Changeset 40024 for trunk/doc/release.2015/inputs/code.sty
- Timestamp:
- May 8, 2017, 5:48:49 AM (9 years ago)
- File:
-
- 1 edited
-
trunk/doc/release.2015/inputs/code.sty (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/release.2015/inputs/code.sty
r39974 r40024 1 2 % the stuff below is used to define commands which disable LaTeX interpretation 3 % of special characters. 4 5 % first thing to know: there is a special internal definition in the latex kernel: 6 % \def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&\do\#\do\^\do\_\do\%\do\~} 7 8 % this command (uncatcodespecials) re-defines the \do command used above to 9 % pass its arguments to \catcode`[arg]=12. thus calling the command 10 % uncatcodespecials essentially iteratively sets the catcode for all of those 11 % special characters to be catcode 12 (which just prints the character) 1 12 \def\uncatcodespecials{\def\do##1{\catcode`##1=12}\dospecials}% 2 {\catcode`\`=\active\gdef`{\relax\lq}}% this line inhibits Spanish 3 % ligatures ?` and !` of \tt font 13 14 % this line inhibits Spanish ligatures ?` and !` of \tt font 15 {\catcode`\`=\active\gdef`{\relax\lq}} 16 4 17 \def\setupc@de % see TeX Book, p. 381 5 {\tt % 6 \spaceskip=0pt \xspaceskip=0pt % just in case... 18 {\spaceskip=0pt \xspaceskip=0pt 7 19 \catcode`\`=\active 8 20 \uncatcodespecials \obeyspaces … … 10 22 }% 11 23 \def\SETUPC@DE % see TeX Book, p. 381 12 { \tt %13 \spaceskip=0pt \xspaceskip=0pt % just in case...24 { 25 \spaceskip=0pt \xspaceskip=0pt 14 26 \catcode`\`=\active 15 27 \uncatcodespecials \obeyspaces 16 28 }% 17 29 18 \def\d@code#1{ #1\endgroup}%19 \def\D@CODE#1{\def\next##1 #1{##1\endgroup}\next}%30 \def\d@code#1{\texttt{#1}\endgroup}% 31 \def\D@CODE#1{\def\next##1\texttt{#1}{##1\endgroup}\next}% 20 32 21 33 \def\code{\begingroup\setupc@de\d@code}% … … 23 35 \def\nocode#1{#1} 24 36 25 \def\setupIPPstage % 26 {\sc % 27 \spaceskip=0pt \xspaceskip=0pt % 28 \catcode`\`=\active 29 \uncatcodespecials \obeyspaces 30 \catcode`\{=1\catcode`\}=2 31 }% 37 \def\IPPstageEND#1{\textsc{#1}\endgroup}% 38 \def\IPPstage{\begingroup\setupc@de\IPPstageEND}% 32 39 33 \def\IPPstage{\begingroup\setupIPPstage\d@code}% 40 \def\IPPdbtableEND#1{\textit{#1}\endgroup}% 41 \def\IPPdbtable{\begingroup\setupc@de\IPPdbtableEND}% 34 42 35 \def\setupIPPdbtable % 36 {\it % 37 \spaceskip=0pt \xspaceskip=0pt % 38 \catcode`\`=\active 39 \uncatcodespecials \obeyspaces 40 \catcode`\{=1\catcode`\}=2 41 }% 43 \def\IPPdbcolumnEND#1{\textbf{#1}\endgroup}% 44 \def\IPPdbcolumn{\begingroup\setupc@de\IPPdbcolumnEND} 42 45 43 \def\IPPdbtable{\begingroup\setupIPPdbtable\d@code}% 46 \def\IPPprogEND#1{\textit{\textbf{#1}}\endgroup}% 47 \def\IPPprog{\begingroup\setupc@de\IPPprogEND} 44 48 45 \def\setupIPPdbcolumn % 46 {\bf % 47 \spaceskip=0pt \xspaceskip=0pt % 48 \catcode`\`=\active 49 \uncatcodespecials \obeyspaces 50 \catcode`\{=1\catcode`\}=2 51 }% 52 53 \def\IPPdbcolumn{\begingroup\setupIPPdbcolumn\d@code} 54 55 \def\setupIPPmisc % 56 {\tt % 57 \spaceskip=0pt \xspaceskip=0pt % 58 \catcode`\`=\active 59 \uncatcodespecials \obeyspaces 60 \catcode`\{=1\catcode`\}=2 61 }% 62 63 \def\IPPmisc{\begingroup\setupIPPmisc\d@code} 49 \def\IPPmiscEND#1{\textsf{#1}\endgroup}% 50 \def\IPPmisc{\begingroup\setupc@de\IPPmiscEND} 64 51 65 52 % 53 54 % stage -> small-caps 55 % program -> tt 56 % dbtable -> it 57 % dbcolumn -> bf 58 % misc -> san-serif 59 60 % text font options: 61 62 % \textrm - roman 63 % \textsf - sans serif 64 % \texttt - typewriter 65 66 % \textmd - medium 67 % \textbf - boldface 68 % \textup - upright 69 70 % \textit - italic 71 % \textsl - slated 72 % \textsc - small caps 73
Note:
See TracChangeset
for help on using the changeset viewer.
