.net c# pdf viewer : Adding pdf pages together application software tool html windows .net online letterfaq27-part542

whichstartsaparagraphbeforeforcingabreak. Theexpdlistpackageprovidesthe
samefunctionalitywithits
\breaklabel
command,andmdwlistprovidesitviaits
\desclabelstyle
command.
Theothercommonoccasionforthemessageiswhenyou’reusingthe
center
(or
flushleft
or
flushright
)environment,andhavedecidedyouneedextraseparation
betweenlinesintheenvironment:
\begin{center}
First (heading) line\\
\\
body of the e centred text...
\end{center}
Thesolutionhereisplain:usethe
\\
commandinthewayit’ssupposedtobeused,to
providemorethanjustasinglelinebreakspace.
\\
takesanoptionalargument,which
specifieshowmuchextraspacetoadd;therequiredeffectinthetextabovecanbehad
bysaying:
\begin{center}
First (heading) line\\[\baselineskip]
body of the e centred text...
\end{center}
Youcanuse
\leavevmode
,asabove:
\begin{center}
First (heading) line\\
\leavevmode\\
body of the e centred text...
\end{center}
butthatisjustastiresometotypeas
\\
withanoptionalargument,andcannotbe
recommended.
expdlist.sty
:
macros/latex/contrib/expdlist
mdwlist.sty
: Distributedaspartof
macros/latex/contrib/mdwtools
386 Extraverticalspaceinfloats
Acommoncomplaintisthatextraverticalspacehascreptinto
figure
or
table
floating
environments.Morecommonstillareuserswhopostcodethatintroducesthisextra
space,andhaven’tnoticedtheproblem!
Thetroublearisesfromthefactthatthe
center
environment(anditssiblings
flushleft
and
flushright
)areactuallybasedonLaTeX’slist-handlingcode;and
listsalwaysseparatethemselvesfromthematerialaroundthem. Meanwhile,there
areparametersprovidedtoadjustthespacingbetweenfloatingenvironmentsandtheir
surroundings;soifwehave:
\begin{figure}
\begin{center}
\includegraphics{...}
\caption{...}
\end{center}
\end{figure}
orworsestill:
\begin{figure}
\begin{center}
\includegraphics{...}
\end{center}
\caption{...}
\end{figure}
271
Adding pdf pages together - Merge, append PDF files in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provide C# Demo Codes for Merging and Appending PDF Document
.net merge pdf files; combine pdf online
Adding pdf pages together - VB.NET PDF File Merge Library: Merge, append PDF files in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET Guide and Sample Codes to Merge PDF Documents in .NET Project
add pdf files together reader; best pdf combiner
unwarrantedverticalspaceisgoingtoappear.
Thesolutionistoletthefloatandtheobjectsinitpositionthemselves,andtouse
“generic”layoutcommandsratherthantheirlist-basedencapsulations.
\begin{figure}
\centering
\includegraphics{...}
\caption{...}
\end{figure}
(whicheveninvolveslesstyping).
ThisalternativecodewillworkwithanyLaTeXpackage. Itwillnotworkwith
obsolete(pre-LaTeX2e)packagessuchaspsfigorepsf—seegraphicsinclusionfor
discussionofthegenesisof
\includegraphics
.
387 Whyismytable/figure/... . notcentred?
Youwantafloatwhosecontentsarecentred,butLaTeXignoresyour
center
environ-
ment.Mostlikely,youhavewritten:
\begin{center}
\begin{figure}
...
\end{figure}
\end{center}
Inthiscase,LaTeXhas“takenthe
figure
away”,andwilltypesetitatsomelocationit
fancies(itdoesthesamewith
table
s)theonlythingwecansay(forsure)aboutthe
locationisthatitwon’tbeinsidethat
center
environment.Asaresult,the
center
environmentisleftwithnothingtodo... excepttomakeamessofyourvertical
spacing.
Thesolutionisthesameasthatoutlinedinthesameanswer,notingthatallcontrol
ofan
figure
or
table
needstobeinsidetheenvironment. Sotheexample’scode
shouldbeconvertedto
\begin{figure}
\centering
...
\end{figure}
(orsomethingsimilarfora
table
).
388 Two-columnfloatnumbersoutoforder
WhenLaTeXcan’tplaceafloatimmediately,itplacesitononeofseveral“defer”lists.
Ifanotherfloatofthesametypecomesalong,andthe“defer”listforthattypestillhas
somethinginit,thelaterfloathastowaitforeverythingearlierinthelist.
Now,standardLaTeXhasdifferentlistsforsingle-columnfloats,anddouble-column
floats;thismeansthatsingle-columnfigurescanovertakedouble-columnfigures(or
vice-versa),andyouobservelaterfiguresappearinthedocumentbeforeearlyones.The
sameistrue,ofcourse,fortables,orforanyuser-definedfloat.
TheLaTeXteamrecognisetheproblem,andprovidesapackage(fixltx2e)todeal
withit.Fixltx2eamalgamatesthetwodeferlists,sothatfloatsdon’tgetoutoforder.
ForthosewhoarestillrunninganolderLaTeXdistribution,thepackagefix2col
shouldserve.Thispackage(alsobyamemberoftheLaTeXteam)wasthebasisofthe
relevantpartoffixltx2e.Thefunctionalityhasalsobeenincludedindblfloatfix,which
alsohascodetoplacefull-widthfloatsat
[b]
placement.
Onceyouhaveloadedthepackage,nomoreremainstobedone:thewholerequire-
mentistopatchtheoutputroutine;noextracommandsareneeded.
dblfloatfix.sty
:
macros/latex/contrib/dblfloatfix
fix2col.sty
:
macros/latex/contrib/fix2col
fixltx2e.sty
: PartoftheLaTeXdistribution
272
C# TIFF: TIFF Editor SDK to Read & Manipulate TIFF File Using C#.
7. How to extract Tiff pages. Tiff Compression in C#. 1. Support embedding, removing, adding and updating ICCProfile. 2. Render text to text, PDF, or Word file.
pdf split and merge; acrobat merge pdf
C# Image: How to Draw Text on Images within Rasteredge .NET Image
txt" to the new project folder, together with .NET to make this image text adding application work powerful & profession imaging controls, PDF document, tiff
attach pdf to mail merge in word; merge pdf files
389 Accentsmisbehavein
tabbing
Soyouareconstructinga
tabbing
environment,andyouhavetheneedofsome
diacriticisedtext—perhapssomethingassimpleas
\’{e}
—andtheaccentdisappears
becauseithasbeeninterpretedasa
tabbing
command,andeverythinggoeswrong.
Thisisreallyaratherghastlyfeatureofthe
tabbing
environment;inordertotype
accentedcharactersyouneedtousethe
\a
kludge:so
\a’{e}
inside
tabbing
for
\’
{e}
outside,andsimilarly
\a‘
for
\‘
and
\a=
for
\=
.Thiswholeprocedureisofcourse
hideousanderror-prone.
Thesimplestalternativeistotypeinanencodingthathasthediacriticisedcharacters
init,andtouseanappropriateencodingdefinitionfileintheinputencpackage.Sofor
example,type:
\usepackage[latin1]{inputenc}
...
\begin{tabbing}
...
...\>voilà\>...
for:
... voilà à ...
andtheinternalmechanismsoftheinputencpackagewillputtherightversionofthe
accentcommandinthere.
AwittyreversaloftherôlesisintroducedbythepackageTabbing(notethecapital
“T”):itprovidesa
Tabbing
environmentwhichduplicates
tabbing
,butallthesingle-
charactercommandsbecomecomplicatedobjects.So
tabbing
’s
\>
becomes
\TAB>
,
\=
becomes
\TAB=
,andsoon.Theabovetrivialexamplewouldthereforebecome:
\usepackage{Tabbing}
...
\begin{Tabbing}
...
... \TAB> > voil\‘a a \TAB> > ...
Tabbing.sty
:
macros/latex/contrib/Tabbing
390 Packagereports“commandalreadydefined”
Youloadapairofpackages,andthesecondreportsthatoneofthecommandsitdefines
isalreadypresent.Forexample,boththetxfontsandamsmathdefineacommand
\iint
(and
\iiint
andsoon);so
...
\usepackage{txfonts}
\usepackage{amsmath}
producesastringoferrormessagesoftheform:
! LaTeX X Error: : Command d \iint t already defined.
Or name \end... illegal, see p.192 2 of f the manual.
Asageneralrule,thingsthatamsmathdefines,itdefineswell;however,thereisagood
caseforusingthetxfontsversionof
\iint
—theassociatedtxfontshaveadouble
integralsymbolthatdoesn’tneedtobe“faked”inthewayamsmathdoes.Inthecase
thatyouareloadingseveralsymbolpackages,everyoneofwhichdefinesthesame
symbol,youarelikelytoexperiencetheprobleminabigway(
\euro
isacommon
victim).
Therearesimilarcaseswhereonepackageredefinesanother’scommand,butno
erroroccursbecausetheredefiningpackagedoesn’tuse
\newcommand
.Often,insucha
case,youonlynoticethechangebecauseyouassumethedefinitiongivenbythefirst
package.Theamsmathtxfontspackagesarejustsuchapair;txfontsdoesn’tprovoke
errors.
273
VB.NET PDF: How to Create Watermark on PDF Document within
example code to create graphics watermark on multiple PDF pages within the users with the most flexible and mature PDF watermark adding API solutions
merge pdf online; pdf mail merge
VB.NET Image: VB.NET Codes to Add Antique Effect to Image with .
When the two libraries are combined together, you can Basic .NET example codings for adding vintage effect & profession imaging controls, PDF document, image
add pdf files together online; pdf combine files online
Youmaydealwiththeproblembysavingandrestoringthecommand. Macro
programmersmaycaretodothisforthemselves;fortherestofus,there’sthepackage
savesym.Thesequence:
\usepackage{savesym}
\usepackage{amsmath}
\savesymbol{iint}
\usepackage{txfonts}
\restoresymbol{TXF}{iint}
doesthejob;restoringtheamsmathversionofthecommand,andmakingthetxfonts
versionofthecommandavailableas
\TXFiint
.
Documentationofsavesym doesn’tamounttomuch: theonlycommandsare
\savesymbol
and
\restoresymbol
,asnotedabove.
amsmath.sty
: Partof
macros/latex/required/amslatex
savesym.sty
:
macros/latex/contrib/savesym/savesym.sty
txfonts.sty
: Partof
fonts/txfonts
391 Whyaremysectionsnumbered0.1...?
Thishappenswhenyourdocumentisusingthestandardbookorreportclass(orone
similar),andyou’vegota
\section
beforeyourfirst
\chapter
.
Whathappensis,thattheclassnumberssectionsas“hchapternoi.hsectionnoi”,and
untilthefirst
\chapter
hasappeared,thechapternumberis0.(Ifyouuse
\chapter
*
,
whichdoesn’tnumberthechapteritproduces,theproblemstillarises.)
Ifyou’redoingthis,it’spossiblethatthearticleclassisforyou;tryitandsee.
Otherwise,puta
\chapter
beforeyoursections,ordoawaywithsectionnumbering
byusing
\section
*
instead.Analternativewayofavoidingnumberingisdiscussedin
unnumberedsectionsinthetableofcontents”.
392 Linktextdoesn’tbreakatendline
Whenusingthehyperrefpackage,youmakeablockoftext“active”whenyoudefinea
hyper-link(whentheuserclicksonthattext,thereaderprogramwilldiverttothetarget
ofthelink).
Thehyperrefpackageusesadriver(inthesamewayasthegraphicspackagedoes),
todeterminehowtoimplementallthathyper-stuff.
Ifyouusethedriverfordvipsoutput(presumablyyouwanttodistilltheresulting
PostScript),limitationsinthewaydvipsdealswiththe
\special
commandsmeanthat
hyperref mustpreventlinkanchorsfrombreakingattheendoflines. Otherdrivers
(notablythoseforPDFTeXandfordvipdfm)don’tsufferfromthisproblem.
Theproblemmayoccurinanumberofdifferentcircumstances.Foracoupleof
them,therearework-arounds:
First,ifyouhaveanURLwhichisactive(sothatclickingonitwillactivateyour
webbrowserto“goto”theURL).Inthiscasehyperrefemploystheurlpackagetosplit
uptheURL(asdescribedintypesettingURLs),butthedvipsdriverthensuppresses
thebreaks.Thewayoutisthebreakurlpackage,whichmodifiesthe
\url
commandto
produceseveralsmallerpieces,betweeneachofwhichalinebreakispermitted.Each
groupofpieces,thatendsuptogetherinoneline,isconvertedtoasingleclickablelink.
Second,ifyouhaveatableofcontents,listoffigureortables,orthelike,hyperref
willordinarilymakethetitlesinthetableofcontents,orcaptionsinthelists,active.If
thetitleorcaptionislong,itwillneedtobreakwithinthetable,butthedvipsdriver
willpreventthat.Inthiscase,loadhyperrefwiththeoption
linktocpage
,andonlythe
pagenumberwillbemadeactive.
Otherwise,ifyouhavealengthypieceoftextthatyouwantactive,youhaveat
presentnosimplesolution:youhavetorewriteyourtext,ortouseadifferentPDF
generationmechanism.
breakurl.sty
:
macros/latex/contrib/breakurl
274
VB.NET Image: How to Deploy & Configure .NET Image SDK
dlls into your ASP.NET web project by adding reference directly; Copy your evaluation license key at the same folder of your web project, together with above
add pdf pages together; pdf combine two pages into one
C# Image: C# Code to Encode & Decode JBIG2 Images in RasterEdge .
codec into PDF documents for a better PDF compression; jbig2.dll to the C# project by adding project reference text to the new project folder, together with .NET
pdf mail merge plug in; append pdf
393 Pagenumberiswrongatstartofpage
Thisisalongstory,whosesourcesaredeepinsidetheworkingsofTeXitself;itall
derivesfromtheTeX’sstrivingtogeneratethebestpossibleoutput.
Thepagenumberisconventionallystoredin
\count0
;LaTeXusersseethisasthe
counter
page
,andmaytypesetitsvalueusing
\thepage
.
Thenumber(thatistosay,
\count0
)isonlyupdatedwhenTeXactuallyoutputsa
page.TeXonlyeventriestodothiswhenitdetectsahintthatitmaybeagoodthing
todo.FromTeX’spointofview,theendofaparagraphisagoodtimetoconsider
outputtingapage;itwilloutputapageifithasmorethanapage’sworthofmaterialto
output.(Ensuringitalwayshassomethinginhandmakessomeoptimisationspossible.)
Asaresult,
\count0
(
\thepage
)isalmostalwayswronginthefirstparagraphofa
page(theexceptioniswherethepagenumberhasbeen“forcibly”changed,eitherby
changingitsvaluedirectly,orbybreakingthepagewhereTeXwouldn’tnecessarily
havechosentobreak).
LaTeXprovidesasafewayofreferringtothepagenumber,byusinglabelreferences.
So,ratherthanwriting:
Here is page \thepage{}.
youshouldwrite:
Here is page \pageref{here}\label{here}.
(note:nospacebetweenthe
\pageref
andthe
\label
,sincethatcouldpotentiallyend
upasapage-breakspaceitself,whichratherdefeatsthepurposeoftheexercise!).
394 Mybracketsdon’tmatch
(La)TeXhasalow-levelmechanismformatchingbracesindocumenttext.Thismeans
youcantypesomethinglike:
\section{All \emph{OK} now.}
andknowthatthefirstbrace(fortheargumentof
\section
)willbematchedwiththe
lastbrace,andtheinternalpairofbraces(fortheargumentof
\emph
)willbematched
witheachother.It’sallverysimple.
However,LaTeXhasaconventionofenclosingoptionalargumentsinbrackets,as
in:
\section[OK]{All \emph{OK} now.}
ThesebracketsarenotmatchedbyTeXmechanisms,despitethesuperficialsimilarity
oftheiruse.Asaresult,straightforward-lookingusageslike:
\section[All [OK] now]{All \emph{OK} } now.}
aren’tOKatall—theoptionalargumentcomestoconsistof“All[OK”,and
\section
takesthesinglecharacter“n”(ofthefirst“now”)asitsargument.
Fortunately,TeX’sscanningmechanismshelpsusbyacceptingthesyntax“
{]}
”to
‘hide’theclosingbracketfromthescanningmechanismthatLaTeXuses.Inpractice,
thecommonestwaytousethisfacilityis:
\section[All {[OK]} } now]{All \emph{OK} } now.}
sincebracingthebracketonitsown“looksodd”.
LaTeXhasanotherargumentsyntax,evenlessregular,wheretheargumentis
enclosedinparentheses,asin:
\put(1,2){foo}
(apictureenvironmentcommand).
Thismechanismisalsopronetoproblemswithmatchingclosingparentheses,but
theissueseldomarisessincesuchargumentsrarelycontaintext.Ifitweretoarise,the
samesolution(enclosingtheconfusedcharactersinbraces)wouldsolvetheproblem.
275
VB.NET Image: VB.NET ISSN Barcode Reader & Scanner; Decode Barcode
into any VB.NET developing applications by adding reference from source PDF file, RasterEdge.Imaging.PDF.dll will and used in VB.NET class application together.
reader merge pdf; batch combine pdf
VB.NET TIFF: .NET TIFF Printer Control; Print TIFF Using VB.NET
Therefore, by adding above mentioned two libraries into VB function to print multiple TIFF pages by defining & profession imaging controls, PDF document, image
batch pdf merger; asp.net merge pdf files
395 CharactersdisappearfromfiguresinPDFTeX
YouhaveaPDFfigure,whichyouwanttouseinyourPDFLaTeXdocument.When
youcompilethedocument,PDFTeXcomplainsabout“missingglyphs”,andsome(or
all)ofthelabellingtextorsymbolsintheoriginalfigureisnolongervisible.
Whathashappenedis:
1. Yourfigurefile(say
fig.pdf
)hasafont
font.pfb
embeddedinit.
2. PDFTeXnotesthatithas
font.pfb
ondisc,andloadsthatinplaceofthecopyin
fig.pdf
.
3. Itturnsoutthatthecopyin
fig.pdf
hasglyphsthataren’tin
font.pfb
ondisc,so
thatyougeterrorswhilecompilingandyouseethatcharactersaremissingwhen
youviewtheoutput.(PDFTeXcan’tknowthatthefontsaredifferent,sincethey
havethesamename.)
Whichisallveryundesirable.
PDFTeXdoesthistokeepfilesizesdown:supposeyouhaveadocumentthatloads
figures
fig1.pdf
and
fig2.pdf
;bothofthoseusefont
font.pfb
.IfPDFTeXtakes
noaction,therewillbetwocopiesof
font.pfb
intheoutput.(Ifyourdocumentalso
usesthefont,therecouldbethreecopies.)
ArealcaseistheURWfont
NimbusRomNo9L-Regu
(acloneofTimesRoman),
whichisavailableinaversionwithCyrillicletters,whiletheversioninTeXdistributions
doesn’thavethoseletters.Bothversions,asdistributed,havethesamename.
Thesimple(“quickanddirty”)solutionistoaddthecommand
\pdfinclusioncopyfonts=1
tothepreambleofyourdocument.
The“real”solutionisthatoneorotherfontshouldberenamed.Ineithercase,this
wouldrequirethatyoureconfiguresomeprogram’s(TeX’soryourdrawingpackage’s)
fonttables—inevitablyatiresomejob.
396 Iaskedfor“empty”,butthepageisnumbered
Ifyouuse
\pagestyle{empty}
andyoufindsomepagesarenumberedanyway,youare
probablyencounteringoneofthestyledecisionsbuiltintothestandardLaTeXclasses:
thatcertainspecialpagesshouldalwaysappearwith
\pagestyle{plain}
,withapage
numberatthecentreofthepagefoot.Thespecialpagesinquestionarethose(inarticle
class)containinga
\maketitle
,or(inbookandreportclasses)
\chapter
or
\part
commands.
Thesimplesolutionistoreissuethepagestyleafterthecommand,witheffectfora
singlepage,as,forexample(inarticle):
\maketitle
\thispagestyle{empty}
or(inbookorreport)
\chapter{foo bar}
\thispagestyle{empty}
Asimilartechniquedoesn’tworkforabookorreport
\part
commandpages.Forthat,
andforotherdetail,takelookat“gettingridofpagenumbers”.
T.2 Commonmisunderstandings
397 What’sgoingoninmy
\include
commands?
The originalLaTeXprovidedthe
\include
commandtoaddressthe problemof
longdocuments: withthe e relatively slow computersofthetime, , thecompanion
\includeonly
facility was s a a boon. . With h the vast increase in computer speed,
\includeonly
islessvaluable(thoughitstillhasitsplaceinsomeverylargeprojects).
Nevertheless,thefacilityisretainedincurrentLaTeX,andcausessomeconfusionto
thosewhomisunderstandit.
276
VB.NET Word: .NET Project for Merging Two or More Microsoft Word
Enable VB.NET developers to split pages of a Word Studio using VB language and adding references to powerful & profession imaging controls, PDF document, image
pdf merger online; pdf merge files
C# Image: C# Tutorial to Scale Images in C# by Using Rasteredge .
txt" to the new project folder, together with C# Imaging SDK DLLs; Integrate imaging processing assemblies to the project by adding reference; RasterEdge
pdf combine; append pdf files reader
Inorderfor
\includeonly
towork,
\include
makesaseparate
.aux
fileforeach
includedfile,andmakesa‘checkpoint’ofimportantparameters(suchaspage,figure,
tableandfootnotenumbers). Asadirectresult,itmustclearthecurrentpageboth
beforeandafterthe
\include
command.(Therequirementderivesfromthedifficulties
ofobservingpagenumbers.)What’smore,thismechanismdoesn’tworkifa
\include
commandappearsinafilethatwas
\include
ditself:LaTeXdiagnosesthisasanerror.
So,wecannowanswerthetwocommonestquestionsabout
\include
:
• WhydoesLaTeXthrowapagebeforeandafter
\include
commands?
Answer:becauseithasto.Ifyoudon’tlikeit,replacethe
\include
commandwith
\input
—youwon’tbeabletouse
\includeonly
anymore,butyouprobably
don’tneeditanyway,sodon’tworry.
• Whycan’tInest
\include
dfiles?—IalwaysusedtobeabletounderLaTeX2.09.
Answer: infact,youcouldn’t,evenunderLaTeX2.09,butthefailurewasn’t
diagnosed.However,sinceyouwerehappywiththebehaviourunderLaTeX2.09,
replacethe
\include
commandswith
\input
commands(with
\clearpage
as
appropriate).
398 Whydoesitignoreparagraphparameters?
WhenTeXislayingouttext,itdoesn’tworkfromwordtoword,orfromlinetoline;
thesmallestcompleteunititformatsistheparagraph. Theparagraphislaiddown
inabuffer,asitappears,andisn’ttouchedfurtheruntiltheend-paragraphmarkeris
processed.It’satthispointthattheparagraphparametershaveeffect;andit’sbecause
ofthissequencethatoneoftenmakesmistakesthatleadtotheparagraphparameters
notdoingwhatonewouldhavehoped(orexpected).
ConsiderthefollowingsequenceofLaTeX:
{\raggedright % % declaration for r ragged text
Here’s text to be e ranged d left in our output,
but it’s the only such paragraph, , so we e now
end the group.}
Here’s more that t needn’t t be ragged...
TeXwillopenagroup,andimposetheragged-settingparameterswithinthatgroup;
itwillthensaveacoupleofsentencesoftextandclosethegroup(thusrestoringthe
previousvalueoftheparametersthat
\raggedright
set).ThenTeXencountersablank
line,whichitknowstotreatasa
\par
token,soittypesetsthetwosentences;but
becausetheenclosinggrouphasnowbeenclosed,theparametersettingshavebeenlost,
andtheparagraphwillbetypesetnormally.
Thesolutionissimple: closetheparagraphinsidethegroup,sothatthesetting
parametersremaininplace.Anappropriatewayofdoingthatistoreplacethelastthree
linesabovewith:
end the group.\par}
Here’s more that t needn’t t be ragged...
Inthisway,theparagraphiscompletedwhile
\raggedright
’sparametersarestillin
forcewithintheenclosinggroup.
Anotheralternativeistodefineanenvironmentthatdoestheappropriatejobforyou.
Fortheaboveexample,LaTeXalreadydefinesanappropriateone:
\begin{flushleft}
Here’s text to be e ranged d left...
\end{flushleft}
Infact,thereareanumberofparametersforwhichTeXonlymaintainsonevalue
perparagraph.Atiresomeoneisthesetofuppercase/lowercasetranslations,which
(oddlyenough)constrainshyphenationofmutilingualtexts. Anotherthatregularly
createsconfusionis
\baselineskip
.
277
399 Case-changingoddities
TeXprovidestwoprimitivecommands
\uppercase
and
\lowercase
tochangethe
caseoftext;they’renotmuchused,butarecapablecreatingconfusion.
Thetwocommandsdonotexpandthetextthatistheirparameter—theresult
of
\uppercase{abc}
is‘
ABC
’,but
\uppercase{\abc}
isalways‘
\abc
’,whatever
themeaningof
\abc
.Thecommandsaresimplyinterpretingatableofequivalences
betweenupper-andlowercasecharacters.Theyhave(forexample)nomathematical
sense,and
\uppercase{About $y=f(x)$}
willproduce
ABOUT $Y=F(X)$
whichisprobablynotwhatiswanted.
Inaddition,
\uppercase
and
\lowercase
donotdealverywellwithnon-American
characters,forexample
\uppercase{\ae}
isthesameas
\ae
.
LaTeXprovidescommands
\MakeUppercase
and
\MakeLowercase
whichfixes
thelatterproblem.Thesecommandsareusedinthestandardclassestoproduceupper
caserunningheadsforchaptersandsections.
Unfortunately
\MakeUppercase
and
\MakeLowercase
donotsolvetheotherprob-
lemswith
\uppercase
,soforexampleasectiontitlecontaining
\begin{tabular}
...
\end{tabular}
willproducearunningheadcontaining
\begin{TABULAR}
.The
simplestsolutiontothisproblemisusingauser-definedcommand,forexample:
\newcommand{\mytable}{\begin{tabular}...
\end{tabular}}
\section{A section title e \protect\mytable{}
with a a table}
Notethat
\mytable
hastobeprotected,otherwiseitwillbeexpandedandmadeupper
case;youcanachievethesameresultbydeclaringitwith
\DeclareRobustCommand
,
inwhichcasethe
\protect
won’tbenecessary.
DavidCarlisle’stextcasepackageaddressesmanyoftheseproblemsinatransparent
way.Itdefinescommands
\MakeTextUppercase
and
\MakeTextLowercase
whichdo
upper-orlowercase,withthefancierfeaturesoftheLaTeXstandard
\Make
*
-commands
butwithouttheproblemsmentionedabove. Loadthepackagewith
\usepackage
[overload]{textcase}
,anditwillredefinetheLaTeXcommands(nottheTeX
primitivecommands
\uppercase
and
\lowercase
),sothatsectionheadingsandthe
likedon’tproducebrokenpageheadings.
textcase.sty
:
macros/latex/contrib/textcase
400 WhydoesLaTeXsplitfootnotesacrosspages?
LaTeXsplitsfootnoteswhenitcanthinkofnothingbettertodo.Typically,whenthis
happens,thefootnotemarkisatthebottomofthepage,andthecompletefootnote
wouldoverfillthepage.LaTeXcouldtrytosalvagethisproblembymakingthepage
shortofboththefootnoteandthelinewiththefootnotemark,butitsprioritiestoldit
thatsplittingthefootnotewouldbepreferable.
Asalways,thebestsolutionistochangeyourtextsothattheproblemdoesn’toccur
inthefirstplace.Considerwhetherthetextthatbearsthefootnotecouldmoveearlierin
thecurrentpage,orontothenextpage.
Ifthisisn’tpossible,youmightwanttochangeLaTeX’sperceptionofitspriorities:
they’recontrolledby
\interfootnotelinepenalty
—thelargeritis,thelesswilling
LaTeXistosplitfootnotes.
Setting
\interfootnotelinepenalty=10000
278
inhibitssplitfootnotesaltogether,whichwillcause‘
Underfull\vbox
’messagesunless
youalsospecify
\raggedbottom
.Thedefaultvalueofthepenaltyis
100
,whichis
rathermild.
Analternativetechniqueistojugglewiththeactualsizeofthepages.
\enlargethispage
changesthesizeofthecurrentpagebyitsargument(forexample,youmightsay
\enlargethispage{\baselineskip}
toaddasinglelinetothepage,butyoucanuse
anyordinaryTeXlengthsuchas
15mm
or
-20pt
asargument).Reducingthesizeofthe
currentpagecouldforcetheoffendingtexttothenextpage;increasingthesizeofthe
pagemayallowthefootnotetobeincludedinitsentirety.Itmaybenecessarytochange
thesizeofmorethanonepage.
Thefnbreakpackagedetects(andgenerateswarningsabout)splitfootnotes.
fnbreak.sty
:
macros/latex/contrib/fnbreak
401 Getting
\marginpar
ontherightside
Inanidealworld,marginalnoteswouldbein“analogous”placesoneverypage:notes
onaneven-sidepagewouldbeintheleftmargin,whilethoseonanodd-sidepagewould
beintherightmargin.Amoment’sthoughtshowsthatamarginalnoteontheleftneeds
tobetypesetdifferentlyfromamarginalnoteontheright.TheLaTeX
\marginpar
commandthereforetakestwoargumentsina
twoside
documents:
\marginpar[left
text]{right text}
.LaTeXusesthe“obvious”testtogetthe
\marginpar
sinthe
correctmargin,butabooby-traparisesbecauseTeXrunsitspagemakerasynchronously.
Ifa
\marginpar
isprocessedwhilepagenisbeingbuilt,butdoesn’tgetuseduntil
pagen+1,thenthe
\marginpar
willturnuponthewrongsideofthepage.Thisisan
instanceofageneralproblem:see“findingifyou’reonanoddoranevenpage”.
ThesolutiontotheproblemisforLaTeXto‘remember’whichsideofthepageeach
\marginpar
shouldbeon.Themparhackpackagedoesthis,usinglabel-likemarks
storedinthe
.aux
file;thememoirclassdoeslikewise.
memoir.cls
:
macros/latex/contrib/memoir
mparhack.sty
:
macros/latex/contrib/mparhack
402 Wherehavemycharactersgone?
You’vetypedsomeapparentlyreasonabletextandprocessedit,buttheresultcontains
nosignofsomeofthecharactersyoutyped.Alikelyreasonisthatthefontyouselected
justdoesn’thavearepresentationforthecharacterinquestion.
Forexample,ifItype“thatwillbe£44.00”intoanordinary(La)TeXdocument,
orifIselectthefont
rsfs10
(whichcontainsuppercaselettersonly)andtypepretty
muchanything,the£sign,oranylowercaselettersordigitswillnotappearintheoutput.
There’snoactualerrormessage,either:youhavetoreadthelogfile,whereyou’llfind
crypticlittlemessageslike
Missing character: : There is no o ^^a3 in font cmr10!
Missing character: : There is no o 3 3 in n font t rsfs10!
(theformerdemonstratingmyTeX’sunwillingnesstodealincharacterswhichhavethe
eighthbitset,whilethe
rsfs10
exampleshowsthatTeXwilllogtheactualcharacterin
error,ifitthinksit’spossible).
Somewhatmoreunderstandablearethediagnosticsyoumaygetfromdvipswhen
usingtheOT1andT1versionsoffontsthatweresuppliedinAdobestandardencoding:
dvips: Warning: missing glyph ‘Delta’
Theprocessthatgeneratesthemetricsforusingthefontsgeneratesaninstructionto
dvipstoproducethesediagnostics,sothattheirnon-appearanceintheprintedoutputis
lesssurprisingthanitmightbe.QuiteafewglyphsprovidedinKnuth’stextencodings
andintheCorkencodingarenotavailableintheAdobefonts.Inthesecases,thereis
atypesetsignofthecharacter:dvipsproducesablackrectangleofwhateversizethe
concoctedfontfilehasspecified.
279
403 “Rerun”messageswon’tgoaway
TheLaTeXmessage“Reruntogetcrossreferencesright”issupposedtowarntheuser
thatthejobneedstobeprocessedagain,sincelabelsseemtohavechangedsince
thepreviousrun. (LaTeXcomparesthelabelsithascreatedthistimeroundwith
whatitfoundfromthepreviousrunwhenitstarted;itdoesthiscomparisonat
\end
{document}
.)
Sometimes,themessagewon’tgoaway:howeveroftenyoureprocessyourdocu-
ment,LaTeXstilltellsyouthat“Label(s)mayhavechanged”.Thiscansometimesbe
causedbyabrokenpackage:bothfootmisc(withthe
perpage
option)andhyperref
havebeenknowntogivetrouble,inthepast:ifyouareusingeither,checkyouhavethe
latestversion,andupgradeifpossible.
However,thereisarareoccasionwhenthiserrorcanhappenasaresultofpatholog-
icalstructureofthedocumentitself.Supposeyouhavepagesnumberedinroman,and
youaddareferencetoalabelonpage“ix”(9).Thepresenceofthereferencepushes
thethingreferredtoontopage“x”(10),butsincethat’sashorterreferencethelabel
movesbacktopage“ix”atthenextrun.Suchasequencecanobviouslynotterminate.
Theonlysolutiontothisproblemistomakeasmallchangetoyourdocument
(somethingassmallasaddingordeletingacommawilloftenbeenough).
footmisc.sty
:
macros/latex/contrib/footmisc
hyperref.sty
:
macros/latex/contrib/hyperref
404 Commandsgobblefollowingspace
Peopleareforeversurprisedthatsimplecommandsgobblethespaceafterthem:thisis
justthewayitis.TheeffectarisesfromthewayTeXworks,andLamportdescribes
asolution(placeapairofbracesafteracommand’sinvocation)inthedescriptionof
LaTeXsyntax.ThustherequirementisineffectpartofthedefinitionofLaTeX.
TheseFAQs,forexample,iswritteninLaTeXforproductionofawebsite.The
HTMLcodeisgeneratedbyascriptthatrequiresapairofbraces,tomakeanull
argument,asin:
\fred{}
foralmostallmacroinvocations,regardlessofwhetherthefollowingspaceisrequired:
however,theseFAQsshouldnotitselfberegardedasamodelofLaTeXstyle.
Manyusersfindallthosebracesbecomeverytediousveryquickly,andwouldreally
rathernottypethemall.
Analternativestructure,thatdoesn’tviolatethedesignofLaTeX,istosay
\fred\
the
\
commandis“selfterminating”(like
\\
)andyoudon’tneedbracesafterit.Thus
onecanreducetoonethenumberofextracharactersoneneedstotype.
Ifeventhatonecharacteristoomany,thepackagexspacedefinesacommand
\xspace
thatguesseswhetherthereshouldhavebeenaspaceafterit,andifsointroduces
thatspace.So“
fred\xspace jim
”produces“fredjim”,while“
fred\xspace. jim
produces“fred.jim”.Whichusagewouldofcoursebecompletelypointless;butyou
canincorporate
\xspace
inyourownmacros:
\usepackage{xspace}
...
\newcommand{\restenergy}{\ensuremath{mc^2}\xspace}
...
and we e find \restenergy available to us...
The
\xspace
commandmustbethelastthinginyourmacrodefinition(asinthe
example);it’snotcompletelyfoolproof,butitcopeswithmostobvioussituationsin
runningtext.
Thexspacepackagedoesn’tsaveyouanythingifyouuseitinamacrothatappears
onlyonceortwicewithinyourdocument,anditisnottotallyfoolproof.(Theoriginal
authorofthepackagewroteitbecausehehadbeenbittenbylostspaces.Henolonger
recommendsitsuse,simplybecauseofthepossibilityoferror.)
280
Documents you may be interested
Documents you may be interested