UMBC thesis and dissertation (thesis.cls, 2025)
UMBC Graduate School's LaTeX template (2025, revised March 2026): Dorothea Brosius's thesis class on report with abstract, title and copyright pages, preface, dedication, acknowledgements, contents, lists of tables, figures and abbreviations, a long sample chapter on tables, figures and landscape pages, an appendix and a hand-coded bibliography; BibTeX and natbib variants of the main file are included.
- Category
- Thesis
- Document class
thesis(thesis.cls) — ships with TeX Live- Workflow
- Thesis / dissertation — submissions and revision rounds
- Author
- University of Maryland, Baltimore County, Graduate School
- Source
- University of Maryland, Baltimore County, Graduate School
- Licence
- thesis.cls: LaTeX Project Public License. The sample text is University of Maryland, Baltimore County, Graduate School's, provided for authors preparing a submission.
These are the publisher’s own files. This project starts from University of Maryland, Baltimore County, Graduate School’s package for this publication — their manuscript, their thesis.cls, their bibliography style — so what compiles here is what they would have given you.
University of Maryland, Baltimore County, Graduate School serves this exact file to University of Maryland, Baltimore County. Check University of Maryland, Baltimore County, Graduate School’s author pages for the current instructions.
Where this differs from the publisher’s download.
- Note: mainthesis-bibtex-2025.tex and mainthesis-natbib-2025.tex cite sample .bib files unrelated to the sample text, so their bibliography stays empty until you add your own entries.
What you get
Abbreviations-supertabular.tex· 4 KBAbbreviations.tex· 358 BAbstract.tex· 3 KBAcknowledgements.tex· 3 KBAppendixA.tex· 43 KBBibliography.tex· 9 KBChapter1.tex· 34 KBCopyright.tex· 277 BDedication.tex· 170 BDottie.bib· 44 KBForeword.tex· 150 BGalactic.bib· 8 KBPreface.tex· 415 BTitlepage.tex· 870 Batom.pdf· 1058 KBcite.sty· 32 KBfloatrow.sty· 59 KBindentfirst.sty· 1 KBlatexsym.sty· 2 KBlistings.sty· 65 KBlongtable.sty· 12 KBlscape.sty· 1 KBltcaption.sty· 6 KBmainthesis-basic-2025.tex— the file that is compiled · 6 KBmainthesis-bibtex-2025.tex· 6 KBmainthesis-natbib-2025.tex· 6 KBmicrotype.sty· 106 KBmpc-eps-converted-to.pdf· 14 KBmpc.eps· 16 KBmpc.pdf· 1057 KBmultirow.sty· 7 KBno-photo.png· 73 KBsetspace.sty· 22 KBslashbox.sty· 3 KBsupertabular.sty· 14 KBtabls.sty· 10 KBthesis.cls· 23 KBtitlesec.sty· 36 KBtocloft.sty· 34 KBurl.sty· 12 KB
These become your files. Editing them afterwards changes your project and nothing else — a project owns its files from the moment it is made.
Source
Abbreviations-supertabular.tex · 4 KB
%List of Abbreviations
\renewcommand{\baselinestretch}{1}
\small\normalsize
\hbox{\ }
\vspace{-.6in}
\begin{center}
\large{List of Abbreviations}
\end{center}
\vspace{1em}
\begin{supertabular}{ll}
AAA & Antiaircraft artillery \\
ABCCC & Airborne Battlefield Command and Control Center \\
AEHF & Advanced Extremely High Frequency \\
AGM & Air-to-ground guided missile \\
AIT & Assembly, Integration, and Testing \\
AOR & Area of Responsibility \\
APAM & Anti-personnel, anti-material \\
ASOC & Air Support Operations Center \\
ATACM & Army Tactical Missile System \\
ATO & Air Tasking Order \\
AWACS & Airborne Warning and Control System \\
\\
BAT & Brilliant Ani-Armor Submunition \\
BDA & Bomb-damage assessment \\
BFT & Blue Force Tracking \\
BLOS & Beyond Line-of-Sight \\
BMD & Ballistic Missile Defense \\
\\
C$^{3}$ & Command, Control, and Communications \\
CAFMS & Computer-aided Force Management System \\
CALCM & Conventional Air-Launched Cruise Missile \\
CBU & Cluster Bomb Unit \\
CCAFS & Cape Canaveral Air Force Station \\
CENTAF & CENTCOM's Air Force component \\
CENTCOM & U.S. Central Command \\
CINC & Commander-in-Chief \\
CONUS & Continental United States \\
\\
DAGR & Defense Advanced GPS Reciever \\
DMA & Defense Mapping Agency \\
DOD & Department of Defense \\
DOP & Dilution of Precision \\
DOT & Department of Transportation \\
DSMAC & Digital Scene Mapping Area Correlator \\
\\
EFOG-M & Enhanced Fiber Optic Guided Missile \\
\\
FAA & Federal Aviation Administration \\
FLIR & Forward-looking infrared \\
\\
GAM & Global Positioning System Aided Munition \\
GPS & Global Positioning System \\
GWAPS & Gulf War Air Power Survey \\
\\
HARM & High-Speed Antiradiation Missile \\
HEO & Highly Elliptical Orbit \\
\\
IADS & Integrated Air Defense System \\
ICBM & Inter-Continental Ballistic Missile \\
INS & Inertial navigation system \\
IIR & Imaging infrared \\
IR & Infrared \\
ISR & Intelligence, Surveillance, and Reconnaissance \\
\\
JDAM & Joint Direct Attack Munition \\
JFC & Joint Force Commander \\
JSOW & Joint Standoff Weapon \\
\\
LANTIRN & Low-Altitude Navigation and Targeting Infrared for Night System \\
LEO & Low Earth Orbit \\
LGB & Laser-guided bomb \\
\\
MAJIC & Microsatellte Area-Wide Joint Information Communication \\
MARCENT & CENTCOM's Marine component \\
MARS & Mid-Atlantic Regional Spaceport \\
MLRS & Multiple Launch Rocket System \\
MUOS & Mobile User Objective System \\
\\
NASA & National Aeronautics and Space Administration \\
NAVCENT & CENTCOM's Navy component \\
NPOESS & National Polar-Orbiting Operational Environmental Satellite System \\
\\
ORS & Opertionally Responsive Space \\
ORSO & Operationally Responsive Space Office \\
\\
PDOP & Position Dilution of Precision \\
PGM & Precision-guided munition \\
P$^{3}I$ & Preplanned Product Improvement \\
PnP & Plug and Play \\
PnPSat & Plug and Play Satellite \\
PPS & Precise Positioning Service \\
\\
RCS & Radar cross section \\
\\
SA & Situational Awareness \\
SADARM & Sense and Destroy Armor Munition \\
SAM & Surface-to-air missile \\
SAR & Synthetic aperture radar \\
SBIRS & Space Based Infrared System \\
SEAD & Suppression of enemy air defenses \\
SFW & Sensor Fuzed Weapon \\
SIGINT & Signal Intelligence \\
SLAM & Standoff Land Attack Missile \\
SLAM-ER & SLAM-Expanded Response \\
SpaceX & Space Exploration Technologies Corporation \\
SPS & Standard Positioning Service \\
\\
TACC & Tactical Air Control Center \\
TACS & Tactical Air Control System \\
TACP & Tactical Air Control Party \\
TASM & Tomahawk Anti-Ship Missile \\
TBIP & Tomahawk Baseline Improvement Program \\
TERCOM & Terrain Contour Mapping \\
TFR & Terrain-following radar \\
TLAM & Tomahawk Land Attack Missile \\
\\
USAF & U.S. Air Force \\
\\
VAFB & Vandenberg Air Force Base \\
\\
WGS & Wideband Global SATCOM \\
%$\alpha$ & alpha \\
%$\beta$ & beta \\
%& \\
%IREAP & Institute for Research in Electronics and Applied Physics \\
%NSA & National Security Agency
\end{supertabular}
Abbreviations.tex · 358 B
%List of Abbreviations
\renewcommand{\baselinestretch}{1}
\small\normalsize
\hbox{\ }
\vspace*{-.6in}
\begin{center}
\large{List of Abbreviations}
\end{center}
\vspace{1em}
\begin{tabular}{ll}
$\alpha$ & alpha \\
$\beta$ & beta \\
& \\
IREAP & Institute for Research in Electronics and Applied Physics \\
NSA & National Security Agency
\end{tabular}
Abstract.tex · 3 KB
%Abstract Page
\hbox{\ } \vspace{.7in}
\renewcommand{\baselinestretch}{1}
\small \normalsize
\begin{center}
\large{{ABSTRACT}}
\vspace{3em}
\end{center}
\hspace{-.15in}
\begin{tabular}{ll}
Title of Dissertation: & {\large NONLINEAR PULSE PROPAGATION }\\
& {\large THROUGH AN OPTICAL FIBER:} \\
& {\large THEORY AND EXPERIMENT} \\
\ \\
& {\large Bhaskar Khubchandani} \\
& {\large Doctor of Philosophy, 2004} \\
\ \\
Dissertation Directed by: & {\large Professor Rajarshi Roy} \\
& {\large Department of Physics } \\
\end{tabular}
\vspace{3em}
\renewcommand{\baselinestretch}{2}
\large \normalsize
Pulse propagation through optical
fibers is studied for two different phenomena: (i) the evolution
of four-wave-mixing and (ii) the interplay between self- and
cross-phase modulation for ultra-short pulses in a polarization
maintaining fiber.
For the four-wave-mixing case, we present the results of a study
of the dynamical evolution of multiple four-wave-mixing processes
in a single-mode optical fiber with spatially and temporally
$\delta$-correlated phase noise. A nonlinear Schr\"odinger
equation (NLSE) with stochastic phase fluctuations along the
length of the fiber is solved using the Split-Step Fourier method.
Good agreement is obtained with previous experimental and
computational results based on a truncated-ODE model in which
stochasticity was seen to play a key role in determining the
nature of the dynamics. The full NLSE allows for simulations with
high frequency resolution (60\,MHz) and frequency span (16\,THz)
compared to the truncated ODE model (300\,GHz and 2.8\,THz), thus
enabling a more detailed comparison with observations.
Fluctuations in the refractive index of the fiber core are found
to be a possible source for this phase noise. It is found that
index fluctuations as small as 1 part per billion are sufficient
to explain observed features of the evolution of the
four-wave-mixing sidebands. These measurements and numerical
models thus may provide a technique for estimating these
refractive index fluctuations which are otherwise difficult to
measure.
For the case of self- and cross-phase modulation, the evolution of orthogonal polarizations of asymmetric femtosecond pulses (810\,nm) propagating through a birefringent single-mode optical fiber (6.9\,cm) is studied both experimentally (using GRENOUILLE) and numerically (using a set of coupled NLSEs). A linear optical spectrogram representation is derived from the electric field of the pulses and juxtaposed with the optical spectrum and optical time-trace. The simulations are
in good qualitative agreement with the experiments. Input temporal pulse asymmetry is found to be the dominant cause of output spectral asymmetry. The results indicate that it is possible to modulate short pulses both temporally and spectrally by passage through polarization maintaining optical fibers with specified orientation and length.
Acknowledgements.tex · 3 KB
%Acknowledgments
\renewcommand{\baselinestretch}{2}
\small\normalsize
\hbox{\ }
\vspace*{-.85in}
\begin{center}
\large{Acknowledgments}
\end{center}
\vspace{1ex}
I owe my gratitude to all the people who have made this thesis possible and because of whom my graduate experience has been one that I will cherish forever.
First and foremost I'd like to thank my advisor, Professor Rajarshi Roy for giving me an invaluable opportunity to work on challenging and extremely interesting projects over the past four years. He has always made himself available for help and advice and there has never been an occasion when I've knocked on his door and he hasn't given me time. It has been a pleasure to work with and learn from such an extraordinary individual.
I would also like to thank my co-advisor, Dr. Parvez Guzdar. Without his extraordinary theoretical ideas and computational expertise, this thesis would have been a distant dream. Thanks are due to Professor Robert Gammon, Professor Edward Ott and Professor Thomas Antonsen for agreeing to serve on my thesis committee and for sparing their invaluable time reviewing the manuscript.
My colleagues at the nonlinear optics laboratory have enriched my graduate life in many ways and deserve a special mention. David DeShazer helped me start-off by rewriting the basic simulation code in a user-friendly format. Christian Silva provided help by setting up the GRENOUILLE apparatus and performing some of the simulations. My interaction with Rohit Tripathi, Ryan McAllister, Vasily Dronov, Min-Young Kim, Elizabeth Rogers, William Ray, Jordi Garcia Ojalvo, Riccardo Meucci, Atsushi Uchida, and Fabian Rogister has been very fruitful. I'd also like to thank Wing-Shun Lam and Benjamin Zeff for providing the LaTex style files for writing this thesis.
I would also like to acknowledge help and support from some of the staff members. Donald Martin's technical help is highly appreciated, as is the computer hardware support from Edward Condon, LaTex and software help from Dorothea Brosius and purchasing help from Nancy Boone.
I owe my deepest thanks to my family - my mother and father who have always stood by me and guided me through my career, and have pulled me through against impossible odds at times. Words cannot express the gratitude I owe them. I would also like to thank Dr. Mohan Advani, Dr. Vasudeo Paralikar and Dr. Vinod Chaugule who are like family members to me.
My housemates at my place of residence have been a crucial factor in my finishing smoothly. I'd like to express my gratitude to Sivasankar Pandeti, Jayakumar Patil, Amit Trehan and Punyaslok Purakayastha for their friendship and support.
I would like to acknowledge financial support from the Office of Naval Research (ONR), Physics, for all the projects discussed herein.
It is impossible to remember all, and I apologize to those I've inadvertently left out.
Lastly, thank you all and thank God!
AppendixA.tex · 43 KB
43 KB — too long to show here. It arrives with the project.
Bibliography.tex · 9 KB
\vspace*{-1in}
\begin{thebibliography}{99}
\vspace{-.25in}
\setlength{\parskip}{1em}
\bibitem{Agrawal1} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 1.
\bibitem{Bloembergen} N. Bloembergen, {\em Nonlinear Optics} (Benjamin,
Reading, MA, 1977).
\bibitem{Shen} Y.R. Shen, {\em Principles of Nonlinear Optics} (Wiley, New
York, 1984).
\bibitem{Butcher} P.N. Butcher and D.N. Cotter, {\em The Elements of
Nonlinear Optics} (Cambridge University Press, Cambridge, UK, 1990).
\bibitem{Boyd} R.W. Boyd, {\em Nonlinear Optics} (Academic Press, San Diego,
CA, 1992).
\bibitem{Newell} A.C. Newell and J.V. Moloney {\em Nonlinear Optics (Advanced Topics in the Interdisciplinary Mathematical Sciences)} (Westview Press, Boulder, CO, April 1992).
\bibitem{Marcuse} D. Marcuse,{\em Light Transmission Optics} (Van Nostrand
Reinhold, New York, 1982), Chaps. 8 and 12.
\bibitem{Agrawal2} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 2.
\bibitem{Diament} P. Diament, {\em Wave Transmission and Fiber Optics}
(Macmillan, New York, 1990).
\bibitem{Zakharov} V.E. Zakharov and A.Shabat, Sov. Phys. JETP
\textbf{34}, 62 (1972)
\bibitem{Hardin} R.H. Hardin and F.D. Tappert, SIAM
Rev. Chronicle \textbf{15}, 423 (1973).
\bibitem{Fisher} R.A.Fisher and
W.K. Bischel, Appl. Phys. Lett. \textbf{23}, 661 (1973); J. Appl. Phys
\textbf{46}, 4921 (1975).
\bibitem{Cooley} J.W. Cooley and J.W. Tukey,
Math. Comput. \textbf{19}, 297 (1965).
\bibitem{Trebino} R. Trebino, D.J. Kane, "Using phase retrieval to measure
the intensity and phase of ultrashort pulses: frequency resolved optical gating," J. Opt. Soc. Am. B \textbf{10}, 1101 (1993).
\bibitem{Kanejqe} D.J. Kane, R. Trebino, "Characterization of Arbitrary Femtosecond Pulses Using Frequency-Resolved Optical Gating," IEEE J. Quant. Elect. \textbf{29}, 571 (1993).
\bibitem{Kaneoptlett} D.J. Kane, R. Trebino, "Single-shot measurement of the intensity and phase of an arbitrary ultrashort pulse by using frequency-resolved optical gating," Opt. Lett. \textbf{10}, 1101 (1993).
\bibitem{OShealett}P. O'Shea, M. Kimmel, X. Gu, R. Trebino, "Highly simplified device for ultrashort-pulse measurement," Opt. Lett. \textbf{26}, 932 (2001).
\bibitem{Agrawal3} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 3.
\bibitem{Agrawal4} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 4.
\bibitem{Agrawal10} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 10.
\bibitem{Agrawal7} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 7.
\bibitem{Agrawal6} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 6.
\bibitem{Stolen} R.H. Stolen, E.P. Ippen, and A.R. Tynes,
Appl. Phys. Lett. \textbf{20}, 62 (1972).
\bibitem{Ippen} E.P. Ippen and R.H. Stolen, Appl. Phys. Lett. \textbf{21},
539 (1972).
\bibitem{Smith} R.G. Smith, Appl. Opt. \textbf{11}, 2489 (1972).
\bibitem{Agrawal9} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 9.
\bibitem{Agrawal8} G.P. Agrawal, {\em Nonlinear Fiber Optics} (Academic
Press, San Diego, CA, 2001), Chap. 8.
\bibitem{hart1} D.L. Hart, Arthur F. Judy, Rajarshi Roy and James W. Beletic, Phys. Rev. E \textbf{57}, 4757 (1998); D.L. Hart, Arthur F. Judy, T.A.B. Kennedy, Rajarshi Roy and K. Stoev, Phys. Rev. A \textbf{50}, 1807 (1994).
\bibitem{ito} K. Ito, {\em Lectures on Stochastic Processes} (Tata Institute of Fundamental Research, Bombay, 1960).
\bibitem{stratanovich} R.L. Stratanovich, {\em Topics in the Theory of Random Noise}, Vols I. and II. (Gordon \& Breach, New York, 1963).
\bibitem{risken} H. Risken, {\em The Fokker-Planck Equation} (Springer-Verlag, Berlin, 1989).
\bibitem{werner2} M.J. Werner and P.D. Drummond, J. Comput. Phys. \textbf{132}, 312 (1997).
\bibitem{drummond1} P.D. Drummond and I.K. Mortimer, J. Comput. Phys. \textbf{93}, 144 (1991).
\bibitem{carter3} S.J. Carter, Phys. Rev. A. \textbf{51}, 3274 (1995).
\bibitem{thompson1} J.R. Thompson and Rajarshi Roy, Phys. Rev. A \textbf{43}, 4987 (1991).
\bibitem{boxmuller} W.H. Press, S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, {\em Numerical Recipes in Fortran: The Art of Scientific Computing} (Cambridge University Press, Cambridge, 1992).
\bibitem{headley} C. Headley, G.P. Agrawal, IEEE J. Quantum Electron. \textbf{QE-31}, 2058 (1995), C. Headley, G.P. Agrawal J. Opt. Soc. Am. B. \textbf{13}, 2170 (1995).
\bibitem{perlmutter1} S.H. Perlmutter, M.D. Levenson, R.M. Shelby and
M.B. Weisman, Phys. Rev. Lett. \textbf{61} 1388, 1988.
\bibitem{abdullaev} F. Kh. Abdullaev, J.H. Hensen, S. Bischoff and M.P. Sorensen, J. Opt. Soc. Am. B. \textbf{15}, 2424 (1998); F. Kh. Abdullaev, J.G. Caputo, and Nikos Flytzanis, Phys. Rev E. \textbf{50}, 1552 (1994).
\bibitem{glenn} William H. Glenn, IEEE J. Quantum Electron. \textbf{QE-25}, 1218 (1989).
\bibitem{Trebinobook} R. Trebino. {\em Frequency-Resolved Optical Gating: The Measurement of Ultrashort Laser Pulses} (Kluwer Academic 2002).
\bibitem{Agrawal} G.P. Agrawal {\em Nonlinear Fiber Optics} (Academic,
San Diego, 2001).
\bibitem{Dudley} J.M. Dudley, X. Gu, L. Xu, M. Kimmel, E. Zeek, P. O'Shea, R. Trebino, S. Coen, R.S. Windeler, "Cross-correlation frequency resolved optical gating analysis of broadband continuum generation in photonic crystal fiber: simulations and experiments," Opt. Express \textbf{10}, 1215 (2002).
\bibitem{Liu1} Q.D. Liu, J.T. Chen, Q.Z. Wang, P.P. Ho, and R.R. Alfano, "Single pulse degenerate-cross-phase modulation in a single-mode optical fiber," Opt. Lett. \textbf{20}, 542 (1995).
\bibitem{Sylvestre} T. Sylvestre, H. Maillotte, E. Lantz, and D. Gindre "Combined spectral effects of pulse walk-off and degenerate cross-phase modulation in birefringent fibers", Journal of Nonlinear Optical Physics and Materials 6, 313-320 (1997).
\bibitem{Liu2} Q.D. Liu, L. Shi, P.P. Ho, R.R. Alfano, R.J. Essiambre, and G.P. Agrawal, "Degenerate cross-phase modulation of femtosecond laser pulses in a birefringent single-mode fiber," IEEE Photon. Tech. Lett. \textbf{9}, 1107 (1997).
\bibitem{Omenetto1} F.G. Omenetto, B.P. Luce, D. Yarotski and A.J. Taylor, "Observation of chirped soliton dynamics at l= 1.55 mm in a single-mode optical fiber with frequency-resolved optical gating," Opt. Lett. \textbf{24}, 1392 (1999).
% 1.55 micron regime - check for more recent papers by Omenetto use both web-sci and inspec
\bibitem{Omenetto2} F.G. Omenetto, Y. Chung, D. Yarotski, T. Shaefer, I. Gabitov and A.J. Taylor, "Phase analysis of nonlinear femtosecond pulse propagation and self-frequency shift in optical fibers," Opt. Commun. \textbf{208}, 191 (2002).
\bibitem{Omenetto3} F.G. Omenetto, J.W. Nicholson, B.P. Luce, D. Yarotski, A.J. Taylor, "Shaping, propagation and characterization of ultrafast pulses in optical fibers," Appl. Phys. B \textbf{70}[Suppl.], S143 (2000).
\bibitem{Nishizawa1} N. Nishizawa and T. Goto, "Experimental analysis of ultrashort pulse propagation in optical fibers around zero-dispersion region using cross-correlation frequency resolved optical gating," Opt. Express \textbf{8}, 328 (2001).
\bibitem{Nishizawa2} N. Nishizawa and T. Goto, "Trapped pulse generation by femtosecond soliton pulse in birefringent optical fibers," Opt. Express \textbf{10}, 256 (2002).
\bibitem{Nishizawa3} N. Nishizawa and T. Goto, "Characteristics of pulse trapping by use of ultrashort soliton pulses in optical fibers across the zero-dispersion wavelength," Opt. Express \textbf{10}, 1151 (2002).
\bibitem{Nishizawa4} N. Nishizawa and T. Goto, "Ultrafast all optical switching by use of pulse trapping across zero-dispersion wavelength," Opt. Express \textbf{11}, 359 (2003).
% All of Nishizawa and Goto papers are related to 1.3 micron experiments and simulations.
\bibitem{Ogawa}, K. Ogawa, M.D. Pelusi, "Characterization of ultrashort optical pulses in a dispersion-managed fiber link using two-photon absorption frequency-resolved optical gating," Opt. Commun. \textbf{198}, 83-87 (2001).
\bibitem{Altes} R.A. Altes, "Detection, estimation, and classification
with spectrograms," J. Acoust. Soc. Am. \textbf{67}(4), 1232 (1980).
\bibitem{Christian} A. Christian Silva, "GRENOUILLE - Practical Issues," unpublished.
\bibitem{Mejia} J. Garduno-Mejia, A.H. Greenaway, and D.T. Reid, "Designer
femtosecond pulses using adaptive optics," Opt. Express \textbf{11}
2030 (2003).
\bibitem{OSheaexpress1} P. O'Shea, M. Kimmel, X. Gu, R. Trebino, "Increased-bandwidth in ultrashort-pulse measurement using an angle-dithered nonlinear-optical crystal," Opt. Express \textbf{7}, 342 (2000).
\bibitem{OSheaexpress2} P. O'Shea, M. Kimmel, R. Trebino, "Increased phase-matching bandwidth in simple ultrashort-laser-pulse measurements," J. Opt. B \textbf{4}, 44 (2002).
\bibitem{Akturk} S. Akturk, M. Kimmel, P. O'Shea, R. Trebino, "Measuring pulse-front tilt in ultrashort pulses using GRENOUILLE", Opt. Express \textbf{11}, 491 (2003).
\bibitem{Blow} K. J. Blow, D. Wood, "Theoretical Description of Transient Stimulated Raman Scattering in Optical Fibers," IEEE J. Quant. Elect. \textbf{25}, 2665 (1989).
\bibitem{Stolen2} R.H. Stolen, J.P. Gordon, W.J. Tomlinson,
J. Opt. Soc. Am. B \textbf{6}, 1159 (1989).
\bibitem{Mamyshev} P.V. Mamyshev and S.V. Chernikov, Sov. Lightwave
Commun. \textbf{2}, 97 (1992).
\bibitem{Headleythesis} C. Headley III, \em{Ultrafast Stimulated Raman
Scattering in Optical Fibers}, Ph.D. Thesis, University of Rochester,
NY (1995).
\end{thebibliography}
Chapter1.tex · 34 KB
%Chapter 1
\renewcommand{\thechapter}{1}
\vspace*{-1.35in}
\chapter{Introduction}
\vspace*{-.5in}
\section{Source of Nonlinearity in an Optical Fiber}
The response of any dielectric to light becomes nonlinear for
intense electromagnetic fields. Standard optical fibers are made
of fused silica which is a dielectric. The total polarization
$\bf{P}$ is nonlinear in the electric field $\bf{E}$ and is given
by [1-5]
The figure below was originally made using the TIKZ package.
\begin{center}
\begin{tikzpicture}
\draw[gray, thick] (-1,2) -- (2,-4); \draw[gray, thick] (-1,-1) --
(2,2); \filldraw[black] (0,0) circle (2pt)
node[anchor=west]{Intersection point};
\end{tikzpicture}
\end{center}
%\cite{Agrawal1,Bloembergen,Shen,Butcher,Boyd} -
%1.1
\begin{equation}
{\bf P} = \epsilon_{0} \left( \chi^{(1)} : {\bf E} + \chi^{(2)}
: {\bf EE} + \chi^{(3)} : {\bf EEE} + \ldots \right),
\end{equation}
where $\epsilon_0$ is the permittivity of free-space, and
$\chi^{(j)}$ is the ${\it j}$-th order susceptibility of the
dielectric. The linear susceptibility $\chi^{(1)}$ represents the
dominant contribution to $\bf{P}$ and its effects are included
through the refractive index n($\omega$) and the attenuation
coefficient $\alpha(\omega)$. $\chi^{(2)}$ is responsible for
nonlinear effects such as sum-frequency generation and second
harmonic generation \cite{Agrawal1, Shen}. Fused silica
does not manifest these effects as it is centro-symmetric
\cite{Newell}. Hence, the dominant nonlinear contribution to ${\bf
P}$ is due to $\chi^{(3)}$ which results in effects such as third
harmonic generation, four-wave-mixing, self- and cross-phase
modulation. The cubic nonlinearity results in an intensity
dependent refractive index
\begin{verbatim}
122 23333
1114 14444
\end{verbatim}
%1.2
\begin{equation}
\tilde{n}(\omega,|E|^2) = n(\omega)+n_2|E|^2 ,
\end{equation}
where n($\omega$) is the linear part given by the Sellmier
equation which
takes into account the resonance frequencies ($\omega_j$) of fused
silica \cite{Agrawal1,Marcuse},
%1.3
\begin{equation}
n^2(\omega) = 1 + \sum_{j=1}^m {B_j\omega^2_j \over \omega^2_j - \omega^2}
\end{equation}
and n$_2$ is given by
%1.4
\begin{equation}
n_2 = {3 \over 8n}Re(\chi_{xxxx}^3)
\end{equation}
for an optical wave assumed to be linearly polarized along one of the
axes of a polarization maintaining fiber. The tensorial nature of $\chi^{(3)}$ needs to be
considered for the case in which the light is not polarized along one of
the fiber axes.\footnote{This is my footnote. I started playing the piano when I was eight years old. This is my footnote. I started playing the piano when I was eight years old. This is my footnote. I started playing the piano when I was eight years old. This is my footnote. I started playing the piano when I was eight years old.}
The following is an equation array to ensure the long equation does not go outside the margins.
\begin{eqnarray}
W & = & \int d^3{\bf r} \left[ \sum_s \left( \int d^3{\bf v} {T_{0s} \langle h^2_s \rangle {\bf r} \over 2F_{0s}} - {q^2_s\varphi^2 n_{0s} \over T_{0s}} \right) + {|\delta {\bf B}|^2 \over 8 \pi} \right] \nonumber \\
& = & \int d^3{\bf r} \left( \sum_s \int d^3{\bf v} {T_{0s}\delta f^2_s \over 2F_{0s}} + {|\delta {\bf B}|^2 \over 8\pi} \right) .
\end{eqnarray}
The experimentally measured value of $n_{2}$ for fused silica ranges from $2.2 - 3.4 \times
10^{-20}$\,m$^2$/W, which is small compared to most other nonlinear media by
at least 2 orders of magnitude \cite{Agrawal1}. Despite this, nonlinear effects are
easily observed for silica fibers for relatively low input power levels due
to the fact that the effective fiber core areas are small and the fiber losses are low.
Single mode fibers (those which propagate a single transverse mode of light for a given
wavelength) have effective fiber core diameters of the order of 5$\mu$m thus causing
the light intensities within the fiber to be large despite the smallness of the input
power. The low loss in the fiber ($<$10 dB/km) allows one to use long fibers to observe
nonlinear phenomena.
\section{Physics of Pulse Propagation}
Mathematically speaking, in the classical limit, pulse propagation in an
optical fiber is governed by Maxwell's equations \cite{Agrawal2,Diament},
%1.5
\begin{eqnarray}
\vec{\nabla}\times\vec{E} & = &- {\partial \vec{B} \over \partial t} \nonumber\\
\vec{\nabla}\times\vec{H} & = & \vec{J}+ {\partial \vec{D} \over \partial t}
\nonumber\\
\vec{\nabla}\cdot\vec{D} & = & \rho_{f} \nonumber\\
\vec{\nabla}\cdot\vec{B} & = & 0 ,
\end{eqnarray}
where $\vec{E}$ and $\vec{H}$ are electric and magnetic field
vectors, and
$\vec{D}$ and $\vec{B}$ are electric and magnetic flux densities,
respectively. $\vec{J}$ is the current density and $\rho_{f}$ is the free
charge density.
This is the second equation array.
\begin{eqnarray}
W & = & \int d^3{\rm r} \left[ \sum_s \left( \int d^3{\rm v} \right){T_{s} \langle h^2_s \rangle {\rm r} \over 2F_{0s}} \right] + {|\delta \rm B|^2 \over 8\pi} \nonumber \\
& = & \int d^3
\end{eqnarray}
Under the following assumptions \cite{Agrawal2} -
\begin{enumerate}
\item[(a)]
there are no free charges ($\vec{J}=\rho_{f}=0$), a good approximation for an optical fiber,
\item[(b)] the medium is non-magnetic ($\vec{M}=0$), which an optical fiber is,
\item[(c)] the wavelength of light propagated is away from any material
resonances (0.5 - 2 $\mu$m), the results described in this thesis lie in this wavelength range, i.e., the results presented in Chap.\ 2 and Chap.\ 3 lie in the 600-700\,nm regime and the results presented in Chap.\ 4 lie in the 800\,nm regime,
\item[(d)] the electric-dipole approximation is valid, due to which the second-order parametric processes such as three-wave-mixing and second harmonic generation can be neglected (in practice they do occur because of quadrupole and magnetic-dipole effects but with a very low efficiency),
\item[(e)] the medium only responds locally, which is a valid approximation for the projects considered herein,
\item[(f)] the nonlinear polarization $\vec{P}_{NL}$ can be taken as a
perturbation to the total induced polarization $\vec{P}$, which is justified as the nonlinear effects are relatively weak for the results presented in this thesis,
\item[(g)] only 3rd order nonlinear effects need to be taken into
account, which is valid up to 5th order in ${\bf E}$ since the 2nd and 4th order effects are absent due to the centrosymmetric nature of the disordered liquidlike state of fused silica,
\item[(h)] the imaginary part of the dielectric constant
$\epsilon(\omega)$ is small compared to the real part (low loss, which is a good approximation for the wavelength regimes and fiber lengths considered here),
\item[(i)] the wavelength of light is higher than the cutoff wavelength
of the fiber so that the single transverse mode condition is satisfied (or else there would be multimode propagation and nonuniform modal dispersion would have to be taken into account),
\item[(j)] the optical fiber is polarization maintaining and the light
pulse is traveling along one of the 2 principal axes of the fiber, a very good approximation for the results of Chap.\ 2, and Chap.\ 3, in the case of Chap.\ 4, this approximation is relaxed as the incident light travels along both axes of the fiber, thus requiring a set of two coupled NLSEs for simulation, one for each axis,
\item[(k)] the slowly varying envelope approximation is valid, i.e.,
$\Delta\omega/\omega_{0} \ll 1$ where $\Delta \omega$ is the spectral
width of the pulse spectrum which is centered at $\omega_{0}$, this approximation is valid for the studies considered in Chap.\ 2 and Chap.\ 4, in Chap.\ 3, the Raman Stokes wave is considered as a separate slowly varying envelope from the pump wave, as the two taken together would not satisfy this condition,
\item[(l)] the nonlinear response of the medium is instantaneous, an
approximation valid for pulse widths greater than $\sim$70\,fs, which amounts to neglecting the contribution of molecular vibrations to $\chi^{(3)}$ (the Raman effect), which have been included in the study presented in Chap.\ 4 since the pulse width was $\sim$ 140\,fs.
\end{enumerate}
The propagation of the slowly varying envelope A(z,t) of a light
pulse
along an optical fiber is governed by the nonlinear partial
differential equation \cite{Agrawal2} -
%1.6
\begin{equation}
{\partial A \over \partial z} + \beta_{1} {\partial A \over \partial t} + {i \beta_{2} \over 2} {\partial^{2} A \over \partial t^{2}} = i \gamma |A|^{2}A,
\end{equation}
where $v_{g}=1/\beta_{1}$ is the group velocity of the pulse,
$\beta_{2}$
is the group velocity dispersion coefficient, %$\alpha$ is the fiber loss,
and $\gamma$ is the nonlinearity coefficient given by
%1.7
\begin{equation}
\gamma = {n_{2}\omega_{0} \over c A_{eff}} .
\end{equation}
Here $\omega_{0}$ is the central angular frequency of the pulse and
A$_{eff}$, the effective core area of the fiber.
Under transformation to a frame of reference moving at the group
velocity of the pulse, the above equation takes the form of the so-called
`nonlinear Schr\"odinger equation' (NLSE), i.e.,
%1.8
\begin{equation}
{\partial A \over \partial z} + {i\beta_2 \over 2} {\partial^2
A \over \partial \tau^2} = i \gamma |A|^2A ,
\end{equation}
where
%1.9
\begin{equation}
\tau = t - {z \over v_g}
\end{equation}
is time measured in a frame of reference moving at the group
velocity
v$_g$ of the pulse.
\section{Numerical Pulse Propagation}
The NLSE, like most nonlinear partial differential equations, is not
amenable to analytical solution except in certain special cases where the
inverse scattering transform can be used \cite{Zakharov}. Thus a
numerical approach is necessary for understanding the physics of phenomena
governed by the NLSE. The numerical methods available can be classified as
finite-difference techniques and pseudo-spectral techniques. Usually
pseudo-spectral methods are an order of magnitude faster, the most
popular method being the Split-Step Fourier Method (SSFM) \cite{Agrawal2,Hardin,
Fisher}. The speed of the SSFM can be partly attributed to the use
of the finite fast-Fourier transform (FFT) algorithm
\cite{Cooley}.For an algorithmic description of the SSFM the reader is
referred to Chap.\ 2, Sec.\ 2. Therein is also described an
unconditionally stable scheme for including linear multiplicative noise into
the SSFM without disturbing the conservative properties of the NLSE. In the
projects described in Chap.\ 3, simulations were carried out using a
combination of the SSFM and finite difference schemes. The SSFM is also used
to arrive at the simulated results described in Chap.\ 4.
\section{Experimental Pulse Diagnostics}
With the advent of frequency resolved optical gating
(FROG) \cite{Trebino,Kanejqe,Kaneoptlett}, it has become possible to not
only measure the optical spectrum and optical time trace of a light pulse
but to measure the full electric field envelope (intensity and phase) of the
light pulse. The two fields of nonlinear fiber optics and frequency resolved
optical gating (FROG) are yet to undergo cross pollination to their fullest
potential since the inception of FROG 10 years ago. This novel experimental
technique adds new dimensions to pulse measurement techniques, one of which
is the ability to measure how asymmetric a pulse is, i.e., measure its
skewness, kurtosis and all higher order moments. Asymmetric pulse
propagation is a subject of interest in Chap.\ 4, where a highly simplified
version of FROG \cite{OShealett} is used to measure pulse characteristics
before and after a fiber.
\section{Group Velocity Dispersion}
Group velocity dispersion \cite{Agrawal3} (GVD) involves the temporal broadening of a pulse as it propagates through an optical fiber. From the NLSE (Eq.\ 1.6) one can derive length scales relevant to linear dispersion (L$_{D}$=T$_{0}^{2}$/$\beta_{2}$) and nonlinearity (L$_{NL}$=1/$\gamma$P$_{0}$). Here T$_{0}$ is the pulse width and P$_{0}$ is the peak power of the pulse. The regime in which the effects of GVD dominate and the effects of nonlinearity are negligible is given by -
%1.10
\begin{equation}
{L_{D} \over L_{NL}}={\gamma P_{0} T_{0}^{2} \over |\beta_{2}|} \ll 1 .
\end{equation}
In this regime, optical pulses propagate as they undergo symmetric temporal broadening and linear chirping without any spectral broadening. The sign of the GVD parameter $\beta_{2}$ determines the sign of the induced chirp. If the input pulse is chirped, then it may undergo some initial pulse compression followed by temporal broadening. Unlike the second-order dispersion associated with GVD, third-order dispersion causes asymmetric temporal broadening with leading and trailing edges. It becomes important, when the operating wavelength is near the zero dispersion wavelength of the fiber (the wavelength at which $\beta_{2}$=0). GVD starts to limit optical fiber communication systems when consecutive pulses broaden so much that they start to overlap.
\section{Self-Phase Modulation}
Self-phase modulation \cite{Agrawal4} (SPM) is a phenomenon that leads to spectral broadening and modulation of optical pulses. In the absence of GVD, SPM induced spectral broadening occurs without change in the temporal pulse shape. The spectral broadening occurs as a consequence of an intensity dependent phase-shift. The project described in Chap.\ 2 has the property that L$_{NL}$ $<$ L $\ll$ L$_D$, i.e., the nonlinear term representing SPM dominates. In the regime where both SPM and GVD are non-negligible (as in Chap.\ 4), phenomena qualitatively different from those described in this section and the previous section can occur. Both temporal and spectral broadening can occur simultaneously. In the regime of femtosecond pulse propagation (as in Chap.\ 4), GVD, third-order dispersion, intrapulse Raman scattering (discussed in Chap.\ 2) and higher order nonlinear effects have to be taken into account. If the input pulse is asymmetric, then SPM effects dominate over all other effects, as is observed in Chap.\ 3. In some cases SPM can lead to pulse compression, and in the anomalous dispersion regime ($\beta_2 < 0$), the balance between GVD and SPM can lead to soliton formation.
\section{Four-wave-mixing}
Four-wave-mixing (FWM) \cite{Agrawal10} is a parametric process involving
the interaction
between four photons at different frequencies. Two different kinds of
four-wave-mixing processes are possible -
%1.11
\begin{eqnarray}
\omega_4 = \omega_1 + \omega_2 + \omega_3 \\
\omega_3 + \omega_4 = \omega_1 + \omega_2 .
\end{eqnarray}
The former process results in third harmonic generation for the special case
when $\omega_1 = \omega_2 = \omega_3$. Both processes require phase
matching to occur, in order to be efficient. For the latter case, with
the partial degeneracy of $\omega_1 = \omega_2$, it is relatively easy
to satisfy the phase matching condition of
%1.12
\begin{equation}
\Delta k = k_3 + k_4 - k_1 - k_2 = 0 .
\end{equation}
This process is of great interest to nonlinear dynamicists as the
evolution of the FWM process could constitute a route to chaos further
down-stream in the fiber. It is also of great interest to people working in
the field of optical communication systems, as it can cause cross-talk
between neighboring channels in a wavelength division multiplexing scheme
of communication.
\section{Cross-Phase Modulation}
Cross-phase modulation (XPM) \cite{Agrawal7} occurs in optical fibers when
two or more optical pulses having different central wavelengths propagate
simultaneously inside a fiber, interacting through the fiber
nonlinearity which couples the two pulses nonlinearly. The evolution of the
two pulses depends on the group velocity mismatch between them by virtue of
their being centered at different wavelengths, although this is a linear
phenomenon. The group velocity mismatch also exists between light pulses
traveling along orthogonal polarization axes of a fiber, and centered around
identical wavelengths, since the slow axis and fast axis of the fiber have
different group velocities. In this case, too, the two polarizations interact
nonlinearly \cite{Agrawal6} through degenerate XPM (degenerate since the
central wavelengths are the same). In the case of degenerate XPM the 2nd order
and higher dispersion parameters, and the nonlinear parameters (all of which
depend only on the wavelength), are also the same unlike in general XPM. The
effects of XPM are more pronounced when one of the pulses (the pump) has much
higher power than the other (the probe). Otherwise, the effects of self-phase
modulation (SPM) tend to dominate.
\section{Stimulated Inelastic Scattering}
Other nonlinear effects (apart from those due to the cubic $\chi^{(3)}$
nonlinearity) arise due to the interaction between the light
traveling in the fiber and the fiber medium. Interactions between
the light field and the vibrational levels of the fiber medium lead to
stimulated Brillouin scattering (SBS) and stimulated Raman
scattering (SRS). SRS and SBS were among the first nonlinear effects
studied in optical fibers \cite{Stolen,Ippen,Smith}. In a simple quantum
mechanical picture \cite{Agrawal1} applicable to
both SRS and SBS, a photon of the incident field (called the pump) is
annihilated to create a photon at a lower frequency (belonging to the
Stoke's wave) and a phonon to conserve energy and momentum. SBS involves
an acoustic phonon whereas SRS involves an optical phonon, thus they have
qualitatively different dispersion relations. SBS has a much
lower threshold power and manifest itself through a backward propagating
wave in contrast to SRS which can involve both forward and backward
traveling waves. SBS has a maximum gain at a frequency 10\,GHz \cite{Agrawal9}
(down-shifted with respect to the pump) and
requires a very narrow bandwidth pump to manifest itself. SRS, in
contrast, has a maximum gain at a frequency 13\,THz \cite{Agrawal8} downshifted with
respect to the pump. For pulse-bandwidths larger than 13\,THz, the
phenomenon of Intrapulse Raman Scattering (IRS) manifests itself,
involving a self-frequency shift within the pulse from higher frequency
components to lower frequency components. Thus, SRS
becomes more important for shorter pulses (larger bandwidth) unlike SBS
which nearly ceases to occur for pulses shorter than 10\,ns. In both SRS
and SBS, the optical fiber plays an active role in the nonlinear process,
unlike the case of cross- and self-phase modulation, four-wave-mixing and
third harmonic generation, where the fiber plays a passive role by
mediating the interaction between several optical waves.
\section{Outline of Thesis}
In Chap.\ 2, we present the results of a computational study of the
influence of stochasticity on the dynamical evolution of multiple
four-wave-mixing processes in a single mode optical fiber with spatially
and temporally $\delta$-correlated phase noise. A generalized nonlinear
Schr\"odinger equation (NLSE) with stochastic phase fluctuations along the
length of the fiber is solved using the Split-step Fourier method
(SSFM). Good agreement is obtained with previous experimental and
computational results based on a truncated-ODE (Ordinary Differential
Equation) model in which stochasticity was seen to play a key role in
determining the nature of the dynamics. The full NLSE allows for
simulations with high frequency resolution (60\,MHz) and frequency span (16
THz) compared to the truncated ODE model (300\,GHz and 2.8\,THz,
respectively), thus enabling a more detailed comparison with
observations. A physical basis for this hitherto phenomenological phase
noise is discussed and quantified.
In Chap.\ 3, we discuss the implications of spontaneous and stimulated
Raman scattering on the project discussed in Chap.\ 2, namely, the dynamical evolution of
stochastic four-wave-mixing processes in an optical fiber.
The following question is asked - can stimulated Raman scattering be a mechanism by which
adequate multiplicative stochastic phase fluctuations are introduced in the
electric field of light undergoing four-wave-mixing as? Adequately checked numerical
algorithms of stimulated Raman scattering (SRS), spontaneous Raman generation and intrapulse
Raman scattering (IRS) are used while exploring this issue. The algorithms are described in detail, as also are
the results of the simulations. It is found that a 50-meter length of fiber (as used in the experiments),
is too short to see the influence of Raman scattering, which is found to eventually
dominate for longer fiber lengths.
In Chap.\ 4, self- and cross-phase modulation (XPM) of femtosecond pulses ($\sim$ 810
nm) propagating through a birefringent single-mode optical fiber ($\sim$ 6.9
cm) is studied both experimentally (using GRENOUILLE - Grating Eliminated
No Nonsense Observation of Ultrafast Laser Light Electric Fields)
%(using second harmonic
%generation-frequency resolved optical gating or SHG-FROG)
and numerically
(by solving a set of coupled nonlinear Schr\"odinger equations or
CNLSEs). An optical spectrogram representation is derived from the
electric field of the pulses and is linearly juxtaposed with the
corresponding optical spectrum and optical time-trace. The effects of
intrapulse Raman scattering (IRS) are discussed and the question whether
it can be a cause of asymmetric tranfer of pulse energies towards longer
wavelengths is explored. The simulations are shown to be in good qualitative
agreement with the experiments. Measured input pulse asymmetry, when incorporated
into the simulations, is found to be the dominant cause of output spectral
asymmetry. \renewcommand{\baselinestretch}{1} \small\footnotesize
\footnote{These averages are reported
for $45$ `detailed occupational codes', which is an intermediate
occupational classification (between two and three-digit codes)
given by the Current Population Survey (CPS).}
\renewcommand{\baselinestretch}{2} \small\normalsize
The results indicate that it is possible to modulate short pulses both temporally and spectrally by passage through polarization maintaining
optical fibers with specified orientation and length. The modulation technique is very direct and straightforward. No frequency components of the broadband pulse have to be rejected as the entire spectrum is uniformly modulated. The technique is flexible as the modulation spacing can be varied by varying the fiber length.
Chapter 5 provides the conclusion to the thesis.
\section{Theorems}
\newtheorem{theorem}{Theorem}[chapter]
\begin{theorem}
This is my first theorem.
\end{theorem}
\section{Axioms}
\newtheorem{axiom}{Axiom}[chapter]
\begin{axiom}
This is my first axiom.
\end{axiom}
\begin{axiom}
This is my second axiom in chapter 1.
\end{axiom}
\section{Tables}
This is my table.
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{table}[h]
\caption[Short title]{Overview of test cases used in this study.}
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
Test & Quality & Setpoint & Manipulated \\
case & variable (QV) & for QV & variables (MVs)\\
\hline \hline
TE & G/H ratio & 1.226 & D-feed SP and Reactor Level SP\\
AZ & xB($H_2O$) & & Reflux flow and $5^{th}$ Tray temperature SP\\
\hline
\end{tabular}
\end{center}
\label{test_over1}
\end{table}
\renewcommand{\baselinestretch}{2}
\small\normalsize
My table is shown above. Normally it is double-spaced but I have inserted a command (marked in blue) to make it single-spaced and then inserted a command (again in blue) to change the text back to double-spacing.
\
\subsection{Adding Extra Space between Text and Horizontal Lines}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\setlength{\tablinesep}{5ex}
\begin{table}[h]
\caption{Table with Extra Space between the Text and Horizontal Lines.}
\begin{center}
\begin{tabular}{|p{.5in}|p{1in}|c|p{2.25in}|}
\hline
Test case& Quality variable QV)& Setpoint for QV & Manipulated variables (MVs)\\
\hline \hline
TE & G/H ratio & 1.226 & D-feed SP and Reactor Level SP\\ \hline
AZ & xB($H_2O$) & & Reflux flow and $5^{th}$ Tray temperature SP \\
\hline
\end{tabular}
\end{center}
\label{test_over2}
\end{table}
\renewcommand{\baselinestretch}{2}
\small\normalsize
The line \begin{verbatim}\usepackage{tabls}\end{verbatim} must be inserted in the preamble of your document.
The table is set up to be single-spaced by \begin{verbatim} \renewcommand{\baselinestretch}{1} \small\normalsize\end{verbatim} before \begin{verbatim}\begin{table}\end{verbatim}. I set the first, second, and fourth columns as paragraphs, .5in, 1in, and 2.25in wide, respectively. I then adjusted the separation between the words and the horizontal lines to 5ex by also adding \begin{verbatim}\setlength{\tablinesep}{5ex}\end{verbatim} before the \begin{verbatim}\begin{table}\end{verbatim} command.
After typing the table I change the document to be double-spaced from this point on.
\newpage
\section{Figures}
The figure on the following page is centered and the figure
caption is indented and single-spaced. Make sure you copy the
last two lines \begin{verbatim}
\renewcommand{\baselinestretch}{2}\\
\small\normalsize\end{verbatim} to return to double-spacing of your text.
\begin{figure}
\begin{center}
\includegraphics[width=5in]{mpc.eps}
%\end{center}
\renewcommand{\baselinestretch}{1}
\small\normalsize \vspace{1em}
\parbox{6.5in}{
\caption[Figure with caption indented]{This figure caption is
indented and single-spaced. Comparison between the experimental
measurements \cite{hart1} (black), the random initial condition
NLSE model excluding phase noise (dashed curves) and the
stochastic phase noise NLSE model (solid curves) showing the
first- and second-order sideband evolution as a function of fiber
length for P$_{0} = 5.5$\,W, $\Omega = 366$\,GHz, $\Delta\nu =
0.5$\,GHz, $\gamma = 0.019$\,W$^{-1}$m$^{-1}$, and $\beta^{(2)} =
55$\,ps$^2$/km: dynamical evolution of the: (a) power in the
first-order blue-shifted sideband, (b) power in the first-order
red-shifted sideband, (c) fluctuations in the first-order
blue-shifted sideband, (d) fluctuations in the first-order
red-shifted sideband, (e) power in the second-order blue-shifted
sideband, (f) power in the second-order red-shifted sideband.
\label{fig:fig27}} }
\end{center}
\end{figure}
\renewcommand{\baselinestretch}{2}
\small\normalsize
The first figure is Fig.\ref{fig:fig27}. Please note that the figure label should be placed inside the figure caption.
\newpage
The next figure is placed landscape. It is Fig.~\ref{fig:mpc}.
\begin{landscape}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{quote}
\begin{figure}
\begin{center}
\includegraphics[width=8.2in]{mpc.eps}
\end{center}
\caption{Schematic illustrating receding horizon control.
\label{fig:mpc} }
\end{figure}
\end{quote}
\renewcommand{\baselinestretch}{2}
\small\normalsize
\end{landscape}
This is a my second figure which was placed landscape. Although I have used the same figure, I have renamed the label to fig:mpc-1. The second figure now becomes Figure~\ref{fig:mpc-1}.
\begin{landscape}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{quote}
\begin{figure}
\begin{center}
\includegraphics[width=8.2in]{mpc.eps}
\end{center}
\caption[Figure placed landscape on page]{Schematic illustrating receding horizon control. \label{fig:mpc-1}}
\end{figure}
\end{quote}
\renewcommand{\baselinestretch}{2}
\small\normalsize
\end{landscape}
The following is an example of three subfigures with their figure
captions and one single caption defining the three subfigures.
\begin{figure}[h]
\centering
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\textwidth]{atom.pdf}
\caption{First subfigure.}
\label{fig:first}
\end{subfigure}
\hfill
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\textwidth]{atom.pdf}
\caption{Second subfigure.}
\label{fig:second}
\end{subfigure}
\hfill
\begin{subfigure}{0.3\textwidth}
\includegraphics[width=\textwidth]{atom.pdf}
\caption{Third subfigure.}
\label{fig:third}
\end{subfigure}
\caption{Creating subfigures in \LaTeX.} \label{fig:figures}
\end{figure}
\subsection{Numbering Figures}
If you wish your figures to be numbered 1-100 without any reference to the chapter (e.g., Figure 1.1, 2.1, etc.), change the first line of your mainthesis.tex file to read \begin{verbatim}"\documentclass[12pt]{thesis-2}".\end{verbatim}
\subsubsection{This is a Subsubsection}
This is my first subsubsection in Chapter 1.
\section[Short Titles]{Short Titles in the Table of Contents, List of Figures, or List of Tables}
The Table of Contents, List of Figures, or List of Tables usually show the entire title of a section, subsection, etc. or table, or the entire caption of a figure. If you put a short title in square brackets after \begin{verbatim} \section, \table, or \figure, \end{verbatim} the short title will show in your Table of Contents or lists.
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{verbatim}
\section[Short Title]{Title of Section}
\subsection[Short Title]{Title of Subsection}
\end{verbatim}
or when using a caption in a figure or table
\begin{verbatim}
\caption[Short Caption]{Full text of the caption.}
\end{verbatim}
\renewcommand{\baselinestretch}{2}
\small\normalsize
\section{Figures on Text Page}
Normally figures in the thesis are placed on a page by themselves. The following figure is placed on the page with text before and after the figure by adding [!!h] after \begin{verbatim} \begin{figure}[!!h] \end{verbatim}. Please note that the figure label is placed within the caption.
\renewcommand{\baselinestretch}{1}
\large\normalsize
\begin{verbatim}
\begin{figure}[!!h]
\begin{center}
\includegraphics[width=5in]{mpc.eps}
\end{center}
\caption[Short title]{Schematic illustrating receding horizon control.
\label{fig:mpc-2}}
\end{figure}
\end{verbatim}
\begin{figure}[!!h]
\begin{center}
\includegraphics[width=5in]{mpc.eps}
\end{center}
\caption{Schematic illustrating receding horizon control. \label{fig:mpc-2}}
\end{figure}
\renewcommand{\baselinestretch}{2}
\large\normalsize
This does not necessarily mean that the text before and after the figure will be exactly what you want. Remember Latex will place the figure where it will fit on the page the best. The previous figure is Figs.~\ref{fig:mpc-2}.
\section{Wrapping Text around Figure}
\renewcommand{\baselinestretch}{1}
\begin{wrapfigure}{r}{0.4\textwidth}
\includegraphics[width=0.4\textwidth]{mpc.eps}
\caption{Text wrap around figure. Text wrap around figure. Text
wrap around figure. Text wrap around figure. Text wrap around
figure. Text wrap around figure. Text wrap around figure.
\label{fig:test}}
\end{wrapfigure}
\renewcommand{\baselinestretch}{2}
\large\normalsize
By way of summary, at the end of the activity, I reminded the class of what we'd done: by considering relatively nearby galaxies whose distance we had measured by some other means, we were able to establish a relationship locally between redshift and distance.
By way of summary, at the end of the activity, I reminded the class of what we'd done: by considering relatively nearby galaxies whose distance we had measured by some other means, we were able to establish a relationship locally between redshift and distance.
By way of summary, at the end of the activity, I reminded the class of what we'd done: by considering relatively nearby galaxies whose distance we had measured by some other means, we were able to establish a relationship locally between redshift and distance.
By way of summary, at the end of the activity, I reminded the class of what we'd done: by considering relatively nearby galaxies whose distance we had measured by some other means, we were able to establish a relationship locally between redshift and distance. See Fig.~\ref{fig:test}.
\section{LaTeX -- A Typesetting Program}
A 13-page explanation of some of the features of LaTeX can be downloaded from http://www.jgsee.kmutt.ac.th/exell/General/LaTeX.html.
\section{Using Bibtex}
Using Bibtex with Latex documents is not difficult. The bulk of the work is organizing your bibtex file, which is a data base compiled by you of the articles, books, etc. which you use in the bibliographies or reference sections of your publications.
I have linked several files to this webpage, which will be helpful
when you are using Bibtex. These files can be downloaded from
\newline http://www.ireap.umd.edu/ireap/theses/bibtex. Please
read the file "BibtexInstructions.pdf". The first two pages
explain how to set up and run Bibtex; the remaining pages were
taken from a published article and show how the references were
cited in the .tex file. The files \\ BibtexInstructions.tex,
Galactic.bib, Dottie.bib are the original .tex files used for \\
BibtexInstructions.pdf. The file BibtexSamples.tex contains
examples of the information needed for the various publications
you wish to reference (e.g., articles in refereed journals, books,
unpublished articles, conference proceedings, etc.).
If you have questions concerning Bibtex, please contact me at 301-405-4955 or dbrosius at umd.edu.
\section{Using Natbib}
Another option of citing references in the bibliography is using
Natbib instead of Bibtex. You must still create a bibtex file, as
noted above. The command "backslash cite" cannot be used with
natbib; instead "backslash citet" and "backslash citep" must be
used. "backslash citet" is used to show references in the text
(e.g., Eq.\ 8 in Reiser,1996 shows ...); "backslash citep" is used
in the parenthetical (e.g., Eq.\ 8 (Reiser, 1996) shows ...).
\begin{verbatim}
Add in preamble -- \usepackage[option]{natbib} -- A list of
options to be used with Natbib can be found at
"http://merkel.zoneo.net/Latex/natbib.php".
Add at bottom of mainthesis.tex file --
\bibliography{name of your bibtex file}
\bibliographystyle{plainnat, abbrnat, or unsrtnat} (I usually use
unsrtnat)
\end{verbatim}
Typesetting: pdflatex, Bib, pdflatex, pdflatex
I use MikTex with WinEdt.
The reference sheet for natbib usage can be found at \newline "http://merkel.zoneo.net/Latex/natbib.php".
\section{APS Physical Review Style and Notation Guide}
The following style guide may be downloaded from The American Physical Society at http://forms.aps.org/author/styleguide.pdf: Physical Review Style and Notation Guide, published by The American Physical Society, compiled and edited by Anne Waldron, Peggy Judd, and Valerie Miller, February 1993. It may be old, but it is very useful.
Copyright.tex · 277 B
%Copyright
\thispagestyle{empty}
\hbox{\ }
\vfill
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{center}
\large{\copyright \hbox{ }Copyright by\\
Bhaskar Khubchandani %Type your name as it appears in University records
\\
2004}
\end{center}
\vfill
\newpage
Dedication.tex · 170 B
%Dedication
\vspace{.65in}
\renewcommand{\baselinestretch}{2}
\small\normalsize
\hbox{\ }
\vspace*{-.85in}
\begin{center}
\large{Dedication}
\end{center}
If needed.
Dottie.bib · 44 KB
44 KB — too long to show here. It arrives with the project.
Foreword.tex · 150 B
%Foreword
\renewcommand{\baselinestretch}{2}
\small\normalsize
\hbox{\ }
\vspace*{-.85in}
\begin{center}
\large{Foreword}
\end{center}
If needed.
Galactic.bib · 8 KB
%Galactic.bib
@ARTICLE{lang1999,
AUTHOR = "Cornelia C. Lang and K. R. Anantharamaiah and N. E. Kassim and T. J. W. Lazio",
TITLE = "Discovery of a Nonthermal Galactic Center Filament (G358.85+0.47) Parallel to the Galactic Plane",
JOURNAL = "Astrophys. J.",
YEAR = "1999",
volume = "521",
number = "",
pages = "L41-L44",
month = "August",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{hindmarsh1995,
AUTHOR = "M. B. Hindmarsh and T. W. B. Kibble",
TITLE = "Cosmic Strings",
JOURNAL = "Rep. Prog. Phys.",
YEAR = "1995",
volume = "58",
number = "5",
pages = "477-562",
month = "May",
note = "",
abstract = "",
keywords = "",
source = "doi:10.1088/0034-4885/58/5/001",
file = F
}
@ARTICLE{genzel2007,
AUTHOR = "M. J. Reid and K. M. Menten and S. Trippe and T. Ott and R. Genzel",
TITLE = "The Position of Sagittarius {A}*. {III}. Motion of the Stellar Cusp",
JOURNAL = "Astrophys. J.",
YEAR = "2007",
volume = "659",
number = "",
pages = "378-379",
month = "April",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{morris2004,
AUTHOR = "A. M. Ghez and S. Salim and S. D. Hornstein and A. Tanner and J. R. Lu and M. Morris and E. E. Becklin and G. Duch$\hat{\mbox{e}}$ne",
TITLE = "Stellar Orbits around the Galactic Center Black Hole",
JOURNAL = "Astrophys. J.",
YEAR = "2005",
volume = "620",
number = "",
pages = "744-757",
month = "February",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{genzel2002,
AUTHOR = "R. Sch$\ddot{\mbox{o}}$del and T. Ott and R. Genzel and R. Hofmann and et al.",
TITLE = "A Star in a 15.2-Year Orbit around the Supermassive Black Hole at the Centre of the {M}ilky {W}ay",
JOURNAL = "Nature",
YEAR = "2002",
volume = "419",
number = "",
pages = "694-696",
month = "October",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{matzner1990,
AUTHOR = "Pablo Laguna and Richard A. Matzner",
TITLE = "Numerical Simulation of Bosonic-Superconducting-String Interactions",
JOURNAL = "Phys. Rev. D",
YEAR = "1990",
volume = "41",
number = "6",
pages = "1751-1763",
month = "March",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{davis2005,
AUTHOR = "Anne-Christine Davis and Konstantinos Dimopoulos",
TITLE = "Cosmic Superstrings and Primordial Magnetogenesis",
JOURNAL = "Phys. Rev. D",
YEAR = "2005",
volume = "72",
number = "",
pages = "043517",
month = "",
note = "",
abstract = "",
keywords = "",
source = "DOI: 10.1103/PhysRevD.72.043517",
file = F
}
@ARTICLE{silveira1991,
AUTHOR = "Vanda Silveira",
TITLE = "Superconducting Strings and Stable Loops",
JOURNAL = "Phys. Rev. D",
YEAR = "1991",
volume = "43",
number = "12",
pages = "3966-3971",
month = "June",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{bellan2004,
AUTHOR = "J. F. Hansen and S. K. P. Tripathi and P. M. Bellan",
TITLE = "Co- and Counter-Helicity Interaction between Two Adjacent Laboratory Prominences",
JOURNAL = "Phys. Plasmas",
YEAR = "2004",
volume = "11",
number = "6",
pages = 3177-3185",
month = "June",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{chud1986,
AUTHOR = "E. M. Chudnovsky and G. B. Field and D. N. Spergel and A. Vilenkin",
TITLE = "Superconducting Cosmic Strings",
JOURNAL = "Phys. Rev. D",
YEAR = "1986",
volume = "34",
number = "4",
pages = "944-950",
month = "August",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{copeland1987,
AUTHOR = "E. Copeland and M. Hindmarsh and N. Turok",
TITLE = "Dynamics of Superconducting Cosmic Strings",
JOURNAL = "Phys. Rev. Lett.",
YEAR = "1987",
volume = "58",
number = "18",
pages = "1910-1913",
month = "May",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{lang2004,
AUTHOR = "K. S. Dwarakanath and W. M. Goss and J. H. Zhao and C. C. Lang",
TITLE = "On the Origin of the Wide {H}I Absorption Line Towards {S}gr {A}*",
JOURNAL = "J. Astrophys. Astr.",
YEAR = "2004",
volume = "25",
number = "",
pages = "129-141",
month = "",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{butler1991,
AUTHOR = "Malcolm N. Butler and Robert A. Malaney and Milan B. Miji$\acute{\mbox{c}}$",
TITLE = "Evolution of a Superconducting-Cosmic-String Network",
JOURNAL = "Phys. Rev. D",
YEAR = "1991",
volume = "43",
number = "",
pages = "2535-1541",
month = "April",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{Lang2002,
AUTHOR = "F. Yusef-Zadeh and C. Law and M. Wardle and Q. D. Wang and A. Fruscione and C. C. Lang and A. Cotera",
TITLE = "Detection of X-ray Emission from the Arches Cluster near the Galactic Center",
JOURNAL = "Astrophys. J.",
YEAR = "2002",
volume = "570",
number = "",
pages = "665-670",
month = "May",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{sofue2001,
AUTHOR = "Yoshiaki Sofue and Vera Rubin",
TITLE = "Rotation Curves of Spiral Galaxies",
JOURNAL = "Annu. Rev. Astron. Astrophys.",
YEAR = "2001",
volume = "39",
number = "",
pages = "137-174",
month = "",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@BOOK{landaumech,
AUTHOR = "L. D. Landau and E. M. Lifshitz",
editor = "",
TITLE = "Course of Theoretical Physics",
PUBLISHER = "Pergamon Press",
YEAR = "1991",
volume = "1",
number = "",
series = "",
address = "England",
edition = "3",
month = "",
note = "Translated from Russian by J. B. Sykes and J. S. Bell",
abstract = "",
isbn = "",
price = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{lang2003,
AUTHOR = "Cornelia C. Lang and Claudia Cyganowski and W. M. Goss and Jun-Nui Zhao",
TITLE = "High-Resolution {H}1 Absorption Observations towards the Central 200 pc of the Galaxy",
JOURNAL = "Astron. Nachr./AN",
YEAR = "2003",
volume = "324",
number = "S1",
pages = "1-7",
month = "",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{ott2003,
AUTHOR = "N. Mouawad and A. Eckart and S. Pfalzner and J. Moultaka and C. Straubmeier and R. Spurzem and R. Sch$\ddot{\mbox{o}}$del and T. Ott",
TITLE = "Stellar Orbits at the Center of the {M}ilky {W}ay",
JOURNAL = "Astron. Nachr./AN",
YEAR = "2003",
volume = "324",
number = "S1",
pages = "315-319",
month = "",
note = "",
abstract = "",
keywords = "",
source = "",
file = F
}
@ARTICLE{polchinski2004,
AUTHOR = "Joseph Polchinski",
TITLE = "Cosmic Superstrings Revisited",
JOURNAL = "",
YEAR = "2004",
volume = "",
number = "",
pages = "",
month = "",
note = "Presented at the Mitchell Conference on Superstring Cosmology, GR17, Cosmo04; presented at the 2004 APS-DPF Meeting",
abstract = "",
keywords = "",
source = "",
file = F
}
Preface.tex · 415 B
%Preface
\pagestyle{plain}\pagenumbering{roman} \setcounter{page}{2}
\renewcommand{\baselinestretch}{2}
\small\normalsize
\hbox{\ }
\vspace*{-.85in}
\begin{center}
\large{Preface or Foreword}
\end{center}
A Foreword includes a statement about the work by someone other
than the principal author.
A Preface contains the author's own statement about a work,
sometimes including acknowledgements and permissions.
Titlepage.tex · 870 B
%Titlepage
\thispagestyle{empty} \hbox{\ }
\vspace{.5in}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\begin{center}
\large{{NONLINEAR PULSE PROPAGATION THROUGH \\
AN OPTICAL FIBER: THEORY AND EXPERIMENT}}\\
\ \\
\ \\
\large{by} \\
\ \\
\large{Bhaskar Khubchandani}%Your full name as it appears in University records.
\ \\
\ \\
\ \\
\ \\
\normalsize
Dissertation submitted to the Faculty of the Graduate School of the \\
University of Maryland, Baltimore County in partial fulfillment \\
of the requirements for the degree of \\
Doctor of Philosophy \\
2004
\end{center}
\vspace{7.5em}
\noindent Advisory Committee: \\
\hspace*{.5in}Professor Rajarshi Roy, Chair/Advisor \\
\hspace*{.5in}Dr.\ Parvez N. Guzdar, Co-Advisor \\
\hspace*{.5in}Professor Thomas M.\ Antonsen, Jr. \\
\hspace*{.5in}Professor Robert W.\ Gammon \\
\hspace*{.5in}Professor Edward Ott
atom.pdf — binary, 1058 KB
cite.sty · 32 KB
% C I T E . S T Y
%
% version 5.3 (Sep 2010)
%
% Compressed, sorted lists of on-line or superscript numerical citations.
% see also drftcite.sty (And the stub overcite.sty)
%
% Copyright (C) 1989-2010 by Donald Arseneau
% These macros may be freely used, transmitted, reproduced, or modified
% provided that this notice is left intact.
%
% Instructions follow \endinput.
% ------------------------------------
% First, ensure that some catcodes have the expected values
\edef\citenum{% to restore funny codes
\catcode\string`\string ` \the\catcode\string`\`
\catcode\string`\string ' \the\catcode\string`\'
\catcode\string`\string = \the\catcode\string`\=
\catcode\string`\string _ \the\catcode\string`\_
\catcode\string`\string : \the\catcode\string`\:}
\catcode\string`\` 12
\catcode`\' 12
\catcode`\= 12
\catcode`\_ 8
\catcode`\: 12
% Prepare for optional variations:
% [ verbose, nospace, space, ref, nosort, noadjust, superscript, nomove ],
% \citeform,\citeleft,\citeright,\citemid,\citepunct,\citedash
%
% Set defaults first:
% [ on the left. Option [ref] does: [Ref. 12, note]
\providecommand\citeleft{[}
% ] on the right:
\providecommand\citeright{]}
% , (comma space) before note
\providecommand\citemid{,\penalty\citemidpenalty\ }
% , (comma thin-space) between entries; [nospace] eliminates the space
\providecommand\citepunct{,\penalty\citepunctpenalty%
\hskip.13emplus.1emminus.1em\relax}%
% -- (endash) designating range of numbers:
% (using \hbox avoids easy \exhyphenpenalty breaks)
\providecommand{\citedash}{\hbox{--}\penalty\citepunctpenalty}
% Default line-breaking penalties. Use \mathchardef instead of count registers
\mathchardef\citeprepenalty=\@highpenalty
\mathchardef\citemidpenalty=\@medpenalty
\mathchardef\citepunctpenalty=\@m
% Each number left as-is:
\providecommand\citeform{}
% punctuation characters to move for overcite
\providecommand{\CiteMoveChars}{.,:;}
% font selection for superscript numbers
\providecommand\OverciteFont{\fontsize\sf@size\baselineskip\selectfont}
% Do not repeat warnings. [verbose] reverses
\let\oc@verbo\relax
% Default is to move punctuation:
\def\oc@movep#1{\futurelet\@tempb\@citey}
%----------------------
% \citen uses \@nocite to ignore spaces after commas, and write the aux file
% \citation. \citen then loops over the citation tags, using \@make@cite@list
% to make a sorted list of numbers. Finally, \citen executes \@citelist to
% compress ranges of numbers and print the list. \citen can be used by itself
% to give citation numbers without the brackets and other formatting; e.g.,
% "See also ref.~\citen{junk}."
% Make internal version called \@cite@n just in case packages put hooks in
% \citen
%
\DeclareRobustCommand\citen{\@cite@n}
\def\@cite@n#1{%
\begingroup
\let\@safe@activesfalse\@empty
\@nocite{#1}% ignores spaces, writes to .aux file, returns #1 in \@no@sparg
\@tempcntb\m@ne % \@tempcntb tracks highest number
\let\@celt\delimiter % an unexpandable, but identifiable, token
\def\@cite@list{}% % empty list to start
\let\@citea\@empty % no punctuation preceding first
\@for \@citeb:=\@no@sparg\do{\@make@cite@list}% make a sorted list of numbers
% After sorted citelist is made, execute it to compress citation ranges.
\@tempcnta\m@ne % no previous number
\mathchardef\@cite@incr\z@ % no previous sequence
\let\@h@ld\@empty % nothing held from list yet
\let\@celt\@compress@cite \@cite@list % output number list with compression
\@h@ld % output anything held over
\endgroup
\@restore@auxhandle
}
% For each citation, check if it is defined. If so, then extract plain
% value to \@B@citeB (without hyperlink info). Then,
% If it is a pure number, add it to cite list
% Otherwise, try extracting prefix and suffix characters.
%
\def\@make@cite@list{%
\expandafter\ifx\csname b@\@citeb\@extra@b@citeb
\endcsname\relax % undefined: output ? and warning
\@citea {\bfseries ?}\let\@citea\citepunct \G@refundefinedtrue
\@warning {Citation `\@citeb' on page \thepage\space undefined}%
%% \oc@verbo \global\@namedef{b@\@citeb\@extra@b@citeb}{?}% ???
\else % defined % remove previous line to repeat warnings
\@cite@nonhyper@sanitize
\@addto@cite@list
\fi}
\def\@nonhyper@@link [#1]#2#3#4{#4}
\def\@cite@nonhyper@sanitize{\begingroup
\let\hyper@@link\@nonhyper@@link
\protected@xdef\@B@citeB{\csname b@\@citeb\@extra@b@citeb \endcsname}%
\endgroup}
\def\@cite@out#1{\citeform{\csname #1\endcsname}}
% Add entry to the list of citations. This default definition sorts pure
% numbers as well as numbers with other single-character tags. There
% is presently no other definition than this default, but features may
% be added later.
%
\def\@addto@cite@list{%
\@cite@posnumtest\@B@citeB
{\@addnumto@cite@list\@B@citeB}% a positive number, put in list
{\@cite@combo@num}% not a pure positive number, test for combo forms
}
% With this \@cite@combo@num we delve into handling of numbers combined
% with non-numeric tags. The specific command name \@cite@combo@num can
% serve as a hook for redefinition, perhaps to give simple non-sorting
% for anything not a pure number, or to attempt even more complicated
% sorting, say dictionary sorting of textual citations. The following
% definition leads down the road of sorting mostly-numbers but with
% optional single-character prefix and/or suffix.
\def\@cite@combo@num{\expandafter\@cite@try@combo\@B@citeB\delimiter}
% First of many stages for sorting numbers with prefix/suffix characters.
% Test for a leading token of category letter or other (appropriate for
% all combination types).
%
\def\@cite@try@combo{%
\@if@printable@char{\@cite@try@prefix}{\@cite@gobbledump@now}}
% First token is good, so test for a character prefix before a number.
% Process first token, either a first digit or a prefix
%
\def\@cite@try@prefix#1{% #1 is first character of citation
\@cite@posnumtest{#1}% a digit else prefix
{\@cite@add@letnumD {\z@}#1}% no prefix character (use zero)
{\@cite@add@letnumC {`#1}}% prefix char; use the char code
}
% Examine character after prefix to ensure it is a number. First must
% ensure it is a plain character token
%
\def\@cite@add@letnumC#1{\@if@printable@char%
{\@cite@add@letnumD{#1}}% continue with prefix (perhaps zero)
{\@cite@gobbledump@now}% else abandon fancy processing
}
% Save prefix (if any) numerically in \@tempcnta, test next character for being
% a digit, then collect main number
%
\def\@cite@add@letnumD#1#2{% #1 = numeric code for prefix, #2 = next char
\@tempcnta=#1\multiply\@tempcnta 16384 %
\@cite@posnumtest{#2}% if next char is a digit, continue with number:
{\afterassignment\@cite@add@letnumE \advance\@tempcnta #2}%
{\@cite@gobbledump@now}% No number so output citation
}
% Have collected number. Now look for a non-number suffix or separator.
%
\gdef\@cite@add@letnumE{%
\multiply\@tempcnta\@cclvi
\@if@printable@char{% a suffix or separator given
\@cite@add@letnumF
}{% else, maybe nothing remains
\ifx\@let@token\delimiter % use number, and remove trailing \delimiter
\@citeaddcnta \expandafter\@gobble
\else % non-printable char found, so abandon fancy processing
\expandafter\@cite@gobbledump@now
\fi
}}
% Have everything up to a suffix or separator character. Check
% following to see which. Three possibilites are (1) noting =>
% a suffix; (2) number => separator-number; (3) other => garbage.
%
\def\@cite@add@letnumF#1#2\delimiter{% #1 = suffix/separator #2=rest
\advance\@tempcnta`#1\relax
\@cite@posnumtest{#2}{\@cite@add@numsepnum{#2}}% handle as num sep num
{% else...
\ifx\delimiter#2\delimiter % nothing left, so #1 is a suffix
\@citeaddcnta
\else % some non-number; dump it
\@cite@dump@now
\fi
}}
% Handle citation as number separator number.
% Yes, there is a bug that the list 1.1,1.258,1.515 will be compressed as
% 1.1-1.515; so sue me.
\def\@cite@add@numsepnum#1{% #1 = last number
\ifnum\@tempcnta<262144 % OK numeric range
\multiply\@tempcnta 4096
\advance\@tempcnta #1 % num,sep,num have maximum numbers: 1023, 255, 4095
\@citeaddcnta
\else % out of range, treat as raw string
\@cite@dump@now
\fi}
% This is our bail-out when the citation cannot be processed as
% [prefix]number[suffix] or number[sep]number: it outputs the citation
% immediately (unsorted) and consumes tokens to the \delimiter tag used
% as an end-marker
%
\def\@cite@gobbledump@now#1\delimiter{\@cite@dump@now}%
\def\@cite@dump@now{%
\@citea \@cite@out{b@\@citeb\@extra@b@citeb}\let\@citea\citepunct}
% add an entry to the sorted list, using its sort-number \@tempcnta, and
% also saving the plain-text value \@B@citeB as well as the csname
% b@\@citeb\@extra@b@citeb. (The \@B@citeB is actually not used, unless
% somebody extends the definitions.)
\def\@citeaddcnta{%
\ifnum \@tempcnta>\@tempcntb % new highest, add to end (efficiently)
\edef\@cite@list{\@cite@list
\@celt{\number\@tempcnta}{\@B@citeB}{b@\@citeb\@extra@b@citeb}}%
\@tempcntb\@tempcnta
\else % other sortable value: insert appropriately
\edef\@cite@list{\expandafter\@sort@celt\@cite@list \@gobble.\@gobble.}%
\fi
}
% add pure numeric entry to cite list, with sorting
\def\@addnumto@cite@list#1{%
\@tempcnta#1\relax
\multiply\@tempcnta\@cclvi
\@citeaddcnta}
% \@sort@celt inserts number (\@tempcnta) into list of \@celt{num}{text}{tag}
% (#1{#2}{#3}{#4})
% \@celt must not be expandable, and the arguments must not be fragile.
% List should end with four vanishing tokens.
%
\def\@sort@celt#1#2#3#4{\ifx \@celt #1% parameters are \@celt{num}{text}{tag}
\ifnum #2<\@tempcnta % number goes later in list
\@celt{#2}{#3}{#4}%
\expandafter\expandafter\expandafter\@sort@celt % continue
\else % number goes here
\@celt{\number\@tempcnta}{\@B@citeB}{b@\@citeb\@extra@b@citeb}%
\@celt{#2}{#3}{#4}% stop comparing
\fi\fi}
% Check if each number follows previous and can be put in a range.
% Since there are suffix characters allowed, there are two kinds of
% ranges: ranges of consecutive pure numbers with no (or same)
% suffix, or ranges of the same number with consecutive suffix
% characters.
%
\def\@compress@cite#1#2#3{%% This is executed for each number
\ifnum\@cite@incr=\z@ % no consecutives pending. Try both types of sequence
\advance\@tempcnta\@cclvi % Now \@tempcnta has incremented number
\ifnum #1=\@tempcnta % Start a sequence of consecutive numbers
\expandafter\def\expandafter\@h@ld\expandafter{\@citea\@cite@out{#3}}%
\mathchardef\@cite@incr=\@cclvi
\else % next try increment of suffix
\advance\@tempcnta-\@cclv % Now \@tempcnta has incremented suffix
\ifnum #1=\@tempcnta % Start a sequence of suffix increments
\expandafter\def\expandafter\@h@ld\expandafter{\@citea\@cite@out{#3}}%
\mathchardef\@cite@incr=\@ne
\else % it is no type of sequence -- emit number (nothing is held)
\@citea \@cite@out{#3}%
\fi
\fi
\else % a sequence is running
\advance\@tempcnta\@cite@incr % Now \@tempcnta is next in sequence
\ifnum #1=\@tempcnta % Number follows previous--hold on to it
\def\@h@ld{\citedash \@cite@out{#3}}%
\else % non-successor -- dump what's held and do this one
\@h@ld \@citea \@cite@out{#3}%
\let\@h@ld\@empty
\mathchardef\@cite@incr=\z@
\fi
\fi
\@tempcnta#1\let\@citea\citepunct
}
% Make \cite choose superscript or normal
\DeclareRobustCommand{\cite}{%
\@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
% Do \cite command on line.
%
\def\@citex[#1]#2{\@cite{\@cite@n{#2}}{#1}}
\def\@cite#1#2{\leavevmode \cite@adjust
\citeleft{#1\if@tempswa\@safe@activesfalse\citemid{#2}\fi
\spacefactor\@m % punctuation in note doesn't affect outside
}\citeright
\@restore@auxhandle}
% Put a penalty before the citation, and adjust the spacing: if no space
% already or if there is extra space due to some punctuation, then change
% to one inter-word space.
%
\def\cite@adjust{\begingroup%
\@tempskipa\lastskip \edef\@tempa{\the\@tempskipa}\unskip
\ifnum\lastpenalty=\z@ \penalty\citeprepenalty \fi
\ifx\@tempa\@zero@skip \spacefactor1001 \fi % if no space before, set flag
\ifnum\spacefactor>\@m \ \else \hskip\@tempskipa \fi
\endgroup}
\edef\@zero@skip{\the\z@skip}
% Superscript cite, with no optional note. Check for punctuation first.
%
\def\@citew#1{\begingroup \leavevmode
\@if@fillglue \lastskip \relax \unskip
\def\@tempa{\@tempcnta\spacefactor
\/% this allows the last word to be hyphenated, and it looks better.
\@citess{\@cite@n{#1}}\spacefactor\@tempcnta
\endgroup \@restore@auxhandle}%
\oc@movep\relax}% check for following punctuation (depending on options)
% Move trailing punctuation before the citation:
%
\def\@citey{\let\@tempc\@tempa
% Watch for double periods and suppress them
\ifx\@tempb.\ifnum\spacefactor<\@bigSfactor\else
\@citeundouble
\fi\fi
% Move other punctuation
\expandafter\@citepc\CiteMoveChars\delimiter
\@tempc}%
% This is in a separate macro in case the next "character" (token)
% is \if or \fi, etc.
\def\@citeundouble{% Suppress doubling of periods
\let\@tempb\relax \let\@tempc\oc@movep
}
\def\@citepc#1{%
\ifx\@tempb#1\@empty #1\let\@tempc\oc@movep \fi
\ifx\delimiter#1\else \expandafter\@citepc\fi}
% Replacement for \@cite which defines the formatting normally done
% around the citation list. This uses superscripts with no brackets.
% HOWEVER, trailing punctuation has already been moved over. The
% format for cites with note is given by \@cite. Redefine \@cite and/
% or \@citex to get different appearance. I don't use \textsuperscript
% because it is defined BADLY in compatibility mode.
\def\@citess#1{\mbox{$\m@th^{\hbox{\OverciteFont{#1}}}$}}
% \nocite: This is changed to ignore *ALL* spaces and be robust. The
% parameter list, with spaces removed, is `returned' in \@no@sparg, which
% is used by \@cite@n (\citen).
%
\DeclareRobustCommand\nocite[1]{%
\@bsphack \@nocite{#1}%
\@for \@citeb:=\@no@sparg\do{\@ifundefined{b@\@citeb\@extra@b@citeb}%
{\G@refundefinedtrue\@warning{Citation `\@citeb' undefined}%
%%\oc@verbo \global\@namedef{b@\@citeb\@extra@b@citeb}{?}
}{}}%
\@esphack}
\def\@nocite#1{\begingroup\let\protect\string% normalize active chars
\xdef\@no@sparg{\expandafter\@ignsp#1 \: }\endgroup% and remove ALL spaces
\if@filesw \immediate\write\@newciteauxhandle % =\@auxout, except with multibib
{\string\citation {\@no@sparg}}\fi
}
% for ignoring *ALL* spaces in the input. This presumes there are no
% \outer tokens and no \if-\fi constructs in the parameter. Spaces inside
% braces are retained.
%
\def\@ignsp#1 {\ifx\:#1\@empty\else #1\expandafter\@ignsp\fi}
% \@if@fillglue{glue}{true}{false}
\begingroup
\catcode`F=12 \catcode`I=12\catcode`L=12
\lowercase{\endgroup
\def\@if@fillglue#1{%
\begingroup \skip@#1\relax
\expandafter\endgroup\expandafter
\@is@fil@ \the\skip@ \relax\@firstoftwo FIL\relax\@secondoftwo\@nil}
\def\@is@fil@ #1FIL#2\relax#3#4\@nil{#3}
}
% Test if next token is a char of "printable" categories other or letter or
% active. Syntax:
% \@if@printable@char {do if printable}{do if not printable}<char>
%
\def\@if@printable@char#1#2{%
\def\reserved@a{#1}%
\def\reserved@b{#2}%
\futurelet\@let@token\@test@print@char
}
% Note side-effect of redefining \reserved@a and \reserved@b
\def\@test@print@char{%
\ifnum
\ifcat\noexpand\@let@token A1\fi
\ifcat\noexpand\@let@token 11\fi
\ifcat\noexpand\@let@token \noexpand~1\fi%
0>\z@
\expandafter\reserved@a \else
\expandafter\reserved@b \fi
}
% Test for a pure positive number: {possible number}{true}{false}
\def\@cite@posnumtest#1{%
\ifcat _\ifnum\z@<0#1_\else A\fi
\expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi
}
\let\nocitecount\relax % in case \nocitecount was used for drftcite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% option processing
\DeclareOption{verbose}{\def\oc@verbo#1#2#3#4{}}
\DeclareOption{nospace}{\def\citepunct{,\penalty\citepunctpenalty}}
\DeclareOption{space}{\def\citepunct{,\penalty\citepunctpenalty\ }}
\DeclareOption{nobreak}{% no line-breaks
\mathchardef\citeprepenalty=\@M
\mathchardef\citemidpenalty=\@M
\mathchardef\citepunctpenalty=\@M
}
\DeclareOption{ref}{\def\citeleft{[Ref.\penalty\@M\ }}
% To disable sorting [nosort], the redefinition depends on whether [nocompress]
% was also selected, so just set a flag first.
\DeclareOption{nosort}{\let\@citeaddcnta\@empty}
\DeclareOption{sort}{}% default!
% Likewise set flag for [nocompress]
\DeclareOption{nocompress}{\let\@compress@cite\@empty}
\DeclareOption{compress}{}% default
\DeclareOption{nomove}{\def\oc@movep{\@tempa}\let\@citey\oc@movep}
\DeclareOption{move}{}% default
\DeclareOption{super}{\ExecuteOptions{superscript}}
\DeclareOption{superscript}{%
\DeclareRobustCommand{\cite}{%
\@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citew}}
}
\DeclareOption{noadjust}{\let\cite@adjust\@empty}% Don't change spaces
\DeclareOption{adjust}{}% adjust space before [ ]
\DeclareOption{biblabel}{\def\@biblabel#1{\@citess{#1}\kern-\labelsep\,}}
\ProvidesPackage{cite}[2010/09/10 \space v 5.3]
\ProcessOptions
\ifx\@citey\oc@movep\else % we are moving punctuation; must ensure sfcodes
\mathchardef\@bigSfactor3000
\expandafter\def\expandafter\frenchspacing\expandafter{\frenchspacing
\mathchardef\@bigSfactor1001
\sfcode`\.\@bigSfactor \sfcode`\?\@bigSfactor \sfcode`\!\@bigSfactor }%
\ifnum\sfcode`\.=\@m \frenchspacing \fi
\fi
% make redefinitions to handle [nosort] [nocompress] and their combination
\ifx\@compress@cite\@empty
\ifx\@citeaddcnta\@empty
% [nosort,nocompress] -- short-circuit much processing
\def\@addto@cite@list{\@cite@dump@now}
\else
% [sort,nocompress]
\def\@compress@cite#1#2#3{% % This is executed for each number
\@h@ld \@citea \@cite@out{#3}%
\let\@h@ld\@empty \let\@citea\citepunct
}
\fi
\else %
\ifx\@citeaddcnta\@empty % [nosort,compress]
% nosort: always add to end of list, but still calculate
% sort-order number (\@tempcnta) because it may be used for
% collapsing consecutive numbers.
\def\@citeaddcnta{%
\edef\@cite@list{\@cite@list
\@celt{\number\@tempcnta}{\@B@citeB}{b@\@citeb\@extra@b@citeb}}%
}
\fi
\fi
% Compatability with chapterbib (see use of \@extra@b@citeb above and in chapterbib)
\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
% Compatability with multibib (see use of \@newciteauxhandle) (Yes, this is
% overly messy, but I asked for it... I can't have multibib putting junk after
% the cite command because it hides following punctuation, but then I have
% to restore the ordinary meaning of \@newciteauxhandle = \@auxout.)
\providecommand\@newciteauxhandle{\@auxout}
\AtBeginDocument{\@ifundefined{newcites}{\global\let\@restore@auxhandle\relax}{}}
\def\@restore@auxhandle{\def\@newciteauxhandle{\@auxout}}
% compatability with backref: prevent it from redefining \@citex
% in the wrong way (ignoring \@citew and \citen. I install hook in
% \@nocite so it applies to \cite, \citen, and \nocite.
%
\AtBeginDocument{\@ifundefined{Hy@backout}{}{%
\@ifundefined{BRorg@citex}{}{\global\let\@citex\BRorg@citex}%
\global\let\BR@citex\@citex
\global\let\@citeorg@nocite\@nocite % use my own hook -> into \@nocite
\gdef\@nocite#1{\@citeorg@nocite{#1}\Hy@backout{#1}}%
}}
% compatability with ooold LaTeX
\@ifundefined{G@refundefinedtrue}{\let\G@refundefinedtrue\relax}{}
% compatability with babel: Prevent it from redefining \@citex
\@ifundefined{@safe@activesfalse}{\let\@safe@activesfalse\relax}{}
\@ifundefined{bbl@cite@choice}{}{\@ifundefined{org@@citex}{}%
{\let\org@@citex\@citex}}% Prevent stomping by babel
\citenum % execute restore-catcodes
% Aliases:
\def\citenum{\citen}
\def\citeonline{\citen}
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CITE.STY
Modify LaTeX's normal citation mechanism for improved handling of numeric
citations, behaving as follows:
o Put a comma and a small space between each citation number. The option
[nospace] removes that space, and the option [space] replaces it with
an ordinary inter-word space.
o Compress lists of three or more consecutive numbers to one number range
which can be split, with difficulty, after the dash. All numbers should
be greater than zero. E.g., if you used to get the (nonsense) list
[7,5,6,?,4,9,8,Einstein,6], then this style will give [?,Einstein,4-6,6-9].
Compression of ranges is disabled by the [nocompress] package option.
o Sort citations into ascending order (this is the default, but may also
be declared with the package option [sort]). The [nosort] package option
turns off sorting. Sortable citations must fit one of these forms:
1. <number>
2. <optional-char><number><optional-char>
3. <number><separator-char><number>
Forms 1 and 2 are really the same, and they mix well, but form 3 is
separate and if used simultaneously with form 1 the citations become,
ummm, mixed. Non-sortable forms (those not listed) are printed before
all sortable forms. Here <number> means a positive integer (natural
number) less than some limit (different for each form), <optional-char>
is a single printable character (or nothing), and <separator-char> is also
a single printable character.
o Sorting of citations with prefix and/or suffix characters is done so so
different prefixes are grouped separately, and suffixes form sub-lists
for the same number. Compression knows about suffixes, so you can get
lists like [18a-18c,19] or [A2,Q1,Q3-Q5].
o Allow, but discourage, line breaks within the group of citations (after
dashes, and after punctuation). Penalties are \citepunctpenalty and
\citemidpenalty.
o Put a high-penalty breakpoint (value \citeprepenalty) before the citation
(unless there is a different penalty specified there). Also, adjust the
spacing: if there is no space or if there is extra space due to some
punctuation, then change to one inter-word space. E.g.,
A space will be inserted here\cite{Larry,Curly,Moe}.
o All breaks can be forbidden with the [nobreak] package option. They can
be adjusted independently by setting the parameters \citeprepenalty,
\citemidpenalty, and \citepunctpenalty. Use \mathchardef to change these
penalty values! E.g., \mathchardef\citeprepenalty=9999 (Yes, that is
obscure but I don't want to use up counters or to pretend they are counters.)
o With package option [superscript] (or [super] for short), display citation
numbers as superscripts (unless they have optional notes, causing them to
be printed on-line with brackets). Superscripted citations follow these
additional rules:
-> Superscript citations use THE SAME INPUT FORMAT as ordinary citations; this
style will ignore spaces before the citation, and move trailing punctuation
before the superscript citation. For example, "information \cite{source};"
ignores the space before \cite and puts the semicolon before the number,
just as if you had typed "information;$^{12}$". You may switch off movement
with the [nomove] package option (only relevant with [superscript]).
-> The punctuation characters that will migrate before the superscript are
listed in the macro \CiteMoveChars, which you can redefine. The default
set of characters is ".,;:"; Perhaps ! and ? should be included too, but
they weren't listed in the APS style manual I looked at, and I agree with
that design choice because they put too much visual separation between the
cite and what it applies to. Feel free to redefine \CiteMoveChars. Quotes
were listed as coming before the cite notation, but they should be typed
before the \cite command in any case because both on-line and superscript
cites come after what is quoted (when citing a quotation). This gives one
difficulty -- punctuation following quotes won't migrate inside the
quotation: e.g., "``Transition State Theory''\cite{Eyring}." gives out
``Transition State Theory''.$^8$, but you may want the period inside the
quotes, thus: ``Transition State Theory.''$^8$.
-> Doubling of periods (.., ?., !.) is checked for and suppressed. The spacing
after the citation is set according to the final punctuation mark moved.
There is a problem with double periods after a capitalized abbreviation
or directly after \@ : Both of "N.A.S.A. \cite{space}." and "et al.\@
\cite{many}." will give doubled periods. These can be fixed as follows:
"N.S.A\@. \cite{space}." and "et al.\ \cite{many}.". The NSA example
gives the wrong spacing when there is no citation. Sorry. Use "\ " after
abbreviations like et al. to get the right spacing within a sentence whether
or not a citation follows.
-> Remember, these rules regarding punctuation only apply when the [super]
or [superscript] option was given (or overcite.sty used) and the [nomove]
option was NOT given.
o Define \citen to get just the numbers without the brackets or superscript
and extra formatting. Aliases are \citenum and \citeonline for easy
conversion to other citation packages.
o All of \nocite, \cite, and \citen ignore spaces in the input tags.
Although each \cite command sorts its numbers, better compression into
ranges can usually be achieved by carefully selecting the order of the
\bibitem entries or the order of initial citations when using BibTeX.
Having the entries pre-sorted will also save processing time, especially
for long lists of numbers.
Customization:
~~~~~~~~~~~~~~
There are several options for \usepackage{cite}, some already mentioned.
[superscript] use superscrpts for cites without optional notes
[super] alias for [superscript] (like natbib)
[verbose] UNUSED NOW! (do repeat duplicate warnings)
[ref] uses the format "[Ref.~12, given note]" (useful with
the superscript option)
[nospace] eliminates the spaces after commas in the number list
[space] uses a full inter-word space after the commas
[nobreak] eliminate all line-breaks
[nosort] prevents sorting of the numbers (default is to sort, and the...
[sort] option is provided for completeness).
[nomove] prevents moving the superscript cite after punctuation.
[move] is the default
[noadjust] disables `smart' handling of space before a cite
[adjust] is the default
[nocompress] inhibit compression of consecutive numbers into ranges
[compress] is the default
[biblabel] define the bibliography label as a superscript
If your citations are not numeric, then you should probably not use
cite.sty, but if you must, then at least use the [nosort,nocompress]
options.
There are several commands that you may redefine (using \renewcommand
or \def) to change the formatting of citation lists:
command function default
---------- ----------------------- ----------------------------
\citeform reformats each number nothing
\citepunct printed between numbers comma + penalty + thin space
\citeleft left delimiter of list [
\citeright right delimeter of list ]
\citemid printed before note comma + penalty + space
\citedash used in a compressed range endash + penalty
\CiteMoveChars charcters that move .,:;
\OverciteFont font sel. for superscripts \fontsize{\sf@size}...
The left/mid/right commands don't affect the formatting of superscript
citations. You may use \renewcommand to change any of these. Remember,
these commands are extensions made by this package; they are not regular
LaTeX. Some examples of changes:
1: \renewcommand\citeform[1]{\romannumeral 0#1}} % roman numerals i,vi
2: \renewcommand\citeform[1]{(#1)} % parenthesized numbers (1)-(5),(9)
3: \renewcommand\citeform{\thechapter.} % by chapter: ^{2.18-2.21}
4: \renewcommand\citepunct{,} % no space and no breaks at commas
5: \renewcommand\citemid{; } % semicolon before optional note
6: \renewcommand\citeleft{(} % parentheses around list with note
\renewcommand\citeright{)} % parentheses around list with note
The appearance of the whole citation list is governed by \@cite, (for full-
sized cites) and \@citess (for superscripts). For more extensive changes
to the formatting, redefine these. For example, to get brackets around the
list of superscript numbers you can do:
\def\@citess#1{\textsuperscript{[#1]}}
after \makeatletter.
Related Note: The superscript option does not affect the numbering format
of the bibliography; the "[12]" style is still the default. To get
superscripts in the bibliography (at any time) you can define
\renewcommand\@biblabel[1]{\textsuperscript{#1}}
Aw, OK, for your convenience, there is the [biblabel] package option that
just performs this definition (sort of).
Line breaking can be turned off using the [nobreak] option. It can be
controlled more precisely by changing three numeric values, assigned
with \mathchardef, for controlling the line-break penalties:
\citeprepenalty penalty before cite default \@highpenalty
\citemidpenalty penalty used in \citemid default \@medpenalty
\citepunctpenalty penalty used in \citepunct default 1000
(Use \mathchardef assignments like \mathchardef\citemidpenalty=900.
These were chosen so as to not waste registers.) Alternatively, the
commands \citemid, \citedash, and \citepunct can be redefined to use
different penalty parameters, or none at all.
% Version 1991: Ignore spaces after commas in the parameter list. Move most of
% \citen into \@cmpresscites for speed. Give the proper \spacefactor afterwards.
% Version 1992: make \citepunct hold the punctuation between numbers (for ease
% of changing). Add \/ to allow hyphenation of previous word, and look better
% in italics.
% 1992a: Make it work with NFSS. (Thank you C. Hamlin and Rainer Schoepf)
%
% Version 3.0 (1992): Rewrite, including sorting. Make entries like "4th"
% be treated properly as text.
% 3.1: Bug fixes (and Joerg-Martin Schwarz also convinced me to use \ifcat)
% 3.2: NFSS support was wrong--added \reset@font. Suppress repetitions of
% warnings. Include \@extra@b@citeb hook.
% 3.3: Handle LaTeX2e options. Introduce various customization hooks.
% 3.4: Heuristics to avoid removing \hspace glue before on-line \cite.
% Make \nocite ignore spaces in list, simplify. Aliases for \citen.
% Compatability with amsmath (which defines \over).
% 3.5: Replace \reset@font with \selectfont so italics are preserved
% Include \G@refundefinedtrue. Fix cite-with-note bug (Lars Engebretsen).
% 3.6: Add nosort option.
% 3.7: Add nomove option; catcode preservation and global \@no@sparg for
% french.sty; warnings in \nocite.
% 3.8: \citedash hook, fix token look-ahead (Heiko Selber), noadjust, babel.
% 3.9: More babel-compatibility hacks. Punctuation move with \frencspacing.
% 4.0: Combine overcite with cite: [superscript] option. Also add [nocompress]
% option and \CiteMoveChars; multibib hooks.
% 4.01 \bf -> \bfseries
% 4.02 Bury undouble action in a separate macro to avoid extra \fi error.
% 5.0 Hyperref and backref compatability! Penalty parameters and [nobreak].
% Letter prefix and suffix sorting. Stop suppressing multiple warnings.
% 5.1 Fix a missing "b@" (disappearing named cites), fix nosort
% 5.2 More robust treatment of non-numbers
% 5.3 Handle sort/compress of compound citation numbers (number by chapter)
% such as 3.18 or 5-3. Note that these compounds cannot have prefix or
% suffix letters (not enough bits in the maximum TeX number).
%
% TODO: other sorting, like dictionary or roman numeral
% TODO: create special "final punct" that could be ", and " and likewise
% a "single punct" that could be " and "
%
% Send problem reports to [email protected]
Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789
:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
floatrow.sty · 59 KB
59 KB — too long to show here. It arrives with the project.
indentfirst.sty · 1 KB
%%
%% This is file `indentfirst.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% indentfirst.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%%
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%%
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%%
%% File: indent.dtx Copyright (C) 1991-1994 David Carlisle
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{indentfirst}
[1995/11/23 v1.03 Indent first paragraph (DPC)]
\let\@afterindentfalse\@afterindenttrue
\@afterindenttrue
\endinput
%%
%% End of file `indentfirst.sty'.
latexsym.sty · 2 KB
%%
%% This is file `latexsym.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% latexsym.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the LaTeX base system.
%% --------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.2
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 1999/12/01 or later.
%%
%% This file may only be distributed together with a copy of the LaTeX
%% base system. You may however distribute the LaTeX base system without
%% such generated files.
%%
%% The list of all files belonging to the LaTeX base distribution is
%% given in the file `manifest.txt'. See also `legal.txt' for additional
%% information.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{latexsym}
[1998/08/17 v2.2e
Standard LaTeX package (lasy symbols)]
\ifx\symlasy\undefined \else
\wlog{Package latexsym: nothing to set up^^J}%
\endinput \fi
\DeclareSymbolFont{lasy}{U}{lasy}{m}{n}
\SetSymbolFont{lasy}{bold}{U}{lasy}{b}{n}
\let\mho\undefined \let\sqsupset\undefined
\let\Join\undefined \let\lhd\undefined
\let\Box\undefined \let\unlhd\undefined
\let\Diamond\undefined \let\rhd\undefined
\let\leadsto\undefined \let\unrhd\undefined
\let\sqsubset\undefined
\DeclareMathSymbol\mho {\mathord}{lasy}{"30}
\DeclareMathSymbol\Join {\mathrel}{lasy}{"31}
\DeclareMathSymbol\Box {\mathord}{lasy}{"32}
\DeclareMathSymbol\Diamond {\mathord}{lasy}{"33}
\DeclareMathSymbol\leadsto {\mathrel}{lasy}{"3B}
\DeclareMathSymbol\sqsubset{\mathrel}{lasy}{"3C}
\DeclareMathSymbol\sqsupset{\mathrel}{lasy}{"3D}
\DeclareMathSymbol\lhd {\mathbin}{lasy}{"01}
\DeclareMathSymbol\unlhd {\mathbin}{lasy}{"02}
\DeclareMathSymbol\rhd {\mathbin}{lasy}{"03}
\DeclareMathSymbol\unrhd {\mathbin}{lasy}{"04}
\let\not@base\@undefined
\endinput
%%
%% End of file `latexsym.sty'.
listings.sty · 65 KB
65 KB — too long to show here. It arrives with the project.
longtable.sty · 12 KB
%%
%% This is file `longtable.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% longtable.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%%
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%%
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%%
%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{longtable}
[2004/02/01 v4.11 Multi-page Table package (DPC)]
\def\LT@err{\PackageError{longtable}}
\def\LT@warn{\PackageWarning{longtable}}
\def\LT@final@warn{%
\AtEndDocument{%
\LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}%
\global\let\LT@final@warn\relax}
\DeclareOption{errorshow}{%
\def\LT@warn{\PackageInfo{longtable}}}
\DeclareOption{pausing}{%
\def\LT@warn#1{%
\LT@err{#1}{This is not really an error}}}
\DeclareOption{set}{}
\DeclareOption{final}{}
\ProcessOptions
\newskip\LTleft \LTleft=\fill
\newskip\LTright \LTright=\fill
\newskip\LTpre \LTpre=\bigskipamount
\newskip\LTpost \LTpost=\bigskipamount
\newcount\LTchunksize \LTchunksize=20
\let\c@LTchunksize\LTchunksize
\newdimen\LTcapwidth \LTcapwidth=4in
\newbox\LT@head
\newbox\LT@firsthead
\newbox\LT@foot
\newbox\LT@lastfoot
\newcount\LT@cols
\newcount\LT@rows
\newcounter{LT@tables}
\newcounter{LT@chunks}[LT@tables]
\ifx\c@table\undefined
\newcounter{table}
\def\fnum@table{\tablename~\thetable}
\fi
\ifx\tablename\undefined
\def\tablename{Table}
\fi
\newtoks\LT@p@ftn
\mathchardef\LT@end@pen=30000
\def\longtable{%
\par
\ifx\multicols\@undefined
\else
\ifnum\col@number>\@ne
\@twocolumntrue
\fi
\fi
\if@twocolumn
\LT@err{longtable not in 1-column mode}\@ehc
\fi
\begingroup
\@ifnextchar[\LT@array{\LT@array[x]}}
\def\LT@array[#1]#2{%
\refstepcounter{table}\stepcounter{LT@tables}%
\if l#1%
\LTleft\z@ \LTright\fill
\else\if r#1%
\LTleft\fill \LTright\z@
\else\if c#1%
\LTleft\fill \LTright\fill
\fi\fi\fi
\let\LT@mcol\multicolumn
\let\LT@@tabarray\@tabarray
\let\LT@@hl\hline
\def\@tabarray{%
\let\hline\LT@@hl
\LT@@tabarray}%
\let\\\LT@tabularcr\let\tabularnewline\\%
\def\newpage{\noalign{\break}}%
\def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%
\def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%
\let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption
\@tempdima\ht\strutbox
\let\@endpbox\LT@endpbox
\ifx\extrarowheight\@undefined
\let\@acol\@tabacol
\let\@classz\@tabclassz \let\@classiv\@tabclassiv
\def\@startpbox{\vtop\LT@startpbox}%
\let\@@startpbox\@startpbox
\let\@@endpbox\@endpbox
\let\LT@LL@FM@cr\@tabularcr
\else
\advance\@tempdima\extrarowheight
\col@sep\tabcolsep
\let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr
\fi
\setbox\@arstrutbox\hbox{\vrule
\@height \arraystretch \@tempdima
\@depth \arraystretch \dp \strutbox
\@width \z@}%
\let\@sharp##\let\protect\relax
\begingroup
\@mkpream{#2}%
\xdef\LT@bchunk{%
\global\advance\c@LT@chunks\@ne
\global\LT@rows\z@\setbox\z@\vbox\bgroup
\LT@setprevdepth
\tabskip\LTleft \noexpand\halign to\hsize\bgroup
\tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}%
\endgroup
\expandafter\LT@nofcols\LT@bchunk&\LT@nofcols
\LT@make@row
\m@th\let\par\@empty
\everycr{}\lineskip\z@\baselineskip\z@
\LT@bchunk}
\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}}
\def\LT@start{%
\let\LT@start\endgraf
\endgraf\penalty\z@\vskip\LTpre
\dimen@\pagetotal
\advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
\advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
\advance\dimen@ \ht\LT@foot
\dimen@ii\vfuzz
\vfuzz\maxdimen
\setbox\tw@\copy\z@
\setbox\tw@\vsplit\tw@ to \ht\@arstrutbox
\setbox\tw@\vbox{\unvbox\tw@}%
\vfuzz\dimen@ii
\advance\dimen@ \ht
\ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi
\advance\dimen@\dp
\ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi
\advance\dimen@ -\pagegoal
\ifdim \dimen@>\z@\vfil\break\fi
\global\@colroom\@colht
\ifvoid\LT@foot\else
\advance\vsize-\ht\LT@foot
\global\advance\@colroom-\ht\LT@foot
\dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@
\maxdepth\z@
\fi
\ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak
\output{\LT@output}}
\def\endlongtable{%
\crcr
\noalign{%
\let\LT@entry\LT@entry@chop
\xdef\LT@save@row{\LT@save@row}}%
\LT@echunk
\LT@start
\unvbox\z@
\LT@get@widths
\if@filesw
{\let\LT@entry\LT@entry@write\immediate\write\@auxout{%
\gdef\expandafter\noexpand
\csname LT@\romannumeral\c@LT@tables\endcsname
{\LT@save@row}}}%
\fi
\ifx\LT@save@row\LT@@save@row
\else
\LT@warn{Column \@width s have changed\MessageBreak
in table \thetable}%
\LT@final@warn
\fi
\endgraf\penalty -\LT@end@pen
\endgroup
\global\@mparbottom\z@
\pagegoal\vsize
\endgraf\penalty\z@\addvspace\LTpost
\ifvoid\footins\else\insert\footins{}\fi}
\def\LT@nofcols#1&{%
\futurelet\@let@token\LT@n@fcols}
\def\LT@n@fcols{%
\advance\LT@cols\@ne
\ifx\@let@token\LT@nofcols
\expandafter\@gobble
\else
\expandafter\LT@nofcols
\fi}
\def\LT@tabularcr{%
\relax\iffalse{\fi\ifnum0=`}\fi
\@ifstar
{\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr
\LT@t@bularcr}%
{\LT@t@bularcr}}
\let\LT@crcr\crcr
\let\LT@setprevdepth\relax
\def\LT@t@bularcr{%
\global\advance\LT@rows\@ne
\ifnum\LT@rows=\LTchunksize
\gdef\LT@setprevdepth{%
\prevdepth\z@\global
\global\let\LT@setprevdepth\relax}%
\expandafter\LT@xtabularcr
\else
\ifnum0=`{}\fi
\expandafter\LT@LL@FM@cr
\fi}
\def\LT@xtabularcr{%
\@ifnextchar[\LT@argtabularcr\LT@ntabularcr}
\def\LT@ntabularcr{%
\ifnum0=`{}\fi
\LT@echunk
\LT@start
\unvbox\z@
\LT@get@widths
\LT@bchunk}
\def\LT@argtabularcr[#1]{%
\ifnum0=`{}\fi
\ifdim #1>\z@
\unskip\@xargarraycr{#1}%
\else
\@yargarraycr{#1}%
\fi
\LT@echunk
\LT@start
\unvbox\z@
\LT@get@widths
\LT@bchunk}
\def\LT@echunk{%
\crcr\LT@save@row\cr\egroup
\global\setbox\@ne\lastbox
\unskip
\egroup}
\def\LT@entry#1#2{%
\ifhmode\@firstofone{&}\fi\omit
\ifnum#1=\c@LT@chunks
\else
\kern#2\relax
\fi}
\def\LT@entry@chop#1#2{%
\noexpand\LT@entry
{\ifnum#1>\c@LT@chunks
1}{0pt%
\else
#1}{#2%
\fi}}
\def\LT@entry@write{%
\noexpand\LT@entry^^J%
\@spaces}
\def\LT@kill{%
\LT@echunk
\LT@get@widths
\expandafter\LT@rebox\LT@bchunk}
\def\LT@rebox#1\bgroup{%
#1\bgroup
\unvbox\z@
\unskip
\setbox\z@\lastbox}
\def\LT@blank@row{%
\xdef\LT@save@row{\expandafter\LT@build@blank
\romannumeral\number\LT@cols 001 }}
\def\LT@build@blank#1{%
\if#1m%
\noexpand\LT@entry{1}{0pt}%
\expandafter\LT@build@blank
\fi}
\def\LT@make@row{%
\global\expandafter\let\expandafter\LT@save@row
\csname LT@\romannumeral\c@LT@tables\endcsname
\ifx\LT@save@row\relax
\LT@blank@row
\else
{\let\LT@entry\or
\if!%
\ifcase\expandafter\expandafter\expandafter\LT@cols
\expandafter\@gobble\LT@save@row
\or
\else
\relax
\fi
!%
\else
\aftergroup\LT@blank@row
\fi}%
\fi}
\let\setlongtables\relax
\def\LT@get@widths{%
\setbox\tw@\hbox{%
\unhbox\@ne
\let\LT@old@row\LT@save@row
\global\let\LT@save@row\@empty
\count@\LT@cols
\loop
\unskip
\setbox\tw@\lastbox
\ifhbox\tw@
\LT@def@row
\advance\count@\m@ne
\repeat}%
\ifx\LT@@save@row\@undefined
\let\LT@@save@row\LT@save@row
\fi}
\def\LT@def@row{%
\let\LT@entry\or
\edef\@tempa{%
\ifcase\expandafter\count@\LT@old@row
\else
{1}{0pt}%
\fi}%
\let\LT@entry\relax
\xdef\LT@save@row{%
\LT@entry
\expandafter\LT@max@sel\@tempa
\LT@save@row}}
\def\LT@max@sel#1#2{%
{\ifdim#2=\wd\tw@
#1%
\else
\number\c@LT@chunks
\fi}%
{\the\wd\tw@}}
\def\LT@hline{%
\noalign{\ifnum0=`}\fi
\penalty\@M
\futurelet\@let@token\LT@@hline}
\def\LT@@hline{%
\ifx\@let@token\hline
\global\let\@gtempa\@gobble
\gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}%
\else
\global\let\@gtempa\@empty
\gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}%
\fi
\ifnum0=`{\fi}%
\multispan\LT@cols
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\noalign{\LT@sep}%
\multispan\LT@cols
\unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr
\noalign{\penalty\@M}%
\@gtempa}
\def\LT@caption{%
\noalign\bgroup
\@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n}
\def\LT@c@ption#1[#2]#3{%
\LT@makecaption#1\fnum@table{#3}%
\def\@tempa{#2}%
\ifx\@tempa\@empty\else
{\let\\\space
\addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%
\fi}
\def\LT@capti@n{%
\@ifstar
{\egroup\LT@c@ption\@gobble[]}%
{\egroup\@xdblarg{\LT@c@ption\@firstofone}}}
\def\LT@makecaption#1#2#3{%
\LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
\sbox\@tempboxa{#1{#2: }#3}%
\ifdim\wd\@tempboxa>\hsize
#1{#2: }#3%
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\endgraf\vskip\baselineskip}%
\hss}}}
\def\LT@output{%
\ifnum\outputpenalty <-\@Mi
\ifnum\outputpenalty > -\LT@end@pen
\LT@err{floats and marginpars not allowed in a longtable}\@ehc
\else
\setbox\z@\vbox{\unvbox\@cclv}%
\ifdim \ht\LT@lastfoot>\ht\LT@foot
\dimen@\pagegoal
\advance\dimen@-\ht\LT@lastfoot
\ifdim\dimen@<\ht\z@
\setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}%
\@makecol
\@outputpage
\setbox\z@\vbox{\box\LT@head}%
\fi
\fi
\global\@colroom\@colht
\global\vsize\@colht
\vbox
{\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}%
\fi
\else
\setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}%
\@makecol
\@outputpage
\global\vsize\@colroom
\copy\LT@head\nobreak
\fi}
\def\LT@end@hd@ft#1{%
\LT@echunk
\ifx\LT@start\endgraf
\LT@err
{Longtable head or foot not at start of table}%
{Increase LTchunksize}%
\fi
\setbox#1\box\z@
\LT@get@widths
\LT@bchunk}
\def\endfirsthead{\LT@end@hd@ft\LT@firsthead}
\def\endhead{\LT@end@hd@ft\LT@head}
\def\endfoot{\LT@end@hd@ft\LT@foot}
\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot}
\def\LT@startpbox#1{%
\bgroup
\let\@footnotetext\LT@p@ftntext
\setlength\hsize{#1}%
\@arrayparboxrestore
\vrule \@height \ht\@arstrutbox \@width \z@}
\def\LT@endpbox{%
\@finalstrut\@arstrutbox
\egroup
\the\LT@p@ftn
\global\LT@p@ftn{}%
\hfil}
\def\LT@p@ftntext#1{%
\edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}%
\global\LT@p@ftn\expandafter{\@tempa{#1}}}%
\endinput
%%
%% End of file `longtable.sty'.
lscape.sty · 1 KB
%%
%% This is file `lscape.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% lscape.dtx (with options: `package')
%%
%% lscape.dtx Copyright (C) 1994 1999-2000 David Carlisle
%%
%% This file is part of the Standard LaTeX `Graphics Bundle'.
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{lscape}
[2000/10/22 v3.01 Landscape Pages (DPC)]
\newif\ifGin@pdftex
\Gin@pdftexfalse
\DeclareOption{pdftex}{%
\PassOptionsToPackage\CurrentOption{graphics}
\Gin@pdftextrue
}
\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
\ProcessOptions
\RequirePackage{graphics}
\let\LS@makecol=\@makecol
\let\LS@makefcolumn=\@makefcolumn
\def\LS@rot{%
\setbox\@outputbox\vbox{\hbox{\rotatebox{90}{\box\@outputbox}}}}
\def\landscape{%
\clearpage
\begingroup
\vsize=\textwidth
\hsize=\textheight
\linewidth=\hsize
\columnwidth=\hsize
\@colroom=\vsize
\textheight=\vsize
\@colht=\vsize
\def\@makecol{\LS@makecol\LS@rot}%
\def\@makefcolumn##1{\LS@makefcolumn{##1}\LS@rot}}
\def\endlandscape{%
\ifGin@pdftex
\pdfpageattr{/Rotate 90}
\fi
\clearpage
\endgroup
\global\@colht=\textheight
\global\vsize=\textheight
\global\@colroom=\textheight}
\endinput
%%
%% End of file `lscape.sty'.
ltcaption.sty · 6 KB
%%
%% This is file `ltcaption.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% ltcaption.dtx (with options: `package')
%%
%% Copyright (C) 1994-2012 Axel Sommerfeldt ([email protected])
%%
%% --------------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Axel Sommerfeldt.
%%
%% This work consists of the files caption.ins, caption.dtx, caption2.dtx,
%% caption3.dtx, bicaption.dtx, ltcaption.dtx, subcaption.dtx, and newfloat.dtx,
%% the derived files caption.sty, caption2.sty, caption3.sty,
%% bicaption.sty, ltcaption.sty, subcaption.sty, and newfloat.sty,
%% and the user manuals caption-deu.tex, caption-eng.tex, and caption-rus.tex.
%%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{ltcaption}[2011/09/12 v1.3 longtable captions (AR)]
\@ifpackageloaded{longtable}{}{%
\PackageError{ltcaption}{longtable package not loaded, aborting}{RTFM}}
\providecommand*\LTcaptype{table}
\providecommand*\ext@table{lot}
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
\@ifpackageloaded{listings}{%
\providecommand*\ext@lstlisting{lol}}{}}
\@ifpackageloaded{caption}{}{%
\newskip\LTcapskip \LTcapskip=\abovecaptionskip
\newskip\LTcapleft \LTcapleft=\fill
\newskip\LTcapright \LTcapright=\fill
\newif\ifLTcapmargins \LTcapmarginstrue
\providecommand*\CaptionLabelFont{}
\providecommand*\CaptionTextFont{}
\providecommand*\CaptionLabelSeparator{:}
}
\@ifundefined{caption@AtBeginDocument}\AtBeginDocument\caption@AtBeginDocument{%
\let\ltcaption@ORI@LT@array\LT@array
\renewcommand*\LT@array{%
\let\caption@LT@refstepcounter\refstepcounter
\def\refstepcounter{%
\caption@LTtype\caption@LT@refstepcounter}%
\let\caption@LT@Hrefstepcounter\H@refstepcounter
\def\H@refstepcounter{%
\caption@LTtype\caption@LT@Hrefstepcounter}%
\let\caption@LT@makecurrent\hyper@makecurrent
\def\hyper@makecurrent{%
\caption@LTtype\caption@LT@makecurrent}%
\def\lst@@caption{\relax}%
\ltcaption@ORI@LT@array}}
\newcommand*\caption@LTtype[2]{%
\edef\caption@LT@tempa{#2}%
\ifx\caption@LT@tempa\caption@LT@table
\caption@LT@type#1%
\else
#1{#2}%
\fi}%
\newcommand*\caption@LT@type[1]{%
\expandafter#1\expandafter{\LTcaptype}}
\newcommand*\caption@LT@table{table}%
\long\def\LT@c@ption#1[#2]#3{%
\LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}%
\def\@tempa{#2}%
\ifx\@tempa\@empty\else
{\let\\\space
\addcontentsline{\csname ext@\LTcaptype\endcsname}{\LTcaptype}%
{\protect\numberline{\csname the\LTcaptype\endcsname}{#2}}}%
\fi
\ignorespaces}
\renewcommand\LT@makecaption[3]{%
\LT@@makecaption{%
\sbox\@tempboxa{%
#1{{\CaptionLabelFont#2\CaptionLabelSeparator} }\CaptionTextFont#3}%
\ifdim\wd\@tempboxa>\hsize
#1{{\CaptionLabelFont#2\CaptionLabelSeparator} }\CaptionTextFont#3%
\else
\hbox to\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\endgraf\vskip\LTcapskip}}
\newcommand\LT@@makecaption[1]{%
\caption@LT@make{\hb@xt@\hsize{%
\ifLTcapmargins
\hspace\LTcapleft
\FBifLTcapwidth{\advance\LTcapwidth-\LTcapleft}%
\else
\hspace\LTleft
\FBifLTcapwidth{\advance\LTcapwidth-\LTleft}%
\fi
\FBifLTcapwidth{\advance\LTcapwidth-%
\ifLTcapmargins\LTcapright\else\LTright\fi}%
\parbox[t]\LTcapwidth{#1}%
\ifLTcapmargins
\hskip\LTcapright
\else
\hskip\LTright
\fi}}}
\AtBeginDocument{\providecommand*\FBifLTcapwidth[1]{}}
\newcommand\caption@LT@make[1]{%
\noalign{\caption@LT@config}%
\expandafter\LT@mcol\expandafter\LT@cols\expandafter{\caption@LTfmt}{%
\hb@xt@\z@{%
\hspace\caption@LTleft
\parbox[t]\linewidth{#1}%
\hspace\caption@LTright}}}%
\newcommand*\caption@LT@config{%
\caption@LT@parse\LTleft\caption@LTleft\caption@ifLTleft
\caption@LT@parse\LTright\caption@LTright\caption@ifLTright
\xdef\caption@LTfmt{%
@{}\caption@ifLTleft{\caption@ifLTright{c}{r}}{l}@{}}}
\newcommand*\caption@LT@parse[3]{%
\let\@pluspart\@undefined
\let\@minuspart\@undefined
\expandafter\caption@LT@parse@\expandafter\@fixpart\the#1 x %
\xdef#2{-\@fixpart
\ifx\@minuspart\@undefined\else
\space\@plus\space\@minuspart
\fi
\ifx\@pluspart\@undefined\else
\space\@minus\space\@pluspart
\fi}%
\let#3\@firstoftwo
\ifx\@pluspart\@undefined
\ifx\@minuspart\@undefined
\let#3\@secondoftwo
\fi
\fi}
\def\caption@LT@parse@#1#2 {%
\edef\@tempa{\@car#2\@nil}%
\if p\@tempa
\def\next{\caption@LT@parse@\@pluspart}%
\else\if m\@tempa
\def\next{\caption@LT@parse@\@minuspart}%
\else\if x\@tempa
\let\next\relax
\else
\def#1{#2}%
\def\next{\caption@LT@parse@ @}%
\fi\fi\fi
\next}
\newenvironment{longtable*}{%
\let\caption@LT@type\@gobble
\let\caption@LT@raisedlink\Hy@raisedlink
\def\Hy@raisedlink{%
\let\Hy@raisedlink\caption@LT@raisedlink
\@gobble}%
\let\ltcaption@ORI@LT@c@ption\LT@c@ption
\def\LT@c@ption##1[##2]##3{%
\ifx##1\@firstofone
\PackageError{ltcaption}%
{Not allowed in longtable* environment}%
{If you do not understand this error, please take a closer
look\MessageBreak at the documentation of the `ltcaption'
package.\MessageBreak \@ehc}%
\else
\ltcaption@ORI@LT@c@ption{##1}[{##2}]{##3}%
\fi}%
\longtable}%
{\endlongtable}
\@ifundefined{@komalongtablefalse}{}{%
\if@komalongtable
\renewcommand{\LT@makecaption}[3]{%
\noalign{%
\if@captionabove
\vskip\belowcaptionskip
\else
\vskip\abovecaptionskip
\fi
}%
\caption@LT@make{%
\@@makecaption{#1}{#2}{#3}%
\endgraf
\if@captionabove
\vskip\abovecaptionskip
\else
\vskip\belowcaptionskip
\fi
}%
}%
\let\LT@@makecaption\@undefined
\fi}
\endinput
%%
%% End of file `ltcaption.sty'.
mainthesis-basic-2025.tex — the file that is compiled · 6 KB
%Use this template when typing your own Bibliography.tex file
%This template was prepared by Dorothea F. Brosius of the
%Institute for Electronics and Applied Physics, University of Maryland, College Park, MD
%The template was last updated in September 2023
%Thesis Main Page used with thesis.sty based on the
%University of Maryland Electronic Thesis and Dissertation (ETD) Style Guide, 2021 Edition
% Select the version that fits how you are making this LaTeX document (its driver).
% The first two are the most likely ones to be needed.
\newcommand{\mydriver}{pdflatex} %Making a PDF directly using pdflatex.
%\newcommand{\mydriver}{dvipdfmx} %Making a DVI and converting that to PDF using dvipdfmx.
%\newcommand{\mydriver}{dvipdfm} %Making a DVI and converting that to PDF using dvipdfm.
%\newcommand{\mydriver}{dvips} %Making a DVI and converting that to PS using dvips (may later be converted to PDF).
%\newcommand{\mydriver}{dvipsone} %Making a DVI and converting that to PS using dvipsone (may later be converted to PDF).
%\newcommand{\mydriver}{ps2pdf} %Same as the one for dvips except it is compatible with Ghostscript's PDF writer.
\documentclass[12pt,\mydriver]{thesis} %12pt is larger than 11pt
\usepackage[margin=1cm]{caption}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{tikz}
\usepackage{times}
\usepackage[USenglish]{babel}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{tabls}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{subeqn}
\usepackage{float}
\usepackage{caption}
\usepackage{supertabular}
\usepackage[onehalfspacing]{setspace} %used for footnote spacing
\usepackage{tocloft,calc}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\large}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\large}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\renewcommand{\cftchapaftersnum}{:\ }
\renewcommand{\cftchappresnum}{\chaptername\space}
\setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix\ }}}
\makeatletter
\g@addto@macro\appendix{%
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
}%
}
\setlength{\cftchapnumwidth}{6em} %adds space between chapter/appendix and title in toc
%hyperref
\usepackage[colorlinks=true,urlcolor=black,linkcolor=blue,citecolor=blue]{hyperref}
\newcommand{\tbsp}{\rule{0pt}{18pt}} %used to get a vertical distance after \hline
\renewcommand{\baselinestretch}{2}
\setlength{\textwidth}{6.75in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.55in}
%\setlength{\topmargin}{-.7in}
%\setlength{\topmargin}{0in} % use this setting if the printer makes
%the top margin 1/2 inch instead of 1 inch
\setlength{\oddsidemargin}{-.1in} % sets left margin to 1 inch
\setlength{\parindent}{.4in}
\pagestyle{empty}
\hyphenation{tem-po-ral-ly}
\begin{document}
\pagestyle{empty}
\include{Abstract} %(must be first, required, non-numbered)
\include{Titlepage} %(must follow Abstract, required, non-numbered)
\include{Copyright} %(highly recommended, non-numbered)
%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain} \pagenumbering{roman} \setcounter{page}{2}
\phantomsection %create the correct anchor for the bookmark
\include{Preface or Foreword} %(if present, start at lower-case Roman number ii)
\addcontentsline{toc}{chapter}{Preface}
%\phantomsection %create the correct anchor for the bookmark
%\addcontentsline{toc}{chapter}{Foreword}
%\include{Foreword} %(if present, lower-case Roman)
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Dedication}
\include{Dedication} %(if present, lower-case Roman)
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Acknowledgements}
\include{Acknowledgements} %(if present, lower-case Roman)
\cleardoublepage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm} %raising the Table of Contents to 1 inch top margin
\addcontentsline{toc}{chapter}{Table of Contents}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm} \addcontentsline{toc}{chapter}{List of Tables}
\renewcommand{\contentsname}{List of Tables}
\listoftables %(if present, lower-case Roman)
\newpage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm}
\addcontentsline{toc}{chapter}{List of Figures}
\renewcommand{\contentsname}{List of Figures}
\listoffigures %(if present, lower-case Roman)
%\newpage
% LIST OF ABBREVIATIONS
\phantomsection %create the correct anchor for the bookmark
\vspace*{-1.5in} \addcontentsline{toc}{chapter}{Abbreviations}
\renewcommand{\contentsname}{List of Abbreviations}
\include{Abbreviations-supertabular} %If the list is more than one page, use this file
%\include{Abbreviations}
\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{2}
\small\normalsize
%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
%\include{Chapter2}
\titleformat{\chapter}
{\normalfont\large}{Appendix \thechapter:}{1em}{}
\include{AppendixA}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\vspace*{-2in}
\addcontentsline{toc}{chapter}{Bibliography}
\include{Bibliography} %To be used when typing your own bibliography
\bibliographystyle{unsrt}
\end{document}
mainthesis-bibtex-2025.tex · 6 KB
%To be used with Bibtex files
%September 2025 - This template was prepared by Dorothea F. Brosius of the
%Institute for Electronics and Applied Physics, University of Maryland, College Park, MD
%Thesis Main Page used with thesis.sty based on the
%University of Maryland Electronic Thesis and Dissertation (ETD) Style Guide, 2024 Edition
% Select the version that fits how you are making this LaTeX document (its driver).
% The first two are the most likely ones to be needed.
\newcommand{\mydriver}{pdflatex} %Making a PDF directly using pdflatex.
%\newcommand{\mydriver}{dvipdfmx} %Making a DVI and converting that to PDF using dvipdfmx.
%\newcommand{\mydriver}{dvipdfm} %Making a DVI and converting that to PDF using dvipdfm.
%\newcommand{\mydriver}{dvips} %Making a DVI and converting that to PS using dvips (may later be converted to PDF).
%\newcommand{\mydriver}{dvipsone} %Making a DVI and converting that to PS using dvipsone (may later be converted to PDF).
%\newcommand{\mydriver}{ps2pdf} %Same as the one for dvips except it is compatible with Ghostscript's PDF writer.
\documentclass[12pt,\mydriver]{thesis} %12pt is larger than 11pt
\usepackage[margin=1cm]{caption}
%\usepackage{longtable}
\usepackage{supertabular}
\usepackage{tabls}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{tikz}
\usepackage{times}
\usepackage[USenglish]{babel}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{subeqn}
\usepackage{float}
\usepackage{caption}
\usepackage[onehalfspacing]{setspace} %used for footnote spacing
\usepackage{bibentry} %Using this to add capability for in-text full citations.
\nobibliography*
\usepackage{array}
%\renewcommand{\arraystretch}{1.1}
%\usepackage{booktabs}
\usepackage{needspace}
%hyperref
\usepackage[colorlinks=true,urlcolor=black,linkcolor=blue,citecolor=blue]{hyperref}
\usepackage{tocloft,calc}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\large}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\large}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\renewcommand{\cftchapaftersnum}{:\ }
\renewcommand{\cftchappresnum}{\chaptername\space}
\setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix\ }}}
\makeatletter
\g@addto@macro\appendix{%
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
}%
}
\setlength{\cftchapnumwidth}{6em} %adds space between chapter/appendix and title in toc
\newcommand{\tbsp}{\rule{0pt}{18pt}} %used to get a vertical distance after \hline
\renewcommand{\baselinestretch}{2}
\setlength{\textwidth}{6.75in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.55in}
% \setlength{\topmargin}{0in} % use this setting if the printer makes
% the top margin 1/2 inch instead of 1 inch
\setlength{\oddsidemargin}{.1in} % sets left margin to 1 inch
\setlength{\parindent}{.4in}
\pagestyle{empty}
\begin{document}
\pagestyle{empty}
\include{Abstract} %(must be first, required, non-numbered)
\include{Titlepage} %(must follow Abstract, required, non-numbered)
%\include{Copyright} %(highly recommended, non-numbered)
%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain} \pagenumbering{roman} \setcounter{page}{2}
\iffalse
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Preface or Foreword}
\include{Preface} %(if present, start at lower-case Roman number ii)
%\phantomsection %create the correct anchor for the bookmark
%\addcontentsline{toc}{chapter}{Foreword}
%\include{Foreword} %(if present, lower-case Roman)
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Dedication}
\include{Dedication} %(if present, lower-case Roman)
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Acknowledgements}
\include{Acknowledgements} %(if present, lower-case Roman)
\cleardoublepage
\fi
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm}
\addcontentsline{toc}{chapter}{Table of Contents}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm}
\addcontentsline{toc}{chapter}{List of Tables}
\renewcommand{\contentsname}{List of Tables}
\listoftables %(if present, lower-case Roman)
\newpage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm}
\addcontentsline{toc}{chapter}{List of Figures}
\renewcommand{\contentsname}{List of Figures}
\listoffigures %(if present, lower-case Roman)
\newpage
% LIST OF ABBREVIATIONS
\phantomsection %create the correct anchor for the bookmark
\vspace*{-1.5in}
\addcontentsline{toc}{chapter}{List of Abbreviations}
\include{Abbreviations-supertabular}
\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{2}
\small\normalsize
%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
\include{Chapter2}
\titleformat{\chapter}
{\normalfont\large}{Appendix \thechapter:}{1em}{}
%\include{AppendixA}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\vspace*{-1in}
%\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{unsrt}
\bibliography{Galactic,Dottie} %replace "Galactic,Dottie"
%with the file name(s) of your bib file(s)
%Use \cite when referencing bibtex files}
\end{document}
mainthesis-natbib-2025.tex · 6 KB
%To be used with Bibtex files using Natbib commands
%September 2025 - This template was prepared by Dorothea F. Brosius of the
%Institute for Electronics and Applied Physics, University of Maryland, College Park, MD
%Thesis Main Page used with thesis.sty based on the
%University of Maryland Electronic Thesis and Dissertation (ETD) Style Guide, 2024 Edition
% Select the version that fits how you are making this LaTeX document (its driver).
% The first two are the most likely ones to be needed.
\newcommand{\mydriver}{pdflatex} %Making a PDF directly using pdflatex.
%\newcommand{\mydriver}{dvipdfmx} %Making a DVI and converting that to PDF using dvipdfmx.
%\newcommand{\mydriver}{dvipdfm} %Making a DVI and converting that to PDF using dvipdfm.
%\newcommand{\mydriver}{dvips} %Making a DVI and converting that to PS using dvips (may later be converted to PDF).
%\newcommand{\mydriver}{dvipsone} %Making a DVI and converting that to PS using dvipsone (may later be converted to PDF).
%\newcommand{\mydriver}{ps2pdf} %Same as the one for dvips except it is compatible with Ghostscript's PDF writer.
\documentclass[12pt,\mydriver]{thesis} %12pt is larger than 11pt
\usepackage[margin=1cm]{caption}
\usepackage{tikz}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\large}{Chapter \thechapter:}{1em}{}
\usepackage{times}
\usepackage[USenglish]{babel}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{cite}
\usepackage{lscape}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{multirow}
\usepackage{epstopdf}
\usepackage{tabls}
\usepackage{wrapfig}
\usepackage{slashbox}
\usepackage{subeqn}
\usepackage{float}
\usepackage{caption}
\usepackage{supertabular}
\usepackage[onehalfspacing]{setspace} %used for footnote spacing
\usepackage[sort,square,numbers]{natbib}
%%%\usepackage[sectionbib]{chapterbib} %used for placing
%%%bibliography after each chapter
\usepackage{bibentry}
\usepackage{tocloft,calc}
\renewcommand{\cftlottitlefont}{\hspace*{\fill}\large}
\renewcommand{\cftafterlottitle}{\hspace*{\fill}}
\renewcommand{\cftloftitlefont}{\hspace*{\fill}\large}
\renewcommand{\cftafterloftitle}{\hspace*{\fill}}
\renewcommand{\cftchapaftersnum}{:\ }
\renewcommand{\cftchappresnum}{\chaptername\space}
\setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix\ }}}
\makeatletter
\g@addto@macro\appendix{%
\addtocontents{toc}{%
\protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}%
}%
}
\setlength{\cftchapnumwidth}{6em} %adds space between chapter/appendix and title in toc
%hyperref
\usepackage[colorlinks=true,urlcolor=black,linkcolor=blue,citecolor=blue]{hyperref}
\newcommand{\tbsp}{\rule{0pt}{18pt}} %used to get a vertical distance after \hline
\renewcommand{\baselinestretch}{2}
\setlength{\textwidth}{6.75in}
\setlength{\textheight}{9in}
\setlength{\topmargin}{-.55in}
% \setlength{\topmargin}{0in} % use this setting if the printer makes
% the top margin 1/2 inch instead of 1 inch
\setlength{\oddsidemargin}{.1in} % sets left margin to 1 inch
\setlength{\parindent}{.4in}
\pagestyle{empty}
\begin{document}
\pagestyle{empty}
\include{Abstract} %(must be first, required, non-numbered)
\include{Titlepage} %(must follow Abstract, required, non-numbered)
\include{Copyright} %(highly recommended, non-numbered)
%Pages from this point start at lower-case Roman number ii)
\pagestyle{plain} \pagenumbering{roman} \setcounter{page}{2}
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Preface or Foreword}
\include{Preface} %(if present, start at lower-case Roman number ii)
%\phantomsection %create the correct anchor for the bookmark
%\addcontentsline{toc}{chapter}{Foreword}
%\include{Foreword} %(if present, lower-case Roman)
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Dedication}
\include{Dedication} %(if present, lower-case Roman)
\phantomsection %create the correct anchor for the bookmark
\addcontentsline{toc}{chapter}{Acknowledgements}
\include{Acknowledgements} %(if present, lower-case Roman)
\cleardoublepage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm}
\addcontentsline{toc}{chapter}{Table of Contents}
\renewcommand{\contentsname}{Table of Contents}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\tableofcontents %(required, lower-case Roman)
\newpage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm}
\addcontentsline{toc}{chapter}{List of Tables}
\renewcommand{\contentsname}{List of Tables}
\listoftables %(if present, lower-case Roman)
\newpage
\phantomsection %create the correct anchor for the bookmark
\vspace*{-2.5cm} \addcontentsline{toc}{chapter}{List of Figures}
\renewcommand{\contentsname}{List of Figures}
\listoffigures %(if present, lower-case Roman)
\newpage
% LIST OF ABBREVIATIONS
\phantomsection %create the correct anchor for the bookmark
\vspace*{-1.5in}
\addcontentsline{toc}{chapter}{List of
Abbreviations}
\include{Abbreviations-supertabular}
\newpage
\setlength{\parskip}{0em}
\renewcommand{\baselinestretch}{2}
\small\normalsize
%Pages from this point start at Arabic numeral 1
\setcounter{page}{1}
\pagenumbering{arabic}
\include{Chapter1}
%\include{Chapter2}
\titleformat{\chapter}
{\normalfont\large}{Appendix \thechapter:}{1em}{}
%\include{AppendixA}
\renewcommand{\baselinestretch}{1}
\small\normalsize
\vspace*{-1in}
\addcontentsline{toc}{chapter}{Bibliography}
%When using Natbib, use the following three lines:
\newpage
\vspace*{-1in}
\bibliographystyle{unsrtnat}
\bibliography{Galactic,Dottie} %replace "Galactic,Dottie" with the
% file name(s) of your bib file(s)
\end{document}
microtype.sty · 106 KB
106 KB — too long to show here. It arrives with the project.
mpc-eps-converted-to.pdf — binary, 14 KB
mpc.eps — binary, 16 KB
mpc.pdf — binary, 1057 KB
multirow.sty · 7 KB
%%
%% multirow.sty V1.5 version (16-July-1999)
%%
%% Author: Jerry Leichter <[email protected]>
%% Piet van Oostrum <[email protected]>
%%
%% This file may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1 or, at your option, any later version.
%%
%% V1.0 was distributed anonymously, based on a Usenet posting that was
%% not intended for stand-alone use.
%% V1.1 was modified by Piet van Oostrum <[email protected]> to allow it to
%% work without bigstrut.sty.
%% V1.2 was modified by Jerry Leichter for the same goal, but using a
%% different approach which will work properly in conjunction with
%% bigstrut.sty.
%% V1.2a was modified by Piet van Oostrum <[email protected]> to use \vskip
%% instead of \raise in positioning, avoiding making rows too high
%% when the adjustment is large.
%% V1.3 was modified by Piet van Oostrum to work properly in a p{} column
%% (\leavevmode added)
%% V1.4 was modified by Piet van Oostrum to check for the special case that
%% the width is given as an *. In this case the natural
%% width of the text argument will be used and the argument
%% is processed in LR-mode.
%% V1.5 was modified by Piet van Oostrum: Added a % after \hbox{#5}\vfill}.
%% Added \struts around #5 for better vertical positioning.
%% Additional coding for negative value of nrows.
%
% Make an entry that will span multiple rows of a table.
%
% \multirow{nrows}[bigstruts]{width}[fixup]{text}
%
% nrows is the number of rows to span. It's up to you to leave the other
% rows empty, or the stuff created by \multirow will over-write it.
% With a positive value of nrows the spanned colomns are this row and
% (nrows-1) rows below it. With a negative value of nrows they are
% this row and (1-nrows) above it.
%
% bigstruts is mainly used if you've used bigstrut.sty. In that case it
% is the total number of uses of \bigstrut within the rows being
% spanned. Count 2 uses for each \bigstrut, 1 for each \bigstrut[x]
% where x is either t or b. The default is 0.
% width is the width to which the text is to be set, or * to indicate that
% the text argument's natural width is to be used.
%
% text is the actual text. If the width was set explicitly, the text will
% be set in a parbox of that width; you can use \\ to force linebreaks
% where you like.
%
% If the width was given as * the text will be set in LR mode. If you
% want a multiline entry in this case you should use a tabular or array
% in the text parameter.
%
% The text is centered vertically within the range spanned by nrows.
%
% fixup is a length used for fine tuning: The text will be raised (or
% lowered, if fixup is negative) by that length above (below) wherever
% it would otherwise have gone.
%
% For example (using both multirow and bigstrut)
%
% \newcommand{\minitab}[2][l]{\begin{tabular}{#1}#2\end{tabular}}
% \begin{tabular}{|c|c|}
% \hline
% \multirow{4}{1in}{Common g text} & Column g2a\\
% & Column g2b \\
% & Column g2c \\
% & Column g2d \\
% \hline
% \multirow{3}[6]*{Common g text} & Column g2a\bigstrut\\\cline{2-2}
% & Column g2b \bigstrut\\\cline{2-2}
% & Column g2c \bigstrut\\
% \hline
% \multirow{4}[8]{1in}{Common g text} & Column g2a\bigstrut\\\cline{2-2}
% & Column g2b \bigstrut\\\cline{2-2}
% & Column g2c \bigstrut\\\cline{2-2}
% & Column g2d \bigstrut\\
% \hline
% \multirow{4}*{\minitab[c]{Common \\ g text}} & Column g2a\\
% & Column g2b \\
% & Column g2c \\
% & Column g2d \\
% \hline
% \end{tabular}
%
% If any of the spanned rows are unusually large, or if you're using
% bigstrut.sty and \bigstrut's are used assymetrically about the centerline of
% the spanned rows, the vertical centering may not come out right. Use the
% fixup argument in this case.
%
% Just before "text" is expanded, the \multirowsetup macro is expanded to
% set up any special environment. Initially, \multirowsetup contains just
% \raggedright. It can be redefined with \renewcommand.
%
% Bugs: It's just about impossible to deal correctly with descenders. The
% text will be set up centered, but it may then have a baseline that doesn't
% match the baseline of the stuff beside it, in particular if the stuff
% beside it has descenders and "text" does not. This may result in a small
% missalignment. About all that can be done is to do a final touchup on
% "text", using the fixup optional argument. (Hint: If you use a measure
% like .1ex, there's a reasonable chance that the fixup will still be correct
% if you change the point size.)
%
% \multirow is mainly designed for use with table, as opposed to array,
% environments. It will not work well in an array environment since the lines
% have an extra \jot of space between them which it won't account for. Fixing
% this is difficult in general, and doesn't seem worth it. The bigstruts
% argument can be used to provide a semi-automatic fix: First set
% \bigstrutjot to .5\jot. Then simply repeat nrows as the bigstruts argument.
% This will be close, but probably not exact; you can use the fixup argument
% to refine the result. (If you do this repeatedly, you'll probably want to
% wrap these steps up in a simple macro. Note that the modified \bigstrutjot
% value will not give reasonable results if you have bigstruts and use this
% argument for its intended purpose elsewhere. In that case, you might want
% to set it locally.)
%
% If you use \multirow with the colortbl package you have to take
% precautions if you want to color the column that has the \multirow in it.
% colortbl works by coloring each cell separately. So if you use \multirow
% with a positive nrows value, colortbl will first color the top cell, then
% \multirow will typeset nrows cells starting with this cell, and later
% colortbl will color the other cells, effectively hiding the text in that
% area. This can be solved by putting the \multirow is the last row with a
% negative nrows value.
% Example:
%
% \begin{tabular}{l>{\columncolor{yellow}}l}
% aaaa & \\
% cccc & \\
% dddd & \multirow{-3}*{bbbb}\\
% \end{tabular}
%
\def\multirowsetup{\raggedright}
\def\multirow#1{\relax\@ifnextchar
[{\@multirow{#1}}{\@multirow{#1}[0]}}
\def\@multirow#1[#2]#3{\@ifnextchar [{\@xmultirow{#1}[#2]{#3}}%
{\@xmultirow{#1}[#2]{#3}[0pt]}}
\def\@xmultirow#1[#2]#3[#4]#5{\@tempcnta=#1%
\@tempdima\@tempcnta\ht\@arstrutbox
\advance\@tempdima\@tempcnta\dp\@arstrutbox
\ifnum\@tempcnta<0\@tempdima=-\@tempdima\fi
\advance\@tempdima#2\bigstrutjot
\if*#3\setbox0\vtop to \@tempdima{\vfill\multirowsetup
\hbox{\strut#5\strut}\vfill}%
\else
\setbox0\vtop to \@tempdima{\hsize#3\@parboxrestore
\vfill \multirowsetup \strut#5\strut\par\vfill}%
\fi
\ht0\z@\dp0\z@
\ifnum\@tempcnta<0\advance\@tempdima-\dp\@arstrutbox
\else\@tempdima=\ht\@arstrutbox
\ifnum#2>0 \advance\@tempdima\bigstrutjot \fi
\fi
\advance\@tempdima#4 \leavevmode\vtop{\vskip-\@tempdima\box0\vss}}
\@ifundefined{bigstrutjot}{\newdimen\bigstrutjot \bigstrutjot\jot}{}
no-photo.png — binary, 73 KB
setspace.sty · 22 KB
% \iffalse meta-comment
%
% Copyright (C) 2011 by Robin Fairbairns ([email protected])
% Copyright (C) 2000 by Geoffrey Tobin
%
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Robin Fairbairns
%
% This work consists of the files setspace.sty and setspace-test.tex
%
% \fi
%
%%% ======================================================================
%%% @LaTeX-style-file{
%%% filename = "setspace.sty",
%%% version = "6.7a",
%%% date = "Fri 1 December 2000",
%%% time = "17:49 UT+11",
%%% author = "Geoffrey Tobin",
%%% address = "Department of Electronic Engineering
%%% Faculty of Science and Technology
%%% La Trobe University
%%% Bundoora VIC 3086
%%% Australia",
%%% email = "[email protected] (Internet)",
%%% telephone = "(+ 613) 9479-3736",
%%% FAX = "(+ 613) 9479-3025",
%%% supported = "yes",
%%% archived = "CTAN",
%%% keywords = "LaTeX package, line spacing",
%%% codetable = "ISO/ASCII",
%%% checksum = "11793 546 2608 21972",
%%% docstring = "setspace.sty is a LaTeX (2e) package.
%%% Comments and bug reports welcome!
%%%
%%% This includes GDG's modification to Erica Harris'
%%% setspace.sty. The main aspects of this
%%% modification deal with the definitions of
%%% \singlespacing \onehalfspacing, and
%%% \doublespacing, (these are near the beginning of
%%% the file). Primarily, these deal with adding
%%% fontsize changes to guarantee that the new
%%% baseline is properly defined and placed into
%%% action. The extra \vskip in the definition of
%%% \singlespacing seems to make for a cleaner
%%% transition from multiple spacing back to single
%%% spacing. These did not appear warrranted for
%%% other size changes.
%%%
%%% Modified by GDG on November 1, 1992, to allow
%%% for use of New Font Selection Scheme.
%%%
%%% Modified by GDG on June 4, 1993, to correct
%%% for spacing tokens in definition of \@setsize
%%% Thanks to Kaja P. Christiansen <[email protected]>
%%% for the fix!!
%%%
%%% Modified by GDG on May 24, 1994, to change toggle
%%% definition from \selectfont to \@newbaseline.
%%%
%%% Modified by GDG on May 25, 1994, to add
%%% definition of \everydisplay -- this part of
%%% the code was apparently written by Geoffrey
%%% Tobin on Thu 23 Jan 1992 and was provided by
%%% [email protected] (Richard Stanton).
%%% This should help with some of the awkward math
%%% placements in changing spacings.
%%%
%%% Modified by GT on 23 Jan 1996, to correct
%%% \everymath bug, first reported by Mario
%%% Wolczko <[email protected]> on 9 June 1992.
%%%
%%% Modified by GT on 23 Jan 1996, to correct
%%% usage of comment characters in macro
%%% definitions.
%%%
%%% Modified by GT on 23 Jan 1996, to update
%%% (adjusted) \@xfloat definition for LaTeX2e.
%%% Bug report was courtesy of Kay Nettle.
%%%
%%% Modified by GT on 24 Jan 1996, to update
%%% (adjusted) \@footnotetext definition for
%%% LaTeX2e, and to add an adjusted LaTeX2e
%%% \@mpfootnotext definition for minipages.
%%% Bug report was courtesy Kay Nettle.
%%%
%%% Changed by GT on 6 Feb 1996, into a LaTeX2e
%%% package.
%%%
%%% Made more package-like by GT on 14 Feb 1996,
%%% by adding standard messages.
%%%
%%% GT replaced \@normalsize by \normalsize on 28
%%% Sep 1996. This change was successively
%%% advised by:
%%%
%%% Rowland J.~Bartlett
%%% <[email protected]>
%%% on Tue 6 Aug 96,
%%%
%%% Ted Stern
%%% <[email protected]>
%%% on Wed 7 Aug 96,
%%%
%%% Michal Jaegermann
%%% <[email protected]>
%%% on Fri 27 Sep 96.
%%%
%%% GT: Sat 28 Sep 1996: Added call to
%%% \setspace@size in \setstretch, as suggested
%%% by David Hull <[email protected]>
%%% on Wed 24 July 1996.
%%%
%%% GT: Sat 28 Sep 1996: Pared \setspace@size
%%% mercilessly down to \@currsize, following
%%% advice given on Fri 27 Sep 1996 by Michal
%%% Jaegermann <[email protected]>.
%%% Retained this macro for flexibility.
%%%
%%% Code rearranged by GT, Sat 28 Sep 1996, to give
%%% greater prominence to \setstretch.
%%%
%%% Also, GT changed (Sat 28 Sep 1996) many
%%% occurrences of \def to \newcommand,
%%% \renewcommand, or \newenvironment,
%%% as seemed appropriate.
%%%
%%% GT, Tue 10 Dec 1996: Following a suggestion
%%% by Ted Stern, the `single' spacing is now
%%% settable by the user. This is for slightly
%%% large fonts such as Lucida Bright.
%%%
%%% GT, Wed 11 Dec 1996: For simplicity and
%%% maintainability, call \onehalfspacing in
%%% the onehalfspace environment, and
%%% \doublespacing in the doublespace
%%% environment.
%%%
%%% GT, Wed 11 Dec 1996: Also deleted
%%% \setspace@size from \setstretch,
%%% as \@currsize suffices.
%%%
%%% Modified by Brett Presnell (BP)
%%% <[email protected]> on 21 Mar 1998
%%% to add nodisplayskipstretch option, which
%%% turns off the stretching of the space
%%% before and after displays, which is often
%%% excessive, particularly with doublespaced
%%% documents. Also added the
%%% setdisplayskipstretch command, which allows
%%% the user to choose by how much to stretch
%%% the space before and after displays
%%% independently from the setting of
%%% baselinestretch. This works regardless of
%%% whether the nodisplayskipstretch option is
%%% in effect.
%%%
%%% GT, Wed 15 Apr 1998: Added the singlespace*
%%% environment requested by
%%% Mark Olesen <[email protected]>
%%% on Sat 24 May 1997 and Wed 18 June 1997.
%%% This is reported to give improved vertical
%%% spacing around itemize and quote environments.
%%%
%%% GT, Wed 15 Apr 1998: David Hull pointed out on
%%% Fri 12 Dec 1997 that the \belowdisplayskip line
%%% in the \everydisplay was mistyped. Now fixed.
%%%
%%% GT, Thu 26 Nov 1998: Finally got round to
%%% fixing the absence of \begingroup from
%%% onehalfspace and doublespace environments.
%%% Thanks to: Bernd Schandl, Ron Smith,
%%% Himanshu Gohel, and Kevin Ruland, for bringing
%%% it to my long overdue attention.
%%%
%%% GT, Tue 27 July 1999: On Saturday 24 July
%%% 1999, Alexander L. Wolf <[email protected]>
%%% informed me that the \doublespace and
%%% \onehalfspace _macros_ are still at fault.
%%%
%%% GT, Fri 3 March 2000: Today Stefano
%%% Lacaprara of Italy brought my attention to
%%% the need to extend the commands and macros
%%% to point sizes other than 10, 11 and 12.
%%% Since there's no general formula for the
%%% line stretch values in terms of point size,
%%% and they vary only slightly between 10, 11
%%% and 12 pt, and furthermore the values were
%%% presumably optimised specifically for the
%%% Computer Modern fonts, i've chosen to use
%%% the 10 pt values as the generic defaults.
%%%
%%% GT, Fri 1 December 2000: George Pearson
%%% requested package options for the three
%%% common spacings.
%%%
%%% The checksum field above contains a CRC-16
%%% checksum as the first value, followed by the
%%% equivalent of the standard UNIX wc (word
%%% count) utility output of lines, words, and
%%% characters. This is produced by Robert
%%% Solovay's checksum utility."
%%% }
%%% ======================================================================
%% FILE: setspace.sty in SYS2.TEX.PUB.ISULATEX.STYLES
%% AUTHOR: Erica M. S. Harris
%% DATE: April 1990
%% MOD: March 1991
%%%
%%% Update to LaTeX (2e) : 6 Feb 1996.
%%% Description: LaTeX Document Package "setspace"
%%%
%%% Usage:
%%% \documentclass[...]{...}
%%% \usepackage{setspace}
%%%
%% Based on the doublespace option created by Stephen Page.
%%
%% This style option provides commands and environments for doing
%% double and one-and-a-half spacing based on pt size.
%%
%% Single spacing is the default.
%%
%% Three commands, \singlespacing, \onehalfspacing, and
%% \doublespacing, are for use in the preamble to set the overall
%% spacing for the document. If a different spacing is required then
%% the \setstretch{baselinestretch} command can be used in the
%% preamble to set the baselinestretch appropriately. The default
%% spacing with this style option is single spacing.
%%
%% Three environments, singlespace, onehalfspace, and doublespace,
%% allow the spacing to be changed within the document. Both the
%% onehalfspace and doublespace environments are intended to increase
%% the spacing, so the onehalfspace environment should not be used in
%% a double spaced document. If an increased spacing different from
%% one-and-a-half or double spacing is required then the spacing
%% environment can be used. The spacing environment takes one
%% argument which is the larger baselinestretch to use,
%% e.g., \begin{spacing}{2.5}.
%%
%% \footins is adjusted the same as \parskip - appears to work. Lose
%% stretch parts but don't consider that to be crucial
%%
%% Removed code for altering spacing before and after displayed
%% equations - just looked too much.
%%
%% MODS:
%% Redefinition of \spacing and \endspacing for consistency with
%% TeX 3.x inserted by George Greenwade. Modification provided by
%% Philip Ross ([email protected]) and John Byrne via INFO-TeX.
%%
%% PLEASE REPORT ANY BUGS
%%
%% Old Documentation follows:
%% 1. A new environment "singlespace" is provided, within which single
%% spacing will apply.
%% JFL - changed so that it works in regular text and so that
%% vertical space before and after is correctly computed
%% 2. Double spacing is turned off within footnotes and floats (figures
%% and tables).
%% 3. Proper double spacing happens below tabular environments and in
%% other places where LaTeX uses a strut.
%% 4. Slightly more space is inserted before footnotes.
%% 5. JFL - fixes spacing before and after displayed math
%%
%%
%% mods: Jean-Francois Lamy
%% [email protected]
%% [email protected]
%%
%% POSSIBLE BUGS:
%% . Increasing struts may possibly cause some other obscure part of
%% formatting to fall over.
%% . \begin{singlespace}\begin{quote} produces the wrong spacing before
%% the quote (extra glue is inserted).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@ifundefined{NeedsTeXFormat}{% 2.09 version
\def \filename {setspace.sty}
\def \filedate {2000/12/01}
\def \fileversion {6.7a}
\typeout {Package: `setspace' \fileversion\space <\filedate>}
}{% 2e version
\NeedsTeXFormat {LaTeX2e}[1994/12/01]
\ProvidesPackage {setspace}[2011/12/19 v6.7a set line spacing]
}
% BP: add nodisplayskipstretch option and \setdisplayskipstretch command.
\newcommand{\displayskipstretch}{\baselinestretch}
\newcommand{\setdisplayskipstretch}[1]{\renewcommand{\displayskipstretch}{#1}}
\DeclareOption{nodisplayskipstretch}{\setdisplayskipstretch{1.0}}
% GT: add George Pearsons' suggested options.
\DeclareOption{singlespacing}{\AtEndOfPackage{\singlespacing}}
\DeclareOption{onehalfspacing}{\AtEndOfPackage{\onehalfspacing}}
\DeclareOption{doublespacing}{\AtEndOfPackage{\doublespacing}}
\ProcessOptions
% GT: Sat 28 Sep 1996: Widely using \newcommand, \renewcommand, and
% \newenvironment, instead of \def.
% ** Line space commands.
\newcommand{\setstretch}[1]{%
\def\baselinestretch{#1}%
\@currsize
}
% GT: Sat 28 Sep 1996: spacing commands and environments modified to
% use \setstretch instead of \baselinestretch.
%
% GT: Sat 28 Sep 1996: No, I don't know understand the line spacing
% algorithms! If someone (LaTeX team) can enlighten me as to the
% general rule, please do! It would be very pleasant if setspace.sty
% were suited for document font sizes other than 10, 11 and 12 pt.
%
% GT: Tue 10 Dec 1996: Instead of fixing singlespacing to exact unity,
% allow user to redefine it (only slightly, please!) from its initial
% value of unity, in the case when a particular font is slightly larger
% or slightly smaller than its point size would indicate. This change
% affects setspace's single spacing commands, and LaTeX's footnote and
% float environments. The one and a half, double, and arbitrary
% spacing commands are unaltered.
\newcommand{\SetSinglespace}[1]{%
\def\setspace@singlespace{#1}%
}
% Here's the default single line spacing value.
\SetSinglespace{1}
\newcommand{\singlespacing}{%
\setstretch {\setspace@singlespace}% normally 1
\vskip \baselineskip % Correction for coming into singlespace
}
\newcommand{\onehalfspacing}{%
\setstretch{1.25}% default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.25}%
\or % 11pt
\setstretch {1.213}%
\or % 12pt
\setstretch {1.241}%
\fi
}
\newcommand{\doublespacing}{%
\setstretch {1.667}% default
\ifcase \@ptsize \relax % 10pt
\setstretch {1.667}%
\or % 11pt
\setstretch {1.618}%
\or % 12pt
\setstretch {1.655}%
\fi
}
% ** Modification of the LaTeX command \@setsize.
%---Stretch the baseline BEFORE calculating the strut size. This improves
% spacing below tabular environments etc., probably...
% Comments are welcomed.
% GT: Sun 29 Sep 1996: Question: Is this code anywhere near correct
% since this part of LaTeX (in, eg, latex.ltx) has been greatly changed?
% GT: Sun 29 Sep 1996: The meanings of the arguments to \@setsize
% appear to be (whatever these may signify) :
% current size; font baselineskip; ignored (!); and font size.
% GT: Sun 29 Sep 1996: Note that \@setsize (in latest LaTeX,
% \@setfontsize, which is called by \@setsize) seems to be the only
% place in purely modern LaTeX where \@currsize is set, and ltxguide.cls
% seems to be the only file in the LaTeX base distribution that uses it!
% RF: 2011-12-19: only redefine \@setsize if under 2e; there have been
% reports of ltx209 packages failing when run with setspace under
% ltx2e, with this definition
\@ifundefined{NeedsTeXFormat}{%
\def\@setsize#1#2#3#4{%
% Modified 1993.04.07--GDG per KPC
\@nomath#1%
\let\@currsize#1%
\baselineskip #2%
\baselineskip \baselinestretch\baselineskip
\parskip \baselinestretch\parskip
\setbox\strutbox \hbox{%
\vrule height.7\baselineskip
depth.3\baselineskip
width\z@}%
\skip\footins \baselinestretch\skip\footins
\normalbaselineskip\baselineskip#3#4}%
}{}%
% ** Float and footnote adjustments to compensate for a change in the
% ** main text's line spacing.
%---Increase the space between last line of text and footnote rule.
%\skip\footins 20pt plus4pt minus4pt
%---Reset baselinestretch within floats and footnotes.
% GT: Tue 23 Jan 1996: This is where the conflict with the combination
% of the color package and the figure environment used to occur.
% Floats.
% GT: Sat 28 Sep 1996: \@xfloat is the only place where \normalsize
% is still used in setspace.sty !
\let\latex@xfloat=\@xfloat
\def\@xfloat #1[#2]{%
\latex@xfloat #1[#2]%
\def\baselinestretch{\setspace@singlespace}%
\normalsize
}
% GT: Wed 24 Jan 1996: This footnote code was copied from LaTeX and
% modified rather naively. It had to be brought up to date, not only
% because of LaTeX's new color ability, but also because ther had
% been major changes to this code in LaTeX at least as far back as
% March 1992.
% Normal, bottom of the page, footnotes.
%
% GT: Based HEAVILY on original LaTeX (2e) code. A standard hook would
% be MUCH preferred, so that LaTeX's footnote implementation needn't be
% copied each time it changes.
%
% GT: The \protected@edef requires at least the December 1994 LaTeX.
% This is precisely the kind of VERSION DEPENDENCY situation that
% cannot (AFAIK) be avoided, because LaTeX (2e) LACKS appropriate
% standard hooks and/or context markers.
\long\def\@footnotetext#1{%
\insert\footins{%
% GT: Next line added. Hook desired here!
\def\baselinestretch {\setspace@singlespace}%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
\splittopskip\footnotesep
\splitmaxdepth \dp\strutbox \floatingpenalty \@MM
\hsize\columnwidth
\@parboxrestore
\protected@edef\@currentlabel{%
\csname p@footnote\endcsname\@thefnmark
}%
\color@begingroup
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
\color@endgroup}}
% Minipage footnotes.
\long\def\@mpfootnotetext#1{%
\global\setbox\@mpfootins\vbox{%
\unvbox \@mpfootins
% GT: Next line added. Hook desired here!
\def\baselinestretch {\setspace@singlespace}%
\reset@font\footnotesize
\hsize\columnwidth
\@parboxrestore
\protected@edef\@currentlabel{%
\csname p@mpfootnote\endcsname\@thefnmark}%
\color@begingroup
\@makefntext{%
\rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
\color@endgroup}}
% ** Line space environments.
% A single spaced quote (say) is done by surrounding singlespace with quote.
\newenvironment{singlespace}{%
\vskip \baselineskip
\setstretch {\setspace@singlespace}%
\vskip -\baselineskip
}{%
\par
}
% GT (c/o Mark Olesen), Wed 15 April 1998.
\newenvironment{singlespace*}{%
\setstretch {\setspace@singlespace}%
\vskip -\baselineskip
}{%
\vskip -0.5\baselineskip
}
% spacing, doublespace and onehalfspace all are meant to INCREASE the
% spacing (i.e. calling onehalfspace from within doublespace will not
% produce a graceful transition between spacings)
%
% Next two definitions fixed for consistency with TeX 3.x
% In order to use \newenvironment, while easily using same code for
% end of each environment, the code that used to be in \endspacing has
% been moved into a new (but internal) macro, \restore@spacing.
\newcommand{\restore@spacing}{%
\par
\vskip \parskip
\vskip \baselineskip
\endgroup
\vskip -\parskip
\vskip -\baselineskip
}
\newenvironment{spacing}[1]{%
\par
\begingroup % moved from \endspacing by PGBR 29-1-91
\setstretch {#1}%
}{%
\restore@spacing
}
% one and a half spacing is 1.5 x pt size
\newenvironment{onehalfspace}{%
\begingroup
\onehalfspacing
}{%
\restore@spacing
}
% double spacing is 2 x pt size
\newenvironment{doublespace}{%
\begingroup
\doublespacing
}{%
\restore@spacing
}
% GT: EMSH chose to omit display math part that follows.
% She wrote (see above) that the "altered spacing before and after displayed
% equations ... just looked too much".
%
% Fix up spacing before and after displayed math
% (arraystretch seems to do a fine job for inside LaTeX displayed math,
% since array and eqnarray seem to be affected as expected).
% Changing \baselinestretch and doing a font change also works if done here,
% but then you have to change @setsize to remove the call to @nomath)
%
% GT: The \belowdisplayskip line was mistyped; now fixed, courtesy of
% David Hull.
%
% GT: Brett Parnell has addressed EMSH's concern by replacing
% \baselinestretch by \displayskipstretch in displays, as follows.
\everydisplay\expandafter{%
\the\everydisplay
\abovedisplayskip \displayskipstretch\abovedisplayskip
\belowdisplayskip \displayskipstretch\belowdisplayskip
\abovedisplayshortskip \displayskipstretch\abovedisplayshortskip
\belowdisplayshortskip \displayskipstretch\belowdisplayshortskip
}
\endinput
%%% EOF.
slashbox.sty · 3 KB
% slashbox.sty by Koichi Yasuoka, May 27, 1993
% minor modification by Toru Sato, May 31, 1993
\typeout{slashbox style by K.Yasuoka, May 1993.}%
\newbox\@slashboxa
\newbox\@slashboxb
\newbox\@slashboxc
\newcount\@slashboxwd
\newcount\@slashboxht
\newdimen\@slashsepl
\newdimen\@slashsepr
\def\slashbox{%
\def\@slashboxpicture##1{%
\put(0,0){\line(##1,1){\@slashboxwd}}%
\put(0,\@slashboxht){\makebox(0,0)[tl]{\box\@slashboxa}}%
\put(\@slashboxwd,0){\makebox(0,0)[br]{\box\@slashboxb}}%
}%
\@slashbox
}%
\def\backslashbox{%
\def\@slashboxpicture##1{%
\put(0,\@slashboxht){\line(##1,-1){\@slashboxwd}}%
\put(0,0){\makebox(0,0)[bl]{\box\@slashboxa}}%
\put(\@slashboxwd,\@slashboxht){\makebox(0,0)[tr]{\box\@slashboxb}}%
}%
\@slashbox
}%
\def\@slashbox{\@ifnextchar [{\@@slashbox}{\@@slashbox[0pt]}}
\def\@@slashbox[#1]{\@ifnextchar [{\@@@slashbox[#1]}{\@@@slashbox[#1][c]}}
\def\@@@slashbox[#1][#2]#3#4{%
% #1: width, #2: suppression of \tabcolsep on `l', `r', or `lr' side
% #3: left item, #4: right item
\@slashsepl=\tabcolsep
\@slashsepr=\tabcolsep
\@tfor\@tempa :=#2\do{\expandafter\let
\csname @slashsep\@tempa\endcsname=\z@}%
\setbox\@slashboxa=\hbox{\strut\hskip\tabcolsep\shortstack[l]{#3}}%
\setbox\@slashboxb=\hbox{\shortstack[r]{#4}\hskip\tabcolsep\strut}%
\setbox\@slashboxa=\hbox{\raise\dp\@slashboxa\box\@slashboxa}%
\setbox\@slashboxb=\hbox{\raise\dp\@slashboxb\box\@slashboxb}%
\setbox\@slashboxc=\hbox{%
\@tempdima=\wd\@slashboxa
\advance\@tempdima by \wd\@slashboxb
\advance\@tempdima by \@slashsepl
\advance\@tempdima by \@slashsepr
\@tempdimb=#1\relax%
\ifdim\@tempdimb>\@tempdima \@tempdima=\@tempdimb\fi%
\@tempdimb=\ht\@slashboxa
\advance\@tempdimb by \dp\@slashboxa
\advance\@tempdimb by \ht\@slashboxb
\advance\@tempdimb by \dp\@slashboxb
\@tempcnta=\@tempdima
\@tempcntb=\@tempdimb
\advance\@tempcnta by \@tempcntb
\advance\@tempcnta by -1
\divide\@tempcnta by \@tempcntb
\ifnum\@tempcnta>6 \@tempcnta=6
\@tempdimb=0.166666666\@tempdima
\else
\ifnum\@tempcnta<1 \@tempcnta=1\fi
\@tempdima=\@tempdimb
\multiply\@tempdima by \@tempcnta
\fi%
\advance\@tempdima by -\@slashsepl
\advance\@tempdima by -\@slashsepr
\@slashboxwd=\@tempdima
\@slashboxht=\@tempdimb
\@tempcntb=\@slashsepl
\setlength{\unitlength}{1sp}%
\begin{picture}(\@slashboxwd,\@slashboxht)(\@tempcntb,0)
\advance\@tempdima by \@slashsepl
\advance\@tempdima by \@slashsepr
\@slashboxwd=\@tempdima
\@slashboxpicture{\@tempcnta}
\end{picture}%
}%
$\vcenter{\box\@slashboxc}$%
}%
supertabular.sty · 14 KB
%%
%% This is file `supertabular.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% supertabular.dtx (with options: `package')
%% Copyright (C) 1989-2004 Johannes Braams. All rights reserved.
%%
%% This file was generated from file(s) of the supertabular package.
%% -----------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Johannes Braams.
%%
%% This file may only be distributed together with a copy of the
%% supertabular package. You may however distribute the supertabular package
%% without such generated files.
%%
%% The list of all files belonging to the supertabular package is
%% given in the file `manifest.txt.
%%
%% The list of derived (unpacked) files belonging to the distribution
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%% Sourcefile `supertabular.dtx'.
%%
%% Copyright (C) 1988 by Theo Jurriens
%% Copyright (C) 1990-2004 by Johannes Braams texniek at braams.cistron.nl
%% Kersengaarde 33
%% 2723 BP Zoetermeer NL
%% all rights reserved.
%%
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{supertabular}
[2004/02/20 v4.1e the supertabular environment]
\newcount\c@tracingst
\DeclareOption{errorshow}{\c@tracingst\z@}
\DeclareOption{pageshow}{\c@tracingst\tw@}
\DeclareOption{debugshow}{\c@tracingst5\relax}
\ProcessOptions
\newif\if@topcaption \@topcaptiontrue
\def\topcaption{\@topcaptiontrue\tablecaption}
\def\bottomcaption{\@topcaptionfalse\tablecaption}
\long\def\tablecaption{%
\refstepcounter{table}\@dblarg{\@xtablecaption}}
\long\def\@xtablecaption[#1]#2{%
\long\gdef\@process@tablecaption{\ST@caption{table}[#1]{#2}}}
\global\let\@process@tablecaption\relax
\newif\ifST@star
\newif\ifST@mp
\newdimen\ST@wd
\newskip\ST@rightskip
\newskip\ST@leftskip
\newskip\ST@parfillskip
\long\def\ST@caption#1[#2]#3{\par%
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{%
\csname the#1\endcsname}{\ignorespaces #2}}
\begingroup
\@parboxrestore
\normalsize
\if@topcaption \vskip -10\p@ \fi
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
\if@topcaption \vskip 10\p@ \fi
\endgroup}
\newcommand\tablehead[1]{%
\gdef\@tablehead{%
\noalign{%
\global\let\@savcr=\\
\global\let\\=\org@tabularcr}%
#1%
\noalign{\global\let\\=\@savcr}}}
\tablehead{}
\newcommand\tablefirsthead[1]{\gdef\@table@first@head{#1}}
\newcommand\tabletail[1]{%
\gdef\@tabletail{%
\noalign{%
\global\let\@savcr=\\
\global\let\\=\org@tabularcr}%
#1%
\noalign{\global\let\\=\@savcr}}}
\tabletail{}
\newcommand\tablelasttail[1]{\gdef\@table@last@tail{#1}}
\newcommand\sttraceon{\c@tracingst5\relax}
\newcommand\sttraceoff{\c@tracingst\z@}
\newcommand\ST@trace[2]{%
\ifnum\c@tracingst>#1\relax
\GenericWarning
{(supertabular)\@spaces\@spaces}
{Package supertabular: #2}%
\fi
}
\newdimen\ST@pageleft
\newcommand*\shrinkheight[1]{%
\noalign{\global\advance\ST@pageleft-#1\relax}}
\newcommand*\setSTheight[1]{%
\noalign{\global\ST@pageleft=#1\relax}}
\newdimen\ST@headht
\newdimen\ST@tailht
\newdimen\ST@pagesofar
\newdimen\ST@pboxht
\newdimen\ST@lineht
\newdimen\ST@stretchht
\newdimen\ST@prevht
\newdimen\ST@toadd
\newdimen\ST@dimen
\newbox\ST@pbox
\def\ST@tabularcr{%
{\ifnum0=`}\fi
\@ifstar{\ST@xtabularcr}{\ST@xtabularcr}}
\def\ST@xtabularcr{%
\@ifnextchar[%]
{\ST@argtabularcr}%
{\ifnum0=`{\fi}\cr\ST@cr}}
\def\ST@argtabularcr[#1]{%
\ifnum0=`{\fi}%
\ifdim #1>\z@
\unskip\ST@xargarraycr{#1}
\else
\ST@yargarraycr{#1}%
\fi}
\def\ST@xargarraycr#1{%
\@tempdima #1\advance\@tempdima \dp \@arstrutbox
\vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr
\noalign{\global\ST@toadd=#1}\ST@cr}
\def\ST@yargarraycr#1{%
\cr\noalign{\vskip #1\global\ST@toadd=#1}\ST@cr}
\def\ST@startpbox#1{%
\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
\def\ST@astartpbox#1{%
\bgroup\hsize#1%
\setbox\ST@pbox\vtop\bgroup\hsize#1\@arrayparboxrestore}
\def\ST@endpbox{%
\@finalstrut\@arstrutbox\par\egroup
\ST@dimen=\ht\ST@pbox
\advance\ST@dimen by \dp\ST@pbox
\ifnum\ST@pboxht<\ST@dimen
\global\ST@pboxht=\ST@dimen
\fi
\ST@dimen=\z@
\box\ST@pbox\hfil}
\def\ST@aendpbox{%
\@finalstrut\@arstrutbox\par\egroup
\ST@dimen=\ht\ST@pbox
\advance\ST@dimen by \dp\ST@pbox
\ifnum\ST@pboxht<\ST@dimen
\global\ST@pboxht=\ST@dimen
\fi
\ST@dimen=\z@
\unvbox\ST@pbox\egroup\hfil}
\def\estimate@lineht{%
\ST@lineht=\arraystretch \baslineskp
\global\advance\ST@lineht by 1\p@
\ST@stretchht\ST@lineht\advance\ST@stretchht-\baslineskp
\ifdim\ST@stretchht<\z@\ST@stretchht\z@\fi
\ST@trace\tw@{Average line height: \the\ST@lineht}%
\ST@trace\tw@{Stretched line height: \the\ST@stretchht}%
}
\def\@calfirstpageht{%
\ST@trace\tw@{Calculating height of tabular on first page}%
\global\ST@pagesofar\pagetotal
\global\ST@pageleft\@colroom
\ST@trace\tw@{Height of text = \the\pagetotal; \MessageBreak
Height of page = \the\ST@pageleft}%
\if@twocolumn
\ST@trace\tw@{two column mode}%
\if@firstcolumn
\ST@trace\tw@{First column}%
\ifnum\ST@pagesofar > \ST@pageleft
\global\ST@pageleft=2\ST@pageleft
\ifnum\ST@pagesofar > \ST@pageleft
\newpage\@calnextpageht
\ST@trace\tw@{starting new page}%
\else
\ST@trace\tw@{Second column}%
\global\advance\ST@pageleft -\ST@pagesofar
\global\advance\ST@pageleft -\@colroom
\fi
\else
\global\advance\ST@pageleft by -\ST@pagesofar
\global\ST@pagesofar\z@
\fi
\else
\ST@trace\tw@{Second column}
\ifnum\ST@pagesofar > \ST@pageleft
\ST@trace\tw@{starting new page}%
\newpage\@calnextpageht
\else
\global\advance\ST@pageleft by -\ST@pagesofar
\global\ST@pagesofar\z@
\fi
\fi
\else
\ST@trace\tw@{one column mode}%
\ifnum\ST@pagesofar > \ST@pageleft
\ST@trace\tw@{starting new page}%
\newpage\@calnextpageht
\else
\global\advance\ST@pageleft by -\ST@pagesofar
\global\ST@pagesofar\z@
\fi
\fi
\ST@trace\tw@{Available height: \the\ST@pageleft}%
\ifx\@@tablehead\@empty
\ST@headht=\z@
\else
\setbox\@tempboxa=\vbox{\@arrayparboxrestore
\ST@restore
\expandafter\tabular\expandafter{\ST@tableformat}%
\@@tablehead\endtabular}%
\ST@headht=\ht\@tempboxa\advance\ST@headht\dp\@tempboxa
\fi
\ST@trace\tw@{Height of head: \the\ST@headht}%
\ifx\@tabletail\@empty
\ST@tailht=\z@
\else
\setbox\@tempboxa=\vbox{\@arrayparboxrestore
\ST@restore
\expandafter\tabular\expandafter{\ST@tableformat}
\@tabletail\endtabular}
\ST@tailht=\ht\@tempboxa\advance\ST@tailht\dp\@tempboxa
\fi
\advance\ST@tailht by \ST@lineht
\ST@trace\tw@{Height of tail: \the\ST@tailht}%
\ST@trace\tw@{Maximum height of tabular: \the\ST@pageleft}%
\@tempdima\ST@headht
\advance\@tempdima\ST@lineht
\advance\@tempdima\ST@tailht
\ST@trace\tw@{Minimum height of tabular: \the\@tempdima}%
\ifnum\@tempdima>\ST@pageleft
\ST@trace\tw@{starting new page}%
\newpage\@calnextpageht
\fi
}
\def\@calnextpageht{%
\ST@trace\tw@{Calculating height of tabular on next page}%
\global\ST@pageleft\@colroom
\global\ST@pagesofar=\z@
\ST@trace\tw@{Maximum height of tabular: \the\ST@pageleft}%
}
\def\x@supertabular{%
\let\org@tabular\tabular
\let\tabular\inner@tabular
\expandafter\let
\csname org@tabular*\expandafter\endcsname
\csname tabular*\endcsname
\expandafter\let\csname tabular*\expandafter\endcsname
\csname inner@tabular*\endcsname
\if@topcaption \@process@tablecaption \fi
\global\let\@oldcr=\\
\def\baslineskp{\baselineskip}%
\ifx\undefined\@classix
\let\org@tabularcr\@tabularcr
\let\@tabularcr\ST@tabularcr
\let\org@startpbox=\@startpbox
\let\org@endpbox=\@endpbox
\let\@@startpbox=\ST@startpbox
\let\@@endpbox=\ST@endpbox
\else
\let\org@tabularcr\@arraycr
\let\@arraycr\ST@tabularcr
\let\org@startpbox=\@startpbox
\let\org@endpbox=\@endpbox
\let\@startpbox=\ST@astartpbox
\let\@endpbox=\ST@aendpbox
\fi
\ifx\@table@first@head\undefined
\let\@@tablehead=\@tablehead
\else
\let\@@tablehead=\@table@first@head
\fi
\let\ST@skippage\ST@skipfirstpart
\estimate@lineht
\@calfirstpageht
\noindent
}
\def\supertabular{%
\@ifnextchar[{\@supertabular}%]
{\@supertabular[]}}
\def\@supertabular[#1]#2{%
\def\ST@tableformat{#2}%
\ST@trace\tw@{Starting a new supertabular}%
\global\ST@starfalse
\global\ST@mpfalse
\x@supertabular
\expandafter\org@tabular\expandafter{\ST@tableformat}%
\@@tablehead}
\@namedef{supertabular*}#1{%
\@ifnextchar[{\@nameuse{@supertabular*}{#1}}%
{\@nameuse{@supertabular*}{#1}[]}%]
}
\@namedef{@supertabular*}#1[#2]#3{%
\ST@trace\tw@{Starting a new supertabular*}%
\def\ST@tableformat{#3}%
\ST@wd=#1\relax
\global\ST@startrue
\global\ST@mpfalse
\x@supertabular
\expandafter\csname org@tabular*\expandafter\endcsname
\expandafter{\expandafter\ST@wd\expandafter}%
\expandafter{\ST@tableformat}%
\@@tablehead}%
\def\mpsupertabular{%
\@ifnextchar[{\@mpsupertabular}%]
{\@mpsupertabular[]}}
\def\@mpsupertabular[#1]#2{%
\def\ST@tableformat{#2}%
\ST@trace\tw@{Starting a new mpsupertabular}%
\global\ST@starfalse
\global\ST@mptrue
\ST@rightskip \rightskip
\ST@leftskip \leftskip
\ST@parfillskip \parfillskip
\x@supertabular
\minipage{\columnwidth}%
\parfillskip\ST@parfillskip
\rightskip \ST@rightskip
\leftskip \ST@leftskip
\noindent\expandafter\org@tabular\expandafter{\ST@tableformat}%
\@@tablehead}
\@namedef{mpsupertabular*}#1{%
\@ifnextchar[{\@nameuse{@mpsupertabular*}{#1}}%
{\@nameuse{@mpsupertabular*}{#1}[]}%]
}
\@namedef{@mpsupertabular*}#1[#2]#3{%
\ST@trace\tw@{Starting a new mpsupertabular*}%
\def\ST@tableformat{#3}%
\ST@wd=#1\relax
\global\ST@startrue
\global\ST@mptrue
\ST@rightskip \rightskip
\ST@leftskip \leftskip
\ST@parfillskip \parfillskip
\x@supertabular
\minipage{\columnwidth}%
\parfillskip\ST@parfillskip
\rightskip \ST@rightskip
\leftskip \ST@leftskip
\noindent\expandafter\csname org@tabular*\expandafter\endcsname
\expandafter{\expandafter\ST@wd\expandafter}%
\expandafter{\ST@tableformat}%
\@@tablehead}%
\def\endsupertabular{%
\ifx\@table@last@tail\undefined
\@tabletail
\else
\@table@last@tail
\fi
\csname endtabular\ifST@star*\fi\endcsname
\ST@restore
\if@topcaption
\else
\@process@tablecaption
\@topcaptiontrue
\fi
\global\let\\\@oldcr
\global\let\@process@tablecaption\relax
\ST@trace\tw@{Ended a supertabular\ifST@star*\fi}%
}
\expandafter\let\csname endsupertabular*\endcsname\endsupertabular
\def\endmpsupertabular{%
\ifx\@table@last@tail\undefined
\@tabletail
\else
\@table@last@tail
\fi
\csname endtabular\ifST@star*\fi\endcsname
\endminipage
\ST@restore
\if@topcaption
\else
\@process@tablecaption
\@topcaptiontrue
\fi
\global\let\\\@oldcr
\global\let\@process@tablecaption\relax
\ST@trace\tw@{Ended a mpsupertabular\ifST@star*\fi}%
}
\expandafter\let\csname endmpsupertabular*\endcsname\endmpsupertabular
\def\ST@restore{%
\ifx\undefined\@classix
\let\@tabularcr\org@tabularcr
\else
\let\@arraycr\org@tabularcr
\fi
\let\@startpbox\org@startpbox
\let\@endpbox\org@endpbox
}
\def\inner@tabular{%
\ST@restore
\let\\\@oldcr
\noindent
\org@tabular}
\@namedef{inner@tabular*}{%
\ST@restore
\let\\\@oldcr
\noindent
\csname org@tabular*\endcsname}
\def\ST@cr{%
\noalign{%
\ifnum\ST@pboxht<\ST@lineht
\global\advance\ST@pageleft -\ST@lineht
\global\ST@prevht\ST@lineht
\else
\ST@trace\thr@@{Added par box with height \the\ST@pboxht}%
\global\advance\ST@pageleft -\ST@pboxht
\global\advance\ST@pageleft -0.1\ST@pboxht
\global\advance\ST@pageleft -\ST@stretchht
\global\ST@prevht\ST@pboxht
\global\ST@pboxht\z@
\fi
\global\advance\ST@pageleft -\ST@toadd
\global\ST@toadd=\z@
\ST@trace\thr@@{Space left for tabular: \the\ST@pageleft}%
}
\noalign{\global\let\ST@next\@empty}%
\ifnum\ST@pageleft<\z@
\ST@skippage
\else
\noalign{\global\@tempdima\ST@tailht
\global\advance\@tempdima\ST@prevht
\ifST@mp
\ifvoid\@mpfootins\else
\global\advance\@tempdima\ht\@mpfootins
\global\advance\@tempdima 3pt
\fi
\fi}
\ifnum\ST@pageleft<\@tempdima
\ST@newpage
\fi
\fi
\ST@next}
\def\ST@skipfirstpart{%
\noalign{%
\ST@trace\tw@{Tabular too high, moving to next page}%
\global\advance\ST@pageleft\pagetotal
\global\ST@pagesofar\z@
\newpage
\global\let\ST@skippage\ST@newpage
}}
\def\ST@newpage{%
\noalign{\ST@trace\tw@{Starting new page, writing tail}}%
\@tabletail
\ifST@star
\csname endtabular*\endcsname
\else
\endtabular
\fi
\ifST@mp
\endminipage
\fi
\global\let\ST@skippage\ST@newpage
\newpage\@calnextpageht
\let\ST@next\@tablehead
\ST@trace\tw@{writing head}%
\ifST@mp
\noindent\minipage{\columnwidth}%
\parfillskip\ST@parfillskip
\rightskip \ST@rightskip
\leftskip \ST@leftskip
\fi
\noindent
\ifST@star
\expandafter\csname org@tabular*\expandafter\endcsname
\expandafter{\expandafter\ST@wd\expandafter}%
\expandafter{\ST@tableformat}%
\else
\expandafter\org@tabular\expandafter{\ST@tableformat}%
\fi}
\endinput
%%
%% End of file `supertabular.sty'.
tabls.sty · 10 KB
%
% T A B L S . S T Y (ver 3.5)
%
% Copyright (c) 1989-1996 by Donald Arseneau
% from
% LaTeX, Copyright (c) 1985... by Leslie Lamport
%
% Modify LaTeX's array and tabular environments to keep text from touching
% other text or hlines above or below. See instructions after \endinput.
%
%----------------------------------------------------------------------
% create registers and default settings:
\newdimen\tablinesep \tablinesep= 1pt \let\tablineskip=\tablinesep
\newdimen\arraylinesep \arraylinesep= 1pt \let\arraylineskip=\arraylinesep
\newdimen\extrarulesep \extrarulesep= 3pt
\newdimen\@arstdepth \newdimen\@arstheight \newdimen\@skip@bove
\let\@tarlinesep\z@ % so outermost arrays will not act nested
% Change the initializations to create a smaller strut and include
% my macros in the initialization for the preamble.
\def\@array[#1]#2{% remember global variables to allow recursion:
\edef\@unrecurse{\global\@skip@bove\the\@skip@bove
\global\@arstheight\the\@arstheight\global\@arstdepth\the\@arstdepth}%
% Make the strut on the first line be shorter by the linesep outside
\let\@otarlinesep\@tarlinesep \global\@skip@bove-\@otarlinesep
% This setup works for both tabular and array because of this test:
\ifx\@classz\@arrayclassz \let\@tarlinesep\arraylinesep
\else \let\@tarlinesep\tablinesep \fi
\divide\@tarlinesep\tw@ % half sep is applied to height & depth
\let\@seesize\relax \let\@rememsize\relax \@mkpream{#2}%
\@tempdima\arraystretch\ht\strutbox \@tempdimb\arraystretch\dp\strutbox
\ifdim\@tarlinesep>\z@ % (need \protect for \multicolumn)
\def\@rememsize{\protect\@r@m@msize}\let\@seesize\@s@@size
\advance\@tempdima-\@tarlinesep \advance\@tempdimb-\@tarlinesep
\fi \setbox\@arstrutbox\hbox{% set up smaller strut
\vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}%
\let\protect\noexpand
\edef\@preamble{\ialign \noexpand\@halignto \bgroup
\unhcopy\@arstrutbox \@preamble \tabskip\z@skip &\@sharp \cr}%
% I have added an extra column (&\@sharp) to take the smart strut.
\let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
\if#1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi
\bgroup \let\par\@empty
\global\@arstheight\ht\@arstrutbox \global\@arstdepth\dp\@arstrutbox
\advance\extrarulesep.5\arrayrulewidth
\let\@sharp##\let\protect\relax \lineskip\z@skip \baselineskip\z@skip
\@preamble}
% Change the meaning of \\ to do the final strut calculation and
% put in the smart strut
\def\@xtabularcr{\@ifnextchar[{\@argtabularcr}{\@argtabularcr[\z@]}}
\def\@xarraycr{\aftergroup\@argarraycr\@xtabularcr}
\def\@argarraycr{${}}% put this "aftergroup" so we can combine macro streams
% Sense a following \end, and adjust spacing accordingly;
% Sense a rule below, as signalled by "\noalign" after expansion
\def\@argtabularcr[#1]{\ifnum\z@=`{\fi}&\omit % end group, new column
{\ifnum\z@=`}\fi
\global\advance\@arstheight\@skip@bove % use \@skip@bove so it is available
\global\@skip@bove#1\relax % actually, the skip below
\@ifnextchar\end{\global\advance\@arstdepth-\@otarlinesep\@mystrutcr}%
{\expandafter\expandafter\expandafter\@xargarraycr}}
\def\@xargarraycr{\@ifnextchar\noalign
{\global\advance\@arstdepth\extrarulesep \@mystrutcr}%
{\@mystrutcr}}
\def\@mystrutcr{% \@skip@bove is really the parameter for skip below here
\ifdim\@skip@bove>\z@ \advance\@arstdepth\@skip@bove \global\@skip@bove\z@\fi
\advance\@arstheight\@tarlinesep \advance\@arstdepth\@tarlinesep
\vrule \@height\@arstheight \@depth\@arstdepth \@width\z@
\global\@arstheight\ht\@arstrutbox \global\@arstdepth\dp\@arstrutbox
\ifnum\z@=`{\fi}\cr
\ifdim\@skip@bove<\z@ \noalign{\vskip\@skip@bove \global\@skip@bove\z@}\fi}
% Simulate \crcr at the end of the table, assuming that we are not in
% vmode once a line of entries has started. This fails to put in a smart
% strut if the table ends without \\ while in vmode in a column entry.
% Use \@unrecurse to simulate grouping of global parameters.
% For nested tables and arrays, the final strut is reduced by the linesep
% that will be added at the outer level.
\def\endtabular{\endarray $\egroup}
\expandafter\let\csname endtabular*\endcsname=\endtabular
\def\endarray{\ifvmode\csname crcr\endcsname % just do \crcr if \\ given
\else \\[\z@ \global\advance\@arstdepth-\@otarlinesep]%
\fi\egroup\@unrecurse\egroup}
% Put \@seesize...\@rememsize in all preamble templates
\def\@tabclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
\or \or \@addamp \or
\@acolampacol \or \@firstampfalse \@acol \fi
\edef\@preamble{\@preamble{%
\ifcase
\@chnum \hfil\@seesize\ignorespaces\@sharp\unskip\@rememsize \hfil
\or \@seesize\ignorespaces\@sharp\unskip\@rememsize \hfil
\or \hfil\hskip\z@skip\@seesize\ignorespaces\@sharp\unskip\@rememsize
\fi}}}
\def\@arrayclassz{\ifcase \@lastchclass \@acolampacol \or \@ampacol \or
\or \or \@addamp \or
\@acolampacol \or \@firstampfalse \@acol \fi
\edef\@preamble{\@preamble
\ifcase \@chnum
\hfil\@seesize $\relax\@sharp$\@rememsize \hfil
\or \@seesize $\relax\@sharp$\@rememsize \hfil
\or \hfil\@seesize $\relax\@sharp$\@rememsize \fi}}
\def\@classv{\@addtopreamble{\@seesize\@startpbox{\@nextchar}%
\ignorespaces\@sharp\@endpbox\@rememsize}}
% my macros to keep track of the size of entries.
\def\@s@@size{\setbox\z@\hbox\bgroup\bgroup}
\def\@r@m@msize{\egroup\egroup % end the \hbox
\ifdim\ht\z@>\@arstheight \global\@arstheight\ht\z@ \fi
\ifdim\dp\z@>\@arstdepth \global\@arstdepth \dp\z@ \fi
\unhbox\z@}
% Redefine \hline to remove notches and to give extrarulesep and
% optional [] skip
\def\hline{\noalign{\ifnum\z@=`}\fi\kern-.5\arrayrulewidth
\hrule \@height \arrayrulewidth \kern-.5\arrayrulewidth
\global\@skip@bove\extrarulesep
\@ifnextchar[\@yhline{\expandafter\expandafter\expandafter\@zhline}}
\def\@xhline{\ifx\@tempa\noalign \vskip\doublerulesep \fi % may be the opt.
\ifnum`{=\z@\fi}}
\def\@yhline[#1]{\doublerulesep#1\global\advance\@skip@bove#1\relax
\expandafter\expandafter\expandafter\@zhline}
\def\@zhline{\futurelet\@tempa\@xhline}%
% make \cline give the \extrarulesep below
\let\TB@cline\cline
\def\cline#1{\noalign{\kern-.5\arrayrulewidth}%
\TB@cline{#1}%
\noalign{\global\@skip@bove\extrarulesep \kern.5\arrayrulewidth}}%
\endinput
% -----------------------------------------------------------------
%
% Modify LaTeX's array and tabular environments to keep text from touching
% other text or hlines above or below. There are three new parameters:
%
% \tablinesep (or \tablelineskip): minimum space between text on successive
% lines in a tabular environment. Negative distances are
% treated as zero. The default value is 1pt. 0pt turns off
% checking for touching text. Text given in an @{ }
% specification is never checked for overlap.
%
% \arraylinesep (or \arraylineskip): like \tablinesep, but for arrays.
%
% \extrarulesep : extra space to add above and below each \hline and \cline.
% There will be at least \extrarulesep + 0.5\tablinesep
% between an \hline and a line of text. Negative values can
% be used, but only until some text touches the line.
% The default value is 3pt.
%
% To ensure interline separations in tables but not arrays, declare
% \setlength\arraylinesep{0pt}
% The appearance of normal LaTeX tables can be had with
% \setlength\tablinesep{0pt}
% \setlength\arraylinesep{0pt}
% \setlength\extrarulesep{0pt}
% but it would be better to not use tabls in this situation.
%
% \hline[dimen]:
%
% \hline has been changed to take an optional length argument just like \\
% giving the space to insert below. This space is in addition to the
% \extrarulesep and linesep. A negative value will reduce the space until
% the hline touches some text below, and then will have no further effect.
% E.g., \hline[-9in] draws a horizontal line while suppressing the extrarulesep
% beneath. Also, the new \hline FIXES THE NOTCHES that used to appear at the
% junction between horizontal and vertical lines.
%
% How it works:
% There are no struts in the preamble entries (lie), rather, there are
% tests to measure the maximum height and depth of all entries on a line.
% The maximum values start at the size of LaTeX's \@arstrut minus the
% appropriate linesep. At the \\, a strut is inserted (in its own
% column) which is that maximum size plus the linesep plus any additional
% space for separation from \hline s.
%
% The Downside:
% Building a table will be slower than before because the entries have to
% be boxed twice (by \@seesize and by \halign itself) instead of just once.
% \setlength\tablinesep{0pt} will recover most of this speed, with
% \extrarulesep still partially in effect--extra space will still be added
% around hlines, but it may be taken up by very tall or very deep table
% entries; thus text may still touch the lines. Because of the speed penalty,
% if your computer is slow, it is probably best to omit the TABLS option
% until producing a final copy.
%
% (2.2) \endtabular* is defined (it was left out before. oops!)
% change some \z@ to \z@skip. Thanks to Michael Downes.
% Create alias \tablinesep = \tablelineskip for consistency with
% \tabcolsep nomenclature. \def\\{\crcr} used in ver 2.1 didn't work right,
% so use \csname crcr\endcsname.
%
% (3.0) Arrays are included! The very top and bottom struts of nested
% arrays are reduced by the lesser of the inner and outer lineseps so space
% doesn't accumulate with each level of nesting.
%
% (3.1 & 3.2 & 3.3) Minor changes to match LaTeX updates.
%
% (3.4) More extensive changes, prompted by LaTeX updates. You can now hide
% \hline in another macro, and it is still recognized. [Similar commands that
% add \extrarulesep must begin with \noalign.] \hline[3pt]\hline is now
% reasonable. (Also try \hline[0pt]\hline!)
%
% (3.5) Fix several (non-crashing) bugs introduced in 3.4
%
% Send problem reports to [email protected]
%
% Test integrity of file:
% brackets: round, square, curly, angle: () [] {} <>
% backslash, slash, vertical, at, dollar, and: \ / | @ $ &
% hat, grave, acute (apostrophe), quote, tilde: ^ ` ' " ~thesis.cls · 23 KB
%thesis.cls is based on report.cls (D. Brosius, August 2006) - These changes were made to comply with the requirements set forth in the University of Maryland, College Park, Thesis and Dissertation Style Guide, 2005-2006, Spring 2006 Edition for the submittal of Ph.D. and Masters dissertations and theses to the University of Maryland.
%%
%% This is file `report.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% classes.dtx (with options: `report')
%%
%% This is a generated file.
%%
%% Copyright 1993 1994 1995 1996 1997 1998 1999
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file is part of the LaTeX2e system.
%% ----------------------------------------
%%
%% It may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1.0 or, at your option, any later version.
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{thesis}
[2006/04/26 v0.1]
\newcommand\@ptsize{}
\newif\if@restonecol
\newif\if@titlepage
\@titlepagetrue
\newif\if@openright
\if@compatibility\else
\DeclareOption{a4paper}
{\setlength\paperheight {297mm}%
\setlength\paperwidth {210mm}}
\DeclareOption{a5paper}
{\setlength\paperheight {210mm}%
\setlength\paperwidth {148mm}}
\DeclareOption{b5paper}
{\setlength\paperheight {250mm}%
\setlength\paperwidth {176mm}}
\DeclareOption{letterpaper}
{\setlength\paperheight {11in}%
\setlength\paperwidth {8.5in}}
\DeclareOption{legalpaper}
{\setlength\paperheight {14in}%
\setlength\paperwidth {8.5in}}
\DeclareOption{executivepaper}
{\setlength\paperheight {10.5in}%
\setlength\paperwidth {7.25in}}
\DeclareOption{landscape}
{\setlength\@tempdima {\paperheight}%
\setlength\paperheight {\paperwidth}%
\setlength\paperwidth {\@tempdima}}
\fi
\if@compatibility
\renewcommand\@ptsize{0}
\else
\DeclareOption{10pt}{\renewcommand\@ptsize{0}}
\fi
\DeclareOption{11pt}{\renewcommand\@ptsize{1}}
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
\if@compatibility\else
\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse}
\fi
\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue}
\DeclareOption{draft}{\setlength\overfullrule{5pt}}
\if@compatibility\else
\DeclareOption{final}{\setlength\overfullrule{0pt}}
\fi
\DeclareOption{titlepage}{\@titlepagetrue}
\if@compatibility\else
\DeclareOption{notitlepage}{\@titlepagefalse}
\fi
\if@compatibility
\else
\DeclareOption{openright}{\@openrighttrue}
\DeclareOption{openany}{\@openrightfalse}
\fi
\if@compatibility\else
\DeclareOption{onecolumn}{\@twocolumnfalse}
\fi
\DeclareOption{twocolumn}{\@twocolumntrue}
\DeclareOption{leqno}{\input{leqno.clo}}
\DeclareOption{fleqn}{\input{fleqn.clo}}
\DeclareOption{openbib}{%
\AtEndOfPackage{%
\renewcommand\@openbib@code{%
\advance\leftmargin\bibindent
\itemindent -\bibindent
\listparindent \itemindent
\parsep \z@
}%
\renewcommand\newblock{\par}}%
}
\ExecuteOptions{letterpaper,10pt,oneside,onecolumn,final,openany}
\ProcessOptions
\input{size1\@ptsize.clo}
\setlength\lineskip{1\p@}
\setlength\normallineskip{1\p@}
\renewcommand\baselinestretch{}
\setlength\parskip{0\p@ \@plus \p@}
\@lowpenalty 51
\@medpenalty 151
\@highpenalty 301
\setcounter{topnumber}{2}
\renewcommand\topfraction{.7}
\setcounter{bottomnumber}{1}
\renewcommand\bottomfraction{.3}
\setcounter{totalnumber}{3}
\renewcommand\textfraction{.2}
\renewcommand\floatpagefraction{.5}
\setcounter{dbltopnumber}{2}
\renewcommand\dbltopfraction{.7}
\renewcommand\dblfloatpagefraction{.5}
\if@twoside
\def\ps@headings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
\def\@evenhead{\thepage\hfil\slshape\leftmark}%
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ %
\fi
##1}}{}}%
\def\sectionmark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\z@
\thesection. \ %
\fi
##1}}}}
\else
\def\ps@headings{%
\let\@oddfoot\@empty
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
\let\@mkboth\markboth
\def\chaptermark##1{%
\markright {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ %
\fi
##1}}}}
\fi
\def\ps@myheadings{%
\let\@oddfoot\@empty\let\@evenfoot\@empty
\def\@evenhead{\thepage\hfil\slshape\leftmark}%
\def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
\let\@mkboth\@gobbletwo
\let\chaptermark\@gobble
\let\sectionmark\@gobble
}
\if@titlepage
\newcommand\maketitle{\begin{titlepage}%
\let\footnotesize\small
\let\footnoterule\relax
\let \footnote \thanks
\null\vfil
\vskip 60\p@
\begin{center}%
{\normalsize \@title \par}%
\vskip 3em%
{\normalsize
\lineskip .75em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1.5em%
{\normalsize \@date \par}% % Set date in \normalsize size.
\end{center}\par
\@thanks
\vfil\null
\end{titlepage}%
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
\else
\newcommand\maketitle{\par
\begingroup
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hb@[email protected]{%
\hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
\if@twocolumn
\ifnum \col@number=\@ne
\@maketitle
\else
\twocolumn[\@maketitle]%
\fi
\else
%% \newpage
\global\@topnum\z@ % Prevents figures from going at top of page.
\@maketitle
\fi
\thispagestyle{plain}\@thanks
\endgroup
\setcounter{footnote}{0}%
\global\let\thanks\relax
\global\let\maketitle\relax
\global\let\@maketitle\relax
\global\let\@thanks\@empty
\global\let\@author\@empty
\global\let\@date\@empty
\global\let\@title\@empty
\global\let\title\relax
\global\let\author\relax
\global\let\date\relax
\global\let\and\relax
}
\def\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{center}%
\let \footnote \thanks
{\normalsize \@title \par}%
\vskip 1.5em%
{\normalsize
\lineskip .5em%
\begin{tabular}[t]{c}%
\@author
\end{tabular}\par}%
\vskip 1em%
{\normalsize \@date}%
\end{center}%
\par
\vskip 1.5em}
\fi
\newcommand*\chaptermark[1]{}
\setcounter{secnumdepth}{3}
\newcounter {part}
\newcounter {chapter}
\newcounter {section}[chapter]
\newcounter {subsection}[section]
\newcounter {subsubsection}[subsection]
\newcounter {paragraph}[subsubsection]
\newcounter {subparagraph}[paragraph]
\renewcommand \thepart {\@Roman\c@part}
\renewcommand \thechapter {\@arabic\c@chapter}
\renewcommand \thesection {\thechapter.\@arabic\c@section}
\renewcommand \thesubsection {\thesection.\@arabic\c@subsection}
\renewcommand \thesubsubsection {\thesubsection .\@arabic\c@subsubsection}
\renewcommand \theparagraph {\thesubsubsection.\@arabic\c@paragraph}
\renewcommand \thesubparagraph {\theparagraph.\@arabic\c@subparagraph}
\newcommand\@chapapp{\chaptername}
\newcommand\part{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\thispagestyle{plain}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\null\vfil
\secdef\@part\@spart}
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >-2\relax
\refstepcounter{part}%
\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}%
\else
\addcontentsline{toc}{part}{#1}%
\fi
\markboth{}{}%
{\centering
\interlinepenalty \@M
\normalfont
\ifnum \c@secnumdepth >-2\relax
\normalsize \partname~\thepart
\par
\vskip 20\p@
\fi
\normalsize #2\par}%
\@endpart}
\def\@spart#1{%
{\centering
\interlinepenalty \@M
\normalfont
\normalsize #1\par}%
\@endpart}
\def\@endpart{\vfil\newpage
\if@twoside
\null
\thispagestyle{empty}%
\newpage
\fi
\if@tempswa
\twocolumn
\fi}
\newcommand\chapter{\if@openright\cleardoublepage\fi
\thispagestyle{plain}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{\thechapter}#1}%
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\def\@makechapterhead#1{%
\vspace*{20\p@}%
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\large \@chapapp\space \thechapter
\par\nobreak
% \vskip 20\p@
\fi
\interlinepenalty\@M
\large #1\par\nobreak
% \vskip 40\p@
}}
\def\@schapter#1{\if@twocolumn
\@topnewpage[\@makeschapterhead{#1}]%
\else
\@makeschapterhead{#1}%
\@afterheading
\fi}
\def\@makeschapterhead#1{%
% \vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
%\normalsize #1\par\nobreak
\large #1\par\nobreak
% \vskip 40\p@
}}
\newcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
%{\normalfont\normalsize}}
{\normalfont\large}}
\newcommand\subsection{\@startsection{subsection}{2}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
%{\normalfont\normalsize}}
{\normalfont\large}}
\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
{-3.25ex\@plus -1ex \@minus -.2ex}%
{1.5ex \@plus .2ex}%
%{\normalfont\normalsize}}
{\normalfont\large}}
\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize}}
\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize}}
\if@twocolumn
\setlength\leftmargini {2em}
\else
\setlength\leftmargini {2.5em}
\fi
\leftmargin \leftmargini
\setlength\leftmarginii {2.2em}
\setlength\leftmarginiii {1.87em}
\setlength\leftmarginiv {1.7em}
\if@twocolumn
\setlength\leftmarginv {.5em}
\setlength\leftmarginvi {.5em}
\else
\setlength\leftmarginv {1em}
\setlength\leftmarginvi {1em}
\fi
\setlength \labelsep {.5em}
\setlength \labelwidth{\leftmargini}
\addtolength\labelwidth{-\labelsep}
\@beginparpenalty -\@lowpenalty
\@endparpenalty -\@lowpenalty
\@itempenalty -\@lowpenalty
\renewcommand\theenumi{\@arabic\c@enumi}
\renewcommand\theenumii{\@alph\c@enumii}
\renewcommand\theenumiii{\@roman\c@enumiii}
\renewcommand\theenumiv{\@Alph\c@enumiv}
\newcommand\labelenumi{\theenumi.}
\newcommand\labelenumii{(\theenumii)}
\newcommand\labelenumiii{\theenumiii.}
\newcommand\labelenumiv{\theenumiv.}
\renewcommand\p@enumii{\theenumi}
\renewcommand\p@enumiii{\theenumi(\theenumii)}
\renewcommand\p@enumiv{\p@enumiii\theenumiii}
\newcommand\labelitemi{\textbullet}
\newcommand\labelitemii{\normalfont \textendash}
\newcommand\labelitemiii{\textasteriskcentered}
\newcommand\labelitemiv{\textperiodcentered}
\newenvironment{description}
{\list{}{\labelwidth\z@ \itemindent-\leftmargin
\let\makelabel\descriptionlabel}}
{\endlist}
\newcommand*\descriptionlabel[1]{\hspace\labelsep
\normalfont #1}
\if@titlepage
\newenvironment{abstract}{%
\titlepage
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null\endtitlepage}
\else
\newenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{ \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
\newenvironment{verse}
{\let\\\@centercr
\list{}{\itemsep \z@
\itemindent -1.5em%
\listparindent\itemindent
\rightmargin \leftmargin
\advance\leftmargin 1.5em}%
\item\relax}
{\endlist}
\newenvironment{quotation}
{\list{}{\listparindent 1.5em%
\itemindent \listparindent
\rightmargin \leftmargin
\parsep \z@ \@plus\p@}%
\item\relax}
{\endlist}
\newenvironment{quote}
{\list{}{\rightmargin\leftmargin}%
\item\relax}
{\endlist}
\if@compatibility
\newenvironment{titlepage}
{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
\setcounter{page}\z@
}%
{\if@restonecol\twocolumn \else \newpage \fi
}
\else
\newenvironment{titlepage}
{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse\newpage
\fi
\thispagestyle{empty}%
\setcounter{page}\@ne
}%
{\if@restonecol\twocolumn \else \newpage \fi
\if@twoside\else
\setcounter{page}\@ne
\fi
}
\fi
\newcommand\appendix{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\gdef\@chapapp{\appendixname}%
\gdef\thechapter{\@Alph\c@chapter}}
\setlength\arraycolsep{5\p@}
\setlength\tabcolsep{6\p@}
\setlength\arrayrulewidth{.4\p@}
\setlength\doublerulesep{2\p@}
\setlength\tabbingsep{\labelsep}
\skip\@mpfootins = \skip\footins
\setlength\fboxsep{3\p@}
\setlength\fboxrule{.4\p@}
\@addtoreset {equation}{chapter}
\renewcommand\theequation
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
\newcounter{figure}[chapter]
\renewcommand \thefigure
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
\def\fps@figure{tbp}
\def\ftype@figure{1}
\def\ext@figure{lof}
\def\fnum@figure{\figurename~\thefigure}
\newenvironment{figure}
{\@float{figure}}
{\end@float}
\newenvironment{figure*}
{\@dblfloat{figure}}
{\end@dblfloat}
\newcounter{table}[chapter]
\renewcommand \thetable
{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
\def\fps@table{tbp}
\def\ftype@table{2}
\def\ext@table{lot}
\def\fnum@table{\tablename~\thetable}
\newenvironment{table}
{\@float{table}}
{\end@float}
\newenvironment{table*}
{\@dblfloat{table}}
{\end@dblfloat}
\newlength\abovecaptionskip
\newlength\belowcaptionskip
\setlength\abovecaptionskip{10\p@}
\setlength\belowcaptionskip{0\p@}
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{#1: #2}%
\ifdim \wd\@tempboxa >\hsize
#1: #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal}
\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal}
\newcommand\@pnumwidth{1.55em}
\newcommand\@tocrmarg{2.55em}
\newcommand\@dotsep{4.5}
\setcounter{tocdepth}{2}
\newcommand\tableofcontents{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\@starttoc{toc}%
\if@restonecol\twocolumn\fi
}
\newcommand*\l@part[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}%
\addvspace{2.25em \@plus\p@}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
{\leavevmode
\normalsize #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par
\nobreak
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\endgroup
\fi}
\newcommand*\l@chapter[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip 1.0em \@plus\p@
\setlength\@tempdima{1.5em}%
\begingroup
\parindent \z@ \rightskip \@pnumwidth
\parfillskip -\@pnumwidth
\leavevmode
\advance\leftskip\@tempdima
\hskip -\leftskip
#1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
\penalty\@highpenalty
\endgroup
\fi}
\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}}
\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}
\newcommand*\l@subsubsection{\@dottedtocline{2}{7.0em}{4.1em}}
\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}}
\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}
\newcommand\listoffigures{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listfigurename
\@mkboth{\MakeUppercase\listfigurename}%
{\MakeUppercase\listfigurename}}%
\addcontentsline{toc}{chapter}{\normalsize List of Figures}
\@starttoc{lof}%
\if@restonecol\twocolumn\fi
}
\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}
\newcommand\listoftables{%
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\chapter*{\listtablename
\@mkboth{\MakeUppercase\listtablename}%
{\MakeUppercase\listtablename}}%
\addcontentsline{toc}{chapter}{\normalsize List of Tables}
\@starttoc{lot}%
\if@restonecol\twocolumn\fi
}
\let\l@table\l@figure
\newdimen\bibindent
\setlength\bibindent{1.5em}
\newenvironment{thebibliography}[1]
{\chapter*{\bibname
\@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}%
\addcontentsline{toc}{chapter}{\normalsize Bibliography}
\vskip 2em%
\list{\@biblabel{\@arabic\c@enumiv}}%
{\settowidth\labelwidth{\@biblabel{#1}}%
\leftmargin\labelwidth
\advance\leftmargin\labelsep
\@openbib@code
\usecounter{enumiv}%
\let\p@enumiv\@empty
\renewcommand\theenumiv{\@arabic\c@enumiv}}%
\sloppy
\clubpenalty4000
\@clubpenalty \clubpenalty
\widowpenalty4000%
\sfcode`\.\@m}
{\def\@noitemerr
{\@latex@warning{Empty `thebibliography' environment}}%
\endlist}
\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}
\let\@openbib@code\@empty
\newenvironment{theindex}
{\if@twocolumn
\@restonecolfalse
\else
\@restonecoltrue
\fi
\columnseprule \z@
\columnsep 35\p@
\twocolumn[\@makeschapterhead{\indexname}]%
\@mkboth{\MakeUppercase\indexname}%
{\MakeUppercase\indexname}%
\thispagestyle{plain}\parindent\z@
\parskip\z@ \@plus .3\p@\relax
\let\item\@idxitem}
{\if@restonecol\onecolumn\else\clearpage\fi}
\newcommand\@idxitem{\par\hangindent 40\p@}
\newcommand\subitem{\@idxitem \hspace*{20\p@}}
\newcommand\subsubitem{\@idxitem \hspace*{30\p@}}
\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax}
\renewcommand\footnoterule{%
\kern-3\p@
\hrule\@width.4\columnwidth
\kern2.6\p@}
\@addtoreset{footnote}{chapter}
\newcommand\@makefntext[1]{%
\parindent 1em%
\noindent
\hb@[email protected]{\hss\@makefnmark}#1}
\newcommand\contentsname{\large\rm\begin{center}Table of Contents\end{center}}
\newcommand\listfigurename{\large\rm\begin{center}List of Figures\end{center}}
\newcommand\listtablename{\large\rm\begin{center}List of Tables\end{center}}
\newcommand\bibname{\large\rm\begin{center}Bibliography\end{center}}
\newcommand\indexname{Index}
\newcommand\figurename{Figure}
\newcommand\tablename{Table}
\newcommand\partname{Part}
\newcommand\chaptername{Chapter}
\newcommand\appendixname{Appendix}
\newcommand\abstractname{Abstract}
\def\today{\ifcase\month\or
January\or February\or March\or April\or May\or June\or
July\or August\or September\or October\or November\or December\fi
\space\number\day, \number\year}
\setlength\columnsep{10\p@}
\setlength\columnseprule{0\p@}
\pagestyle{plain}
\pagenumbering{arabic}
\if@twoside
\else
\raggedbottom
\fi
\if@twocolumn
\twocolumn
\sloppy
\flushbottom
\else
\onecolumn
\fi
\endinput
%%
%% End of file `report.cls'.
titlesec.sty · 36 KB
% +--------------------------------------------------+
% | Typeset titlesec.tex to get the documentation. |
% +--------------------------------------------------+
%
% Copyright (c) 1998-2011 by Javier Bezos.
% All Rights Reserved.
%
% This file is part of the titlesec distribution release 2.10.0
% -----------------------------------------------------------
%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
%
% This work has the LPPL maintenance status "maintained".
%
% The Current Maintainer of this work is Javier Bezos.
%
% Notes
% ~~~~~
%
% The following tags are used:
% ttl@ : the generic tag used through the style
% ttlh@ : a shape definition
% ttlf@ : a macro containing the title format
% ttls@ : id. the title space
% ttlp@ : page key related macros
% ttll@ : level number
%
% The ttlf@ and ttls@ contains data in the form {..}{..}.
% Perhaps in future releases they should be converted
% to a prop-like list, similar to that proposed by the
% latex team.
%
% Admittedly, the current implementation seems too
% complicated, but that's necessary in order to provide
% certain compatibility with the sections as defined by the
% used class. Other packages opt for providing the sections
% as defined by standard classes ignoring the class; for
% instance sectsty which does a simple task in a simple and
% nice way. However, that was not my goal.
%
% Release
% ~~~~~~~
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{titlesec}[2011/12/15 v2.10.0 Sectioning titles]
% Initialization
% ~~~~~~~~~~~~~~
\newif\ifttl@ps
\ttl@psfalse
% The \ttl@label switch is used when printing the label in titles.
% A numberless variant makes it to true.
% There is a \ttl@toclabel as well, which is true iff the
% title is numbered; used in toc entries (except default part
% and chapter) and marks (only in titlesec pagestyles).
\newif\ifttl@label
\newif\ifttl@toclabel
\newbox\ttl@box
% A provision for the report style:
\@ifundefined{if@mainmatter}
{\let\if@mainmatter\iftrue}{}
\@ifundefined{if@openright}
{\let\if@openright\iftrue}{}
% and the ams styles as well
\@ifundefined{@chapapp}
{\let\@chapapp\chaptername}{}
\def\ttl@trylist{\ttl@try{}}
\def\ttl@getkeys#1#2{%
\if\expandafter @\@gobble#1@\@empty
\edef\ttl@b{\expandafter\@gobble\string#1}%
\let\ttl@a\ttl@b
\else
\makeatletter
\edef\ttl@d{%
\noexpand\input{ttlkeys.def}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\ttl@getkeys{#1}{#2}%
\fi}
% A more meaningful error for \@notdefinable
\expandafter\AtEndOfPackage\expandafter{\expandafter
\gdef\expandafter\@notdefinable\expandafter{\@notdefinable}}
\def\@notdefinable{%
\PackageError{titlesec}%
{Incompatible package}%
{Titlesec cannot continue defining its own macros
because\MessageBreak
\@backslashchar\reserved@a\space is already used by other package,
the class\MessageBreak
or the document.}}
% +-----------------+
% | C L A S S E S |
% +-----------------+
\def\ttl@useclass#1#2{%
\@ifstar
{\ttl@labelfalse#1{#2}[]}%
{\ttl@labeltrue\@dblarg{#1{#2}}}}
\def\ttl@straightclass{\ttl@useclass\ttl@straight@i}
\def\ttl@partclass{\ttl@useclass\ttl@part@i}
\def\ttl@topclass{\ttl@useclass\ttl@top@i}
\def\ttl@pageclass{\ttl@useclass\ttl@page@i}
% Here \scantokens is used to make sure the unescaped name
% has `letters' and no `others'. Mainly for hyperref, so there
% should be no problems.
\newcommand\titleclass[1]{%
\edef\ttl@a{\expandafter\@gobble\string#1}%
\ifx\scantokens\@undefined\else
\scantokens\expandafter{\expandafter
\def\expandafter\ttl@a\expandafter{\ttl@a}}%
\fi
\@ifnextchar[{\@tempswatrue\ttl@class@i{#1}}%
{\@tempswafalse\ttl@class@ii{#1}}}
\def\ttl@class@i#1[#2]{%
\@namedef{ttll@\ttl@a}{#2}%
\expandafter\providecommand\csname\ttl@a title\endcsname{}%%%%
\@ifundefined{ttl@toplevel}{}%
{\expandafter\let\csname ttlss@\ttl@a\expandafter\endcsname
\csname ttlss@\ttl@toplevel\endcsname}%
\edef\ttl@toplevel{\ttl@a}%
\ttl@class@ii{#1}}
\def\ttl@class@ii#1#2{%
\@ifundefined{ttl@#2class}%
{\PackageError{titlesec}{Unknown sectioning class}%
{Valid names are top, page and straight}}%
{\expandafter\let\csname ttl@compat\ttl@a\endcsname\relax
\@ifundefined{\ttl@a mark}%
{\@namedef{\ttl@a mark}{\@gobble}}%
{}%
\edef#1{%
\expandafter\noexpand\csname ttl@#2class\endcsname{\ttl@a}}}%
\if@tempswa
\expandafter\@gobble
\else
\expandafter\@firstofone
\fi
{\@ifnextchar[%
{\ttl@class@iii}%
{\@ifundefined{ttll@\ttl@a}%
{\PackageError{titlesec}{Unknown sectioning level}%
{\string\titleclass\space with no optional arguments\MessageBreak
only changes the class of an *existing* level}}}}}
\def\ttl@class@iii[#1]{%
\edef\ttl@b{\expandafter\@gobble\string#1}%
\expandafter\let\csname ttlss@\ttl@a\expandafter\endcsname
\csname ttlss@\ttl@b\endcsname
\expandafter\edef\csname ttlss@\ttl@b\endcsname{\ttl@a}%
\let\ttl@a\ttl@toplevel
\count@\csname ttll@\ttl@toplevel\endcsname
\ttl@class@iv}
\def\ttl@class@iv{%
\@ifundefined{ttlss@\ttl@a}{}%
{\advance\count@\@ne
\edef\ttl@a{\csname ttlss@\ttl@a\endcsname}%
\expandafter\edef\csname ttll@\ttl@a\endcsname{\the\count@}%
\ttl@class@iv}}
% Typesetting Classes: General tools
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% The following command handles the *n spacing
% Some tricks are necessary to multiply a
% skip by a non integer number
\newskip\beforetitleunit
\beforetitleunit=1ex\@plus.3ex\@minus.06ex
\newskip\aftertitleunit
\aftertitleunit=1ex\@plus.1ex
\newdimen\ttl@plus
\newdimen\ttl@minus
\def\ttl@assign#1{%
\@ifstar
{\ttl@assign@i{#1}}%
{\ttl@assign@d{#1}}}
\def\ttl@assign@i#1#2\relax#3{%
\ttl@plus\z@
\ttl@minus\z@
\afterassignment\ttl@assign@ii
\dimen@\the#3, % <- space
#1 = #2\dimen@
plus #2\ttl@plus
minus #2\ttl@minus}
\def\ttl@assign@ii#1 {% <- space
\if#1,\else\afterassignment\ttl@assign@ii\fi
\csname ttl@\string#1\endcsname}
\def\ttl@assign@d#1#2\relax#3{\setlength#1{#2}}
% To be used with \v/vspace to make them calc-savvy
\def\ttl@calc#1#2{%
{\setlength\@tempskipa{#2}%
#1\@tempskipa}}
\def\ttl@calcneg#1#2{%
{\setlength\@tempskipa{#2}%
#1{-\@tempskipa}}}
% Gets from ttls@ and passes the spacing parameters:
\def\ttl@startargs#1#2{% Get the first arguments, with the spacing
\@ifundefined{ttlp@#2}%
{\let\ttl@key@page\@empty}%
{\ttlp@fetch{#2}}%
\begingroup
\def\ttl@b{ttls@#2}%
\edef\ttl@key@numberless{\ifttl@label//\else/*\fi}%
\def\ttl@a##1{\csname ttl@key@##1\endcsname}% Used as elt in try
\ttl@trylist
\xdef\ttl@b{\ttl@c}%
\endgroup
\ifx\ttl@b\@empty
\PackageError{titlesec}{Format/spacing not found}%
{I was unable to find the format corresponding to #2.\MessageBreak
Maybe you haven't set it with \string\titleformat\space and
\string\titlespacing}
\fi
\expandafter#1\ttl@b{#2}}
% Used in ttl@select
\def\ttl@savefn#1[#2]#3{%
\ifcase#1%
\footnotemark[#2]%
\gdef\ttl@fn{\footnotetext[#2]{#3}}%
\else
\footnotemark
\gdef\ttl@fn{\footnotetext{#3}}%
\fi}
\def\ttl@nest@error{%
\PackageError{titlesec}{Nested titles}{Titles must not be nested}}
\def\ttl@hmode@error{%
\PackageError{titlesec}{Entered in horizontal mode}
{The <format> argument cannot contain horizontal material\MessageBreak
such as text, \string\noindent, \string\makebox, etc.}}
% \ttl@select not only selects the right version to be
% used. It also take steps to ensure that a mark
% is not lost inside a box by saving it into \ttl@mk,
% which in turn is used by the sect and chap commands.
\newif\ifttl@explicit
\def\ttl@gmk#1{\gdef\ttl@mk{#1}}
\def\ttl@select#1#2#3#4{%
\ttl@Hy@saveanchor
\global\let\ttl@mk\@empty % global because of rigidchapters
\global\let\ttl@fn\@empty
\begingroup
\everypar{\setbox\z@\lastbox\strut}% or \hskip-\parindent?
\let\ttl@straight@i\ttl@nest@error
\let\ttl@top@i \ttl@nest@error
\let\ttl@part@i \ttl@nest@error
\let\ttl@page@i \ttl@nest@error
\let\ttl@newpage\newpage
\def\newpage{\ttl@savewrite\ttl@newpage}%
\def\markboth##1##2{\protect\ttl@gmk{\protect\markboth{##1}{##2}}}%
\def\markright##1{\protect\ttl@gmk{\protect\markright{##1}}}%
\def\@mkboth##1##2{\protect\ttl@gmk{\protect\@mkboth{##1}{##2}}}%
\def\footnote{\@ifnextchar[%
{\ttl@savefn\z@}{\ttl@savefn\@ne[]}}%
\edef\ttl@key@numberless{\ifttl@label//\else/*\fi}%
\def\ttl@b{ttlf@#1}%
\def\ttl@a##1{\csname ttl@key@##1\endcsname}% Used as elt in try
\ttl@trylist
\ifttl@explicit
\def\ttl@passexplicit{\ttl@case{#4}}%
\ttl@c{#4}{#2}{#3}{}% ttl@c is returned by ttl@try with ttlf@...
\else
\let\ttl@passexplicit\ttl@case
\ttl@c{#2}{#3}{#4}% ttl@c is returned by ttl@try with ttlf@...
\fi
\endgroup}
\let\ttl@savewrite\@empty
\def\ttl@finmarks{%
\ttl@savewrite
\ttl@mk % Contains a possible mark, returned by \ttl@select
\ttl@fn} % And a footnote
\def\ttl@try#1{%
\edef\ttl@c{#1}% #1 is a list in the form \ttl@a{key}\ttl@a{key}
\@ifundefined{\ttl@b\ttl@c}{}{%
\edef\ttl@c{\expandafter\noexpand\csname\ttl@b\ttl@c\endcsname}%
\def\ttl@a##1{\csname ttl@extra@##1\endcsname}%
#1%
\let\ttl@try\@gobble}} % locally modified to `break' testings
% \ttl@write writes marks and toc. tocdepth is taken
% care of when the toc is typesetted and not here.
% Used always through ttl@savewrite
\def\ttl@write#1#2{%
\ttl@blinemarks
\csname#1mark\endcsname{#2}%
\def\ttl@a{\protect\numberline{\@nameuse{the#1}}}%
\@nameuse{ttl@toc#1}% eg, \ttl@tocpart modifies \ttl@a
\ttl@addcontentsline{#1}{#2}% Depends on toctitles
\ttl@elinemarks
\global\ttl@toclabelfalse}
\newif\ifttl@premark % to be used in ttlps.def
\ttl@premarkfalse
\def\ttl@premark#1#2{%
\protected@xdef\ttl@prevmarks{\ttl@marks}%
\ttl@blinemarks
\csname#1mark\endcsname{#2}%
\ttl@elinemarks
\gdef\ttl@prevmarks{\ttl@marks}}
% Must be preceded by a default \ttl@savewrite, which is used
% in starred variants--\@empty in top and straight classes.
% In straight class, it is preceded by the setting of
% prev marks to provide a "fixed" top mark. Otherwise,
% the default prev mark (= curr mark) is used (restored
% after ttl@labelling in straight). This is the command
% to be hacked if you want to change the behaviour of
% starred variants.
\def\ttl@labelling#1#2{%
\let\ttl@Hy@saveanchor\@empty
\ifttl@label % First: if star
\def\ttl@savewrite{\ttl@write{#1}{#2}}%
\@nameuse{ttl@#1label}% eg, sets if mainmatter in chapter.
\ifttl@label % Second, eg, if not main matter
\ifnum\@nameuse{ttll@#1}>\c@secnumdepth\relax
\ttl@labelfalse % Third: if too deep
\else
\ttl@Hy@refstepcounter{#1}%
\@nameuse{ttl@#1out}%
\fi
\fi
\fi
\let\ifttl@toclabel\ifttl@label
\ifx\ttl@savewrite\@empty\else % If marks
\ifttl@ps
\ifttl@premark
\global\ttl@premarkfalse
\else % if no \pretitlemark
\ttl@premark{#1}{#2}%
\fi
\fi
\ifttl@label\else\ttl@Hy@steplink{#1}\fi
\fi}
% Executed by ttl@labelling if the name of section is chapter:
\def\ttl@chapterlabel{\if@mainmatter\else\ttl@labelfalse\fi}
% Executed by ttl@labelling if chapter has a number. Note
% you can define messages for other sectioning levels (eg,
% \ttl@sectionout).
\def\ttl@chapterout{\typeout{\chaptertitlename\space\thechapter.}}
% Straight class
% ~~~~~~~~~~~~~
% Default for nobottomtitles. Changed by nobottomtitles*
\def\ttl@addstretch{\advance\@tempskipa-\pagestretch}
% 1:name 2:level 3:indent 4:before 5:after 6:afind [7]:cap 8:title
% The second argument of ttl@sect is the level, which
% is empty if the star version is used. In this case
% neither the toc nor the marks are written.
\def\ttl@straight@i#1[#2]#3{%
\def\@currentlabelname{#2}% for nameref
\gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
\let\ttl@savewrite\@empty
\def\ttl@savetitle{#3}%
\gdef\thetitle{\csname the#1\endcsname}%
\if@noskipsec \leavevmode \fi
\par
\ttl@labelling{#1}{#2}%
\ttl@startargs\ttl@straight@ii{#1}{#3}}
% 1:left 2:right 3:before 4:after 5:afterindent 6:name 7:title
\def\ttl@straight@ii#1#2#3#4#5#6#7{%
\ttl@assign\@tempskipa#3\relax\beforetitleunit
\@ifundefined{ttl@ps@#6}{}%
{\PackageWarning{titlesec}{Page style in straight class ignored}}%
\if@nobreak
\ttl@titlespace{\@tempskipa}%
\else
\@ifundefined{#6break}%
{\addpenalty{\@secpenalty}}%
{\csname#6break\endcsname}%
\addvspace{\@tempskipa}%
\ifdim\bottomtitlespace<\z@
\else
\begingroup
\@tempskipb\pagegoal
\@tempskipa\pagegoal
\ttl@addstretch % \relax if nobottomtitle*
\advance\@tempskipa-\bottomtitlespace\relax % not a register
\pagegoal\@tempskipa
\def\@textbottom{\vskip\z@\@plus.0001fil}%
\penalty9999
\pagegoal\@tempskipb
\endgroup
\fi
\fi
\@afterindenttrue
\ifcase#5 \@afterindentfalse\fi
\ttl@assign\@tempskipb#4\relax\aftertitleunit
\ttl@select{#6}{#1}{#2}{#7}%
\ttl@finmarks
\@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
\if@noskipsec
\global\@nobreakfalse
\everypar{%
\if@noskipsec
\global\@noskipsecfalse
\clubpenalty\@M
\hskip-\parindent
\begingroup
\@svsechd\unskip{\hspace{\@tempskipb}}%
\endgroup
\else
\clubpenalty\@clubpenalty\everypar{}%
\fi}%
\else
\par\nobreak
\vspace{\@tempskipb}%
\@afterheading
\fi
\ignorespaces}
% Part class
% ~~~~~~~~~~
\providecommand\partmark[1]{\markboth{}{}}
\def\ttl@part@i#1[#2]#3{%
\gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
\def\ttl@savewrite{\ttl@write{#1}{#3}}% A default value. Not #2!
\def\ttl@savetitle{#3}%
\ttl@labelling{#1}{#2}%
\ttl@startargs\ttl@part@ii{#1}{#3}}
\def\ttl@part@ii#1#2#3#4#5#6#7{%
\ttl@assign\@tempskipa#3\relax\beforetitleunit
\vspace*{\@tempskipa}%
\@ifundefined{ttl@ps@#6}{}%
{\PackageWarning{titlesec}{Page style in part class ignored}}%
\global\@afterindenttrue
\ifcase#5 \global\@afterindentfalse \fi
\ttl@assign\@tempskipb#4\relax\aftertitleunit
\ttl@select{#6}{#1}{#2}{#7}%
\ttl@finmarks
\@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
\par\nobreak
\vspace{\@tempskipb}%
\@afterheading}
% Page class
% ~~~~~~~~~~
\def\ttl@page@i#1[#2]#3{%
\gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
\def\ttl@savewrite{\ttl@write{#1}{#3}}% A default value. Not #2!
\def\ttl@savetitle{#3}%
\ttl@labelling{#1}{#2}%
\ttl@startargs\ttl@page@ii{#1}{#3}}
\def\ttl@page@ii#1#2#3#4#5#6#7{%
\ttl@assign\@tempskipa#3\relax\beforetitleunit
\if@openright
\cleardoublepage
\else
\clearpage
\fi
\@ifundefined{ttl@ps@#6}%
{\thispagestyle{plain}}%
{\thispagestyle{\@nameuse{ttl@ps@#6}}}%
\if@twocolumn
\onecolumn
\@tempswatrue
\else
\@tempswafalse
\fi
\vspace*{\@tempskipa}%
\@afterindenttrue
\ifcase#5 \@afterindentfalse\fi
\ttl@assign\@tempskipb#4\relax\aftertitleunit
\ttl@select{#6}{#1}{#2}{#7}%
\ttl@finmarks
\@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
\vspace{\@tempskipb}%
\newpage
\if@twoside
\if@openright
\null
\@ifundefined{ttl@ps@#6}%
{\thispagestyle{empty}}%
{\thispagestyle{\@nameuse{ttl@ps@#6}}}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi
\ignorespaces}
% Top class and some makechapterhead stuff
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%
% \ttl@mkchap is the new make(s)chapterhead.
\def\ttl@mkchap#1#2#3#4#5#6#7{%
\gdef\ttl@savemark{\csname#6mark\endcsname{#7}}%
\let\ttl@savewrite\@empty
\let\ttl@Hy@saveanchor\@empty
\@ifundefined{ttl@ps@#6}{}%
{\thispagestyle{\@nameuse{ttl@ps@#6}}}%
\let\ifttl@toclabel\ifttl@label
\ttl@mkchap@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
% But \ttl@mkchap@i is used by both makechapterhead and
% the top class.
\def\ttl@mkchap@i#1#2#3#4#5#6#7{%
\ttl@assign\@tempskipa#3\relax\beforetitleunit
\vspace*{\@tempskipa}%
\global\@afterindenttrue
\ifcase#5 \global\@afterindentfalse\fi
\ttl@assign\@tempskipb#4\relax\aftertitleunit
\ttl@topmode{\@tempskipb}{%
\ttl@select{#6}{#1}{#2}{#7}}%
\ttl@finmarks % Outside the box!
\@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}}
\def\ttl@top@i#1[#2]#3{%
\gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
\let\ttl@savewrite\@empty
\def\ttl@savetitle{#3}%
\ttl@labelling{#1}{#2}%
\ttl@startargs\ttl@top@ii{#1}{#3}}
\def\ttl@top@ii#1#2#3#4#5#6#7{%
\@ifundefined{#6break}%
{\if@openright
\cleardoublepage
\else
\clearpage
\fi}%
{\csname#6break\endcsname}%
\@ifundefined{ttl@ps@#6}%
{\thispagestyle{plain}}%
{\thispagestyle{\@nameuse{ttl@ps@#6}}}%
\global\@topnum\z@
\@ifundefined{#6tolists}%
{\addtocontents{lof}{\protect\ttl@tocsep}%
\addtocontents{lot}{\protect\ttl@tocsep}}
{\@nameuse{#6tolists}}%
\if@twocolumn
\@topnewpage[\ttl@mkchap@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}]%
\else
\ttl@mkchap@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
\@afterheading
\fi
\ignorespaces}
% \def\ttl@noskipsectrue{%
% \if@noskipsec
% \PackageError{titlesec}{Invalid shape for top class}%
% {The selected shape only makes sense when merged into\MessageBreak
% a paragraph. That is impossible in the top class}%
% \else
\newcommand\chaptertitlename{\@chapapp}
\def\ttl@tocsep{\addvspace{10\p@}}
% +-----------------+
% | S H A P E S |
% +-----------------+
%
% % Reformatting Titles: Interface
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
% The surrounding space is stored in a macro
% named \ttls@<section> whose content is
% {left}{right}{before}{after}{afterindent}.
% But if there is the page key, the name is
% \ttls@<section>/<page>
\newcommand\titlespacing{%
\@ifstar{\ttl@spacing@i{\z@}}{\ttl@spacing@i{\@ne}}}
\def\ttl@spacing@i#1#2#3#4#5{%
\ttl@getkeys{#2}{titlesec}%
\@ifnextchar[{%
\ttl@spacing@ii{#1}{#3}{#4}{#5}%
}{%
\ttl@spacing@ii{#1}{#3}{#4}{#5}[\z@]}}
\def\ttl@spacing@ii#1#2#3#4[#5]{%
\expandafter\def\csname ttls@\ttl@a\endcsname
{{#2}{#5}{#3}{#4}{#1}}}
% The section name is built in \ttl@a.
% The format is stored in a macro named \ttlf@<section>,
% or \ttlf@<section>/<page> if there is the page spec,
% or \ttlf@.../* if numberless is true
% whose content is
% \ttl@<shape>{format}{label}{sep}{before}{after}
\newtoks\ttl@toksa
\newcommand\titleformat{%
\@ifstar{\ttl@format@s}%
{\ttl@format@i}}
\def\ttl@format@s#1#2{%
\edef\ttl@a{\expandafter\@gobble\string#1}%
\@ifundefined{ttlf@\ttl@a}%
{\PackageError{titlesec}{Not allowed in `easy' settings}
{The sectiong command you are trying to redefine\MessageBreak
is not handled by the starred variant (eg, \string\part)}}{}
\expandafter\expandafter\expandafter
\ttl@format@si\csname ttlf@\ttl@a \endcsname
{#2}}
\def\ttl@format@si#1#2#3#4#5#6#7{%
\@namedef{ttlf@\ttl@a}{#1{#7}{#3}{#4}{#5}{#6}}}
\def\ttl@format@i#1{%
\@ifnextchar[{\ttl@format@ii{#1}}{\ttl@format@ii{#1}[hang]}}
\def\ttl@format@ii#1[#2]#3#4#5#6{%
\ttl@getkeys{#1}{titlesec}%
\ttl@toksa{{#3}{#4}{#5}{#6}}% Save arguments
\@ifnextchar[{%
\ttl@format@iii{#2}%
}{%
\ttl@format@iii{#2}[]}}
% First, we get the shape -- if not defined it loads
% the corresponding file.
\def\ttl@format@iii#1[#2]{%
\@ifundefined{ttlh@#1}{%
\begingroup
\makeatletter
\InputIfFileExists{#1.tss}{}{%
\PackageError{titlesec}{Unknown shape}%
{Shapes are defined in files with extension tss\MessageBreak
Either you have misspelled the shape\MessageBreak
or there is no a #1.tss file}}%
\endgroup}{}%
\@temptokena{#2}%
\ifttl@explicit
\edef\ttl@b{%
\def\expandafter\noexpand\csname ttlf@\ttl@a\endcsname####1%
{\expandafter\noexpand\csname ttlh@#1\endcsname
\the\ttl@toksa{\the\@temptokena}}}%
\else
\edef\ttl@b{%
\def\expandafter\noexpand\csname ttlf@\ttl@a\endcsname
{\expandafter\noexpand\csname ttlh@#1\endcsname
\the\ttl@toksa{\the\@temptokena}}}%
\fi
\ttl@b
\csname ttl@compat\ttl@a\endcsname}
% Styles
% ~~~~~~
% 1:global 2:label 3:sep 4:style 5:after 6:left 7:right 8:title
% \ttl@<shape> and \ttlh@<shape> take the following eight
% arguments:
% {format}{label}{sep}{before}{after}{left}{right}{title}
% where before and after refer to the format.
% With the option explicit, #4 contains the title and #8 is
% empty.
\def\ttlh@display#1#2#3#4#5#6#7#8{%
\gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
\setlength\leftskip{#6}%
\setlength\rightskip{#7}%
\interlinepenalty\@M
\ttl@changecentercr
\ttl@beginlongest
#1\ifhmode\ttl@hmode@error\fi
\ttl@glcmds
\parindent\z@
\ifttl@label
{#2\strut\@@par}\nobreak\ttl@calc\vspace{#3}%
\fi
#4{#8}%
\kern\z@\strut\@@par
\nobreak\ttl@midlongest#5\@@par
\ttl@endlongest}
\def\ttlh@hang#1#2#3#4#5#6#7#8{%
\gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
\setlength\leftskip{#6}%
\setlength\rightskip{#7}%
\interlinepenalty\@M
\ttl@changecentercr
\ttl@beginlongest
#1{\ifhmode\ttl@hmode@error\fi
\ttl@glcmds
\parindent\z@
\leavevmode
\begingroup
\ifttl@label
\sbox\z@{#2\strut\ttl@calc\hspace{#3}}%
\advance\leftskip\wd\z@
\llap{\box\z@}%
\fi
#4{#8}%
\kern\z@\strut\@@par
\endgroup
\nobreak\ttl@midlongest#5\@@par}%
\ttl@endlongest}
\def\ttlh@runin#1#2#3#4#5#6#7#8{%
\global\@noskipsectrue
\gdef\ttl@makeline##1{##1}%
\ttl@changecentercr
#1{\ifhmode\ttl@hmode@error\fi
\global\sbox\ttl@box{%
\ttl@calc\hspace{#6}%
\ifttl@label{\strut#2}\ttl@calc\hspace{#3}\fi
#4{#8}#5\unskip}}%
\gdef\@svsechd{\unhbox\ttl@box}}
% +-----------------+
% | T O O L S |
% +-----------------+
%
% calcwidth
% ~~~~~~~~~
% Implemented after code from soul (but much modified...)
\newdimen\titlewidth
\newdimen\titlewidthlast
\newdimen\titlewidthfirst
\let\ttl@glcmds\relax
\let\ttl@beginlongest\@empty
\let\ttl@midlongest\@empty
\let\ttl@endlongest\@empty
\let\iftitlemeasuring\@secondoftwo
\def\ttl@xbeginlongest#1\ttl@endlongest{%
\titlewidth\z@
\titlewidthlast\z@
\let\iftitlemeasuring\@firstoftwo
\setbox\ttl@box\vbox{%
\def\ttl@glcmds{%
\def\\{\@ifstar{\@ifnextchar[{\ttl@bs}{\newline}}%
{\@ifnextchar[{\ttl@bs}{\newline}}}%
\def\ttl@bs[####1]{\newline}%
\let\@centercr\\%
\def\ttl@midlongest####1\@@par{}% Very dirty...
\advance\rightskip 1\leftskip plus 1fil
\leftskip=\z@}%
#1}%
\let\iftitlemeasuring\@secondoftwo
\ttl@boxprocess
#1}
\def\ttl@boxprocess{%
\setbox\ttl@box=\vbox{%
\unvcopy\ttl@box
\unskip\unpenalty
\global\setbox\@ne=\lastbox}%
\ifvoid\@ne
\else
\setbox\tw@=\hbox{\hskip-\leftskip\unhbox\@ne\hskip-\rightskip}%
\titlewidthfirst\wd\tw@
\ifdim\titlewidth<\titlewidthfirst
\titlewidth\titlewidthfirst
\fi
\ifdim\titlewidthlast=\z@
\titlewidthlast\titlewidthfirst
\fi
\expandafter\ttl@boxprocess
\fi}
% Rules
% ~~~~~
\providecommand\titleline{%
\@ifstar{\ttl@line@i{\hb@xt@\titlewidth}}%
{\ttl@line@i{}}}
\def\ttl@line@i#1{%
\@ifnextchar[{\ttl@line{#1}}{\ttl@line{#1}[s]}}
\def\ttl@line#1[#2]#3{%
\vskip\topskip
\hrule \@height \z@
\nobreak
\vskip-\topskip
\begingroup
\parindent\z@
\everypar{}%
\leftskip\z@
\rightskip\z@ % #1 is either \hb@xt@\titlewidth or empty:
\@makebox[\hsize][#2]{\ttl@makeline{#1{#3}}}%
\par
\endgroup
\hrule height \z@
\nobreak}
\providecommand\titlerule{\@ifstar{\ttl@row}{\ttl@rule}}
\let\ttl@leaders\xleaders % For titletoc compatibility
\def\ttl@row{\@ifnextchar[{\ttl@row@i}{\ttl@row@i[\wd\z@]}}
\def\ttl@row@i[#1]#2{%
\ifvmode\expandafter\titleline\fi
{\sbox\z@{#2}%
\ttl@calcneg\hspace{#1}%
\hskip\wd\z@
\ttl@leaders\hb@xt@#1{\hss\box\z@}%
\hfill\kern\z@}}
\def\ttl@rule{\@ifnextchar[{\ttl@rule@i}{\ttl@rule@i[.4\p@]}}
\def\ttl@rule@i[#1]{%
\ifvmode\expandafter\titleline\fi
{\leaders\hrule height #1\hfill\kern\z@}}
% Par shapes and space
% ~~~~~~~~~~~~~~~~~~~~
\providecommand\filright{%
\gdef\ttl@filleft##1{\hskip##1}%
\gdef\ttl@filright##1{\hfill}%
\let\\\@centercr
\advance\rightskip\z@ \@plus 1fil\relax}
\providecommand\filleft{%
\gdef\ttl@filleft##1{\hfill}%
\gdef\ttl@filright##1{\hskip##1}%
\let\\\@centercr
\advance\leftskip\z@ \@plus 1fil
\parfillskip\z@}
\providecommand\filcenter{\filleft\filright
\gdef\ttl@filleft##1{\hfill}}
\providecommand\fillast{%
\gdef\ttl@filleft##1{\hfill}%
\gdef\ttl@filright##1{\hfill}%
\let\\\@centercr
\filleft\advance\rightskip\z@ \@plus -1fil
\parfillskip\z@ \@plus 2fil\relax}
\newcommand\filinner{%
\if@twoside
\ifodd\count\z@\filleft\else\filright\fi
\else
\filleft
\fi}
\newcommand\filouter{%
\if@twoside
\ifodd\count\z@\filright\else\filleft\fi
\else
\filright
\fi}
\newcommand\wordsep{\fontdimen\tw@\font \@plus
\fontdimen\thr@@\font \@minus \fontdimen4\font}
% +-----------------+
% | O P T I O N S |
% +-----------------+
\DeclareOption{pagestyles}{\let\sectiontitle\@empty}
\DeclareOption{extramarks}{\let\ttl@fetchmark\@empty}
\DeclareOption{floatps}{%
\ifx\sectiontitle\@empty
\let\ttl@replace\space
\else
\PackageWarning{titlesec}{Ignoring `floatps' without
`pagestyles'. This option is now deprecated.}%
\fi}
\DeclareOption{psfloats}{%
\ifx\sectiontitle\@empty
\let\ttl@replace\@empty
\else
\PackageWarning{titlesec}{Ignoring `psfloats' without
`pagestyles'}%
\fi}
\DeclareOption{loadonly}{\let\ttl@extract\@empty}
\DeclareOption{outermarks}{%
\def\ttl@titlemarks{\outertitlemarks}}
\DeclareOption{topmarks}{
\def\ttl@titlemarks{\toptitlemarks}}
\DeclareOption{botmarks}{%
\def\ttl@titlemarks{\bottitlemarks}}
\DeclareOption{innermarks}{%
\def\ttl@titlemarks{\innertitlemarks}}
\DeclareOption{footmarks}{} % Backward compat
\DeclareOption{explicit}{\ttl@explicittrue}
\DeclareOption{clearempty}{%
\def\cleardoublepage{%
\clearpage{\ps@empty\if@twoside\ifodd\c@page\else
\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}}}
\DeclareOption{rigidchapters}{%
\def\ttl@topmode#1#2{\vbox to #1{#2\vfil}}%
\def\ttl@chapafter{.26\textheight}}
\DeclareOption{rubberchapters}{%
\def\ttl@topmode#1#2{{#2}\ttl@calc\vspace{#1}}%
\def\ttl@chapafter{40\p@}}
\DeclareOption{bottomtitles}{%
\def\bottomtitlespace{-1\p@}}
\DeclareOption{nobottomtitles}{%
\def\bottomtitlespace{.2\textheight}}
\DeclareOption{nobottomtitles*}{%
\let\ttl@addstretch\relax
\def\bottomtitlespace{.2\textheight}}
\DeclareOption{calcwidth}{%
\let\ttl@beginlongest\ttl@xbeginlongest}
\DeclareOption{aftersep}{%
\let\ttl@titlespace\@gobble}
\DeclareOption{largestsep}{%
\let\ttl@titlespace\addvspace}
\DeclareOption{oldparttoc}{%
\def\ttl@tocpart{\def\ttl@a{\thepart\hspace{1em}}}}
\DeclareOption{newparttoc}{%
\let\ttl@tocpart\relax}
\DeclareOption{rm}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\rmfamily}}
\DeclareOption{sf}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\sffamily}}
\DeclareOption{tt}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\ttfamily}}
\DeclareOption{md}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\mdseries}}
\DeclareOption{bf}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\bfseries}}
\DeclareOption{up}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\upshape}}
\DeclareOption{it}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\itshape}}
\DeclareOption{sl}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\slshape}}
\DeclareOption{sc}{%
\protected@xdef\ttl@fonts{\ttl@fonts\protect\scshape}}
\DeclareOption{big}{%
\gdef\ttl@sizes#1{\ifcase#1\relax\Huge\or\Large\or\large
\or\normalsize\or\or\or\huge\fi}}
\DeclareOption{medium}{%
\gdef\ttl@sizes#1{\ifcase#1\relax\huge\or\Large\or\large
\or\normalsize\or\or\or\LARGE\fi}}
\DeclareOption{small}{%
\gdef\ttl@sizes#1{\ifcase#1\relax\LARGE\or\large
\or\normalsize\or\normalsize\or\or\or\Large\fi}}
\DeclareOption{tiny}{%
\gdef\ttl@sizes#1{\ifcase#1\relax\large\or\normalsize\or
\normalsize\or\normalsize\or\or\or\normalsize\fi}}
\DeclareOption{raggedleft}{%
\gdef\ttl@fil{\filleft}}
\DeclareOption{center}{%
\gdef\ttl@fil{\filcenter}}
\DeclareOption{raggedright}{%
\gdef\ttl@fil{\filright}}
\DeclareOption{uppercase}{%
\gdef\ttl@case{\MakeUppercase}}
\DeclareOption{compact}{%
\gdef\ttl@space{1}%
\gdef\ttl@chapafter{30\p@}}
% Deprecated. To be remmoved in a major upgrade (3.0)
\DeclareOption{indentfirst}{%
\gdef\@afterindentfalse{\let\if@afterindent\iftrue}%
\@afterindenttrue
\def\titlespacing{%
\@ifstar{\ttl@spacing@i{\@ne}}{\ttl@spacing@i{\@ne}}}}
\DeclareOption{nonindentfirst}{%
\def\titlespacing{%
\@ifstar{\ttl@spacing@i{\z@}}{\ttl@spacing@i{\z@}}}}
% New names
\DeclareOption{indentafter}{%
\gdef\@afterindentfalse{\let\if@afterindent\iftrue}%
\@afterindenttrue
\def\titlespacing{%
\@ifstar{\ttl@spacing@i{\@ne}}{\ttl@spacing@i{\@ne}}}}
\DeclareOption{noindentafter}{%
\def\titlespacing{%
\@ifstar{\ttl@spacing@i{\z@}}{\ttl@spacing@i{\z@}}}}
% newlinetospace
\let\ttl@blinemarks\relax
\let\ttl@elinemarks\relax
\DeclareRobustCommand\ttl@linetosp{%
\@ifstar{\ttl@linetosp@i}{\ttl@linetosp@i}}%
\def\ttl@linetosp@i{%
\ifdim\lastskip>\z@\else\space\fi
\ignorespaces}
\DeclareOption{newlinetospace}{%
\def\ttl@blinemarks{%
\let\ttl@e\\%
\def\\{\ttl@linetosp}}%
\def\ttl@elinemarks{\let\\\ttl@e}}%
% toctitles
\def\ttl@addcontentsline#1#2{%
\addcontentsline{toc}{#1}{\ifttl@toclabel\ttl@a\fi#2}%
\nobreak}
\DeclareOption{toctitles}{%
\def\ttl@addcontentsline#1#2{%
\addcontentsline{toc}{#1}{\ifttl@toclabel\ttl@a\fi\ttl@savetitle}%
\nobreak}}
% pageatnewline
\def\ttl@changecentercr{%
\let\ttl@centercr\@centercr
\def\@centercr{\@ifstar{\ttl@centercr*}{\ttl@centercr*}}}
\DeclareOption{pageatnewline}{\let\ttl@changecentercr\relax}
\def\ttl@fonts{}
\ExecuteOptions{rubberchapters,bottomtitles,aftersep,oldparttoc,%
innermarks}
\ProcessOptions
% +-----------------+
% | H Y P E R R E F |
% +-----------------+
%
% These two commands are provided by hyperref. But if they
% are not defined at \begin{document} hyperref has not been
% loaded or it is an old version.
\AtBeginDocument{%
\ifx\ttl@Hy@steplink\@undefined
\let\ttl@Hy@steplink\@gobble
\let\ttl@Hy@refstepcounter\refstepcounter
\fi}
% +-----------------+
% | PAGE STYLES |
% +-----------------+
%
% This is generic:
\newcommand\assignpagestyle[2]{%
\@namedef{ttl@ps@\expandafter\@gobble\string#1}{#2}}
% Old pagestyles
% ~~~~~~~~~~~~~~
\providecommand\newpagestyle{%
\let\ttl@compatps\@empty % marks the ``old interface''
\makeatletter
\edef\ttl@d{%
\noexpand\input{ttlps.def}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\newpagestyle}
\providecommand\renewpagestyle{%
\let\ttl@compatps\@empty % marks the ``old interface''
\makeatletter
\edef\ttl@d{%
\noexpand\input{ttlps.def}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\renewpagestyle}
\providecommand\widenhead{%
\let\ttl@compatps\@empty % marks the ``old interface''
\makeatletter
\edef\ttl@d{%
\noexpand\input{ttlps.def}%
\catcode`\noexpand\@=\the\catcode`\@}%
\ttl@d
\widenhead}
% New pagestyles
% ~~~~~~~~~~~~~~
\@ifundefined{sectiontitle}{}{\input{ttlps.def}}
% +-----------------+
% | C O M P A T |
% +-----------------+
% Easy setup, i.e., that of package options, is
% taken care of, if necessary.
\renewcommand\secdef[2]{%
\@ifstar
{\ttl@labelfalse
#2}
{\ttl@labeltrue
\ifx#1\@chapter
\if@mainmatter\else\ttl@labelfalse\fi
\ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
\else\ifx#1\@part
\ifnum\ttll@part>\c@secnumdepth\ttl@labelfalse\fi
\fi\fi
\let\ifttl@toclabel\ifttl@label
\@dblarg{#1}}}
\@ifundefined{ttl@extract}{}{\endinput}
\newcommand\titlelabel[1]{%
\def\@seccntformat##1{#1}}
\expandafter\ifx\csname chapter\endcsname\relax
\def\ttl@compatpart{\titleclass{\part}{part}\relax}
\else
\def\ttl@compatchapter{%
\def\@makechapterhead{%
\ttl@labeltrue
\if@mainmatter\else\ttl@labelfalse\fi
\ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
\ttl@startargs\ttl@mkchap{chapter}}%
\def\@makeschapterhead{%
\ttl@labelfalse
\if@mainmatter\else\ttl@labelfalse\fi
\ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
\ttl@startargs\ttl@mkchap{chapter}}}
\def\ttl@compatpart{\titleclass{\part}{page}\relax}
\fi
\def\ttl@@extract#1\@startsection#2#3#4#5#6#7#8{%
\@tempskipa=#5
\@tempskipb=#6
\ifdim\@tempskipa<\z@
\toks@{\titlespacing*#8{#4}}%
\@tempskipa-\@tempskipa
\else
\toks@{\titlespacing#8{#4}}%
\fi
\@ifundefined{ttl@space}{}{%
\ttl@assign\@tempskipa*\ttl@space\relax\beforetitleunit}%
\ifdim\@tempskipb<\z@
\if@tempswa
\titleformat#8[runin]%
{\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}%
{\z@}\ttl@passexplicit
\else
\titleformat#8[runin]%
{#7}{\@seccntformat{#2}}%
{\z@}\ttl@passexplicit
\fi
\@tempskipb-\@tempskipb
\else
\if@tempswa
\titleformat#8%
{\ttl@fil\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}%
{\z@}\ttl@passexplicit
\else
\titleformat#8%
{#7}{\@seccntformat{#2}}%
{\z@}\ttl@passexplicit
\fi
\@ifundefined{ttl@space}{}{%
\ttl@assign\@tempskipb*\ttl@space\relax\aftertitleunit}%
\fi
\edef\ttl@a{\the\toks@{\the\@tempskipa}{\the\@tempskipb}}
\ttl@a}
\def\ttl@extract#1{%
\expandafter\in@\expandafter\@startsection\expandafter{#1}%
\ifin@
\expandafter\ttl@@extract#1#1%
\else
\PackageWarningNoLine{titlesec}%
{Non standard sectioning command detected\MessageBreak
Using default spacing and no format}
\titlespacing*#1{\z@}{*3}{*2}%
\fi}
\@tempswafalse
\ifx\ttl@fonts\@empty
\def\ttl@fonts{\bfseries}
\else
\@tempswatrue
\fi
\expandafter\ifx\csname ttl@sizes\endcsname\relax
\gdef\ttl@sizes#1{\ifcase#1\relax\Huge\or\Large\or\large
\or\normalsize\or\or\or\huge\fi}
\else
\@tempswatrue
\fi
\expandafter\ifx\csname ttl@fil\endcsname\relax
\let\ttl@fil\@empty
\else
\@tempswatrue
\fi
\expandafter\ifx\csname ttl@case\endcsname\relax
\let\ttl@case\@firstofone
\else
\@tempswatrue
\fi
\if@tempswa
\expandafter\ifx\csname chapter\endcsname\relax\else
\titleformat\chapter[display]%
{\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
{\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
\fi
\fi
\ttl@extract\section
\ttl@extract\subsection
\ttl@extract\subsubsection
\ttl@extract\paragraph
\ttl@extract\subparagraph
\let\ttl@extract\@undefined
\let\ttl@@extract\@undefined
\def\ttl@toplevel{part}
\expandafter\ifx\csname chapter\endcsname\relax
\@namedef{ttll@part}{0}
\titleclass{\section}{straight}[\part]
\titlespacing*{\part}
{\z@}
{4ex}
{3ex}
\else
\let\ttl@save@mkchap\@makechapterhead
\let\ttl@save@mkschap\@makeschapterhead
\def\@makechapterhead#1{%
\gdef\ttl@savemark{\chaptermark{#1}}%
\ttl@save@mkchap{#1}%
\@ifundefined{ttl@ps@chapter}{}%
{\thispagestyle{\@nameuse{ttl@ps@chapter}}}}
\def\@makeschapterhead#1{%
\gdef\ttl@savemark{\chaptermark{#1}}%
\ttl@save@mkschap{#1}%
\@ifundefined{ttl@ps@chapter}{}%
{\thispagestyle{\@nameuse{ttl@ps@chapter}}}}
\@namedef{ttll@part}{-1}
\@namedef{ttlss@part}{chapter}
\@namedef{ttll@chapter}{0}
\titleclass{\section}{straight}[\chapter]
% The following is unoperant, unless when \chapter / \part
% format is redefined
\titlespacing*{\part}
{\z@}
{\z@\@plus1fil}
{\z@\@plus1fil}
\titlespacing*\chapter
{\z@}%
{50\p@}%
{\ttl@chapafter}%
\fi
\titleclass{\subsection} {straight}[\section]
\titleclass{\subsubsection}{straight}[\subsection]
\titleclass{\paragraph} {straight}[\subsubsection]
\titleclass{\subparagraph} {straight}[\paragraph]
\endinput
tocloft.sty · 34 KB
%%
%% This is file `tocloft.sty',
%% generated with the docstrip utility.
%% May 2020 - Modifications made by Dorothea F. Brosius to comply with rules for University of Maryland Graduate School
%%
%% The original source files were:
%%
%% tocloft.dtx (with options: `usc')
%%
%% Author: Peter Wilson (CUA) now at [email protected]
%% (or [email protected])
%% Copyright 1998-2003 Peter R. Wilson
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3 of this license or (at your option) any
%% later version.
%% The latest version of the license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of
%% LaTeX version 2003/06/01 or later.
%%
%% This work has the LPPL maintenance status "author-maintained".
%%
%% This work consists of the files listed in the README file.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{tocloft}[2003/09/26 v2.3c parameterised ToC, etc., typesetting]
\providecommand{\PRWPackageNote}[2]{%
\GenericWarning{%
(#1)\@spaces\@spaces\@spaces\@spaces
}{%
Package #1 Note: #2%
}%
}
\providecommand{\PRWPackageNoteNoLine}[2]{%
\PRWPackageNote{#1}{#2\@gobble}%
}
\newcommand{\@cftquit}{}
\newif\if@cfthaschapter
\newif\if@cftkoma
\@cftkomafalse
\@ifclassloaded{scrartcl}{\@cftkomatrue}{}
\@ifclassloaded{scrreprt}{\@cftkomatrue}{}
\@ifclassloaded{scrbook}{\@cftkomatrue}{}
\@ifundefined{chapter}{%
\@cfthaschapterfalse
\@ifundefined{section}{%
\PackageWarning{tocloft}%
{I don't recognize any sectional divisions so I'll do nothing}
\renewcommand{\@cftquit}{\endinput}
}{\PRWPackageNoteNoLine{tocloft}{The document has section divisions}}
}{\@cfthaschaptertrue
\PRWPackageNoteNoLine{tocloft}{The document has chapter divisions}}
\@cftquit
\newif\if@cfttocbibind
\AtBeginDocument{%
\@ifpackageloaded{tocbibind}{\@cfttocbibindtrue}{\@cfttocbibindfalse}
\if@cfttocbibind
\@ifpackagelater{tocbibind}{1998/11/16}{}{%
\PackageWarning{tocloft}{%
You are using a version of the tocbibind package\MessageBreak
that is not compatible with tocloft.\MessageBreak
The results may be surprising.\MessageBreak
Consider installing the current version of tocbibind.}}
\fi
}
\newif\if@cftnctoc\@cftnctocfalse
\DeclareOption{titles}{\@cftnctoctrue}
%% \ProcessOptions\relax
\newif\if@cftsubfigopt\@cftsubfigoptfalse
\DeclareOption{subfigure}{\@cftsubfigopttrue}
\ProcessOptions\relax
\newcommand{\tocloftpagestyle}[1]{%
\def\@cftpagestyle{\thispagestyle{#1}}}
\tocloftpagestyle{plain}
\newcommand{\cftmarktoc}{%
\@mkboth{\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}
\newcommand{\cftmarklof}{%
\@mkboth{\MakeUppercase\listfigurename}{\MakeUppercase\listfigurename}}
\newcommand{\cftmarklot}{%
\@mkboth{\MakeUppercase\listtablename}{\MakeUppercase\listtablename}}
\if@cftkoma
\renewcommand{\cftmarktoc}{%
\@mkboth{\contentsname}{\contentsname}}
\renewcommand{\cftmarklof}{%
\@mkboth{\listfigurename}{\listfigurename}}
\renewcommand{\cftmarklot}{%
\@mkboth{\listtablename}{\listtablename}}
\fi
\providecommand{\@cfttocstart}{%
\if@cfthaschapter
\if@twocolumn
\@restonecoltrue\onecolumn
\else
\@restonecolfalse
\fi
\fi}
\providecommand{\@cfttocfinish}{%
\if@cfthaschapter
\if@restonecol\twocolumn\fi
\fi}
\providecommand{\phantomsection}{}
\newcommand{\@cftdobibtoc}{%
\if@dotoctoc
\if@bibchapter
\phantomsection
\addcontentsline{toc}{chapter}{\contentsname}
\else
\phantomsection
\addcontentsline{toc}{\@tocextra}{\contentsname}
\fi
\fi}
\newlength{\cftparskip}
\setlength{\cftparskip}{0pt}
\AtBeginDocument{%
\if@cftnctoc\else
\renewcommand{\tableofcontents}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\cftparskip
\@cftmaketoctitle
\if@cfttocbibind
\@cftdobibtoc
\fi
\@starttoc{toc}%
\endgroup
\@cfttocfinish}
\fi
}
\newcommand{\@cftmaketoctitle}{%
\addpenalty\@secpenalty
\if@cfthaschapter
\vspace*{\cftbeforetoctitleskip}
\else
\vspace{\cftbeforetoctitleskip}
\fi
\@cftpagestyle
{\interlinepenalty\@M
{\cfttoctitlefont\contentsname}{\cftaftertoctitle}
\cftmarktoc
\par\nobreak
\vskip \cftaftertoctitleskip
\@afterheading}}
\newlength{\cftbeforetoctitleskip}
\newlength{\cftaftertoctitleskip}
\if@cfthaschapter
\setlength{\cftbeforetoctitleskip}{50pt}
\setlength{\cftaftertoctitleskip}{40pt}
\else
\setlength{\cftbeforetoctitleskip}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\cftaftertoctitleskip}{2.3ex \@plus.2ex}
\fi
\if@cfthaschapter
%\newcommand{\cfttoctitlefont}{\normalfont\Huge\bfseries}
\newcommand{\cfttoctitlefont}{\hfill \large}
\if@cftkoma\renewcommand{\cfttoctitlefont}{\size@chapter\sectfont}\fi
\else
\newcommand{\cfttoctitlefont}{\normalfont\Large\bfseries}
\if@cftkoma\renewcommand{\cfttoctitlefont}{\size@section\sectfont}\fi
\fi
%\newcommand{\cftaftertoctitle}{}
\newcommand{\cftaftertoctitle}{\hfill}
\newcommand{\cftsetpnumwidth}[1]{\renewcommand{\@pnumwidth}{#1}}
\newcommand{\cftsetrmarg}[1]{\renewcommand{\@tocrmarg}{#1}}
\providecommand{\cftdot}{.}
\providecommand{\cftdotfill}[1]{%
\leaders\hbox{$\m@th\mkern #1 mu\hbox{\cftdot}\mkern #1 mu$}\hfill}
\providecommand{\cftdotsep}{4.5}
\newcommand{\cftnodots}{10000}
\newcommand{\cftparfillskip}{\parfillskip=0pt plus1fil}
\renewcommand{\numberline}[1]{%
\hb@xt@\@tempdima{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb}
\newcommand{\@cftbsnum}{}
\newcommand{\@cftasnum}{}
\newcommand{\@cftasnumb}{}
\newif\if@cftdopart
\newif\if@cfthaspart
\@ifundefined{part}{\@cfthaspartfalse}{\@cfthasparttrue}
\if@cfthaspart
\renewcommand*{\l@part}[2]{%
\@cftdopartfalse
\ifnum \c@tocdepth >-2\relax
\if@cfthaschapter
\@cftdoparttrue
\fi
\ifnum \c@tocdepth >\m@ne
\if@cfthaschapter\else
\@cftdoparttrue
\fi
\fi
\fi
\if@cftdopart
\if@cfthaschapter
\addpenalty{-\@highpenalty}%
\else
\addpenalty\@secpenalty
\fi
\addvspace{\cftbeforepartskip}%
\begingroup
{\leftskip \cftpartindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftpartindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftpartnumwidth\relax
\let\@cftbsnum \cftpartpresnum
\let\@cftasnum \cftpartaftersnum
\let\@cftasnumb \cftpartaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftpartfont \cftpartpresnum #1}%
\cftpartfillnum{#2}}
\nobreak
\if@cfthaschapter
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\else
\if@compatibility
\global\@nobreaktrue
\everypar{\global\@nobreakfalse\everypar{}}%
\fi
\fi
\endgroup
\fi}
\fi
\if@cfthaspart
\newlength{\cftbeforepartskip}
\setlength{\cftbeforepartskip}{2.25em \@plus\p@}
\newlength{\cftpartnumwidth}
\setlength{\cftpartnumwidth}{0em}
\newcommand{\cftpartfont}{\large\bfseries}
\newcommand{\cftpartpresnum}{}
\newcommand{\cftpartaftersnum}{}
\newcommand{\cftpartaftersnumb}{}
\newcommand{\cftpartleader}{\large\bfseries\cftdotfill{\cftpartdotsep}}
\newcommand{\cftpartdotsep}{\cftnodots}
\newcommand{\cftpartpagefont}{\large\bfseries}
\newcommand{\cftpartafterpnum}{}
\newlength{\cftpartindent}
\setlength{\cftpartindent}{0em}
\newcommand{\cftpartfillnum}[1]{%
{\cftpartleader}%
{\hb@xt@\@pnumwidth{\hss {\cftpartpagefont #1}}}\cftpartafterpnum\par}
\if@cftkoma
\setlength{\cftpartnumwidth}{2em}
\renewcommand{\cftpartfont}{\sectfont\large}
\renewcommand{\cftpartpagefont}{\sectfont\large}
\fi
\fi
\if@cfthaschapter
\renewcommand*{\l@chapter}[2]{%
\ifnum \c@tocdepth >\m@ne
\addpenalty{-\@highpenalty}%
\vskip \cftbeforechapskip
{\leftskip \cftchapindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftchapindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftchapnumwidth\relax
\let\@cftbsnum \cftchappresnum
\let\@cftasnum \cftchapaftersnum
\let\@cftasnumb \cftchapaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftchapfont #1}\nobreak
\cftchapfillnum{#2}}
\fi}
\fi
\if@cfthaschapter
\newlength{\cftbeforechapskip}
\setlength{\cftbeforechapskip}{1.0em \@plus\p@}
\newlength{\cftchapindent}
\setlength{\cftchapindent}{0em}
\newlength{\cftchapnumwidth}
\setlength{\cftchapnumwidth}{1.5em}
%\newcommand{\cftchapfont}{\bfseries}
\newcommand{\cftchapfont}{\normalsize}
\newcommand{\cftchappresnum}{}
\newcommand{\cftchapaftersnum}{}
\newcommand{\cftchapaftersnumb}{}
\newcommand{\cftchapleader}{\bfseries\cftdotfill{\cftchapdotsep}}
\newcommand{\cftchapdotsep}{\cftnodots}
% \newcommand{\cftchappagefont}{\bfseries}
\newcommand{\cftchappagefont}{\normalsize}
\newcommand{\cftchapafterpnum}{}
\newcommand{\cftchapfillnum}[1]{
{\cftchapleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftchappagefont #1}\cftchapafterpnum\par}
\if@cftkoma
\renewcommand{\cftchapfont}{\sectfont}
\fi
\fi
\renewcommand*{\l@section}[2]{%
\ifnum \c@tocdepth >\z@
\if@cfthaschapter
\vskip \cftbeforesecskip
\else
\addpenalty\@secpenalty
\addvspace{\cftbeforesecskip}
\fi
{\leftskip \cftsecindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsecindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsecnumwidth\relax
\let\@cftbsnum \cftsecpresnum
\let\@cftasnum \cftsecaftersnum
\let\@cftasnumb \cftsecaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsecfont #1}\nobreak
\cftsecfillnum{#2}}
\fi}
\newlength{\cftbeforesecskip}
\newlength{\cftsecindent}
\newlength{\cftsecnumwidth}
\newcommand{\cftsecpresnum}{}
\newcommand{\cftsecaftersnum}{}
\newcommand{\cftsecaftersnumb}{}
\if@cfthaschapter
\setlength{\cftbeforesecskip}{\z@ \@plus.2\p@}
\setlength{\cftsecindent}{1.5em}
\setlength{\cftsecnumwidth}{2.3em}
\newcommand{\cftsecfont}{\normalfont}
\newcommand{\cftsecleader}{\normalfont\cftdotfill{\cftsecdotsep}}
\newcommand{\cftsecdotsep}{\cftdotsep}
\newcommand{\cftsecpagefont}{\normalfont}
\else
\setlength{\cftbeforesecskip}{1.0em \@plus\p@}
\setlength{\cftsecindent}{0em}
\setlength{\cftsecnumwidth}{1.5em}
\newcommand{\cftsecfont}{\bfseries}
\newcommand{\cftsecleader}{\bfseries\cftdotfill{\cftsecdotsep}}
\newcommand{\cftsecdotsep}{\cftnodots}
\newcommand{\cftsecpagefont}{\bfseries}
\fi
\newcommand{\cftsecafterpnum}{}
\newcommand{\cftsecfillnum}[1]{%
{\cftsecleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsecpagefont #1}\cftsecafterpnum\par}
\renewcommand*{\l@subsection}[2]{%
\ifnum \c@tocdepth >\@ne
\vskip \cftbeforesubsecskip
{\leftskip \cftsubsecindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubsecindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubsecnumwidth\relax
\let\@cftbsnum \cftsubsecpresnum
\let\@cftasnum \cftsubsecaftersnum
\let\@cftasnumb \cftsubsecaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubsecfont #1}\nobreak
\cftsubsecfillnum{#2}}
\fi}
\newlength{\cftbeforesubsecskip}
\setlength{\cftbeforesubsecskip}{\z@ \@plus.2\p@}
\newlength{\cftsubsecindent}
\newlength{\cftsubsecnumwidth}
\if@cfthaschapter
\setlength{\cftsubsecindent}{3.8em}
\setlength{\cftsubsecnumwidth}{3.2em}
\else
\setlength{\cftsubsecindent}{1.5em}
\setlength{\cftsubsecnumwidth}{2.3em}
\fi
\newcommand{\cftsubsecfont}{\normalfont}
\newcommand{\cftsubsecpresnum}{}
\newcommand{\cftsubsecaftersnum}{}
\newcommand{\cftsubsecaftersnumb}{}
\newcommand{\cftsubsecleader}{\normalfont\cftdotfill{\cftsubsecdotsep}}
\newcommand{\cftsubsecdotsep}{\cftdotsep}
\newcommand{\cftsubsecpagefont}{\normalfont}
\newcommand{\cftsubsecafterpnum}{}
\newcommand{\cftsubsecfillnum}[1]{%
{\cftsubsecleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubsecpagefont #1}\cftsubsecafterpnum\par}
\renewcommand*{\l@subsubsection}[2]{%
\ifnum \c@tocdepth >\tw@
\vskip \cftbeforesubsubsecskip
{\leftskip \cftsubsubsecindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubsubsecindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubsubsecnumwidth\relax
\let\@cftbsnum \cftsubsubsecpresnum
\let\@cftasnum \cftsubsubsecaftersnum
\let\@cftasnumb \cftsubsubsecaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubsubsecfont #1}\nobreak
\cftsubsubsecfillnum{#2}}
\fi}
\newlength{\cftbeforesubsubsecskip}
\setlength{\cftbeforesubsubsecskip}{\z@ \@plus.2\p@}
\newlength{\cftsubsubsecindent}
\newlength{\cftsubsubsecnumwidth}
\if@cfthaschapter
\setlength{\cftsubsubsecindent}{7.0em}
\setlength{\cftsubsubsecnumwidth}{4.1em}
\else
\setlength{\cftsubsubsecindent}{3.8em}
\setlength{\cftsubsubsecnumwidth}{3.2em}
\fi
\newcommand{\cftsubsubsecfont}{\normalfont}
\newcommand{\cftsubsubsecpresnum}{}
\newcommand{\cftsubsubsecaftersnum}{}
\newcommand{\cftsubsubsecaftersnumb}{}
\newcommand{\cftsubsubsecleader}{\normalfont\cftdotfill{\cftsubsubsecdotsep}}
\newcommand{\cftsubsubsecdotsep}{\cftdotsep}
\newcommand{\cftsubsubsecpagefont}{\normalfont}
\newcommand{\cftsubsubsecafterpnum}{}
\newcommand{\cftsubsubsecfillnum}[1]{%
{\cftsubsubsecleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubsubsecpagefont #1}\cftsubsubsecafterpnum\par}
\renewcommand*{\l@paragraph}[2]{%
\ifnum \c@tocdepth >3\relax
\vskip \cftbeforeparaskip
{\leftskip \cftparaindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftparaindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftparanumwidth\relax
\let\@cftbsnum \cftparapresnum
\let\@cftasnum \cftparaaftersnum
\let\@cftasnumb \cftparaaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftparafont #1}\nobreak
\cftparafillnum{#2}}
\fi}
\newlength{\cftbeforeparaskip}
\setlength{\cftbeforeparaskip}{\z@ \@plus.2\p@}
\newlength{\cftparaindent}
\newlength{\cftparanumwidth}
\if@cfthaschapter
\setlength{\cftparaindent}{10em}
\setlength{\cftparanumwidth}{5em}
\else
\setlength{\cftparaindent}{7.0em}
\setlength{\cftparanumwidth}{4.1em}
\fi
\newcommand{\cftparafont}{\normalfont}
\newcommand{\cftparapresnum}{}
\newcommand{\cftparaaftersnum}{}
\newcommand{\cftparaaftersnumb}{}
\newcommand{\cftparaleader}{\normalfont\cftdotfill{\cftparadotsep}}
\newcommand{\cftparadotsep}{\cftdotsep}
\newcommand{\cftparapagefont}{\normalfont}
\newcommand{\cftparaafterpnum}{}
\newcommand{\cftparafillnum}[1]{%
{\cftparaleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftparapagefont #1}\cftparaafterpnum\par}
\renewcommand*{\l@subparagraph}[2]{%
\ifnum \c@tocdepth >4\relax
\vskip \cftbeforesubparaskip
{\leftskip \cftsubparaindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubparaindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubparanumwidth\relax
\let\@cftbsnum \cftsubparapresnum
\let\@cftasnum \cftsubparaaftersnum
\let\@cftasnumb \cftsubparaaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubparafont #1}\nobreak
\cftsubparafillnum{#2}}
\fi}
\newlength{\cftbeforesubparaskip}
\setlength{\cftbeforesubparaskip}{\z@ \@plus.2\p@}
\newlength{\cftsubparaindent}
\newlength{\cftsubparanumwidth}
\if@cfthaschapter
\setlength{\cftsubparaindent}{12em}
\setlength{\cftsubparanumwidth}{6em}
\else
\setlength{\cftsubparaindent}{10em}
\setlength{\cftsubparanumwidth}{5em}
\fi
\newcommand{\cftsubparafont}{\normalfont}
\newcommand{\cftsubparapresnum}{}
\newcommand{\cftsubparaaftersnum}{}
\newcommand{\cftsubparaaftersnumb}{}
\newcommand{\cftsubparaleader}{\normalfont\cftdotfill{\cftsubparadotsep}}
\newcommand{\cftsubparadotsep}{\cftdotsep}
\newcommand{\cftsubparapagefont}{\normalfont}
\newcommand{\cftsubparaafterpnum}{}
\newcommand{\cftsubparafillnum}[1]{%
{\cftsubparaleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubparapagefont #1}\cftsubparaafterpnum\par}
\newcommand{\@cftdobiblof}{%
\if@dotoclof
\if@bibchapter
\phantomsection
\addcontentsline{toc}{chapter}{\listfigurename}
\else
\phantomsection
\addcontentsline{toc}{\@tocextra}{\listfigurename}
\fi
\fi}
\AtBeginDocument{
\if@cftnctoc\else
\renewcommand{\listoffigures}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\cftparskip
\@cftmakeloftitle
\if@cfttocbibind
\@cftdobiblof
\fi
\@starttoc{lof}%
\endgroup
\@cfttocfinish}
\fi
}
\newcommand{\@cftmakeloftitle}{%
\addpenalty\@secpenalty
\if@cfthaschapter
\vspace*{\cftbeforeloftitleskip}
\else
\vspace{\cftbeforeloftitleskip}
\fi
\@cftpagestyle
{\interlinepenalty\@M
{\cftloftitlefont\listfigurename}{\cftafterloftitle}
\cftmarklof
\par\nobreak
\vskip \cftafterloftitleskip
\@afterheading}}
\newlength{\cftbeforeloftitleskip}
\newlength{\cftafterloftitleskip}
\if@cfthaschapter
\setlength{\cftbeforeloftitleskip}{50pt}
\setlength{\cftafterloftitleskip}{40pt}
\else
\setlength{\cftbeforeloftitleskip}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\cftafterloftitleskip}{2.3ex \@plus.2ex}
\fi
\if@cfthaschapter
% \newcommand{\cftloftitlefont}{\normalfont\Huge\bfseries}
\newcommand{\cftloftitlefont}{\large}
\if@cftkoma\renewcommand{\cftloftitlefont}{\size@chapter\sectfont}\fi
\else
\newcommand{\cftloftitlefont}{\normalfont\Large\bfseries}
\if@cftkoma\renewcommand{\cftloftitlefont}{\size@section\sectfont}\fi
\fi
\newcommand{\cftafterloftitle}{}
\renewcommand*{\l@figure}[2]{%
\ifnum \c@lofdepth >\z@
\vskip \cftbeforefigskip
{\leftskip \cftfigindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftfigindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftfignumwidth\relax
\let\@cftbsnum \cftfigpresnum
\let\@cftasnum \cftfigaftersnum
\let\@cftasnumb \cftfigaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftfigfont #1}\nobreak
\cftfigfillnum{#2}}
\fi
}
\newlength{\cftbeforefigskip}
\setlength{\cftbeforefigskip}{\z@ \@plus.2\p@}
\newlength{\cftfigindent}
\setlength{\cftfigindent}{1.5em}
\newlength{\cftfignumwidth}
\setlength{\cftfignumwidth}{2.3em}
\newcommand{\cftfigfont}{\normalfont}
\newcommand{\cftfigpresnum}{}
\newcommand{\cftfigaftersnum}{}
\newcommand{\cftfigaftersnumb}{}
\newcommand{\cftfigleader}{\normalfont\cftdotfill{\cftfigdotsep}}
\newcommand{\cftfigdotsep}{\cftdotsep}
\newcommand{\cftfigpagefont}{\normalfont}
\newcommand{\cftfigafterpnum}{}
\newcommand{\cftfigfillnum}[1]{%
{\cftfigleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftfigpagefont #1}\cftfigafterpnum\par}
\if@cftsubfigopt\else
\newcounter{lofdepth}\setcounter{lofdepth}{1}
\newcounter{lotdepth}\setcounter{lotdepth}{1}
\fi
\newcommand{\@cftdobiblot}{%
\if@dotoclot
\if@bibchapter
\phantomsection
\addcontentsline{toc}{chapter}{\listtablename}
\else
\phantomsection
\addcontentsline{toc}{\@tocextra}{\listtablename}
\fi
\fi}
\AtBeginDocument{
\if@cftnctoc\else
\renewcommand{\listoftables}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\cftparskip
\@cftmakelottitle
\if@cfttocbibind
\@cftdobiblot
\fi
\@starttoc{lot}%
\endgroup
\@cfttocfinish}
\fi
}
\newcommand{\@cftmakelottitle}{%
\addpenalty\@secpenalty
\if@cfthaschapter
\vspace*{\cftbeforelottitleskip}
\else
\vspace{\cftbeforelottitleskip}
\fi
\@cftpagestyle
{\interlinepenalty\@M
{\cftlottitlefont\listtablename}{\cftafterlottitle}
\cftmarklot
\par\nobreak
\vskip \cftafterlottitleskip
\@afterheading}}
\newlength{\cftbeforelottitleskip}
\newlength{\cftafterlottitleskip}
\if@cfthaschapter
\setlength{\cftbeforelottitleskip}{50pt}
\setlength{\cftafterlottitleskip}{40pt}
\else
\setlength{\cftbeforelottitleskip}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\cftafterlottitleskip}{2.3ex \@plus.2ex}
\fi
\if@cfthaschapter
\newcommand{\cftlottitlefont}{\normalfont\Huge\bfseries}
\if@cftkoma\renewcommand{\cftlottitlefont}{\size@chapter\sectfont}\fi
\else
\newcommand{\cftlottitlefont}{\normalfont\Large\bfseries}
\if@cftkoma\renewcommand{\cftlottitlefont}{\size@section\sectfont}\fi
\fi
\newcommand{\cftafterlottitle}{}
\renewcommand*{\l@table}[2]{%
\ifnum\c@lotdepth >\z@
\vskip \cftbeforetabskip
{\leftskip \cfttabindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cfttabindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cfttabnumwidth\relax
\let\@cftbsnum \cfttabpresnum
\let\@cftasnum \cfttabaftersnum
\let\@cftasnumb \cfttabaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cfttabfont #1}\nobreak
\cfttabfillnum{#2}}
\fi
}
\newlength{\cftbeforetabskip}
\setlength{\cftbeforetabskip}{\z@ \@plus.2\p@}
\newlength{\cfttabindent}
\setlength{\cfttabindent}{1.5em}
\newlength{\cfttabnumwidth}
\setlength{\cfttabnumwidth}{2.3em}
\newcommand{\cfttabfont}{\normalfont}
\newcommand{\cfttabpresnum}{}
\newcommand{\cfttabaftersnum}{}
\newcommand{\cfttabaftersnumb}{}
\newcommand{\cfttableader}{\normalfont\cftdotfill{\cfttabdotsep}}
\newcommand{\cfttabdotsep}{\cftdotsep}
\newcommand{\cfttabpagefont}{\normalfont}
\newcommand{\cfttabafterpnum}{}
\newcommand{\cfttabfillnum}[1]{%
{\cfttableader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cfttabpagefont #1}\cfttabafterpnum\par}
\newcommand{\@cftl@subfig}{
\renewcommand*{\l@subfigure}[2]{%
\ifnum \c@lofdepth > \toclevel@subfigure
\vskip \cftbeforesubfigskip
{\leftskip \cftsubfigindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubfigindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubfignumwidth\relax
\let\@cftbsnum \cftsubfigpresnum
\let\@cftasnum \cftsubfigaftersnum
\let\@cftasnumb \cftsubfigaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubfigfont ##1}\nobreak
\cftsubfigfillnum{##2}}
\fi
}
}
\newcommand{\@cftsetsubfig}{%
\newlength{\cftbeforesubfigskip}
\setlength{\cftbeforesubfigskip}{\z@ \@plus.2\p@}
\newlength{\cftsubfigindent}
\setlength{\cftsubfigindent}{3.8em}
\newlength{\cftsubfignumwidth}
\setlength{\cftsubfignumwidth}{2.5em}
\newcommand{\cftsubfigfont}{\normalfont}
\newcommand{\cftsubfigpresnum}{}
\newcommand{\cftsubfigaftersnum}{}
\newcommand{\cftsubfigaftersnumb}{}
\newcommand{\cftsubfigleader}{\normalfont\cftdotfill{\cftsubtabdotsep}}
\newcommand{\cftsubfigdotsep}{\cftdotsep}
\newcommand{\cftsubfigpagefont}{\normalfont}
\newcommand{\cftsubfigafterpnum}{}
\providecommand{\toclevel@subfigure}{1}
\newcommand{\cftsubfigfillnum}[1]{%
{\cftsubfigleader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubfigpagefont ##1}\cftsubfigafterpnum\par}
}
\newcommand{\@cftl@subtab}{
\renewcommand*{\l@subtable}[2]{%
\ifnum \c@lotdepth > \toclevel@subtable
\vskip \cftbeforesubtabskip
{\leftskip \cftsubtabindent\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \cftsubtabindent\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \cftsubtabnumwidth\relax
\let\@cftbsnum \cftsubtabpresnum
\let\@cftasnum \cftsubtabaftersnum
\let\@cftasnumb \cftsubtabaftersnumb
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
{\cftsubtabfont ##1}\nobreak
\cftsubtabfillnum{##2}}
\fi
}
}
\newcommand{\@cftsetsubtab}{
\newlength{\cftbeforesubtabskip}
\setlength{\cftbeforesubtabskip}{\z@ \@plus.2\p@}
\newlength{\cftsubtabindent}
\setlength{\cftsubtabindent}{3.8em}
\newlength{\cftsubtabnumwidth}
\setlength{\cftsubtabnumwidth}{2.5em}
\newcommand{\cftsubtabfont}{\normalfont}
\newcommand{\cftsubtabpresnum}{}
\newcommand{\cftsubtabaftersnum}{}
\newcommand{\cftsubtabaftersnumb}{}
\newcommand{\cftsubtableader}{\normalfont\cftdotfill{\cftsubtabdotsep}}
\newcommand{\cftsubtabdotsep}{\cftdotsep}
\newcommand{\cftsubtabpagefont}{\normalfont}
\newcommand{\cftsubtabafterpnum}{}
\providecommand{\toclevel@subtable}{1}
\newcommand{\cftsubtabfillnum}[1]{%
{\cftsubtableader}\nobreak
\hb@xt@\@pnumwidth{\hfil\cftsubtabpagefont ##1}\cftsubtabafterpnum\par}
}
\if@cftsubfigopt
\@cftsetsubfig\@cftsetsubtab
\AtBeginDocument{\@cftl@subfig\@cftl@subtab}
\fi
%% \AtBeginDocument{\if@cftsubfigopt
%% \@cftsetsubfig\@cftsetsubtab
%% \@cftl@subfig\@cftl@subtab
%% \fi}
\newcommand{\newlistentry}[4][\@empty]{%
\@ifundefined{c@#2}{% check & set the counter
\ifx \@empty#1\relax
\newcounter{#2}
\else
\@ifundefined{c@#1}{\PackageWarning{tocloft}%
{#1 has no counter for use as a `within'}
\newcounter{#2}}%
{\newcounter{#2}[#1]%
\expandafter\edef\csname the#2\endcsname{%
\expandafter\noexpand\csname the#1\endcsname.\noexpand\arabic{#2}}}
\fi
\setcounter{#2}{0}
}
{\PackageError{tocloft}{#2 has been previously defined}{\@eha}}
\@namedef{l@#2}##1##2{%
\ifnum \@nameuse{c@#3depth} > #4\relax
\vskip \@nameuse{cftbefore#2skip}
{\leftskip \@nameuse{cft#2indent}\relax
\rightskip \@tocrmarg
\parfillskip -\rightskip
\parindent \@nameuse{cft#2indent}\relax\@afterindenttrue
\interlinepenalty\@M
\leavevmode
\@tempdima \@nameuse{cft#2numwidth}\relax
\expandafter\let\expandafter\@cftbsnum\csname cft#2presnum\endcsname
\expandafter\let\expandafter\@cftasnum\csname cft#2aftersnum\endcsname
\expandafter\let\expandafter\@cftasnumb\csname cft#2aftersnumb\endcsname
\advance\leftskip\@tempdima \null\nobreak\hskip -\leftskip
{\@nameuse{cft#2font}##1}\nobreak
\@nameuse{cft#2fillnum}{##2}}
\fi
} % end of \l@#2
\expandafter\newlength\csname cftbefore#2skip\endcsname
\setlength{\@nameuse{cftbefore#2skip}}{\z@ \@plus .2\p@}
\expandafter\newlength\csname cft#2indent\endcsname
\expandafter\newlength\csname cft#2numwidth\endcsname
\ifcase #4\relax % 0
\setlength{\@nameuse{cft#2indent}}{0em}
\setlength{\@nameuse{cft#2numwidth}}{1.5em}
\or % 1
\setlength{\@nameuse{cft#2indent}}{1.5em}
\setlength{\@nameuse{cft#2numwidth}}{2.3em}
\or % 2
\setlength{\@nameuse{cft#2indent}}{3.8em}
\setlength{\@nameuse{cft#2numwidth}}{3.2em}
\or % 3
\setlength{\@nameuse{cft#2indent}}{7.0em}
\setlength{\@nameuse{cft#2numwidth}}{4.1em}
\else % anything else
\setlength{\@nameuse{cft#2indent}}{10.0em}
\setlength{\@nameuse{cft#2numwidth}}{5.0em}
\fi
\@namedef{cft#2font}{\normalfont}
\@namedef{cft#2presnum}{}
\@namedef{cft#2aftersnum}{}
\@namedef{cft#2aftersnumb}{}
\@namedef{cft#2dotsep}{\cftdotsep}
\@namedef{cft#2leader}{\normalfont\cftdotfill{\@nameuse{cft#2dotsep}}}
\@namedef{cft#2pagefont}{\normalfont}
\@namedef{cft#2afterpnum}{}
\@namedef{toclevel@#2}{#4}
\@namedef{cft#2fillnum}##1{%
{\@nameuse{cft#2leader}}\nobreak
\hb@xt@\@pnumwidth{\hfil\@nameuse{cft#2pagefont}##1}\@nameuse{cft#2afterpnum}\par}
} % end \newlistentry
\newcommand{\newlistof}[4][\@empty]{%
\ifx \@empty#1\relax
\newlistentry{#2}{#3}{0}
\else
\newlistentry[#1]{#2}{#3}{0}
\fi
\@namedef{ext@#3}{#3}
\newcounter{#3depth}
\setcounter{#3depth}{1}
\if@cftkoma
\@namedef{cftmark#3}{%
\@mkboth{#4}{#4}}
\else
\@namedef{cftmark#3}{%
\@mkboth{\MakeUppercase{#4}}{\MakeUppercase{#4}}}
\fi
\if@cftnctoc
\@namedef{listof#2}{%
\@cfttocstart
\if@cfthaschapter
\chapter*{#4}
\else
\section*{#4}
\fi
\@nameuse{cftmark#3}
\@starttoc{#3}%
\@cfttocfinish}
\else
\@namedef{listof#2}{%
\@cfttocstart
\par
\begingroup
\parindent\z@ \parskip\cftparskip
\@nameuse{@cftmake#3title}
\@starttoc{#3}%
\endgroup
\@cfttocfinish}
\fi
\@namedef{@cftmake#3title}{%
\addpenalty\@secpenalty
\if@cfthaschapter
\vspace*{\@nameuse{cftbefore#3titleskip}}
\else
\vspace{\@nameuse{cftbefore#3titleskip}}
\fi
\@cftpagestyle
{\interlinepenalty\@M
{\@nameuse{cft#3titlefont}#4}{\@nameuse{cftafter#3title}}
\@nameuse{cftmark#3}
\par\nobreak
\vskip \@nameuse{cftafter#3titleskip}
\@afterheading}}
\expandafter\newlength\csname cftbefore#3titleskip\endcsname
\expandafter\newlength\csname cftafter#3titleskip\endcsname
\if@cfthaschapter
\setlength{\@nameuse{cftbefore#3titleskip}}{50pt}
\setlength{\@nameuse{cftafter#3titleskip}}{40pt}
\if@cftkoma
\@namedef{cft#3titlefont}{\size@chapter\sectfont}
\else
\@namedef{cft#3titlefont}{\normalfont\Huge\bfseries}
\fi
\else
\setlength{\@nameuse{cftbefore#3titleskip}}{3.5ex \@plus 1ex \@minus .2ex}
\setlength{\@nameuse{cftafter#3titleskip}}{2.3ex \@plus .2ex}
\if@cftkoma
\@namedef{cft#3titlefont}{\size@section\sectfont}
\else
\@namedef{cft#3titlefont}{\normalfont\Huge\bfseries}
\fi
\fi
\@namedef{cftafter#3title}{}
} % end \newlistof
\newcommand{\cftsetindents}[3]{%
\def\@cftemp{#1}
\ifx\@cftemp\cftchapname
\@cftsetindents{chap}{#2}{#3}
\else
\ifx\@cftemp\cftsecname \@cftsetindents{sec}{#2}{#3}
\else
\ifx\@cftemp\cftsubsecname \@cftsetindents{subsec}{#2}{#3}
\else
\ifx\@cftemp\cftsubsubsecname \@cftsetindents{subsubsec}{#2}{#3}
\else
\ifx\@cftemp\cftparaname \@cftsetindents{para}{#2}{#3}
\else
\ifx\@cftemp\cftsubparaname \@cftsetindents{subpara}{#2}{#3}
\else
\ifx\@cftemp\cftfigname \@cftsetindents{fig}{#2}{#3}
\else
\ifx\@cftemp\cftsubfigname \@cftsetindents{subfig}{#2}{#3}
\else
\ifx\@cftemp\cfttabname \@cftsetindents{tab}{#2}{#3}
\else
\ifx\@cftemp\cftsubtabname \@cftsetindents{subtab}{#2}{#3}
\else
\@cftsetindents{#1}{#2}{#3}
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
}
\newcommand{\@cftsetindents}[3]{%
\setlength{\@nameuse{cft#1indent}}{#2}
\setlength{\@nameuse{cft#1numwidth}}{#3}
}
\newcommand{\@cftpnumoff}[1]{%
\@namedef{cft#1fillnum}##1{%
\cftparfillskip\@nameuse{cft#1afterpnum}\par}}
\newcommand*{\cftchapname}{chapter}
\newcommand*{\cftsecname}{section}
\newcommand*{\cftsubsecname}{subsection}
\newcommand*{\cftsubsubsecname}{subsubsection}
\newcommand*{\cftparaname}{paragraph}
\newcommand*{\cftsubparaname}{subparagraph}
\newcommand*{\cftfigname}{figure}
\newcommand*{\cftsubfigname}{subfigure}
\newcommand*{\cfttabname}{table}
\newcommand*{\cftsubtabname}{subtable}
\DeclareRobustCommand{\cftpagenumbersoff}[1]{%
\def\@cftemp{#1}
\ifx\@cftemp\cftchapname
\@cftpnumoff{chap}
\else
\ifx\@cftemp\cftsecname \@cftpnumoff{sec}
\else
\ifx\@cftemp\cftsubsecname \@cftpnumoff{subsec}
\else
\ifx\@cftemp\cftsubsubsecname \@cftpnumoff{subsubsec}
\else
\ifx\@cftemp\cftparaname \@cftpnumoff{para}
\else
\ifx\@cftemp\cftsubparaname \@cftpnumoff{subpara}
\else
\ifx\@cftemp\cftfigname \@cftpnumoff{fig}
\else
\ifx\@cftemp\cftsubfigname \@cftpnumoff{subfig}
\else
\ifx\@cftemp\cfttabname \@cftpnumoff{tab}
\else
\ifx\@cftemp\cftsubtabname \@cftpnumoff{subtab}
\else
\@cftpnumoff{#1}
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
}
\DeclareRobustCommand{\cftpagenumberson}[1]{%
\def\@cftemp{#1}
\ifx\@cftemp\cftchapname
\@cftpnumon{chap}
\else
\ifx\@cftemp\cftsecname \@cftpnumon{sec}
\else
\ifx\@cftemp\cftsubsecname \@cftpnumon{subsec}
\else
\ifx\@cftemp\cftsubsubsecname \@cftpnumon{subsubsec}
\else
\ifx\@cftemp\cftparaname \@cftpnumon{para}
\else
\ifx\@cftemp\cftsubparaname \@cftpnumon{subpara}
\else
\ifx\@cftemp\cftfigname \@cftpnumon{fig}
\else
\ifx\@cftemp\cftsubfigname \@cftpnumon{subfig}
\else
\ifx\@cftemp\cfttabname \@cftpnumon{tab}
\else
\ifx\@cftemp\cftsubtabname \@cftpnumon{subtab}
\else
\@cftpnumon{#1}
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
\fi
}
\newcommand{\@cftpnumon}[1]{%
\@namedef{cft#1fillnum}##1{%
{\@nameuse{cft#1leader}}\nobreak
\hb@xt@\@pnumwidth{\hfil\@nameuse{cft#1pagefont}##1}\@nameuse{cft#1afterpnum}\par}}
\newcommand{\cftchapterprecis}[1]{%
\cftchapterprecishere{#1}
\cftchapterprecistoc{#1}}
\newcommand{\cftchapterprecishere}[1]{%
\vspace*{-2\baselineskip}
\begin{quote}\textit{#1}\end{quote}}
\newcommand{\cftchapterprecistoc}[1]{\addtocontents{toc}{%
{\leftskip \cftchapindent\relax
\advance\leftskip \cftchapnumwidth\relax
\rightskip \@tocrmarg\relax
\textit{#1}\protect\par}}}
\newcommand{\cftlocalchange}[3]{%
\addtocontents{#1}{\protect\cftsetpnumwidth{#2} \protect\cftsetrmarg{#3}}}
\newcommand{\cftaddtitleline}[4]{\addtocontents{#1}{%
\protect\contentsline{#2}{#3}{#4}}}
\newcommand{\cftaddnumtitleline}[5]{\addtocontents{#1}{%
\protect\contentsline{#2}{\protect\numberline{#3}#4}{#5}}}
\AtBeginDocument{%
\@ifpackageloaded{hyperref}{%
\renewcommand{\cftaddtitleline}[4]{\addtocontents{#1}{%
\protect\contentsline{#2}{#3}{#4}{\@currentHref}}}
\renewcommand{\cftaddnumtitleline}[5]{\addtocontents{#1}{%
\protect\contentsline{#2}{\protect\numberline{#3}#4}{#5}{\@currentHref}}}
}{}
}
\endinput
%%
%% End of file `tocloft.sty'.
url.sty · 12 KB
% url.sty ver 3.4 16-Sep-2013 Donald Arseneau [email protected]
% Copyright 1996-2013 Donald Arseneau, Vancouver, Canada.
% This program can be used, distributed, and modified under the terms
% of the LaTeX Project Public License, version 2 or later.
%
% A form of \verb that allows linebreaks at certain characters or
% combinations of characters, accepts reconfiguration, and can usually
% be used in the argument to another command. It is intended for email
% addresses, hypertext links, directories/paths, etc., which normally
% have no spaces. The font may be selected using the \urlstyle command,
% and new url-like commands can be defined using \urldef.
%
% Usage: Conditions:
% \url{ } If the argument contains any "%" or "^^", or ends with
% "\", it can't be used in the argument to another command.
% The argument must not contain unbalanced braces.
% \url| | ...where "|" is any character not used in the argument and not
% "{" or a space. The same restrictions as above except that the
% argument may contain unbalanced braces.
% \urldef\xyz\url{ }
% \xyz a defined-url: "\xyz" can be used anywhere, no matter what
% characters it contains.
% \DeclareUrlCommand\abc{settings}: makes \abc{ } like \url{ } with settings
%
% See url.tex/url.pdf for documentation. Some info after \endinput
%
% Required catcodes during loading: letters @ = letter,
% ` = > < . [ ] + - digits = other,
% { } \ ~ # % $ _ ^ = their normal
% default style assignments
\def\UrlBreaks{\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\>\do\]%
\do\)\do\,\do\?\do\&\do\'\do+\do\=\do\#}%
\def\UrlBigBreaks{\do\:\do@url@hyp}%
\def\UrlNoBreaks{\do\(\do\[\do\{\do\<}%
% any ordinary characters that aren't usually:
\def\UrlOrds{\do\*\do\-\do\~\do\'\do\"\do\-}%
\def\UrlSpecials{\do\ {\Url@space}\do\%{\Url@percent}\do\^^M{\Url@space}%
\Url@force@Tilde}% package option may force faked text-ascii-tilde
\@namedef{Url@OT1encSpecials}{%
% *Some* latin-1 or windows characters that ot1 has elsewhere: OE oe ss
\do\^^8c{\mathchar30 }\do\^^9c{\mathchar27 }\do\^^df{\mathchar25 }%
\do\~{\lower.45ex\hbox{\m@th$\mathchar126$}}% For tt style
% lots more to add, but I should later link into inputenc
\do\^^b5{\mu}%
\Url@OTnonTT % more for any but typewriter
}
\def\Url@OTnonTT{\do\<{\langle}\do\>{\mathbin{\rangle}}\do
\_{\_\penalty\@m}\do\|{\mid}\do\{{\lbrace}\do\}{\mathbin{\rbrace}}\do
\\{\mathbin{\backslash}}\UrlTildeSpecial}
% *Some* latin-1 or windows characters. Most will pass through safely to T1 enc
% mu inverted-? OE oe
% lots more to add, but I should later link into inputenc
\@namedef{Url@T1encSpecials}{\do\^^b5{\mu}\do\^^bf{\mathchar190 }%
\do\^^8c{\mathchar215 }\do\^^9c{\mathchar247 }\do\^^df{\mathchar255 }%
\do\^^ff{\mathchar184 }}
\@namedef{Url@LY1encSpecials}{\do\~{\mathchar158 }}
\def\UrlTildeSpecial{\do\~{\raise.45ex\hbox{\m@th$\scriptstyle\sim$}}}
\let\Url@force@Tilde\relax
\def\url@ttstyle{%
\@ifundefined{selectfont}{\def\UrlFont{\tt}}{\def\UrlFont{\ttfamily}}}
\def\url@rmstyle{%
\@ifundefined{selectfont}{\def\UrlFont{\rm}}{\def\UrlFont{\rmfamily}}}
\def\url@sfstyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\sffamily}}}
\def\url@samestyle{\def\UrlFont{}}
\@ifundefined{strip@prefix}{\def\strip@prefix#1>{}}{}
\@ifundefined{verbatim@nolig@list}{\def\verbatim@nolig@list{\do\`}}{}
% \Url sets up the reading the argument verbatim if possible
\def\Url{%
\Url@movingtest
\ifmmode\@inmatherr$\fi %$
\let\do\@makeother \dospecials % verbatim catcodes
\catcode`{\@ne \catcode`}\tw@ % with exceptions
\catcode`\ =10 % allow "\url {x}"
\catcode`\#=6 % always # -> ##, so I can later convert ## -> #
\@ifnextchar\bgroup{\obeyspaces\obeylines\Url@z}\Url@y}
% \Url@y read arguments delimited like |...|, passing to \Url@z
\def\Url@y#1{\catcode`{11 \catcode`}11\obeyspaces\obeylines
\def\@tempa##1#1{\Url@z{##1}}\@tempa}
% \Url@z read arguments delimited like {...}, verbatimizes with \meaning,
% performs character translations, then invokes the formatter.
\def\Url@z#1{\toks@{#1}\edef\Url@String{\the\toks@}%
\edef\Url@String{\expandafter\strip@prefix\meaning\Url@String}%
%\if\urldebug \message{------------------------------------------------------}%
%\message{ \Url@String}\fi
% \meaning introduces spurious spaces in the text, so it would be nice
% to preserve the real spaces before \meaning, but that doesn't work --
% we can only do replacement on streams of non-syntactic characters.
\Url@ObeySp % may be no-op; otherwise put ordinary (12) space characters
%\if\urldebug \message{ \Url@String}\fi
% we left the catcode of # with its normal value (6) so \meaning
% doubles it to ##. Now we convert back to single #. This allows
% \url{#} to appear in the arguments of other commands, where we can't
% make # be an ordinary character. We make the single # active rather
% than `other' to support hyperref.sty.
\Url@acthash
%\if\urldebug \message{ \Url@String}\fi
% Also make % active to support hyperref.
\Url@actpercent
% now do any hyper referencing due to hyperref (or perform a url-def)
\Url@HyperHook
% Now do the formatting in a group (can also have \Url@HyperHook take
% this as an argument.
{\Url@FormatString}%
\endgroup}
\let\Url@ObeySp\@empty
\let\UrlRight\@empty
\let\UrlLeft\@empty
\let\Url@HyperHook\@empty
% This is the normal way to format the strings, using math mode.
\def\Url@FormatString{%
\UrlFont \Url@MathSetup
$\fam\z@ \textfont\z@\font
\expandafter\UrlLeft\Url@String\UrlRight
\m@th$%
% \if\urldebug \showlists \fi
}%
\def\Url@MathSetup{%
\medmuskip\Urlmuskip \thickmuskip\medmuskip \thinmuskip0mu%
\relpenalty\UrlBigBreakPenalty \binoppenalty\UrlBreakPenalty
\expandafter\let\expandafter\UrlEncSpecials\csname Url@\f@encoding encSpecials\endcsname
% Insert test for unknown encodings here \ifx\UrlEncSpecials\relax
\ifdim\fontdimen\thr@@\font=\z@ \let\Url@OTnonTT\relax \fi
\@tempcnta\z@ % \fam\multiply\@tempcnta\@cclvi
\let\do\set@mathcode \UrlOrds % ordinary characters that were special
\advance\@tempcnta 8192 \UrlBreaks % bin
\advance\@tempcnta 4096 \UrlBigBreaks % rel
\advance\@tempcnta 4096 \UrlNoBreaks % open
\let\do\set@mathact \UrlSpecials \UrlEncSpecials % active
\let\do\set@mathnolig \verbatim@nolig@list % prevent ligatures
}
\def\set@mathcode#1{\count@`#1\advance\count@\@tempcnta
%\message{Set mathcode of \string #1 (\number`#1) = \number`#1 + \number\@tempcnta. }%
\mathcode`#1\count@}
\def\set@mathact#1#2{\mathcode`#1=32768 \begingroup
\lccode`\~`#1\lowercase{\endgroup\def~}{#2}}
\def\set@mathnolig#1{\ifnum\mathcode`#1<32768
\begingroup\lccode`\~`#1\lowercase{\endgroup
\edef~}{\mathchar\number\mathcode`#1\sb{\/}}%
\mathcode`#1=32768 \fi}
\def\Url@movingtest{\begingroup
\ifx\let\HyPsd@LetCommand % we are already in a pdf string!
\expandafter\Url@unmove \fi % give the argument and hope for the best
\let\Url@moving\relax\relax\relax
\ifx\Url@moving\relax\else \expandafter\Url@unmove \fi
\endgroup}
\long\def\Url@unmove#1\Url@y{\endgroup \ifx\protect\relax\else\protect\Url\fi}
\edef\Url@moving{\csname Url Error\endcsname}
\expandafter\edef\Url@moving
{\csname url used in a moving argument.\endcsname}
\expandafter\expandafter\expandafter \let \Url@moving\@undefined
\def\urldef#1#2{\begingroup \setbox\z@\hbox\bgroup
\def\Url@HyperHook##1\endgroup{\Url@def{#1}{#2}}%
% Because hyperref breaks \urldef and does not define its own (Grrrr!)...
\def\url@##1{\egroup\endgroup\DeclareRobustCommand#1{#2{##1}}}%
#2}
\def\Url@def#1#2{%
\toks0\expandafter{\Url@String}%
\protected@edef\Url@String{\Url@String}%
\toks1\expandafter{\Url@String}%
\edef\Url@String{\endgroup\egroup\endgroup\def
\expandafter\noexpand\csname\expandafter\@gobble\string#1 \endcsname
{\noexpand\Url@eitherdef{\the\toks1}{\noexpand#2{\the\toks0}}}}%
\Url@String
\edef#1{\noexpand\protect
\expandafter\noexpand\csname\expandafter\@gobble\string#1 \endcsname}%
}
\def\Url@eitherdef{\ifx\let\HyPsd@LetCommand % we are already in a pdf string!
\expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi}
\def\urlstyle#1{\expandafter\protect\csname url@#1style\endcsname}
\def\DeclareUrlCommand#1#2{\def#1{\leavevmode\begingroup #2\Url}}
% Sample (and default) configuration:
%
\DeclareUrlCommand\url{}
\urlstyle{tt}
%
\newmuskip\Urlmuskip \Urlmuskip=0mu
\mathchardef\UrlBreakPenalty=\binoppenalty
\mathchardef\UrlBigBreakPenalty=\relpenalty
%
% picTeX defines \path, so declare it optionally:
\@ifundefined{path}{\DeclareUrlCommand\path{\urlstyle{tt}}}{}
%
% too many styles define \email like \address, so I will not define it.
% \DeclareUrlCommand\email{\urlstyle{rm}}
% Process LaTeX \package options
%
\let\Url@sppen\@M
\def\Url@space{\penalty\Url@sppen}
\def\do@url@hyp{}% by default, no breaks after hyphens
\@ifundefined{ProvidesPackage}{
}{\ProvidesPackage
{url}[2013/09/16 \space ver 3.4 \space Verb mode for urls, etc.]
\DeclareOption{hyphens}{\def\do@url@hyp{\do\-}}% allow breaks after hyphens
\DeclareOption{obeyspaces}{\let\Url@ObeySp\relax}% a flag for later
\DeclareOption{spaces}{\def\Url@sppen{\UrlBreakPenalty}}
\DeclareOption{LY1}{}
\DeclareOption{T1}{}
\DeclareOption{allowmove}{\let\Url@moving\@empty}
\DeclareOption{lowtilde}{%
\def\UrlTildeSpecial{\do\~{\raise.2ex\hbox{\m@th$\scriptstyle\sim$}}}
\let\Url@force@Tilde\UrlTildeSpecial
}
\ProcessOptions\relax
\ifx\Url@ObeySp\relax % [obeyspaces] was declared
\begingroup \lccode`+=32 \lowercase
{\endgroup \def\Url@ObeySp{\Url@Edit\Url@String{ }{+}}}
\def\Url@space{\penalty\Url@sppen\ }
\fi
}
\ifx\f@encoding\undefined \def\f@encoding{OT1}\fi
\begingroup
% \Url@acthash: convert `other' (doubled) ## to active #
% \Url@actpercent: convert `other' % to active %
\lccode`+=`\# \lccode`\~=`\#
\lowercase {\long\gdef\Url@acthash{\Url@Edit\Url@String{++}{~}%
\ifnum\mathcode`\#<32768 \def~{\#}\fi}}%
\lccode`+=`\% \lccode`\~=`\%
\lowercase {\long\gdef\Url@actpercent{\Url@Edit\Url@String{+}{~}%
\ifnum\mathcode`\%<32768 \def~{\%}\fi}}%
\catcode13=12 %
\gdef\Url@percent{\@ifnextchar^^M{\@gobble}{\mathbin{\mathchar`\%}}}%
\endgroup%
% Edit macro #1 changing all appearances of pattern #2 to replacement #3.
% The replacement is recursive, so don't put the search pattern into the
% replacement text!
{ \catcode`Q=3
\gdef\Url@Edit#1#2#3{%
\begingroup % \tracingall
\def\DOE@a{\endgroup\def#1}% Just so I can \expandafter it safely.
\def\DOE@b##1#2##2Q##3{\@ifblank{##2}% if finished,
{\DOE@c ##1Q}% then remove \@empty's and redefine macro
{\DOE@b##1##3##2Q{##3}}% else, re-iterate
}% the leading \@empty preserves braces, as does the trailing pattern:
\expandafter\DOE@b\expandafter\@empty #1\@empty#2Q{#3}}
\gdef\DOE@c#1\@empty Q{\expandafter\DOE@a\expandafter{#1}}
%
% \@ifblank (LaTeX syntax) --- checks if parameter is blank (Spaces
% count as blank) use \@ifblank{#1}{true case}{false case} etc
\long\gdef\@ifblank#1{\@Ifbl@nk#1QQ\@secondoftwo\@firstoftwo!}%
\long\gdef\@Ifbl@nk#1#2Q#3#4#5!{#4}
} % restore Q catcode
%\ifx\urldebug\@undefined \def\urldebug{01}\fi
\endinput
% For documentation, please see accompanying url.tex (url.pdf)
% Package Options: obeyspaces, hyphens, spaces, lowtilde
%
% Revision History:
% ver 1.1 6-Feb-1996:
% Fix hyphens that wouldn't break and ligatures that weren't suppressed.
% ver 1.2 19-Oct-1996:
% Package option for T1 encoding; Hooks: "\UrlLeft" and "\UrlRight".
% ver 1.3 21-Jul-1997:
% Prohibit spaces as delimiter characters; change ascii tilde in OT1.
% ver 1.4 02-Mar-1999:
% LaTeX license; moving-argument-error
% ver 1.5 28-Mar-1999:
% possibility of spacing around break characters; re-settable penalties
% ver 1.6 20-Jun-2002:
% un-double #, fix obeyed-spaces, ignore trailing %, hook for hyperref
% (\Url@HyperHook), no macros in pre-processed url string (in \Url@String),
% limit catcode change of ~.
% ver 3.0 June 2003/Nov 2003:
% \DeclareUrlCommand; make font encoding automatic (only a few inputenc characters
% are supported yet - needs refactoring); reverse penalties.
% ver 3.1 Mar 2004:
% Remove spurious spaces in \url@XXstyle commands.
% ver 3.2 June 2005:
% Fix cmsy-symbols in tt bug (from 3.0); LY1 encoding bug; Enable plain
% with miniltx (again); Define the \urldef for hyperref; Lower "sim" tilde
% a little; fix \lowercase error in \UrlSpecials handling.
% ver 3.3 April 2006:
% Fix some encoding bugs and remove 8-bit characters. lowtilde option
% ver 3.4 Sept 2013:
% \@nomatherr->\@inmatherr. & is now another \UrlBreak character.
% The End
Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789
:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
The first page, as this template compiles today. Click it to enlarge, and again to shrink. Open the file ↗