-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmacros.tex
104 lines (96 loc) · 4.56 KB
/
macros.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
%% cxxdraft-htmlgen builtins:
%
% \link
% Link to section.
% arg 0: link text
% arg 1: section abbreviation
%
% \weblink
% arg 0: link text
% arg 1: URL
%
% \indexlink
% Link to indexed position.
% arg 0: link text
% arg 1: index category
% arg 2: index key
% arg 3: abbreviation of section to link to (empty to auto-resolve)
%
% \hiddenindexlink
% Hidden link to indexed position.
% arg 0: link text
% arg 1: index category
% arg 2: index key
% arg 3: abbreviation of section to link to (empty to auto-resolve)
%
% \indexedspan
% arg 0: text
% arg 1: indices (zero or more \index commands)
%% cxxdraft-htmlgen derived macros:
\newcommand{\linkx}[3]{\indexlink{#1}{generalindex}{#2}{#3}}
% Link to indexed position.
% arg 0: link text
% arg 1: generalindex key
% arg 2: section abbreviation
\newcommand{\deflinkx}[3]{\indexlink{#1}{generalindex}{#2|idxbfpage}{#3}}
% Link to definition.
% arg 0: link text
% arg 1: definition key
% arg 2: section abbreviation
\newcommand{\deflink}[2]{\deflinkx{#1}{#1}{#2}}
% Convenience macro for when the link
% text is also the definition key.
\newcommand{\libmemberrefx}[3]{\indexlink{\tcode{#1}}{libraryindex}{\idxcode{#2}!\idxcode{#3}}{}}
\newcommand{\libglobalref}[1]{\libglobalrefx{#1}{#1}}
\newcommand{\libglobalrefx}[2]{\indexlink{\tcode{#1}}{libraryindex}{\idxcode{#2}}{}}
\newcommand{\noncxxtcode}[1]{\tcode{#1}}
\newcommand{\literaltcode}[1]{\tcode{#1}}
\newcommand{\literalterminal}[1]{\terminal{##1}}
\newcommand{\noncxxterminal}[1]{\terminal{##1}}
\newcommand{\oldconceptref}[1]{\indexlink{\oldconcept{#1}}{generalindex}{\idxoldconcept{#1}}{}}
%% replacements for existing macros:
\newcommand{\defnoldconcept}[1]{\indexedspan{\oldconcept{#1}}{\indextext{\idxoldconcept{#1}}}}
\newcommand{\indexdefn}[1]{\indextext{#1|idxbfpage}}
\newcommand{\idxcode}[1]{#1@\tcode{#1}}
\newcommand{\nontermdef}[1]{\hiddenindexlink{\indexedspan{#1\textnormal{:}}{\indexgrammar{\idxgram{#1}}}}{grammarindex}{\idxgram{#1}|idxbfpage}{}}
\newcommand{\renontermdef}[1]{#1\,\textnormal{::}}
\newcommand{\fmtnontermdef}[1]{#1\,\textnormal{:}}
\newcommand{\locnontermdef}[1]{#1\,\textnormal{:}}
\newcommand{\grammarterm}[1]{\indexlink{\indexedspan{\gterm{#1}}{\indexgram{\idxgram{#1}}}}{grammarindex}{\idxgram{#1}|idxbfpage}{}}
\newcommand{\cite}[1]{\indexlink{[bib]}{bibliography}{#1}{bibliography}}
\newcommand{\libglobal}[1]{\indexedspan{\hiddenindexlink{#1}{libraryindex}{\idxcode{#1}}{}}{\indexlibraryglobal{#1}}}
\newcommand{\libmember}[2]{\indexedspan{\hiddenindexlink{#1}{libraryindex}{\idxcode{#2}!\idxcode{#1}}{}}{\indexlibrarymember{#1}{#2}}}
\newcommand{\libheader}[1]{\indexlink{\indexedspan{\tcode{<#1>}}{\indexhdr{#1}}}{headerindex}{\idxhdr{#1}|idxbfpage}{}}
\newcommand{\libheaderdef}[1]{\indexedspan{\tcode{<#1>}}{\indexheader{#1}}}
\newcommand{\libheaderrefx}[2]{\libheader{#1}}
\newcommand{\libconceptx}[2]{\indexlink{\indexedspan{\cname{#1}}{\indexconcept{\idxconcept{#2}}}}{conceptindex}{\idxconcept{#2}|idxbfpage}{}}
\newcommand{\Range}[4]{#1\tcode{#3,\penalty2000{} #4}#2}
\newcommand{\deflibconcept}[1]{\hiddenindexlink{\indexedspan{\cname{#1}}{\indexlibrary{\idxconcept{#1}}\indexconcept{\idxconcept{#1}|idxbfpage}}}{conceptindex}{\idxconcept{#1}|idxbfpage}{}}
\newcommand{\defexposconcept}[1]{\hiddenindexlink{\indexedspan{\ecname{#1}}{\indexconcept{\idxexposconcept{#1}|idxbfpage}}}{conceptindex}{\idxexposconcept{#1}|idxbfpage}{}}
\newcommand{\exposconcept}[1]{\indexlink{\indexedspan{\ecname{#1}}{\indexconcept{\idxexposconcept{#1}}}}{conceptindex}{\idxexposconcept{#1}|idxbfpage}{}}
\newcommand{\exposconceptx}[2]{\indexedspan{\ecname{#1}}{\indexconcept{\idxexposconcept{#2}}}}
\newcommand{\keyword}[1]{\indexedspan{\tcode{#1}}{\indextext{\idxcode{#1}}}}
\newcommand{\itcorr}[1][]{}
\newcommand{\diffdef}[1]{\break\diffhead{#1}}
\newcommand{\defnx}[2]{\hiddenindexlink{\indexedspan{\textit{#1}}{\indexdefn{#2}}}{generalindex}{#2|idxbfpage}{}}
\newcommand{\defnxname}[1]{\indexedspan{\xname{#1}}{\indextext{\idxxname{#1}}}}
\newcommand{\defnadj}[2]{\indextext{#1 #2|see{#2, #1}}\defnx{#1 #2}{#2!#1}}
\newcommand{\defnadjx}[3]{\indextext{#1 #3|see{#3, #1}}\defnx{#1 #2}{#3!#1}}
\newcommand{\defnlibxname}[1]{\indexedspan{\xname{#1}}{\indexlibrary{\idxxname{#1}}}}
\newcommand{\descr}[1]{\textnormal{#1}}
\newcommand{\cv}{\mathit{cv}}
\newcommand{\texorpdfstring}[2]{#2}
\newcommand{\textunderscore}{_}
\newcommand{\emo}[1]{#1}
\newcommand{\bm}[1]{\textbf{#1}}
\newenvironment{LongTable}[3]
{
\newcommand{\continuedcaption}{\caption[]{#1 (continued)}}
\begin{htmlTable}{#1}{#2}{#3}
\begin{TableBase}
}
{
\bottomline
\end{TableBase}
\end{htmltable}
}