...
<acknowledgements, etc.>
...
\end{document}
Thesubfilesclassisusedinthecomponent filesofamulti-fileproject,andthe
correspondingsubfilespackageisusedinthemasterfile;sothestructureofthemaster
filelookslike:
\documentclass{<whatever>}
...
\usepackage{subfiles}
...
\begin{document}
...
\subfile{subfile_name}
...
\end{document}
whileasubfilehasthestructure:
\documentclass[mainfile_name]{subfiles}
\begin{document}
...
\end{document}
Arrangementsmaybemadesothatthecomponentfileswillbetypesetusingdifferent
pageformat,etc.,parametersthanthoseusedwhentheyaretypesetasapartofthemain
file.
Amore‘raw’toolkitisofferedbyMattSwift’sincludexandnewcludepackages,
bothpartofthefrankensteinbundle.NotethatMattbelievesincludexisobsolete(though
itcontinuestoworkforthisauthor);furthermore,itsreplacement,newcluderemains“in
development”,asithasbeensince1999.
Bothincludexandnewcludeenableyouto‘
\includedoc
’completearticles(inthe
waythatyou‘
\include
’chapterfilesinanordinaryreport).Thepreamble(everything
upto
\begin{document}
),andeverythingafter
\end{document}
,isignoredbyboth
packages.Thusthepackagesdon’t“dothewholejob”foryou,though: youneedto
analysethepackageuseoftheindividualpapers,andensurethataconsistentsetis
loadedinthepreambleofthemainreport.(Bothpackagesrequiremoredefs,whichis
alsopartofthebundle.)
Aneat(andsimple)toolkitisofferedbythedocmutepackage;oncethepackage
isloaded,anythingbetween
\documentclass[...]{...}
and
\begin{document}
in
an
\input
’edor
\include
’ddocumentisignored,andthentheinputisprocessedup
to
\end{document}
intheinputfile.Thepackagedoesnothingabout
\usepackage
(oranythingelse)inthepreambleoftheincludeddocument;it’suptotheusertoensure
thatanypackagesneededareloaded,andanyothernecessaryconfigurationisdone,in
theparentdocument.
Thestandalonepackagedevelopsontheideasofdocmute;itwasdesignedtomeet
theneedsofuserswhoaredeveloping imagesfromoneof themoreextremenew
graphicspackages(notablypgf/tikz)wherethecompiletimeofthegraphicsissuch
thatseparatecompilationisverydesirable.Standaloneprovidesameansofdeveloping
thegraphicsinaconvenientway,detachedfromthedevelopmentofthedocumentasa
whole;itsvalueforuseinmultipledocumentsisclear.
Theuserincludesthestandalonepackageinthemaindocument,andeachsubfile
usesthestandaloneclass.(Standaloneusesarticleforthe“real”workinstand-alone
mode,butitmaybeaskedtouseanother).
Therealdifferencefromthedocmutepackageisflexibility.Inparticular,youcanask
thatthepreamblesoftheincludeddocumentsbegatheredup,sothatyoucanconstruct
agoodpreambleforthemasterdocument.
131
Converting pdf to html format - application SDK utility:C# PDF Convert to HTML SDK: Convert PDF to html files in C#.net, ASP.NET MVC, WinForms, WPF application
How to Convert PDF to HTML Webpage with C# PDF Conversion SDK
www.rasteredge.com
Converting pdf to html format - application SDK utility:VB.NET PDF Convert to HTML SDK: Convert PDF to html files in vb.net, ASP.NET MVC, WinForms, WPF application
PDF to HTML Webpage Converter SDK for VB.NET PDF to HTML Conversion
www.rasteredge.com
Afinal“compile-together”approachcomesfromthesubdocspackage.Thedriver
filecontainsa
\subdocuments
command:
\subdocuments[options]{file1, file2, ...}
(theoptionalargumentsprovidelayoutoptions,suchascontroloverwhether
\clearpage
or
\cleardoublepage
areusedbetweenthefiles).Eachofthesub-fileswillexecute
\usepackage[master]{subdocs}
todeclarethename,
master
,ofthecallingfile;eachofthesubfilesreadsallthe
.aux
files,sothattablesofcontentsmaybeproduced.
Acompletelydifferentapproachistousethepdfpagespackage,andtoinclude
articlessubmittedinPDFformatintoaaPDFdocumentproducedbyPDFLaTeX.The
packagedefinesan
\includepdf
command,whichtakesargumentssimilartothose
ofthe
\includegraphics
command.Withkeywordsintheoptionalargumentofthe
command,youcanspecifywhichpagesyouwanttobeincludedfromthefilenamed,
andvariousdetailsofthelayoutoftheincludedpages.
combine.cls
:
macros/latex/contrib/combine
combinet.sty
:
macros/latex/contrib/combine
docmute.sty
:
macros/latex/contrib/docmute
includex.sty
Distributedinthe“unsupported”partof
macros/latex/contrib/
frankenstein
moredefs.sty
: Distributedaspartof
macros/latex/contrib/frankenstein
newclude.sty
: Distributedaspartof
macros/latex/contrib/frankenstein
pdfpages.sty
:
macros/latex/contrib/pdfpages
standalone.cls,standalone.sty
:
macros/latex/contrib/standalone
subdocs.sty
: Distributedaspartof
macros/latex/contrib/bezos
subfiles.cls,etc.
:
macros/latex/contrib/subfiles
199 CurriculumVitae(Résumé)
AndrejBrodnik’sclass,vita,offersaframework for producingacurriculumvitae.
Theclass may becustomised both forsubject (exampleclass option filessupport
bothcomputerscientistsandsingers),andforlanguage(boththeoptionsprovidedare
availableforbothEnglishandSlovene). Extensionsmaybewrittenbycreatingnew
classoptionfiles,orbyusingmacrosdefinedintheclasstodefinenewentrytypes,etc.
DidierVerna’sclass,curve,isbasedonamodelinwhichtheCV ismadeofa
setofrubrics(eachonedealingwithamajoritemthatyouwanttodiscuss,suchas
‘education’,‘workexperience’,etc).Theclass’sdocumentationissupportedbyacouple
ofexamplefiles,andanemacsmodeisprovided.
XavierDanauxoffersaclassmoderncvwhichsupportstypesettingmoderncurricula
vitarum,bothinaclassicandinacasualstyle.Itisfairlycustomizable,allowingyouto
defineyourownstylebychangingthecolours,thefonts,etc.
TheEuropeanCommissionhasrecommendedaformatforcurriculavitarumwithin
Europe,andNicolaVitacolonnahasdevelopedaclasseuropecvtoproduceit.While(by
hisownadmission)theclassdoesn’tsolveallproblems,itseemswell-thoughtoutand
supportsallcurrentofficialEUlanguages(togetherwithafewnon-officiallanguages,
suchasCatalan,GalicianandSerbian).
Thealternativetousingaseparateclassistoimposeapackageononeofthestandard
classes.Anexample,AxelReichert’scurrvitapackage,hasbeenrecommendedtothe
FAQteam.Itsoutputcertainlylooksgood.
ThereisalsoaLaTeX2.09packageresume,whichcomeswithlittlebutadvice
againsttryingtouseit.
currvita.sty
:
macros/latex/contrib/currvita
curve.cls
:
macros/latex/contrib/curve
132
application SDK utility:VB.NET Image: Tutorial for Converting Image and Document in VB.NET
image to byte array or stream and convert Word or PDF document to image format. VB.NET Project for Converting Image to Byte Array, Convert Word to
www.rasteredge.com
application SDK utility:C# PDF Convert to SVG SDK: Convert PDF to SVG files in C#.net, ASP
Support converting PDF document to SVG image within C# PDFDocument(@"C:\input.pdf"); pdf.ConvertToVectorImages(ContextType Description: Convert to html/svg files
www.rasteredge.com
europecv.cls
:
macros/latex/contrib/europecv
moderncv.cls
:
macros/latex/contrib/moderncv
resume.sty
:
obsolete/macros/latex209/contrib/resume/resume.sty
vita.cls
:
macros/latex/contrib/vita
200 Lettersandthelike
LaTeXitselfprovidesaletterdocumentclass,whichiswidelydisliked;thepresent
authorlongsincegaveup tryingwithit. Ifyouneverthelesswant to tryit,butare
irritatedbyitswayofvertically-shiftingasingle-pageletter,trythefollowinghack:
\makeatletter
\let\@texttop\relax
\makeatother
inthepreambleofyourfile.
Doing-it-yourselfisacommonstrategy; Knuth (for usewithPlain TeX,inthe
TeXbook),andKopkaandDaly(intheirGuidetoLaTeX)offerworkedexamples.(The
latestversion ofKnuth’smacrosappearin his“locallibrary”dump on thearchive,
whichisupdatedinparallelwithnewversionsofTeX—sonotveryoften...)
Nevertheless,therearecontributedalternatives—infactthereareanawfullylarge
numberofthem:thefollowinglist,ofnecessity,makesbutasmallselection.
Thelargest,mostcomprehensive,classisnewlfm;the
lfm
partofthenameimplies
thattheclasscancreateletters,faxesandmemoranda.Thedocumentationisvoluminous,
andthepackageseemsveryflexible.
OtherclassesrecommendedforinclusioninthisFAQareakletterandisodoc.
Thedinbrief class,whilerecommended,isonlydocumentedinGerman.
ThereareletterclassesineachoftheexcellentKOMA-script(scrlttr2:documenta-
tionisavailableinEnglish)andntgclass(brief:documentationinDutchonly)bundles.
Whiletheseareprobablygood(sincethebundlesthemselvesinspiretrust)they’venot
beenspecificallyrecommendedbyanyusers.
akletter.cls
:
macros/latex/contrib/akletter
brief.cls
: Distributedaspartof
macros/latex/contrib/ntgclass
dinbrief.cls
:
macros/latex/contrib/dinbrief
isodoc.cls
:
macros/latex/contrib/isodoc
Knuth’sletter.tex:
systems/knuth/local/lib/letter.tex
newlfm.cls
:
macros/latex/contrib/newlfm
scrlttr2.cls
: Distributedaspart of
macros/latex/contrib/koma-script
201 Other“documentfont”sizes?
TheLaTeXstandardclasseshaveaconceptofa(base)“documentfont”size;thissizeis
thebasisonwhichotherfontsizes(thosefrom
\tiny
to
\Huge
)aredetermined.The
classesaredesignedontheassumptionthattheywon’tbeusedwithsizesotherthanthe
setthatLaTeXoffersbydefault(10–12pt),butpeopleregularlyfindtheyneedother
sizes. Theproperresponsetosucharequirementistoproduceanewdesignforthe
document,butmanypeopledon’tfancydoingthat.
Asimplesolution is to usetheextsizes bundle. This bundleoffers“extended”
versionsofthearticle,report,bookandletterclasses,atsizesof8,9,14,17and20ptas
wellasthestandard10–12pt.Sincelittlehasbeendonetotheseclassesotherthanto
adjustfontsizesandthingsdirectlyrelatedtothem,theymaynotbeoptimal—butthey
areatleastpractical.
MoresatisfactoryaretheKOMA-scriptclasses,whicharedesignedtoworkproperly
withtheclassoptionfilesthatcomewithextsizes,andthememoirclassthathasitsown
optionsfordocumentfontsizes9pt–12pt,14pt,17pt,20pt,25pt,30pt,36pt,48ptand
60pt.Theclassesalsooffersizesetupforanyoldfontsize,andthescrextendpackage
canextendthisfacilityforusewithanyclass:
133
application SDK utility:C# PDF Convert to Images SDK: Convert PDF to png, gif images in C#
C#.NET DLLs Solution for Converting Images to PDF in C#.NET. Description: Convert all the PDF pages to target format images and output into the directory.
www.rasteredge.com
application SDK utility:VB.NET PDF Convert to Tiff SDK: Convert PDF to tiff images in vb.
When converting PDF document to TIFF image using VB.NET program, do you know about TIFF image format? Originally, TIFF stands for
www.rasteredge.com
\usepackage[fontsize=12.3]{scrextend}
willindeedsetupthemaindocumentfonttohavesize
12.3pt
withanappropriate
defaultbaselineskip.Thepackage“knows”aboutKOMA-script’sdefaultsizes,andfor
eccentricsizessuchastheexample,itwillproduceawarning:
Using fallback calculation to setup font sizes
(usersshouldavoidbecomingexcitedaboutthat...).Thepackagesuffersfromthesame
problemasdoesextsizes:theresultingfontsizesaretheonlyfeatureofthedocument
thatischanged,andtheappearanceoftheresultingdocumentwillprobablynotbeas
goodasifthedocumentclasshadbeendesignedforuseatthesizechosen.
Manyclasses,designedtoproducetypesetresultsotherthanon“ordinary”paper,
willhavetheirownfontsizemechanismsandrangesofsizes.Thisistrue,forexample,
ofposterclasses(suchasa0poster),andofpresentationandlecturingclasses(suchas
beamer.
a0poster.cls
:
macros/latex/contrib/a0poster
beamer.cls
:
macros/latex/contrib/beamer
extsizesbundle
:
macros/latex/contrib/extsizes
KOMAscriptbundle:
macros/latex/contrib/koma-script
memoir.cls
:
macros/latex/contrib/memoir
scrextend.sty
: Distributedaspartof
macros/latex/contrib/koma-script
O.2 Documentstructure
202 Thestyleofdocumenttitles
Thetitlingpackageprovidesanumberof facilitiesthatpermitmanipulationofthe
appearanceofa
\maketitle
command,the
\thanks
commandswithinit,andsoon.
Thepackagealsodefinesa
titlingpage
environment,thatofferssomethinginbetween
thestandardclasses’
titlepage
optionandthe
titlepage
environment,andisitself
somewhatconfigurable.
Thememoirclassincludesallthefunctionalityofthetitlingpackage,whilethe
KOMA-scriptclasseshavetheirownrangeofdifferenttitlingstyles.
Finally,theindefatigableVincentZoonekyndsuppliesexamplesofhowtoprogram
alternativetitlestyles.Thewebpageisnotusefultousersunlesstheyarewillingtodo
theirownLaTeXprogramming.
KOMAscriptbundle:
macros/latex/contrib/koma-script
memoir.cls
:
macros/latex/contrib/memoir
titling.sty
:
macros/latex/contrib/titling
203 Thestyleofsectionheadings
Supposethattheeditorofyourfavouritejournalhasspecifiedthatsectionheadingsmust
becentred,insmallcapitals,andsubsectionheadingsraggedrightinitalic,butthatyou
don’twanttogetinvolvedinthesortofprogrammingdescribedinsection2.2ofThe
LaTeXCompanion(seeLaTeXbooks;theprogrammingitselfisdiscussedelsewherein
thisFAQ).Thefollowinghackwillprobablysatisfyyoureditor.Defineyourselfnew
commands
\newcommand{\ssection}[1]{%
\section[#1]{\centering\normalfont\scshape #1}}
\newcommand{\ssubsection}[1]{%
\subsection[#1]{\raggedright\normalfont\itshape #1}}
andthenuse
\ssection
and
\ssubsection
inplaceof
\section
and
\subsection
.
Thisisn’tperfect:sectionnumbersremaininbold,andstarredformsneedaseparate
redefinition.
134
application SDK utility:C# Raster - Raster Conversion & Rendering in C#.NET
This image converting library component offers reliable C#.NET image rendering APIs for developers This tutorial page is a guide of ico format and offers you a
www.rasteredge.com
application SDK utility:Convert Image & Documents Formats in Web Viewer| Online Tutorials
for converting image & documents in HTML Document Image page provides detailed information for converting images or RasterEdge OCR Engine; PDF Reading; Encode &
www.rasteredge.com
Thetitlesecpackageoffersastructuredapproachtotheproblem,basedonredef-
initionofthesectioningandchaptercommandsthemselves.Thisapproachallowsit
toofferradicaladjustment:itsoptionsprovide(ineffect)atoolboxfordesigningyour
ownsectioningcommands’output.
Thesectstypackageprovidesamoresimplystructuredsetoftools;whileitisless
powerfulthanistitlesec,itisperhapspreferableforminoradjustments,sinceyoucan
useitafterhavingreadasmallerproportionofthemanual.
Thefncychappackageprovidesanicecollectionofcustomisedchapterheading
designs.Theanonchappackageprovidesasimplemeansoftypesettingchapterheadings
“likesectionheadings”(i.e.,withoutthe“Chapter”partoftheheading);thetocbibind
packageprovidesthesamecommands,inpursuitofanotherend.
Thememoirclassincludesfacilitiesthatmatchsectstyandtitlesec,aswellasa
bundleof chapterheading styles(includingan anonchap-equivalent). TheKOMA-
script classesalso havesetsof toolsthatprovideequivalentfunctionality,notably
formattingspecifications
\partformat
,
\chapterformat
,
\sectionformat
,...,as
wellasseveralusefuloverallformattingspecificationsdefinedinclassoptions.
Finally,theindefatigableVincentZoonekyndsuppliesexamplesofhowtoprogram
alternativechapterheadingstylesandsectionheadingstyles.Thewebpagesprovide
programmingexamples,andexpectuserstoadaptthemtotheirownLaTeXuse.
anonchap.sty
:
macros/latex/contrib/anonchap
fncychap.sty
:
macros/latex/contrib/fncychap
KOMAscriptbundle:
macros/latex/contrib/koma-script
memoir.cls
:
macros/latex/contrib/memoir
sectsty.sty
:
macros/latex/contrib/sectsty
titlesec.sty
:
macros/latex/contrib/titlesec
tocbibind.sty
:
macros/latex/contrib/tocbibind
204 Appendixes
LaTeX providesan exceedingly simplemechanism forappendixes: thecommand
\appendix
switchesthedocumentfromgeneratingsections(inarticleclass)orchapters
(inreportorbookclasses)toproducingappendixes.Sectionorchapternumberingis
restartedandtherepresentationofthecounterswitchestoalphabetic.So:
\section{My inspiration}
...
\section{Developing the inspiration}
...
\appendix
\section{How I became inspired}
...
wouldbetypeset(inanarticledocument)somethinglike:
1 Myinspiration
...
2 Developingtheinspiration
...
A HowIbecameinspired
...
whichisquiteenoughformanyordinarypurposes.Notethat,onceyou’veswitchedto
typesettingappendixes,LaTeXprovidesyouwithnowayback—onceyou’vehadan
appendix,youcannolongerhavean“ordinary”
\section
or
\chapter
.
135
application SDK utility:C# PDF Converter Library SDK to convert PDF to other file formats
This PDF document converting library component offers reliable C#.NET PDF If you want to transform and convert PDF document to HTML file format, this
www.rasteredge.com
application SDK utility:C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
watermark and save PDF text, image, table, hyperlink and bookmark to Word without losing format. Powerful components for batch converting PDF documents in C#
www.rasteredge.com
Theappendixprovidesseveralwaysofelaboratingonthissimplesetup.Straightfor-
warduseofthepackageallowsyoutohaveaseparateheading,bothinthebodyofthe
documentandthetableofcontents;thiswouldbeachievedby
\usepackage{appendix}
...
\appendix
\appendixpage
\addappheadtotoc
The
\appendixpage
commandaddsaseparatetitle“Appendices”abovethefirstap-
pendix,and
\addappheadtotoc
addsasimilartitletothetableofcontents. These
simplemodificationscovermanypeople’sneedsaboutappendixes.
Thepackagealsoprovidesan
appendices
environment,whichprovidesforfancier
use.Theenvironmentisbestcontrolledbypackageoptions;theaboveexamplewould
beachievedby
\usepackage[toc,page]{appendix}
...
\begin{appendices}
...
\end{appendices}
Thegreatthingthatthe
appendices
environmentgivesyou,isthatoncetheenvironment
ends,youcancarryonwithsectionsorchaptersasbefore—numberingisn’taffected
bytheinterveningappendixes.
Thepackageprovidesanotheralternativewayofsettingappendixes,asinferior
divisionsinthedocument.The
subappendices
environmentallowsyoutoputseparate
appendixesforaparticularsection,codedas
\subsection
s,orforaparticularchapter,
codedas
\section
s.Soonemightwrite:
\usepackage{appendix}
...
\section{My inspiration}
...
\begin{subappendices}
\subsection{How I became inspired}
...
\end{subappendices}
\section{Developing the inspiration}
...
Whichwillproduceoutputsomethinglike:
1 Myinspiration
...
1.A HowIbecameinspired
...
2 Developingtheinspiration
...
Therearemanyothermerrythingsonemaydowiththepackage;theuserisreferred
tothepackagedocumentationforfurtherdetails.
Thememoirclassincludesthefacilitiesoftheappendixpackage. TheKOMA-
scriptclassesoffera
\appendixprefix
commandformanipulatingtheappearanceof
appendixes.
appendix.sty
:
macros/latex/contrib/appendix
KOMAscriptbundle:
macros/latex/contrib/koma-script
memoir.cls
:
macros/latex/contrib/memoir
136
205 Indentaftersectionheadings
LaTeXimplementsastylethatdoesn’tindentthefirstparagraphafterasectionheading.
Therearecoherentreasonsforthis,butnoteveryonelikesit.Theindentfirstpackage
suppressesthemechanism,sothatthefirstparagraphisindented.
indentfirst.sty
: Distributedaspartof
macros/latex/required/tools
206 Howtocreatea
\subsubsubsection
LaTeX’ssetof“sections”stopsatthelevelof
\subsubsection
.Thisreflectsadesign
decisionbyLamport—for,afterall,whocanreasonablywantasectionwithsuchhuge
stringsofnumbersinfrontofit?
Infact,LaTeXstandardclassesdodefine“sectioning”levelslowerthan
\subsubsection
,
buttheydon’tformatthemlikesections(they’renotnumbered,andthetextisrun-in
aftertheheading). Thesedeeply inferior section commandsare
\paragraph
and
\subparagraph
;youcan (ifyoumust)arrangethat thesetwo commandsproduce
numberedheadings,sothatyoucanusethemas
\subsubsubsection
sandlower.
Thetitlesecpackageprovidesasensiblesetofmacrosforyoutoadjustthedefinitions
ofthesectioningmacros,anditmaybeusedtotransforma
\paragraph
’stypesetting
sothatitlookslikethatofa
\section
.
If you want to program the change yourself, you’ll find that the commands
(
\section
allthewaydownto
\subparagraph
)aredefinedintermsoftheinternal
\@startsection
command,which takes6arguments. Beforeattemptingthissort
ofwork,youarewelladvisedtoreadtheLaTeXsources(
ltsect.dtx
intheLaTeX
distribution)andthesourceofthestandardpackages(
classes.dtx
),ortomakeuse
oftheLaTeXCompanion,whichdiscussestheuseof
\@startsection
forthissortof
thing.
YouwillnotethatLamportdidn’tgoonadding“
sub
”tothenamesofsectioning
commands,whencreatingcommandsforthelowestlevelsofadocument.Thiswould
seemsensibletoanybutthemostrigoroussticklerforsymmetry—itwouldsurely
challengeprettymuchanyone’sreadingofthesourceofadocument,iftherewasaneed
todistinguish
\subsubsubsection
and
\subsubsubsubsection
LaTeXsource:
macros/latex/base
titlesec.sty
:
macros/latex/contrib/titlesec
207 Thestyleofcaptions
Changestothestyleofcaptionsmaybemadebyredefiningthecommandsthatproduce
thecaption. So,forexample,
\fnum@figure
(whichproducesthefloatnumberfor
figurefloats)mayberedefined,inapackageofyourown,orbetween
\makeatletter
\makeatother
:
\renewcommand{\fnum@figure}{\textbf{Fig.~\thefigure}}
whichwillcausethenumbertobetypesetinboldface.(Notethattheoriginaldefinition
used
\figurename
\figurename
.)Moreelaboratechangescanbemadebypatching
the
\caption
command,butsincetherearepackagestodothejob,suchchanges(which
cangetrathertricky)aren’trecommendedforordinaryusers.
Thefloatpackageprovidessomecontroloftheappearanceofcaptions,thoughit’s
principallydesignedforthecreationofnon-standardfloats.Thecaptionandccaption
(notethedouble“c”)packagesprovidearangeofdifferentformattingoptions.
ccaption also provides‘continuation’ captionsandcaptions that can beplaced
outsideoffloatenvironments.The(verysimple)capt-of packagealsoallowscaptions
outsideafloatenvironment.Notethatcareisneededwhendoingthingsthatassumethe
sequenceoffloats(asincontinuationcaptions),orpotentiallymixnon-floatingcaptions
withfloatingones.
Thememoirclassincludesthefacilitiesoftheccaptionpackage;theKOMA-script
classesalsoprovideawiderangeofcaption-formattingcommands.
Thedocumentationofcaptionisavailablebyprocessingafile
manual.tex
,which
iscreatedwhenyouunpack
caption.dtx
137
Notethatthepreviously-recommendedpackagecaption2hasnowbeenovertaken
againbycaption;however,caption2remainsavailableforuseinolderdocuments.
caption.sty
:
macros/latex/contrib/caption
capt-of.sty
:
macros/latex/contrib/capt-of
ccaption.sty
:
macros/latex/contrib/ccaption
float.sty
:
macros/latex/contrib/float
KOMAscriptbundle:
macros/latex/contrib/koma-script
memoir.cls
:
macros/latex/contrib/memoir
208 Alternativehead-andfootlinesinLaTeX
ThestandardLaTeXdocumentclassesdefineasmallsetof‘pagestyles’whichspecify
head-andfootlinesforyourdocument(thoughtheycanbeusedforotherpurposes,
too).Thestandardsetisverylimited,butLaTeXiscapableofmuchmore.Theinternal
LaTeXcodingneededtochangepagestylesisnotparticularlychallenging,butthere’s
noneed—therearepackagesthatprovideusefulabstractionsthatmatchthewaywe
typicallythinkaboutthesethings.
Thefancyhdrpackageprovidessimplemechanismsfordefiningprettymuchevery
head-orfootlinevariationyoucouldwant;thedirectoryalsocontainssomedocumenta-
tionandoneortwosmallerpackages.Fancyhdralsodealswiththetediousbehaviour
ofthestandardstyleswithinitialpages,byenablingyoutodefinedifferentpagestyles
forinitialandforbodypages.
While fancyhdr will work with KOMA-script classes, an alternative package,
scrpage2,easesintegrationwiththeclasses.Scrpage2mayalsobeusedasafancyhdr
replacement,providingsimilarfacilities.TheKOMA-scriptclassesthemselvespermit
somemodestredefinitionofhead-andfootlines,withouttheuseoftheextrapackage.
Memoiralso containsthefunctionalityoffancyhdr,andhasseveralpredefined
styles.
Documentation of fancyhdr is distributed with thepackage, in aseparate file;
documentationofscrpage2isintegratedwiththe
scrgui
*
documentationfilesthatare
distributedwiththeKOMA-scriptclasses.
fancyhdr.sty
:
macros/latex/contrib/fancyhdr
KOMAscriptbundle:
macros/latex/contrib/koma-script
memoir.cls
:
macros/latex/contrib/memoir
209 Widefiguresintwo-columndocuments
Floatingfiguresand tablesordinarilycomeoutthesamewidthasthepage,butin
two-columndocumentsthey’rerestrictedtothewidthofthecolumn.Thisissometimes
not goodenough; so therearealternativeversionsofthefloat environments—in
two-columndocuments,
figure
*
providesafloatingpage-widefigure(and
table
*
a
page-widetable)whichwilldothenecessary.
The“
*
”edfloatenvironmentscanonlyappearatthetopofapage,oronawhole
page—
h
or
b
floatplacementdirectivesaresimplyignored.
Unfortunately, page-wideequationscan only beaccommodated insidefloat en-
vironments. Youshouldincludethemin
figure
environments, or usethefloat or
ccaptionpackagetodefineanewfloattype.
ccaption.sty
:
macros/latex/contrib/ccaption
float.sty
:
macros/latex/contrib/float
210 1-columnabstractin2-columndocument
Oneoftenrequiresthattheabstractofapapershouldappearacrosstheentirepage,even
inatwo-columnpaper.Therequiredtrickis:
\documentclass[twocolumn]{article}
...
\begin{document}
138
... % \author, etc
\twocolumn[
\begin{@twocolumnfalse}
\maketitle
\begin{abstract}
...
\end{abstract}
\end{@twocolumnfalse}
]
Unfortunately,withtheabove
\thanks
won’tworkinthe
\author
list. Ifyouneed
suchspecially-numberedfootnotes,youcanmakethemlikethis:
\title{Demonstration}
\author{Me, You\thanks{}}
\twocolumn[
... as above ...
]
{
\renewcommand{\thefootnote}%
{\fnsymbol{footnote}}
\footnotetext[1]{Thanks for nothing}
}
andsoon.
Asanalternative,amongotherfacilitiestheabstractpackageprovidesa
\saythanks
commandanda
onecolabstract
environmentwhichremovetheneedtofiddlewith
the
\thanks
andfootnoting.Theycanbeusedlikethis:
\twocolumn[
\maketitle
% full width title
\begin{onecolabstract} % ditto abstract
... text
\end{onecolabstract}
]
\saythanks
% typeset any \thanks
Thememoirclassoffersallthefacilitiesofabstract.
abstract.sty
:
macros/latex/contrib/abstract
memoir.cls
:
macros/latex/contrib/memoir
211 Reallyblankpagesbetweenchapters
Ifyou’reusingthestandardclasses,youneedtotakespecialaction;thememoirclass
andtheKoma-Scriptclassesprovidetheirownsupportforthis—seebelow.
Book(bydefault)andreport(with
openright
classoption)ensurethateachchapter
startson aright-hand (recto)page; they dothisbyinserting a
\cleardoublepage
commandbetweenchapters(ratherthanamere
\clearpage
). Theemptypagethus
createdgetstohaveanormalrunningheader,whichsomepeopledon’tlike.
The(excellent)fancyhdrmanualcoversthisissue,basicallyadvisingthecreationof
acommand
\clearemptydoublepage
:
\let\origdoublepage\cleardoublepage
\newcommand{\clearemptydoublepage}{%
\clearpage
{\pagestyle{empty}\origdoublepage}%
}
The“obvious”thingisthentousethiscommandtoreplace
\cleardoublepage
ina
patchedversionofthe
\chapter
command.(Makeapackageofyourowncontaining
acopyofthecommandoutoftheclass.)Thisisn’tparticularlydifficult,butyoucan
insteadsimplysubvert
\cleardoublepage
(whichisn’toftenusedelsewhere):
139
\let\cleardoublepage\clearemptydoublepage
Note: this command works because
\clearemptydoublepage
uses a copy of
\cleardoublepage
: instructions on macro programming patchingtechniquesex-
plaintheproblemandwhythisisasolution.
Theemptypagepackagedoesthissortofthingforyou;allyouneeddoisloadthe
package,anditdoestherest.
The KOMA-Script replacements for thebook and report classes (scrbook and
scrreprtoffersclassoptions
cleardoubleempty
,
cleardoubleplain
and
cleardoublestandard
(usingtherunningpagestyle,asnormal)thatcontroltheappearanceoftheseempty
pages.Theclassesalsoofferdo-it-yourselfcommands
\cleardoubleempty
(etc.).
Thememoirclass(andthenextpagepackage)providecommands
\cleartooddpage
and
\cleartoevenpage
,whichbothtakeanoptionalargument(thefirst,withnoargu-
ment,beinganequivalentof
\cleardoublepage
).Onecanachieve‘special’effectsby
puttingcommandsintheoptionalargument:the
\clearemptydoublepage
we’reafter
wouldbeachievedby
\cleartooddpage[\thispagestyle{empty}]
.Thecommands
willalsoserveifyouwantthesurrealeffectof“Thispageintentionallyleftblank”in
thecentreofanotherwiseemptypage.
emptypage.sty
:
macros/latex/contrib/emptypage
fancyhdr.sty
:
macros/latex/contrib/fancyhdr
memoir.cls
:
macros/latex/contrib/memoir
nextpage.sty
:
macros/latex/contrib/misc/nextpage.sty
scrbook.cls,scrrept.cls
: Part of
macros/latex/contrib/koma-script
212 Balancingcolumnsattheendofadocument
ThetwocolumnoptionofthestandardclassescausesLaTeXtosetthetextofadocument
intwocolumns.However,thelastpageofthedocumenttypicallyendsupwithcolumns
ofdifferentlengths—suchcolumnsaresaidtobe“unbalanced”.Many(most?)people
don’tlikeunbalancedcolumns.
Thesimplestsolutiontotheproblemistousethemulticolpackageinplaceofthe
twocolumnoption,asmulticolbalancesthecolumnsonthefinalpagebydefault.How-
ever,theuseofmulticoldoescomeatacost:itsspecialoutputroutinedisallowstheuse
ofin-columnfloats,thoughitdoesstillpermitfull-width(e.g.,
figure
*
environment)
floats.
Asaresult,thereisaconstantpushforameansofbalancingcolumnsattheendof
atwocolumndocument.Ofcourse,thejobcanbedonemanually:
\pagebreak
inserted
attheappropriateplaceonthelastpagecanoftenproducetherighteffect,butthis
seldomappeals,andifthelastpageismadeupofautomatically-generatedtext(for
example,bibliographyorindex)insertingthecommandwillbedifficult.
Theflushendpackageoffersasolutiontothisproblem.It’sasomewhatdangerous
pieceofmacrocode,whichpatchesoneofthemostintricatepartsoftheLaTeXkernel
withoutdeployinganyofthesafeguardsdiscussedinpatchingcommands.Thepackage
onlychangesthebehaviourat end document (its
\flushend
command is enabled
bydefault),andoneothercommand permitsadjustment ofthefinalbalance; other
packagesinthebundleprovidemeansforinsertionoffullwidthmaterialintwo-column
documents.
Thebalancepackagealsopatchestheoutputroutine(somewhatmorecarefullythan
flushend).
Theusershouldbeawarethatanyofthesepackagesareliabletobecomeconfused
in thepresenceoffloats: ifproblemsarise, manualadjustment of thefloatsinthe
documentislikelytobenecessary.Itisthisdifficulty(what’srequiredinanyinstance
can’treallybeexpressedincurrentLaTeX)thatledtheauthorofmulticoltosuppress
single-column-widefloats.
balance.sty
: Distributedaspartof
macros/latex/contrib/preprint
flushend.sty
: Distributedaspartof
macros/latex/contrib/sttools
multicol.sty
: Distributedaspartof
macros/latex/required/tools
140
Documents you may be interested
Documents you may be interested