| Commit | Line | Data |
|---|---|---|
| 92d0a6a6 | 1 | .ig |
| 4d3e9548 JL |
2 | Copyright (C) 1989-2000, 2001, 2004, 2005, 2007, 2009 |
| 3 | Free Software Foundation, Inc. | |
| 92d0a6a6 JR |
4 | |
| 5 | Permission is granted to make and distribute verbatim copies of | |
| 6 | this manual provided the copyright notice and this permission notice | |
| 7 | are preserved on all copies. | |
| 8 | ||
| 9 | Permission is granted to copy and distribute modified versions of this | |
| 10 | manual under the conditions for verbatim copying, provided that the | |
| 11 | entire resulting derived work is distributed under the terms of a | |
| 12 | permission notice identical to this one. | |
| 13 | ||
| 14 | Permission is granted to copy and distribute translations of this | |
| 15 | manual into another language, under the above conditions for modified | |
| 16 | versions, except that this permission notice may be included in | |
| 17 | translations approved by the Free Software Foundation instead of in | |
| 18 | the original English. | |
| 19 | .. | |
| 465b256c JR |
20 | . |
| 21 | . | |
| 22 | .ie \n(.V<\n(.v \ | |
| 23 | . ds tx T\h'-.1667m'\v'.224m'E\v'-.224m'\h'-.125m'X | |
| 24 | .el \ | |
| 25 | . ds tx TeX | |
| 26 | . | |
| 27 | . | |
| 92d0a6a6 JR |
28 | .\" Like TP, but if specified indent is more than half |
| 29 | .\" the current line-length - indent, use the default indent. | |
| 30 | .de Tp | |
| 465b256c JR |
31 | . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP |
| 32 | . el .TP "\\$1" | |
| 33 | .. | |
| 34 | . | |
| 35 | . | |
| 92d0a6a6 JR |
36 | .\" The BSD man macros can't handle " in arguments to font change macros, |
| 37 | .\" so use \(ts instead of ". | |
| 38 | .tr \(ts" | |
| 465b256c JR |
39 | . |
| 40 | . | |
| 92d0a6a6 | 41 | .TH @G@EQN @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" |
| 465b256c JR |
42 | . |
| 43 | . | |
| 92d0a6a6 | 44 | .SH NAME |
| 4d3e9548 | 45 | @g@eqn \- format equations for troff or MathML |
| 465b256c JR |
46 | . |
| 47 | . | |
| 92d0a6a6 | 48 | .SH SYNOPSIS |
| 4d3e9548 | 49 | .SY @g@eqn |
| 92d0a6a6 JR |
50 | .OP \-rvCNR |
| 51 | .OP \-d xy | |
| 52 | .OP \-T name | |
| 53 | .OP \-M dir | |
| 54 | .OP \-f F | |
| 55 | .OP \-s n | |
| 56 | .OP \-p n | |
| 57 | .OP \-m n | |
| 4d3e9548 JL |
58 | .RI [ files\|.\|.\|. ] |
| 59 | .YS | |
| 465b256c JR |
60 | . |
| 61 | .LP | |
| 92d0a6a6 JR |
62 | It is possible to have whitespace between a command line option and its |
| 63 | parameter. | |
| 465b256c JR |
64 | . |
| 65 | . | |
| 92d0a6a6 JR |
66 | .SH DESCRIPTION |
| 67 | This manual page describes the GNU version of | |
| 68 | .BR eqn , | |
| 69 | which is part of the groff document formatting system. | |
| 70 | .B eqn | |
| 71 | compiles descriptions of equations embedded within | |
| 72 | .B troff | |
| 73 | input files into commands that are understood by | |
| 74 | .BR troff . | |
| 75 | Normally, it should be invoked using the | |
| 76 | .B \-e | |
| 77 | option of | |
| 78 | .BR groff . | |
| 79 | The syntax is quite compatible with Unix eqn. | |
| 465b256c JR |
80 | The output of GNU |
| 81 | .B eqn | |
| 82 | cannot be processed with Unix troff; | |
| 92d0a6a6 | 83 | it must be processed with GNU troff. |
| 4d3e9548 | 84 | If no files are given on the command line, the standard input is read. |
| 92d0a6a6 JR |
85 | A filename of |
| 86 | .B \- | |
| 4d3e9548 | 87 | causes the standard input to be read. |
| 465b256c | 88 | . |
| 92d0a6a6 JR |
89 | .LP |
| 90 | .B eqn | |
| 91 | searches for the file | |
| 92 | .B eqnrc | |
| 93 | in the directories given with the | |
| 94 | .B \-M | |
| 95 | option first, then in | |
| 96 | .BR @SYSTEMMACRODIR@ , | |
| 97 | .BR @LOCALMACRODIR@ , | |
| 98 | and finally in the standard macro directory | |
| 99 | .BR @MACRODIR@ . | |
| 465b256c JR |
100 | If it exists, |
| 101 | .B eqn | |
| 4d3e9548 | 102 | processes it before the other input files. |
| 92d0a6a6 JR |
103 | The |
| 104 | .B \-R | |
| 105 | option prevents this. | |
| 465b256c | 106 | . |
| 92d0a6a6 | 107 | .LP |
| 465b256c JR |
108 | GNU |
| 109 | .B eqn | |
| 110 | does not provide the functionality of neqn: | |
| 92d0a6a6 JR |
111 | it does not support low-resolution, typewriter-like devices |
| 112 | (although it may work adequately for very simple input). | |
| 465b256c JR |
113 | . |
| 114 | . | |
| 92d0a6a6 | 115 | .SH OPTIONS |
| 4d3e9548 | 116 | . |
| 92d0a6a6 JR |
117 | .TP |
| 118 | .BI \-d xy | |
| 119 | Specify delimiters | |
| 120 | .I x | |
| 465b256c | 121 | and\~\c |
| 92d0a6a6 JR |
122 | .I y |
| 123 | for the left and right end, respectively, of in-line equations. | |
| 124 | Any | |
| 125 | .B delim | |
| 126 | statements in the source file overrides this. | |
| 465b256c | 127 | . |
| 92d0a6a6 JR |
128 | .TP |
| 129 | .B \-C | |
| 130 | Recognize | |
| 131 | .B .EQ | |
| 132 | and | |
| 133 | .B .EN | |
| 134 | even when followed by a character other than space or newline. | |
| 135 | .TP | |
| 136 | .B \-N | |
| 137 | Don't allow newlines within delimiters. | |
| 138 | This option allows | |
| 139 | .B eqn | |
| 140 | to recover better from missing closing delimiters. | |
| 465b256c | 141 | . |
| 92d0a6a6 JR |
142 | .TP |
| 143 | .B \-v | |
| 144 | Print the version number. | |
| 465b256c | 145 | . |
| 92d0a6a6 JR |
146 | .TP |
| 147 | .B \-r | |
| 148 | Only one size reduction. | |
| 465b256c | 149 | . |
| 92d0a6a6 JR |
150 | .TP |
| 151 | .BI \-m n | |
| 465b256c | 152 | The minimum point-size is\~\c |
| 92d0a6a6 | 153 | .IR n . |
| 465b256c | 154 | .B eqn |
| 4d3e9548 | 155 | does not reduce the size of subscripts or superscripts to |
| 465b256c | 156 | a smaller size than\~\c |
| 92d0a6a6 | 157 | .IR n . |
| 465b256c | 158 | . |
| 92d0a6a6 JR |
159 | .TP |
| 160 | .BI \-T name | |
| 161 | The output is for device | |
| 162 | .IR name . | |
| 4d3e9548 | 163 | Normally, the only effect of this is to define a macro |
| 92d0a6a6 | 164 | .I name |
| 465b256c | 165 | with a value of\~\c |
| 4d3e9548 | 166 | .BR 1 ; |
| 92d0a6a6 | 167 | .B eqnrc |
| 4d3e9548 JL |
168 | uses this to provide definitions appropriate for the output device. |
| 169 | However, if the specified device is \[lq]MathML\[rq], the output is | |
| 170 | MathML markup rather than troff commands, and | |
| 171 | .B eqnrc | |
| 172 | is not loaded at all. | |
| 92d0a6a6 JR |
173 | The default output device is |
| 174 | .BR @DEVICE@ . | |
| 465b256c | 175 | . |
| 92d0a6a6 JR |
176 | .TP |
| 177 | .BI \-M dir | |
| 178 | Search | |
| 179 | .I dir | |
| 180 | for | |
| 181 | .B eqnrc | |
| 182 | before the default directories. | |
| 465b256c | 183 | . |
| 92d0a6a6 JR |
184 | .TP |
| 185 | .B \-R | |
| 186 | Don't load | |
| 187 | .BR eqnrc . | |
| 465b256c | 188 | . |
| 92d0a6a6 JR |
189 | .TP |
| 190 | .BI \-f F | |
| 191 | This is equivalent to a | |
| 192 | .BI gfont\ F | |
| 193 | command. | |
| 465b256c | 194 | . |
| 92d0a6a6 JR |
195 | .TP |
| 196 | .BI \-s n | |
| 197 | This is equivalent to a | |
| 198 | .BI gsize\ n | |
| 199 | command. | |
| 200 | This option is deprecated. | |
| 465b256c | 201 | .B eqn |
| 4d3e9548 | 202 | normally sets equations at whatever the current point size |
| 92d0a6a6 | 203 | is when the equation is encountered. |
| 465b256c | 204 | . |
| 92d0a6a6 JR |
205 | .TP |
| 206 | .BI \-p n | |
| 207 | This says that subscripts and superscripts should be | |
| 465b256c | 208 | .I n\~\c |
| 92d0a6a6 JR |
209 | points smaller than the surrounding text. |
| 210 | This option is deprecated. | |
| 465b256c JR |
211 | Normally |
| 212 | .B eqn | |
| 4d3e9548 JL |
213 | sets subscripts and superscripts at 70% of the size of the |
| 214 | surrounding text. | |
| 465b256c JR |
215 | . |
| 216 | . | |
| 92d0a6a6 | 217 | .SH USAGE |
| 465b256c JR |
218 | Only the differences between GNU |
| 219 | .B eqn | |
| 220 | and Unix eqn are described here. | |
| 221 | . | |
| 92d0a6a6 | 222 | .LP |
| 4d3e9548 | 223 | GNU |
| 465b256c | 224 | .B eqn |
| 4d3e9548 JL |
225 | emits Presentation MathML output when invoked with the |
| 226 | .B "-T\~MathML" | |
| 227 | option. | |
| 228 | . | |
| 229 | .LP | |
| 230 | GNU eqn sets the input token | |
| 231 | .B \&"..." | |
| 232 | as three periods or low dots, rather than the three centered dots of | |
| 233 | classic eqn. To get three centered dots, write | |
| 234 | .B "cdots" | |
| 235 | or | |
| 236 | .BR "cdot cdot cdot". | |
| 237 | . | |
| 238 | .LP | |
| 239 | Most of the new features of the GNU | |
| 240 | .B eqn | |
| 241 | input language are based on \*(tx. | |
| 465b256c JR |
242 | There are some references to the differences between \*(tx and GNU |
| 243 | .B eqn | |
| 244 | below; | |
| 92d0a6a6 | 245 | these may safely be ignored if you do not know \*(tx. |
| 465b256c | 246 | . |
| 92d0a6a6 | 247 | .SS Automatic spacing |
| 92d0a6a6 JR |
248 | .B eqn |
| 249 | gives each component of an equation a type, and adjusts the spacing | |
| 250 | between components using that type. | |
| 251 | Possible types are: | |
| 465b256c JR |
252 | . |
| 253 | .RS | |
| 92d0a6a6 JR |
254 | .TP \w'punctuation'u+2n |
| 255 | ordinary | |
| 465b256c JR |
256 | an ordinary character such as `1' or `\c |
| 257 | .IR x '; | |
| 258 | . | |
| 92d0a6a6 JR |
259 | .TP |
| 260 | operator | |
| 261 | a large operator such as | |
| 465b256c | 262 | .ds Su `\s+5\(*S\s0' |
| 92d0a6a6 JR |
263 | .if \n(.g .if !c\(*S .ds Su the summation operator |
| 264 | \*(Su; | |
| 465b256c | 265 | . |
| 92d0a6a6 JR |
266 | .TP |
| 267 | binary | |
| 465b256c JR |
268 | a binary operator such as `\(pl'; |
| 269 | . | |
| 92d0a6a6 JR |
270 | .TP |
| 271 | relation | |
| 465b256c JR |
272 | a relation such as `='; |
| 273 | . | |
| 92d0a6a6 JR |
274 | .TP |
| 275 | opening | |
| 465b256c JR |
276 | a opening bracket such as `('; |
| 277 | . | |
| 92d0a6a6 JR |
278 | .TP |
| 279 | closing | |
| 465b256c JR |
280 | a closing bracket such as `)'; |
| 281 | . | |
| 92d0a6a6 JR |
282 | .TP |
| 283 | punctuation | |
| 465b256c JR |
284 | a punctuation character such as `,'; |
| 285 | . | |
| 92d0a6a6 JR |
286 | .TP |
| 287 | inner | |
| 288 | a subformula contained within brackets; | |
| 289 | .TP | |
| 290 | suppress | |
| 291 | spacing that suppresses automatic spacing adjustment. | |
| 465b256c JR |
292 | .RE |
| 293 | . | |
| 92d0a6a6 JR |
294 | .LP |
| 295 | Components of an equation get a type in one of two ways. | |
| 465b256c | 296 | . |
| 92d0a6a6 JR |
297 | .TP |
| 298 | .BI type\ t\ e | |
| 465b256c | 299 | This yields an equation component that contains\~\c |
| 92d0a6a6 | 300 | .I e |
| 465b256c | 301 | but that has type\~\c |
| 92d0a6a6 JR |
302 | .IR t , |
| 303 | where | |
| 304 | .I t | |
| 305 | is one of the types mentioned above. | |
| 306 | For example, | |
| 307 | .B times | |
| 308 | is defined as | |
| 465b256c | 309 | . |
| 92d0a6a6 JR |
310 | .RS |
| 311 | .IP | |
| 312 | .B | |
| 313 | type "binary" \e(mu | |
| 314 | .RE | |
| 465b256c | 315 | . |
| 92d0a6a6 JR |
316 | .IP |
| 317 | The name of the type doesn't have to be quoted, but quoting protects | |
| 318 | from macro expansion. | |
| 465b256c | 319 | . |
| 92d0a6a6 JR |
320 | .TP |
| 321 | .BI chartype\ t\ text | |
| 322 | Unquoted groups of characters are split up into individual characters, | |
| 323 | and the type of each character is looked up; | |
| 324 | this changes the type that is stored for each character; | |
| 325 | it says that the characters in | |
| 326 | .I text | |
| 465b256c | 327 | from now on have type\~\c |
| 92d0a6a6 JR |
328 | .IR t . |
| 329 | For example, | |
| 465b256c | 330 | . |
| 92d0a6a6 JR |
331 | .RS |
| 332 | .IP | |
| 333 | .B | |
| 334 | chartype "punctuation" .,;: | |
| 335 | .RE | |
| 465b256c | 336 | . |
| 92d0a6a6 | 337 | .IP |
| 465b256c | 338 | would make the characters `.,;:' have type punctuation |
| 92d0a6a6 | 339 | whenever they subsequently appeared in an equation. |
| 465b256c | 340 | The type\~\c |
| 92d0a6a6 JR |
341 | .I t |
| 342 | can also be | |
| 343 | .B letter | |
| 344 | or | |
| 345 | .BR digit ; | |
| 346 | in these cases | |
| 347 | .B chartype | |
| 348 | changes the font type of the characters. | |
| 465b256c JR |
349 | See the |
| 350 | .B Fonts | |
| 351 | subsection. | |
| 352 | . | |
| 92d0a6a6 JR |
353 | .SS New primitives |
| 354 | .TP | |
| 4d3e9548 JL |
355 | .BI big\ e |
| 356 | Enlarges the expression it modifies; intended to have semantics like | |
| 357 | CSS `large'. | |
| 358 | In troff output, the point size is increased by\~5; | |
| 359 | in MathML output, the expression uses | |
| 360 | . | |
| 361 | .RS | |
| 362 | .IP | |
| 363 | .EX | |
| 364 | <mstyle \%mathsize='big'> | |
| 365 | .EE | |
| 366 | .RE | |
| 367 | . | |
| 368 | .TP | |
| 92d0a6a6 JR |
369 | .IB e1\ smallover\ e2 |
| 370 | This is similar to | |
| 371 | .BR over ; | |
| 372 | .B smallover | |
| 373 | reduces the size of | |
| 374 | .I e1 | |
| 375 | and | |
| 376 | .IR e2 ; | |
| 377 | it also puts less vertical space between | |
| 378 | .I e1 | |
| 379 | or | |
| 380 | .I e2 | |
| 381 | and the fraction bar. | |
| 382 | The | |
| 383 | .B over | |
| 384 | primitive corresponds to the \*(tx | |
| 385 | .B \eover | |
| 386 | primitive in display styles; | |
| 387 | .B smallover | |
| 388 | corresponds to | |
| 389 | .B \eover | |
| 390 | in non-display styles. | |
| 465b256c | 391 | . |
| 92d0a6a6 JR |
392 | .TP |
| 393 | .BI vcenter\ e | |
| 394 | This vertically centers | |
| 395 | .I e | |
| 396 | about the math axis. | |
| 397 | The math axis is the vertical position about which characters | |
| 465b256c | 398 | such as `\(pl' and `\(mi' are centered; also it is the vertical position |
| 92d0a6a6 JR |
399 | used for the bar of fractions. |
| 400 | For example, | |
| 401 | .B sum | |
| 402 | is defined as | |
| 465b256c | 403 | . |
| 92d0a6a6 JR |
404 | .RS |
| 405 | .IP | |
| 406 | .B | |
| 407 | { type "operator" vcenter size +5 \e(*S } | |
| 408 | .RE | |
| 465b256c | 409 | . |
| 4d3e9548 JL |
410 | .IP |
| 411 | (Note that vcenter is silently ignored when generating MathML.) | |
| 412 | . | |
| 92d0a6a6 JR |
413 | .TP |
| 414 | .IB e1\ accent\ e2 | |
| 415 | This sets | |
| 416 | .I e2 | |
| 417 | as an accent over | |
| 418 | .IR e1 . | |
| 419 | .I e2 | |
| 420 | is assumed to be at the correct height for a lowercase letter; | |
| 421 | .I e2 | |
| 4d3e9548 | 422 | is moved down according to whether |
| 92d0a6a6 JR |
423 | .I e1 |
| 424 | is taller or shorter than a lowercase letter. | |
| 425 | For example, | |
| 426 | .B hat | |
| 427 | is defined as | |
| 465b256c | 428 | . |
| 92d0a6a6 JR |
429 | .RS |
| 430 | .IP | |
| 431 | .B | |
| 432 | accent { "^" } | |
| 433 | .RE | |
| 465b256c | 434 | . |
| 92d0a6a6 JR |
435 | .IP |
| 436 | .BR dotdot , | |
| 437 | .BR dot , | |
| 438 | .BR tilde , | |
| 465b256c | 439 | .BR vec , |
| 92d0a6a6 JR |
440 | and |
| 441 | .B dyad | |
| 442 | are also defined using the | |
| 443 | .B accent | |
| 444 | primitive. | |
| 465b256c | 445 | . |
| 92d0a6a6 JR |
446 | .TP |
| 447 | .IB e1\ uaccent\ e2 | |
| 448 | This sets | |
| 449 | .I e2 | |
| 450 | as an accent under | |
| 451 | .IR e1 . | |
| 452 | .I e2 | |
| 453 | is assumed to be at the correct height for a character without a descender; | |
| 454 | .I e2 | |
| 4d3e9548 | 455 | is moved down if |
| 92d0a6a6 JR |
456 | .I e1 |
| 457 | has a descender. | |
| 458 | .B utilde | |
| 459 | is pre-defined using | |
| 460 | .B uaccent | |
| 461 | as a tilde accent below the baseline. | |
| 465b256c | 462 | . |
| 92d0a6a6 JR |
463 | .TP |
| 464 | .BI split\ \(ts text \(ts | |
| 465 | This has the same effect as simply | |
| 465b256c | 466 | . |
| 92d0a6a6 JR |
467 | .RS |
| 468 | .IP | |
| 469 | .I text | |
| 470 | .RE | |
| 465b256c | 471 | . |
| 92d0a6a6 JR |
472 | .IP |
| 473 | but | |
| 474 | .I text | |
| 475 | is not subject to macro expansion because it is quoted; | |
| 476 | .I text | |
| 4d3e9548 | 477 | is split up and the spacing between individual characters is adjusted. |
| 465b256c | 478 | . |
| 92d0a6a6 JR |
479 | .TP |
| 480 | .BI nosplit\ text | |
| 481 | This has the same effect as | |
| 465b256c | 482 | . |
| 92d0a6a6 JR |
483 | .RS |
| 484 | .IP | |
| 485 | .BI \(ts text \(ts | |
| 486 | .RE | |
| 465b256c | 487 | . |
| 92d0a6a6 JR |
488 | .IP |
| 489 | but because | |
| 490 | .I text | |
| 4d3e9548 | 491 | is not quoted it is subject to macro expansion; |
| 92d0a6a6 | 492 | .I text |
| 4d3e9548 JL |
493 | is not split up |
| 494 | and the spacing between individual characters is not adjusted. | |
| 465b256c | 495 | . |
| 92d0a6a6 JR |
496 | .TP |
| 497 | .IB e\ opprime | |
| 498 | This is a variant of | |
| 499 | .B prime | |
| 465b256c | 500 | that acts as an operator on\~\c |
| 92d0a6a6 JR |
501 | .IR e . |
| 502 | It produces a different result from | |
| 503 | .B prime | |
| 504 | in a case such as | |
| 505 | .BR A\ opprime\ sub\ 1 : | |
| 506 | with | |
| 507 | .B opprime | |
| 465b256c | 508 | the\~\c |
| 92d0a6a6 | 509 | .B 1 |
| 4d3e9548 | 510 | is tucked under the prime as a subscript to the\~\c |
| 92d0a6a6 JR |
511 | .B A |
| 512 | (as is conventional in mathematical typesetting), | |
| 513 | whereas with | |
| 514 | .B prime | |
| 465b256c | 515 | the\~\c |
| 92d0a6a6 | 516 | .B 1 |
| 4d3e9548 | 517 | is a subscript to the prime character. |
| 92d0a6a6 JR |
518 | The precedence of |
| 519 | .B opprime | |
| 520 | is the same as that of | |
| 521 | .B bar | |
| 522 | and | |
| 523 | .BR under , | |
| 524 | which is higher than that of everything except | |
| 525 | .B accent | |
| 526 | and | |
| 527 | .BR uaccent . | |
| 465b256c | 528 | In unquoted text a\~\c |
| 92d0a6a6 | 529 | .B ' |
| 4d3e9548 | 530 | that is not the first character is treated like |
| 92d0a6a6 | 531 | .BR opprime . |
| 465b256c | 532 | . |
| 92d0a6a6 JR |
533 | .TP |
| 534 | .BI special\ text\ e | |
| 465b256c | 535 | This constructs a new object from\~\c |
| 92d0a6a6 JR |
536 | .I e |
| 537 | using a | |
| 465b256c | 538 | .BR @g@troff (@MAN1EXT@) |
| 92d0a6a6 JR |
539 | macro named |
| 540 | .IR text . | |
| 541 | When the macro is called, | |
| 542 | the string | |
| 543 | .B 0s | |
| 4d3e9548 | 544 | contains the output for\~\c |
| 92d0a6a6 JR |
545 | .IR e , |
| 546 | and the number registers | |
| 547 | .BR 0w , | |
| 548 | .BR 0h , | |
| 549 | .BR 0d , | |
| 465b256c | 550 | .BR 0skern , |
| 92d0a6a6 JR |
551 | and |
| 552 | .BR 0skew | |
| 4d3e9548 | 553 | contain the width, height, depth, subscript kern, and skew of\~\c |
| 92d0a6a6 JR |
554 | .IR e . |
| 555 | (The | |
| 556 | .I "subscript kern" | |
| 557 | of an object says how much a subscript on that object should be tucked in; | |
| 558 | the | |
| 559 | .I skew | |
| 560 | of an object says how far to the right of the center of the object an | |
| 561 | accent over the object should be placed.) | |
| 562 | The macro must modify | |
| 563 | .B 0s | |
| 4d3e9548 | 564 | so that it outputs the desired result with its origin at the current |
| 92d0a6a6 JR |
565 | point, and increase the current horizontal position by the width |
| 566 | of the object. | |
| 567 | The number registers must also be modified so that they correspond to the | |
| 568 | result. | |
| 465b256c JR |
569 | . |
| 570 | .IP | |
| 92d0a6a6 JR |
571 | For example, suppose you wanted a construct that `cancels' an expression |
| 572 | by drawing a diagonal line through it. | |
| 465b256c JR |
573 | . |
| 574 | .RS | |
| 92d0a6a6 | 575 | .IP |
| 92d0a6a6 JR |
576 | .ft B |
| 577 | .if t .ne 6+\n(.Vu | |
| 465b256c | 578 | .br |
| 92d0a6a6 | 579 | \&.EQ |
| 465b256c | 580 | .br |
| 92d0a6a6 | 581 | define cancel 'special Ca' |
| 465b256c | 582 | .br |
| 92d0a6a6 | 583 | \&.EN |
| 465b256c | 584 | .br |
| 92d0a6a6 | 585 | \&.de Ca |
| 465b256c JR |
586 | .br |
| 587 | \&.\ \ ds 0s \e | |
| 588 | .br | |
| 589 | \eZ'\e\e*(0s'\e | |
| 590 | .br | |
| 591 | \ev'\e\en(0du'\e | |
| 592 | .br | |
| 593 | \eD'l \e\en(0wu -\e\en(0hu-\e\en(0du'\e | |
| 594 | .br | |
| 595 | \ev'\e\en(0hu' | |
| 596 | .br | |
| 92d0a6a6 JR |
597 | \&.. |
| 598 | .ft | |
| 465b256c JR |
599 | .RE |
| 600 | . | |
| 601 | .IP | |
| 602 | Then you could cancel an expression\~\c | |
| 92d0a6a6 JR |
603 | .I e |
| 604 | with | |
| 465b256c JR |
605 | .BI \%cancel\ {\ e\ } |
| 606 | . | |
| 607 | .IP | |
| 92d0a6a6 | 608 | Here's a more complicated construct that draws a box round an expression: |
| 465b256c JR |
609 | . |
| 610 | .RS | |
| 92d0a6a6 | 611 | .IP |
| 92d0a6a6 JR |
612 | .ft B |
| 613 | .if t .ne 11+\n(.Vu | |
| 614 | \&.EQ | |
| 465b256c | 615 | .br |
| 92d0a6a6 | 616 | define box 'special Bx' |
| 465b256c | 617 | .br |
| 92d0a6a6 | 618 | \&.EN |
| 465b256c | 619 | .br |
| 92d0a6a6 | 620 | \&.de Bx |
| 465b256c JR |
621 | .br |
| 622 | \&.\ \ ds 0s \e | |
| 623 | .br | |
| 624 | \eZ'\eh'1n'\e\e*(0s'\e | |
| 625 | .br | |
| 626 | \eZ'\e | |
| 627 | .br | |
| 628 | \ev'\e\en(0du+1n'\e | |
| 629 | .br | |
| 630 | \eD'l \e\en(0wu+2n 0'\e | |
| 631 | .br | |
| 632 | \eD'l 0 -\e\en(0hu-\e\en(0du-2n'\e | |
| 633 | .br | |
| 634 | \eD'l -\e\en(0wu-2n 0'\e | |
| 635 | .br | |
| 636 | \eD'l 0 \e\en(0hu+\e\en(0du+2n'\e | |
| 637 | .br | |
| 638 | \&'\e | |
| 639 | .br | |
| 640 | \eh'\e\en(0wu+2n' | |
| 641 | .br | |
| 642 | \&.\ \ nr 0w +2n | |
| 643 | .br | |
| 644 | \&.\ \ nr 0d +1n | |
| 645 | .br | |
| 646 | \&.\ \ nr 0h +1n | |
| 647 | .br | |
| 92d0a6a6 JR |
648 | \&.. |
| 649 | .ft | |
| 92d0a6a6 | 650 | .RE |
| 465b256c JR |
651 | . |
| 652 | .TP | |
| 653 | .BI space\ n | |
| 654 | A positive value of the integer\~\c | |
| 655 | .I n | |
| 656 | (in hundredths of an em) sets the vertical spacing before the equation, | |
| 657 | a negative value sets the spacing after the equation, replacing the | |
| 658 | default values. | |
| 659 | This primitive provides an interface to | |
| 660 | .BR groff 's | |
| 661 | .B \ex | |
| 662 | escape (but with opposite sign). | |
| 663 | . | |
| 664 | .IP | |
| 665 | This keyword has no effect if the equation is part of a | |
| 666 | .B pic | |
| 667 | picture. | |
| 668 | . | |
| 669 | .SS Extended primitives | |
| 670 | .TP | |
| 671 | .BI col\ n\ {\ .\|.\|.\ } | |
| 672 | .TQ | |
| 673 | .BI ccol\ n\ {\ .\|.\|.\ } | |
| 674 | .TQ | |
| 675 | .BI lcol\ n\ {\ .\|.\|.\ } | |
| 676 | .TQ | |
| 677 | .BI rcol\ n\ {\ .\|.\|.\ } | |
| 678 | .TQ | |
| 679 | .BI pile\ n\ {\ .\|.\|.\ } | |
| 680 | .TQ | |
| 681 | .BI cpile\ n\ {\ .\|.\|.\ } | |
| 682 | .TQ | |
| 683 | .BI lpile\ n\ {\ .\|.\|.\ } | |
| 684 | .TQ | |
| 685 | .BI rpile\ n\ {\ .\|.\|.\ } | |
| 686 | The integer value\~\c | |
| 687 | .I n | |
| 688 | (in hundredths of an em) increases the vertical spacing between rows, | |
| 689 | using | |
| 690 | .BR groff 's | |
| 691 | .B \ex | |
| 4d3e9548 | 692 | escape (the value has no effect in MathML mode). |
| 465b256c JR |
693 | Negative values are possible but have no effect. |
| 694 | If there is more than a single value given in a matrix, the biggest one | |
| 695 | is used. | |
| 696 | . | |
| 92d0a6a6 | 697 | .SS Customization |
| 4d3e9548 JL |
698 | When |
| 699 | .B eqn | |
| 700 | is generating troff markup, the appearance of equations is controlled | |
| 701 | by a large number of parameters. They have no effect when generating | |
| 702 | MathML mode, which pushes typesetting and fine motions downstream to | |
| 703 | a MathML rendering engine. | |
| 704 | These parameters can be set using the | |
| 92d0a6a6 JR |
705 | .B set |
| 706 | command. | |
| 465b256c | 707 | . |
| 92d0a6a6 JR |
708 | .TP |
| 709 | .BI set\ p\ n | |
| 465b256c | 710 | This sets parameter\~\c |
| 92d0a6a6 | 711 | .I p |
| 465b256c JR |
712 | to value\~\c |
| 713 | .IR n ; | |
| 714 | .I n\~\c | |
| 92d0a6a6 JR |
715 | is an integer. |
| 716 | For example, | |
| 465b256c | 717 | . |
| 92d0a6a6 JR |
718 | .RS |
| 719 | .IP | |
| 720 | .B | |
| 721 | set x_height 45 | |
| 722 | .RE | |
| 465b256c | 723 | . |
| 92d0a6a6 JR |
724 | .IP |
| 725 | says that | |
| 726 | .B eqn | |
| 465b256c JR |
727 | should assume an x\~height of 0.45\~ems. |
| 728 | . | |
| 92d0a6a6 JR |
729 | .RS |
| 730 | .LP | |
| 731 | Possible parameters are as follows. | |
| 732 | Values are in units of hundredths of an em unless otherwise stated. | |
| 733 | These descriptions are intended to be expository rather than | |
| 734 | definitive. | |
| 465b256c JR |
735 | . |
| 736 | .ie t \ | |
| 737 | . TP \w'\fBdefault_rule_thickness'u+2n | |
| 738 | .el \ | |
| 739 | . TP | |
| 92d0a6a6 JR |
740 | .B minimum_size |
| 741 | .B eqn | |
| 4d3e9548 | 742 | doesn't set anything at a smaller point-size than this. |
| 92d0a6a6 | 743 | The value is in points. |
| 465b256c | 744 | . |
| 92d0a6a6 JR |
745 | .TP |
| 746 | .B fat_offset | |
| 747 | The | |
| 748 | .B fat | |
| 749 | primitive emboldens an equation | |
| 750 | by overprinting two copies of the equation | |
| 751 | horizontally offset by this amount. | |
| 4d3e9548 JL |
752 | This parameter is not used in MathML mode; instead, fat text uses |
| 753 | . | |
| 754 | .RS | |
| 755 | .IP | |
| 756 | .EX | |
| 757 | <mstyle mathvariant='double-struck'> | |
| 758 | .EE | |
| 759 | .RE | |
| 465b256c | 760 | . |
| 92d0a6a6 JR |
761 | .TP |
| 762 | .B over_hang | |
| 4d3e9548 | 763 | A fraction bar is longer by twice this amount than |
| 92d0a6a6 | 764 | the maximum of the widths of the numerator and denominator; |
| 4d3e9548 | 765 | in other words, it overhangs the numerator and |
| 92d0a6a6 | 766 | denominator by at least this amount. |
| 465b256c | 767 | . |
| 92d0a6a6 JR |
768 | .TP |
| 769 | .B accent_width | |
| 770 | When | |
| 771 | .B bar | |
| 772 | or | |
| 773 | .B under | |
| 774 | is applied to a single character, | |
| 4d3e9548 | 775 | the line is this long. |
| 92d0a6a6 JR |
776 | Normally, |
| 777 | .B bar | |
| 778 | or | |
| 779 | .B under | |
| 780 | produces a line whose length is the width of the object to which it applies; | |
| 781 | in the case of a single character, | |
| 782 | this tends to produce a line that looks too long. | |
| 465b256c | 783 | . |
| 92d0a6a6 JR |
784 | .TP |
| 785 | .B delimiter_factor | |
| 786 | Extensible delimiters produced with the | |
| 787 | .B left | |
| 788 | and | |
| 789 | .B right | |
| 4d3e9548 | 790 | primitives have a combined height and depth of at least this many |
| 92d0a6a6 JR |
791 | thousandths of twice the maximum amount by which the sub-equation that |
| 792 | the delimiters enclose extends away from the axis. | |
| 465b256c | 793 | . |
| 92d0a6a6 JR |
794 | .TP |
| 795 | .B delimiter_shortfall | |
| 796 | Extensible delimiters produced with the | |
| 797 | .B left | |
| 798 | and | |
| 799 | .B right | |
| 4d3e9548 | 800 | primitives have a combined height and depth |
| 92d0a6a6 JR |
801 | not less than the difference of |
| 802 | twice the maximum amount by which the sub-equation that | |
| 803 | the delimiters enclose extends away from the axis | |
| 804 | and this amount. | |
| 465b256c | 805 | . |
| 92d0a6a6 JR |
806 | .TP |
| 807 | .B null_delimiter_space | |
| 808 | This much horizontal space is inserted | |
| 809 | on each side of a fraction. | |
| 465b256c | 810 | . |
| 92d0a6a6 JR |
811 | .TP |
| 812 | .B script_space | |
| 813 | The width of subscripts and superscripts is increased by this amount. | |
| 465b256c | 814 | . |
| 92d0a6a6 JR |
815 | .TP |
| 816 | .B thin_space | |
| 817 | This amount of space is automatically inserted after punctuation | |
| 818 | characters. | |
| 465b256c | 819 | . |
| 92d0a6a6 JR |
820 | .TP |
| 821 | .B medium_space | |
| 822 | This amount of space is automatically inserted on either side | |
| 823 | of binary operators. | |
| 465b256c | 824 | . |
| 92d0a6a6 JR |
825 | .TP |
| 826 | .B thick_space | |
| 827 | This amount of space is automatically inserted on either side of | |
| 828 | relations. | |
| 465b256c | 829 | . |
| 92d0a6a6 JR |
830 | .TP |
| 831 | .B x_height | |
| 465b256c JR |
832 | The height of lowercase letters without ascenders such as `x'. |
| 833 | . | |
| 92d0a6a6 JR |
834 | .TP |
| 835 | .B axis_height | |
| 836 | The height above the baseline of the center of characters | |
| 465b256c | 837 | such as `\(pl' and `\(mi'. |
| 92d0a6a6 JR |
838 | It is important that this value is correct for the font |
| 839 | you are using. | |
| 465b256c | 840 | . |
| 92d0a6a6 JR |
841 | .TP |
| 842 | .B default_rule_thickness | |
| 843 | This should set to the thickness of the | |
| 844 | .B \e(ru | |
| 845 | character, or the thickness of horizontal lines produced with the | |
| 846 | .B \eD | |
| 847 | escape sequence. | |
| 465b256c | 848 | . |
| 92d0a6a6 JR |
849 | .TP |
| 850 | .B num1 | |
| 851 | The | |
| 852 | .B over | |
| 4d3e9548 | 853 | command shifts up the numerator by at least this amount. |
| 465b256c | 854 | . |
| 92d0a6a6 JR |
855 | .TP |
| 856 | .B num2 | |
| 857 | The | |
| 858 | .B smallover | |
| 4d3e9548 | 859 | command shifts up the numerator by at least this amount. |
| 465b256c | 860 | . |
| 92d0a6a6 JR |
861 | .TP |
| 862 | .B denom1 | |
| 863 | The | |
| 864 | .B over | |
| 4d3e9548 | 865 | command shifts down the denominator by at least this amount. |
| 465b256c | 866 | . |
| 92d0a6a6 JR |
867 | .TP |
| 868 | .B denom2 | |
| 869 | The | |
| 870 | .B smallover | |
| 4d3e9548 | 871 | command shifts down the denominator by at least this amount. |
| 465b256c | 872 | . |
| 92d0a6a6 JR |
873 | .TP |
| 874 | .B sup1 | |
| 4d3e9548 | 875 | Normally superscripts are shifted up by at least this amount. |
| 465b256c | 876 | . |
| 92d0a6a6 JR |
877 | .TP |
| 878 | .B sup2 | |
| 879 | Superscripts within superscripts or upper limits | |
| 880 | or numerators of | |
| 881 | .B smallover | |
| 882 | fractions | |
| 4d3e9548 | 883 | are shifted up by at least this amount. |
| 92d0a6a6 | 884 | This is usually less than sup1. |
| 465b256c | 885 | . |
| 92d0a6a6 JR |
886 | .TP |
| 887 | .B sup3 | |
| 888 | Superscripts within denominators or square roots | |
| 4d3e9548 | 889 | or subscripts or lower limits are shifted up by at least |
| 92d0a6a6 JR |
890 | this amount. |
| 891 | This is usually less than sup2. | |
| 465b256c | 892 | . |
| 92d0a6a6 JR |
893 | .TP |
| 894 | .B sub1 | |
| 4d3e9548 | 895 | Subscripts are normally shifted down by at least this amount. |
| 465b256c | 896 | . |
| 92d0a6a6 JR |
897 | .TP |
| 898 | .B sub2 | |
| 899 | When there is both a subscript and a superscript, the subscript | |
| 4d3e9548 | 900 | is shifted down by at least this amount. |
| 465b256c | 901 | . |
| 92d0a6a6 JR |
902 | .TP |
| 903 | .B sup_drop | |
| 4d3e9548 | 904 | The baseline of a superscript is no more |
| 92d0a6a6 JR |
905 | than this much amount below the top of the object on |
| 906 | which the superscript is set. | |
| 465b256c | 907 | . |
| 92d0a6a6 JR |
908 | .TP |
| 909 | .B sub_drop | |
| 4d3e9548 | 910 | The baseline of a subscript is at least this much below |
| 92d0a6a6 | 911 | the bottom of the object on which the subscript is set. |
| 465b256c | 912 | . |
| 92d0a6a6 JR |
913 | .TP |
| 914 | .B big_op_spacing1 | |
| 4d3e9548 | 915 | The baseline of an upper limit is at least this |
| 92d0a6a6 | 916 | much above the top of the object on which the limit is set. |
| 465b256c | 917 | . |
| 92d0a6a6 JR |
918 | .TP |
| 919 | .B big_op_spacing2 | |
| 4d3e9548 | 920 | The baseline of a lower limit is at least this |
| 92d0a6a6 | 921 | much below the bottom of the object on which the limit is set. |
| 465b256c | 922 | . |
| 92d0a6a6 JR |
923 | .TP |
| 924 | .B big_op_spacing3 | |
| 4d3e9548 | 925 | The bottom of an upper limit is at least this much above the |
| 92d0a6a6 | 926 | top of the object on which the limit is set. |
| 465b256c | 927 | . |
| 92d0a6a6 JR |
928 | .TP |
| 929 | .B big_op_spacing4 | |
| 4d3e9548 | 930 | The top of a lower limit is at least this much below |
| 92d0a6a6 | 931 | the bottom of the object on which the limit is set. |
| 465b256c | 932 | . |
| 92d0a6a6 JR |
933 | .TP |
| 934 | .B big_op_spacing5 | |
| 4d3e9548 | 935 | This much vertical space is added above and below limits. |
| 465b256c | 936 | . |
| 92d0a6a6 JR |
937 | .TP |
| 938 | .B baseline_sep | |
| 4d3e9548 | 939 | The baselines of the rows in a pile or matrix are normally |
| 92d0a6a6 JR |
940 | this far apart. |
| 941 | In most cases this should be equal to the sum of | |
| 942 | .B num1 | |
| 943 | and | |
| 944 | .BR denom1 . | |
| 465b256c | 945 | . |
| 92d0a6a6 JR |
946 | .TP |
| 947 | .B shift_down | |
| 948 | The midpoint between the top baseline and the bottom baseline | |
| 4d3e9548 | 949 | in a matrix or pile is shifted down by this much from the axis. |
| 92d0a6a6 JR |
950 | In most cases this should be equal to |
| 951 | .BR axis_height . | |
| 465b256c | 952 | . |
| 92d0a6a6 JR |
953 | .TP |
| 954 | .B column_sep | |
| 4d3e9548 | 955 | This much space is added between columns in a matrix. |
| 465b256c | 956 | . |
| 92d0a6a6 JR |
957 | .TP |
| 958 | .B matrix_side_sep | |
| 4d3e9548 | 959 | This much space is added at each side of a matrix. |
| 465b256c | 960 | . |
| 92d0a6a6 JR |
961 | .TP |
| 962 | .B draw_lines | |
| 4d3e9548 | 963 | If this is non-zero, lines are drawn using the |
| 92d0a6a6 JR |
964 | .B \eD |
| 965 | escape sequence, rather than with the | |
| 966 | .B \el | |
| 967 | escape sequence and the | |
| 968 | .B \e(ru | |
| 969 | character. | |
| 465b256c | 970 | . |
| 92d0a6a6 JR |
971 | .TP |
| 972 | .B body_height | |
| 973 | The amount by which the height of the equation exceeds this | |
| 4d3e9548 | 974 | is added as extra space before the line containing the equation |
| 92d0a6a6 | 975 | (using |
| 465b256c | 976 | .BR \ex ). |
| 92d0a6a6 | 977 | The default value is 85. |
| 465b256c | 978 | . |
| 92d0a6a6 JR |
979 | .TP |
| 980 | .B body_depth | |
| 981 | The amount by which the depth of the equation exceeds this | |
| 4d3e9548 | 982 | is added as extra space after the line containing the equation |
| 92d0a6a6 | 983 | (using |
| 465b256c | 984 | .BR \ex ). |
| 92d0a6a6 | 985 | The default value is 35. |
| 465b256c | 986 | . |
| 92d0a6a6 JR |
987 | .TP |
| 988 | .B nroff | |
| 989 | If this is non-zero, | |
| 990 | then | |
| 991 | .B ndefine | |
| 4d3e9548 | 992 | behaves like |
| 92d0a6a6 JR |
993 | .B define |
| 994 | and | |
| 995 | .B tdefine | |
| 4d3e9548 | 996 | is ignored, |
| 92d0a6a6 JR |
997 | otherwise |
| 998 | .B tdefine | |
| 4d3e9548 | 999 | behaves like |
| 92d0a6a6 JR |
1000 | .B define |
| 1001 | and | |
| 1002 | .B ndefine | |
| 4d3e9548 | 1003 | is ignored. |
| 465b256c JR |
1004 | The default value is\~0 |
| 1005 | (This is typically changed to\~1 by the | |
| 92d0a6a6 JR |
1006 | .B eqnrc |
| 1007 | file for the | |
| 1008 | .BR ascii , | |
| 1009 | .BR latin1 , | |
| 1010 | .BR utf8 , | |
| 1011 | and | |
| 1012 | .B cp1047 | |
| 1013 | devices.) | |
| 465b256c | 1014 | . |
| 92d0a6a6 JR |
1015 | .LP |
| 1016 | A more precise description of the role of many of these | |
| 465b256c JR |
1017 | parameters can be found in Appendix\~H of |
| 1018 | .IR "The \*(txbook" . | |
| 92d0a6a6 | 1019 | .RE |
| 465b256c | 1020 | . |
| 92d0a6a6 JR |
1021 | .SS Macros |
| 1022 | Macros can take arguments. | |
| 1023 | In a macro body, | |
| 1024 | .BI $ n | |
| 1025 | where | |
| 1026 | .I n | |
| 465b256c | 1027 | is between 1 and\~9, |
| 4d3e9548 | 1028 | is replaced by the |
| 92d0a6a6 JR |
1029 | .IR n-th |
| 1030 | argument if the macro is called with arguments; | |
| 1031 | if there are fewer than | |
| 465b256c | 1032 | .I n\~\c |
| 4d3e9548 | 1033 | arguments, it is replaced by nothing. |
| 92d0a6a6 JR |
1034 | A word containing a left parenthesis where the part of the word |
| 1035 | before the left parenthesis has been defined using the | |
| 1036 | .B define | |
| 1037 | command | |
| 4d3e9548 | 1038 | is recognized as a macro call with arguments; |
| 92d0a6a6 | 1039 | characters following the left parenthesis |
| 4d3e9548 | 1040 | up to a matching right parenthesis are treated as comma-separated |
| 92d0a6a6 JR |
1041 | arguments; |
| 1042 | commas inside nested parentheses do not terminate an argument. | |
| 465b256c | 1043 | . |
| 92d0a6a6 JR |
1044 | .TP |
| 1045 | .BI sdefine\ name\ X\ anything\ X | |
| 1046 | This is like the | |
| 1047 | .B define | |
| 1048 | command, but | |
| 1049 | .I name | |
| 4d3e9548 | 1050 | is not recognized if called with arguments. |
| 465b256c | 1051 | . |
| 92d0a6a6 JR |
1052 | .TP |
| 1053 | .BI include\ \(ts file \(ts | |
| 465b256c JR |
1054 | .TQ |
| 1055 | .BI copy\ \(ts file \(ts | |
| 92d0a6a6 | 1056 | Include the contents of |
| 465b256c JR |
1057 | .I file |
| 1058 | .RB ( include | |
| 1059 | and | |
| 1060 | .B copy | |
| 1061 | are synonyms). | |
| 92d0a6a6 JR |
1062 | Lines of |
| 1063 | .I file | |
| 1064 | beginning with | |
| 1065 | .B .EQ | |
| 1066 | or | |
| 1067 | .B .EN | |
| 4d3e9548 | 1068 | are ignored. |
| 465b256c | 1069 | . |
| 92d0a6a6 JR |
1070 | .TP |
| 1071 | .BI ifdef\ name\ X\ anything\ X | |
| 1072 | If | |
| 1073 | .I name | |
| 1074 | has been defined by | |
| 1075 | .B define | |
| 1076 | (or has been automatically defined because | |
| 1077 | .I name | |
| 1078 | is the output device) | |
| 1079 | process | |
| 1080 | .IR anything ; | |
| 1081 | otherwise ignore | |
| 1082 | .IR anything . | |
| 1083 | .I X | |
| 1084 | can be any character not appearing in | |
| 1085 | .IR anything . | |
| 465b256c JR |
1086 | . |
| 1087 | .TP | |
| 1088 | .BI undef\ name | |
| 1089 | Remove definition of | |
| 1090 | .IR name , | |
| 1091 | making it undefined. | |
| 1092 | . | |
| 1093 | .LP | |
| 1094 | Besides the macros mentioned above, the following definitions are available: | |
| 1095 | .BR Alpha , | |
| 1096 | .BR Beta , | |
| 1097 | \&.\|.\|., | |
| 1098 | .B Omega | |
| 1099 | (this is the same as | |
| 1100 | .BR ALPHA , | |
| 1101 | .BR BETA , | |
| 1102 | \&.\|.\|., | |
| 1103 | .BR OMEGA ), | |
| 1104 | .B ldots | |
| 1105 | (three dots on the base line), | |
| 1106 | and | |
| 1107 | .BR dollar . | |
| 1108 | . | |
| 92d0a6a6 JR |
1109 | .SS Fonts |
| 1110 | .B eqn | |
| 1111 | normally uses at least two fonts to set an equation: | |
| 1112 | an italic font for letters, | |
| 1113 | and a roman font for everything else. | |
| 1114 | The existing | |
| 1115 | .B gfont | |
| 1116 | command | |
| 1117 | changes the font that is used as the italic font. | |
| 465b256c | 1118 | By default this is\~\c |
| 92d0a6a6 JR |
1119 | .BR I . |
| 1120 | The font that is used as the roman font can be changed | |
| 1121 | using the new | |
| 1122 | .B grfont | |
| 1123 | command. | |
| 465b256c | 1124 | . |
| 92d0a6a6 JR |
1125 | .TP |
| 1126 | .BI grfont\ f | |
| 465b256c | 1127 | Set the roman font to\~\c |
| 92d0a6a6 | 1128 | .IR f . |
| 465b256c | 1129 | . |
| 92d0a6a6 JR |
1130 | .LP |
| 1131 | The | |
| 1132 | .B italic | |
| 1133 | primitive uses the current italic font set by | |
| 1134 | .BR gfont ; | |
| 1135 | the | |
| 1136 | .B roman | |
| 1137 | primitive uses the current roman font set by | |
| 1138 | .BR grfont . | |
| 1139 | There is also a new | |
| 1140 | .B gbfont | |
| 1141 | command, which changes the font used by the | |
| 1142 | .B bold | |
| 1143 | primitive. | |
| 1144 | If you only use the | |
| 1145 | .BR roman , | |
| 1146 | .B italic | |
| 1147 | and | |
| 1148 | .B bold | |
| 1149 | primitives to changes fonts within an equation, | |
| 1150 | you can change all the fonts used by your equations | |
| 1151 | just by using | |
| 1152 | .BR gfont , | |
| 1153 | .B grfont | |
| 1154 | and | |
| 1155 | .B gbfont | |
| 1156 | commands. | |
| 465b256c | 1157 | . |
| 92d0a6a6 JR |
1158 | .LP |
| 1159 | You can control which characters are treated as letters | |
| 1160 | (and therefore set in italics) by using the | |
| 1161 | .B chartype | |
| 1162 | command described above. | |
| 1163 | A type of | |
| 1164 | .B letter | |
| 4d3e9548 | 1165 | causes a character to be set in italic type. |
| 92d0a6a6 JR |
1166 | A type of |
| 1167 | .B digit | |
| 4d3e9548 | 1168 | causes a character to be set in roman type. |
| 465b256c JR |
1169 | . |
| 1170 | . | |
| 92d0a6a6 JR |
1171 | .SH FILES |
| 1172 | .Tp \w'\fB@MACRODIR@/eqnrc'u+2n | |
| 1173 | .B @MACRODIR@/eqnrc | |
| 1174 | Initialization file. | |
| 465b256c | 1175 | . |
| 4d3e9548 JL |
1176 | .SH MATHML MODE LIMITATIONS |
| 1177 | MathML is designed on the assumption that it cannot know the exact | |
| 1178 | physical characteristics of the media and devices on which it will | |
| 1179 | be rendered. | |
| 1180 | It does not support fine control of motions and sizes to the same | |
| 1181 | degree troff does. | |
| 1182 | Thus: | |
| 1183 | . | |
| 1184 | .IP * | |
| 1185 | .B eqn | |
| 1186 | parameters have no effect on the generated MathML. | |
| 1187 | . | |
| 1188 | .IP * | |
| 1189 | The | |
| 1190 | .BR special, | |
| 1191 | .BR up , | |
| 1192 | .BR down , | |
| 1193 | .BR fwd , | |
| 1194 | and | |
| 1195 | .B back | |
| 1196 | operations cannot be implemented, and yield a | |
| 1197 | MathML `<merror>' message instead. | |
| 1198 | . | |
| 1199 | .IP * | |
| 1200 | The | |
| 1201 | .B vcenter | |
| 1202 | keyword is silently ignored, as centering on the math axis is the | |
| 1203 | MathML default. | |
| 1204 | . | |
| 1205 | .IP * | |
| 1206 | Characters that | |
| 1207 | .B eqn | |
| 1208 | over troff sets extra large \(en notably the integral sign \(en | |
| 1209 | may appear too small and need to have their `<mstyle>' wrappers | |
| 1210 | adjusted by hand. | |
| 1211 | . | |
| 1212 | .LP | |
| 1213 | As in its troff mode, | |
| 1214 | .B eqn | |
| 1215 | in MathML mode leaves the | |
| 1216 | .B .EQ | |
| 1217 | and | |
| 1218 | .B .EN | |
| 1219 | delimiters in place for displayed equations, but emits no explicit | |
| 1220 | delimiters around inline equations. | |
| 1221 | They can, however, be recognized as strings that begin with `<math>' | |
| 1222 | and end with `</math>' and do not cross line boundaries. | |
| 1223 | . | |
| 1224 | .LP | |
| 1225 | See the | |
| 1226 | .B BUGS | |
| 1227 | section for translation limits specific to | |
| 1228 | .BR eqn . | |
| 1229 | . | |
| 465b256c | 1230 | . |
| 92d0a6a6 | 1231 | .SH BUGS |
| 4d3e9548 | 1232 | Inline equations are set at the point size that is current at the |
| 92d0a6a6 | 1233 | beginning of the input line. |
| 4d3e9548 JL |
1234 | .LP |
| 1235 | In MathML mode, the | |
| 1236 | .B mark | |
| 1237 | and | |
| 1238 | .B lineup | |
| 1239 | features don't work. | |
| 1240 | These could, in theory, be implemented with `<maligngroup>' elements. | |
| 1241 | .LP | |
| 1242 | In MathML mode, each digit of a numeric literal gets a separate | |
| 1243 | `<mn>\:</mn>' pair, and decimal points are tagged with `<mo>\:</mo>'. | |
| 1244 | This is allowed by the specification, but inefficient. | |
| 465b256c JR |
1245 | . |
| 1246 | . | |
| 92d0a6a6 JR |
1247 | .SH "SEE ALSO" |
| 1248 | .BR groff (@MAN1EXT@), | |
| 1249 | .BR @g@troff (@MAN1EXT@), | |
| 465b256c | 1250 | .BR @g@pic (@MAN1EXT@), |
| 92d0a6a6 JR |
1251 | .BR groff_font (@MAN5EXT@), |
| 1252 | .I The\ \*(txbook | |
| 1253 | . | |
| 1254 | .\" Local Variables: | |
| 1255 | .\" mode: nroff | |
| 1256 | .\" End: |