r7rs-small-texinfo

Unnamed repository; edit this file 'description' to name the repository.
git clone https://kaka.farm/~git/r7rs-small-texinfo
Log | Files | Refs | README | LICENSE

r7rs-texinfo-macros.texinfo (3575B)


      1 @c Like @dfn, but correctly produces <dfn>...</dfn> in HTML
      2 @c output. (Why does @dfn produce <em>...</em>?)
      3 @macro define {text}
      4 @dfn{\text\}
      5 @end macro
      6 
      7 @ifhtml
      8 @unmacro define
      9 @macro define {text}
     10 @inlineraw{html, <dfn>\text\</dfn>}
     11 @end macro
     12 @end ifhtml
     13 
     14 @c Produce a header for a Rationale section. We may want to adjust
     15 @c the heading level of this.
     16 @macro rationale
     17 @subheading Rationale:
     18 @end macro
     19 
     20 @c --- Report names.
     21 
     22 @macro rsevenrs
     23 R@sup{7}RS
     24 @end macro
     25 
     26 @macro rfivers
     27 R@sup{5}RS
     28 @end macro
     29 
     30 @macro rsixrs
     31 R@sup{6}RS
     32 @end macro
     33 
     34 @c --- Subscripted variables
     35 
     36 @macro vari {name}
     37 @var{\name\@sub{1}}
     38 @end macro
     39 
     40 @macro varii {name}
     41 @var{\name\@sub{2}}
     42 @end macro
     43 
     44 @macro variii {name}
     45 @var{\name\@sub{3}}
     46 @end macro
     47 
     48 @macro variv {name}
     49 @var{\name\@sub{4}}
     50 @end macro
     51 
     52 @c --- Syntactic variables
     53 
     54 @c These will be presented in angle brackets, which have to be
     55 @c produced differently in TeX output. Because Texinfo has no
     56 @c way to set the font family, we can't reliably display these
     57 @c in a Roman face (as they're displayed in the LaTeX R7RS).
     58 
     59 @c By default, insert Unicode brackets.
     60 @macro svar {name}
     61 @U{27e8}\name\@U{27e9}
     62 @end macro
     63 
     64 @c For TeX output, use raw math-mode snippets.
     65 @c Using @math{...} produces extra space around *name*, for some
     66 @c reason.
     67 @iftex
     68 @unmacro svar
     69 @macro svar {name}
     70 @inlineraw{tex, $\\langle$\name\$\\rangle$}
     71 @end macro
     72 @end iftex
     73 
     74 @c For use in code examples where the default font is not Roman.
     75 @macro rsvar {name}
     76 @r{@svar{\name\}}
     77 @end macro
     78 
     79 @c --- Greek characters.
     80 
     81 @c Apparently lambda, iota, etc. are already in the Texinfo macro
     82 @c namespace (but unusable!) and can't be redefined.
     83 
     84 @c Insert a lower-case lambda.
     85 @macro theultimate
     86 @U{03bb}
     87 @end macro
     88 
     89 @iftex
     90 @unmacro theultimate
     91 @macro theultimate {}
     92 @math{\\lambda}
     93 @end macro
     94 @end iftex
     95 
     96 @c Insert a lower-case pi.
     97 @macro greekpi
     98 @U{03c0}
     99 @end macro
    100 
    101 @iftex
    102 @unmacro greekpi
    103 @macro greekpi {}
    104 @math{\\pi}
    105 @end macro
    106 @end iftex
    107 
    108 @c Insert a lower-case iota.
    109 @macro greekiota {}
    110 @U{03b9}
    111 @end macro
    112 
    113 @iftex
    114 @unmacro greekiota
    115 @macro greekiota {}
    116 @math{\\iota}
    117 @end macro
    118 @end iftex
    119 
    120 @c Insert a lower-case theta.
    121 @macro greektheta
    122 @U{03b8}
    123 @end macro
    124 
    125 @iftex
    126 @unmacro greektheta
    127 @macro greektheta {}
    128 @math{\\theta}
    129 @end macro
    130 @end iftex
    131 
    132 @c Insert a capital sigma.
    133 @macro greekcapitalsigma
    134 @U{03a3}
    135 @end macro
    136 
    137 @iftex
    138 @unmacro greekcapitalsigma
    139 @macro greekcapitalsigma {}
    140 @math{\\Sigma}
    141 @end macro
    142 @end iftex
    143 
    144 @c Insert a lower-case sigma.
    145 @macro greeksmallsigma
    146 @U{03c3}
    147 @end macro
    148 
    149 @iftex
    150 @unmacro greeksmallsigma
    151 @macro greeksmallsigma {}
    152 @math{\\sigma}
    153 @end macro
    154 @end iftex
    155 
    156 @c Insert a lower-case final sigma.
    157 @macro greekfinalsigma
    158 @U{03c2}
    159 @end macro
    160 
    161 @iftex
    162 @unmacro greekfinalsigma
    163 @macro greekfinalsigma {}
    164 @math{\\varsigma}
    165 @end macro
    166 @end iftex
    167 
    168 @c --- Other non-ASCII characters
    169 
    170 @c @dotless doesn't produce Unicode output.
    171 @c Taylan, this is for you.
    172 @macro nodoti
    173 @U{0131}
    174 @end macro
    175 
    176 @iftex
    177 @unmacro nodoti
    178 @macro nodoti
    179 @dotless{i}
    180 @end macro
    181 @end iftex
    182 
    183 @c --- EBNF macros
    184 
    185 @c Zero or more (Kleene star).
    186 @macro arbno {obj}
    187 \obj\@sup{*}
    188 @end macro
    189 
    190 @c One or more.
    191 @macro atleastone {obj}
    192 \obj\@sup{+}
    193 @end macro
    194 
    195 @c Brackets for things that aren't really grammar elements.
    196 @macro pseudoprod {text}
    197 @U{27e8}\text\@U{27e9}
    198 @end macro
    199 
    200 @iftex
    201 @unmacro pseudoprod
    202 @macro pseudoprod {text}
    203 @inlineraw{tex, $\\langle$\text\$\\rangle$}
    204 @end macro
    205 @end iftex
    206 
    207 @c --- Indexing
    208 
    209 @c Add a sharped token to the function index under its the key
    210 @c of the first character after #.
    211 @macro sharpindex {token}
    212 @findex @sortas{\token\} #\token\
    213 @end macro