Chapter2. CategoryCodesandInternalStates
{\catcode‘\^^M=13 %
\gdef\obeylines{\catcode‘\^^M=13 \def^^M{\par}}%
}
Emptylinesintheinputarenottakenintoaccountinthisdefinition:thesedisappear,be-
causetwoconsecutive\partokensare(inthiscase)equivalenttoone.Aslightlymodified
definitionforthelineendas
\def^^M{\par\leavevmode}
remediesthis:noweverylineendforcesT
E
Xtostartaparagraph.Foremptylinesthiswill
thenbeanemptyparagraph.
2.11.2 Changingthe\endlinechar
Occasionallyyoumaywanttochangethe\endlinechar,orthe\catcodeoftheordi-
narylineterminator^^M,forinstancetoobtainspecialeffectssuchasmacroswherethe
argumentisterminatedbythelineend.Seepage122foraworked-outexample.
Thereareacoupleoftraps.Considerthefollowing:
{\catcode‘\^^M=12 \endlinechar=‘\^^J \catcode‘\^^J=5
...
... }
Thiscausesunintendedoutputofbothcharacter13(^^M)and10(^^J),causedbytheline
terminatorsofthefirstandlastline.
Terminatingthefirstandlastlinewithacommentworks,butreplacingthefirstlinebythe
twolines
{\endlinechar=‘\^^J \catcode‘\^^J=5
\catcode‘\^^M=12
isalsoasolution.
Ofcourse, in many casesit isnotnecessary to substituteanotherend-of-linecharacter;
amuchsimplersolutionisthentoput
\endlinechar=-1
whichtreatsalllinesasiftheyendwithacomment.
2.11.3 Moreremarksabouttheend-of-linecharacter
ThecharacterthatT
E
Xappendsattheendofaninputlineistreatedlikeanyothercharacter.
Usuallyoneisnotawareofthis,asitscategorycodeisspecial,butthereareafewwaysto
letitbeprocessedinanunusualway.
Terminatinganinputlinewith^^will(ordinarily,when\endlinechar
is13)give‘M’intheoutput,whichisthe
ASCII
characterwithcode13+64.
If\^^Mhasbeendefined,terminatinganinputlinewithabackslashwill
executethiscommand.Theplainformatdefines
\def\^^M{\ }
whichmakesa‘controlreturn’equivalenttoacontrolspace.
40
VictorEijkhout–T
E
XbyTopic
Delete a page from a pdf online - remove PDF pages in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Provides Users with Mature Document Manipulating Function for Deleting PDF Pages
delete page on pdf document; delete a page from a pdf reader
Delete a page from a pdf online - VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Visual Basic Sample Codes to Delete PDF Document Page in .NET
delete pages from pdf acrobat; delete pdf pages ipad
2.12. Moreabouttheinputprocessor
2.12 Moreabouttheinputprocessor
2.12.1 Theinputprocessorasaseparateprocess
T
E
X’slevelsofprocessingareallworkingatthesametimeandincrementally,butconcep-
tuallytheycanoftenbeconsideredtobeseparateprocessesthateachacceptthecompleted
outputofthepreviousstage.Thejugglingwithspacesprovidesaniceillustrationforthis.
Considerthedefinition
\def\DoAssign{\count42=800}
andthecall
\DoAssign 0
Theinputprocessor,thepartofT
E
Xthatbuildstokens,inscanningthiscallskipsthespace
beforethezero,sotheexpansionofthiscallis
\count42=8000
Itwouldbeincorrecttoreason‘\DoAssignisread,thenexpanded,thespacedelimitsthe
number800,so800isassignedandthezeroisprinted’.Notethatthesamewouldhappen
ifthezeroappearedonthenextline.
Anotherillustrationshowsthatoptionalspacesappearinadifferent stageofprocessing
fromthatforskippedspaces:
\def\c.{\relax}
a\c.b
expandsto
a\relaxb
whichgivesasoutput
‘ab’
becausespacesafterthe\relaxcontrolsequenceareonlyskippedwhenthelineisfirst
read,notwhenitisexpanded.Thefragment
\def\c.{\ignorespaces}
a\c. b
ontheotherhand,expandsto
a\ignorespacesb
Executingthe\ignorespacescommandremovesthesubsequentspacetoken,sotheout-
putis
‘ab’.
Inbothdefinitionstheperiodafter\cisadelimitingtoken;itisusedheretopreventspaces
frombeingskipped.
2.12.2 Theinputprocessornotasaseparateprocess
ConsideringthetokenizingofT
E
Xtobeaseparateprocessisaconvenientview,butsome-
timesitleadstoconfusion.Theline
VictorEijkhout–T
E
XbyTopic
41
C# PDF File & Page Process Library SDK for C#.net, ASP.NET, MVC
Provides you with examples for adding an (empty) page to a PDF and adding empty pages You may feel free to define some continuous PDF pages and delete.
delete page in pdf; delete blank pages in pdf online
C# HTML5 PDF Viewer SDK to view PDF document online in C#.NET
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF C# File: Split PDF; C# Page: Insert PDF pages; C# Page: Delete PDF pages;
delete pages from pdf reader; reader extract pages from pdf
Chapter2. CategoryCodesandInternalStates
\catcode‘\^^M=13{}
makesthelineendactive,andsubsequentlygivesan‘undefinedcontrolsequence’errorfor
thelineendofthislineitself.Executionofthecommandsonthelinethusinfluencesthe
scanningprocessofthatsameline.
Bycontrast,
\catcode‘\^^M=13
doesnotgiveanerror.Thereasonforthisisthat T
E
Xreadsthelineendwhileitisstill
scanningthenumber13;thatis,atatimewhentheassignmenthasnotbeenperformedyet.
Thelineendisthenconvertedtotheoptionalspacecharacterdelimitingthenumbertobe
assigned.
2.12.3 Recursiveinvocationoftheinputprocessor
Above,theactivityofreplacingaparametercharacterplusadigitbyaparametertokenwas
describedassomethingsimilartothelumpingtogetheroflettersintoacontrolsequence
token.Realityissomewhatmorecomplicatedthanthis.T
E
X’stokenscanningmechanism
isinvokedbothfor input fromfileand forinput fromlistsoftokenssuch asthemacro
definition.Onlyinthefirstcaseistheterminologyofinternalstatesapplicable.
Macroparametercharactersaretreatedthesameinbothcases,however.Ifthiswerenot
thecaseitwouldnotbepossibletowritethingssuchas
\def\a{\def\b{\def\c####1{####1}}}
Seepage114foranexplanationofsuchnesteddefinitions.
2.13 The@convention
AnyonewhohaseverbrowsedthrougheithertheplainformatortheLAT
E
Xformatwillhave
noticedthatalotofcontrolsequencescontainan‘at’sign:@.Thesearecontrolsequences
thataremeanttobeinaccessibletotheordinaryuser.
Nearthebeginningoftheformatfilestheinstruction
\catcode‘@=11
occurs,makingtheatsignintoaletter,meaningthatitcanbeusedincontrolsequences.
Somewhereneartheendoftheformatdefinitiontheatsignismade‘other’again:
\catcode‘@=12
Nowwhyisitthatuserscannotcallacontrolsequencewithanatsigndirectly,although
theycancallmacrosthatcontainlotsofthose‘at-definitions’?Thereasonisthatthecontrol
sequencescontainingan@areinternalizedbyT
E
Xatdefinitiontime,afterwhichtheyarea
token,notastringofcharacters.Macroexpansionthenjustinsertssuchtokens,andatthat
timethecategorycodesoftheconstituentcharactersdonotmatteranymore.
42
VictorEijkhout–T
E
XbyTopic
C# PDF Page Insert Library: insert pages into PDF file in C#.net
Free components and online source codes for .NET framework 2.0+. PDF document files by C# code, how to rotate PDF document page, how to delete PDF page using C#
delete pages from pdf preview; delete pages on pdf online
VB.NET PDF- View PDF Online with VB.NET HTML5 PDF Viewer
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF C# File: Split PDF; C# Page: Insert PDF pages; C# Page: Delete PDF pages;
delete page on pdf reader; delete blank page from pdf
Chapter3
Characters
Internally,T
E
Xrepresentscharactersbytheir(integer)charactercode.Thischaptertreats
thosecodes,andthecommandsthathaveaccesstothem.
\char Explicitdenotationofacharactertobetypeset.
\chardef Defineacontrolsequencetobeasynonymforacharactercode.
\accent Commandtoplaceaccentcharacters.
\if Testequalityofcharactercodes.
\ifx Testequalityofbothcharacterandcategorycodes.
\let Defineacontrolsequencetobeasynonymofatoken.
\uccode Queryorsetthecharactercodethatistheuppercasevariantofagivencode.
\lccode Queryorsetthecharactercodethatisthelowercasevariantofagivencode.
\uppercase Convertthegeneraltextargumenttoitsuppercaseform.
\lowercase Convertthegeneraltextargumenttoitslowercaseform.
\string Convertatokentoastringofoneormorecharacters.
\escapechar Numberofthecharacterthatistobeusedfortheescapecharacterwhen
controlsequencesarebeingconvertedintocharactertokens.IniT
E
Xdefault:92(\).
3.1
Charactercodes
ConceptuallyitiseasiesttothinkthatT
E
Xworkswithcharactersinternally,butinfactT
E
X
workswithintegers:the‘charactercodes’.
Thewaycharactersareencodedinacomputermaydifferfromsystemtosystem.Therefore
T
E
Xusesitsownschemeofcharactercodes.Anycharacterthatisreadfromafile(orfrom
theuserterminal)isconvertedtoacharactercodeaccordingtothecharactercodetable.
Acategorycodeisthenassignedbasedonthis(seeChapter2).Thecharactercodetableis
basedonthe7-bit
ASCII
tablefornumbersunder128(seeChapter38).
Thereisanexplicitconversionbetweencharacters(better:charactertokens)andcharacter
codesusingtheleftquote(grave,backquote)character‘:atallplaceswhereT
E
Xexpects
anumberyoucanusetheleftquotefollowedbyacharactertokenorasingle-character
controlsequence.Thusboth\count‘aand\count‘\aaresynonymsfor\count97.See
alsoChapter7.
43
VB.NET PDF Page Insert Library: insert pages into PDF file in vb.
in VB.NET. Ability to create a blank PDF page with related by using following online VB.NET source code. Support .NET WinForms, ASP
cut pages out of pdf; delete blank pages in pdf
VB.NET PDF - Convert PDF Online with VB.NET HTML5 PDF Viewer
RasterEdge. PRODUCTS: ONLINE DEMOS: Online HTML5 Document Viewer; Online XDoc.PDF C# File: Split PDF; C# Page: Insert PDF pages; C# Page: Delete PDF pages;
add and delete pages in pdf online; delete page pdf online
Chapter3. Characters
Thepossibilityofasingle-charactercontrolsequenceisnecessaryincertaincasessuchas
\catcode‘\%=11 or \def\CommentSign{\char‘\%}
whichwouldbemisunderstoodifthebackslashwereleftout.Forinstance
\catcode‘%=11
wouldconsiderthe=11tobeacomment.Single-charactercontrolsequencescanbeformed
fromcharacterswithanycategorycode.
Aftertheconversiontocharactercodesanyconnectionwithexternalrepresentationshas
disappeared.Ofcourse,formostcharactersthevisibleoutputwill‘equal’theinput(thatis,
an‘a’causesan‘a’).Thereareexceptions,however,evenamongthecommonsymbols.In
theComputerModernromanfontsthereareno‘lessthan’and‘greaterthan’signs,sothe
input‘<>’willgive‘¡¿’intheoutput.
InordertomakeT
E
Xmachineindependentattheoutputside,thecharactercodesarealso
usedinthedvifile:opcodesn=0...127denotesimplytheinstruction‘takecharactern
fromthecurrentfont’.Thecompletedefinitionoftheopcodesinadvifilecanbefound
in[23].
3.2
Controlsequencesforcharacters
Thereareanumberofwaysinwhichacontrolsequencecandenoteacharacter.The\char
commandspecifiesacharactertobetypeset;the\letcommandintroducesasynonymfor
acharactertoken,thatis,thecombinationofcharactercodeandcategorycode.
3.3
Denotingcharacterstobetypeset:\char
Characterscanbedenotednumerically by, forexample, \char98.This commandtells
T
E
Xtoaddcharacternumber98ofthecurrentfonttothehorizontallistcurrentlyunder
construction.
Insteadofdecimalnotation,itisoftenmoreconvenienttouseoctalorhexadecimalnota-
tion.Foroctalthesinglequoteisused:\char’142;hexadecimalusesthedoublequote:
\char"62.Notethat\char’’62isincorrect; theprocessthatreplacestwo quotesby a
doublequoteworksatalaterstageofprocessing(thevisualprocessor)thannumberscan-
ning(theexecutionprocessor).
Becauseoftheexplicitconversiontocharactercodesbythebackquotecharacteritisalso
possibletogeta‘b’ –providedthatyou areusingafontorganizedabitlikethe
ASCII
table–with\char‘bor\char‘\b.
The\charcommandlookssuperficiallyabitlikethe^^substitutionmechanism(Chap-
ter2).Bothmechanismsaccesscharacterswithoutdirectlydenotingthem.However,the
^^mechanismoperatesinaveryearlystageofprocessing(intheinputprocessorofT
E
X,
butbeforecategorycodeassignment);the\charcommand,ontheotherhand,comesin
thefinalstagesofprocessing.Ineffectitsays‘typesetcharacternumberso-and-so’.
44
VictorEijkhout–T
E
XbyTopic
VB.NET PDF - Annotate PDF Online with VB.NET HTML5 PDF Viewer
Ability to insert a text note after selected text. Allow users to draw freehand shapes on PDF page. VB.NET HTML5 PDF Viewer: Annotate PDF Online.
best pdf editor delete pages; delete page from pdf
C# PDF remove image library: remove, delete images from PDF in C#.
Delete and remove all image objects contained in a specific to remove a specific image from PDF document page. Free .NET PDF SDK library download and online C#
add and delete pages from pdf; delete pages pdf online
3.3. Denotingcharacterstobetypeset:\char
Thereisaconstructiontoletacontrolsequencestandforsomecharactercode:the com-
mand.Thesyntaxofthisis
\chardefcontrolsequenceequalsnumber,
wherethenumbercanbeanexplicitrepresentationoracountervalue,butitcanalsobe
acharactercodeobtained using theleft quotecommand (seeabove; thefull definition
of number is given in Chapter7). In theplain format thelatter possibilityisused in
definitionssuchas
\chardef\%=‘\%
whichcouldhavebeengivenequivalentlyas
\chardef\%=37
Afterthiscommand,thecontrolsymbol\%usedonitsown isasynonymfor\char37,
thatis,thecommandtotypesetcharacter37(usuallythepercentcharacter).
Acontrolsequencethathasbeendefinedwitha\chardefcommandcanalsobeusedas
anumber.Thisfactisusedinallocationcommandssuchas\newbox(seeChapters7
and31).Tokensdefinedwith\mathchardefcanalsobeusedthisway.
3.3.1
Implicitcharactertokens:\let
Anotherconstructiondefiningacontrolsequencetostandfor(amongotherthings)acha-
racteris\let:
\letcontrolsequenceequalstoken
with acharactertokenontherighthand sideofthe(optional)equalssign.Theresultis
calledanimplicitcharactertoken.(Seepage117forafurtherdiscussionof\let.)
Intheplainformatthereareforinstancesynonymsfortheopenandclosebrace:
\let\bgroup={ \let\egroup=}
Theresultingcontrolsequencesarecalled‘implicitbraces’(seeChapter10).
Assigningcharactersby\letisdifferentfromdefiningcontrolsequencesby\chardef,
inthesensethat\letmakesthecontrolsequencestandforthecombinationofacharacter
codeandcategorycode.
Asanexample
\catcode‘|=2 % make the bar an end of group
\let\b=| % make \b a bar character
{\def\m{...}\b \m
givesan‘undefinedcontrolsequence\m’becausethe\bclosedthegroupinsidewhich\m
wasdefined.Ontheotherhand,
\let\b=| % make \b a bar character
\catcode‘|=2 % make the bar character end of group
{\def\m{...}\b \m
VictorEijkhout–T
E
XbyTopic
45
Chapter3. Characters
leavesonegroupopen,anditprintsaverticalbar(orwhateverisinposition124ofthe
currentfont).Thefirstoftheseexamplesimpliesthatevenwhenthebraceshavebeenre-
defined(forinstanceintoactivecharactersformacrosthatformatCcode)thebeginning-of-
groupandend-of-groupfunctionalityisavailablethroughthecontrolsequences\bgroup
and\egroup.
Hereisanotherexampletoshowthatimplicitcharactertokensarehardtodistinguishfrom
realcharactertokens.Aftertheabovesequence
\catcode‘|=2 \let\b=|
thetests
\if\b|
and
\ifcat\b}
arebothtrue.
Yetanotherexamplecanbefoundintheplainformat:thecommands
\let\sp=^ \let\sb=_
allowpeoplewithout an underscoreorcircumflex on theirkeyboard to makesub-and
superscriptsinmathematics.Forinstance:
x\sp2\sb{ij} gives x2
ij
If apersontypingintheformatitselfdoesnot havethesekeys,somefurthertricksare
needed:
{\lccode‘,=94 \lccode‘.=95 \catcode‘,=7 \catcode‘.=8
\lowercase{\global\let\sp=, \global\let\sb=.}}
will do thejob; seebelow foran explanationoflowercasecodes. The^^method asit
wasinT
E
Xversion2 (seepage32)cannotbeusedhere,asitwouldrequiretypingtwo
charactersthatcanordinarilynotbeinput.WiththeextensioninT
E
Xversion3itwould
alsobepossibletowrite
{\catcode‘\,=7
\global\let\sp=,,5e \global\let\sb=,,5f}
denotingthecodes94and95hexadecimally.
Findingoutjustwhatacontrolsequencehasbeendefinedtobewith\letcanbedone
using\meaning:thesequence
\let\x=3 \meaning\x
gives‘the character 3’.
3.4
Accents
Accentscanbeplacedbythehorizontalcommand:
\accent8-bitnumberoptionalassignmentscharacter
46
VictorEijkhout–T
E
XbyTopic
3.5. Testingcharacters
wherecharacterisacharacterofcategory11or12,a\char8-bitnumbercommand,or
a\chardeftoken.Ifnoneofthesefourtypesofcharacterfollows,theaccentistaken
tobea\charcommanditself;thisgivesanaccent‘suspendedinmid-air’.Otherwisethe
accentisplacedontopofthefollowingcharacter.Fontchangesbetweentheaccentandthe
charactercanbeeffectedbytheoptionalassignments.
Anunpleasantimplicationofthefactthatan\accentcommandhastobefollowedbya
characteristhatitisnotpossibletoplaceanaccentonaligature,ortwoaccentsontopof
eachother.Insomelanguages,suchasHindiorVietnamese,suchdoubleaccentsdooccur.
Positioningaccentsontopofeachotherispossible,however,inmathmode.
Thewidthofacharacterwithanaccentisthesameasthatoftheunaccentedcharacter.T
E
X
assumesthattheaccentasitappearsinthefontfileisproperlypositionedforacharacter
thatisashighasthex-heightofthefont;forcharacterswithotherheightsitcorrespondin-
glylowersorraisestheaccent.
Nogenuineunder-accentsexistinT
E
X.Theyareimplementedaslowplacedover-accents.
Awayofhandlingthemmorecorrectlywouldbetowriteamacrothatmeasuresthefollo-
wingcharacter,andraisesordropstheaccentaccordingly.Thecedillamacro,\c,inplain
T
E
Xdoessomethingalongtheselines.However,itdoesnotdroptheaccentforcharacters
withdescenders.
Thehorizontal positioning of an accent iscontrolledby \fontdimen1, slant perpoint.
Kernsareusedforthehorizontalmovement.Notethat,althoughtheyareinsertedautoma-
tically,thesekernsareclassifiedasexplicitkerns.Thereforetheyinhibithyphenationinthe
partsofthewordbeforeandafterthekern.
Asanexampleofkerningforaccents,herefollowsthedumpofahorizontallist.
\setbox0=\hbox{\it \‘l}
\showbox0
gives
\hbox(9.58334+0.0)x2.55554
.\kern -0.61803 (for accent)
.\hbox(6.94444+0.0)x5.11108, shifted -2.6389
..\tenit ^^R
.\kern -4.49306 (for accent)
.\tenit l
Notethattheaccentisplacedfirst,soafterwardstheitaliccorrectionofthelastcharacter
isstillavailable.
3.5
Testingcharacters
Equalityofcharactercodesistestedby\if:
\iftoken
1
token
2
VictorEijkhout–T
E
XbyTopic
47
Chapter3. Characters
Tokensfollowingthisconditional areexpanded untiltwounexpandabletokensareleft.
Thecondition isthen trueifthosetokensarecharactertokens withthesamecharacter
code,regardlessofcategorycode.
Anunexpandablecontrolsequenceisconsideredtohavecharactercode256andcategory
code16(sothatitisunequaltoanythingexceptanothercontrolsequence),exceptinthe
casewhereithadbeen\lettoanon-activecharactertoken.Inthatcaseitisconsideredto
havethecharactercodeandcategorycodeofthatcharacter.Thiswasmentionedabove.
Thetest\ifcatforcategorycodeswasmentionedinChapter2;thetest
\ifxtoken
1
token
2
canbeusedtotestforcategorycodeandcharactercodesimultaneously.Thetokensfollo-
wingthistestarenotexpanded.However,iftheyaremacros,T
E
Xteststheirexpansionsfor
equality.
Quantitiesdefinedby\chardefcanbetestedwith\ifnum:
\chardef\a=‘x \chardef\b=‘y \ifnum\a=\b % is false
basedonthefact(seeChapter7)thatchardeftokenscanbeusedasnumbers.
3.6
Uppercaseandlowercase
3.6.1
Uppercaseandlowercasecodes
Toeachofthecharactercodescorrespond an uppercasecodeandalowercasecode(for
stillmorecodesseebelow).Thesecanbeassignedby
\uccodenumberequalsnumber
and
\lccodenumberequalsnumber.
InIniT
E
Xcodes‘a..‘z,‘A..‘Zhaveuppercasecode‘A..‘Zandlowercasecode‘a..‘z.
Allothercharactercodeshavebothuppercaseandlowercasecodezero.
3.6.2
Uppercaseandlowercasecommands
Thecommands \uppercase{...}and \lowercase{...}go through their argument
lists,replacingallcharactercodesofexplicitcharactertokensbytheiruppercaseandlower-
casecoderespectivelyifthesearenon-zero,withoutchangingthecategorycodes.
Theargumentof\uppercaseand\lowercaseisageneraltext,whichisdefinedas
generaltext−→filler{balancedtextrightbrace
(forthedefinitionoffillerseeChapter36)meaningthattheleftbracecanbeimplicit,
buttheclosingrightbracemustbeanexplicitcharactertokenwithcategorycode2.T
E
X
performsexpansiontofindtheopeningbrace.
Uppercasingandlowercasingareexecutedintheexecutionprocessor;theyarenot‘macro
expansion’activitieslike\numberor\string.Thesequence(attemptingtoproduce\A)
48
VictorEijkhout–T
E
XbyTopic
3.7. Codesofacharacter
\expandafter\csname\uppercase{a}\endcsname
givesanerror(T
E
Xinsertsan\endcsnamebeforethe\uppercasebecause\uppercase
isunexpandable),but
\uppercase{\csname a\endcsname}
works.
Asanexampleofthecorrectuseof\uppercase,hereisamacrothattestsifacharacter
isuppercase:
\def\ifIsUppercase#1{\uppercase{\if#1}#1}
Thesametestcanbeperformedby\ifnum‘#1=\uccode‘#1.
Hyphenationofwordsstartingwithanuppercasecharacter,thatis,acharacternotequalto
itsown\lccode,issubjecttothe\uchyphparameter:ifthisispositive,hyphenationof
capitalizedwordsisallowed.SeealsoChapter19.
3.6.3
Uppercaseandlowercaseformsofkeywords
EachcharacterinT
E
Xkeywords,suchaspt,canbegiveninuppercaseorlowercaseform.
Forinstance,pT,Pt,pt,andPTallhavethesamemeaning.T
E
Xdoesnotusethe\uccode
and\lccodetablesheretodeterminethelowercaseform.Insteaditconvertsuppercase
characterstolowercasebyadding32–the
ASCII
differencebetweenuppercaseandlower-
casecharacters–totheircharactercode.Thishassomeimplicationsforimplementations
ofT
E
Xfornon-romanalphabets;seepage370oftheT
E
Xbook,[25].
3.6.4
Creativeuseof\uppercaseand\lowercase
Thefactthat\uppercaseand\lowercasedonotchangecategorycodescansometimes
beusedtocreatecertaincharacter-code–category-codecombinationsthatwouldotherwise
bedifficulttoproduce.Seeforinstancetheexplanationofthe\newifmacroinChapter13,
andanotherexampleonpage46.
For aslightlydifferentapplication, considertheproblem (solvedby Rainer Sch¨opf) of,
givenacounter\newcount\mycount,writingcharacternumber\mycounttotheterminal.
Hereisasolution:
\lccode‘a=\mycount \chardef\terminal=16
\lowercase{\write\terminal{a}}
The\lowercasecommandeffectivelychangestheargumentof the\writecommand
from‘a’intowhateveritshouldbe.
3.7
Codesofacharacter
Eachcharactercodehasanumberofcodenamesassociatedwithit.Theseareintegersin
variousrangesthatdeterminehowthecharacteristreatedinvariouscontexts,orhowthe
occurrenceofthatcharacterchangestheworkingsofT
E
Xincertaincontexts.
Thecodenamesareasfollows:
VictorEijkhout–T
E
XbyTopic
49
Documents you may be interested
Documents you may be interested