checkeq (帮助描述方程的语言处理器)

小猪老师 发表于 2020-07-20 14:29
浏览次数:
在手机上阅读

在类unix操作系统上,eqn和neqn命令是帮助描述方程的语言处理器。 eqn是troff的预处理器,适用于能够打印troff输出的设备。 neqn是nroff的预处理器,用于终端。

查看英文版

目录

1 checkeq 运行系统环境

2 checkeq 描述

3 checkeq 语法

4 checkeq 示例

checkeq 运行系统环境

Unix&Linux

checkeq 描述

eqn将嵌入在troff输入文件中的方程描述编译为troff可以理解的命令。

如果命令行上没有给出文件,则读取标准输入。

文件名为-将读取标准输入。


eqn首先在带-M选项的目录中搜索eqnrc文件,然后在/usr/lib/groff/site-tmac、/usr/share/groff/site-tmac中搜索,最后在标准宏目录/usr/share/groff/1.22.1/ tmac中搜索。

如果它存在,eqn会在其他输入文件之前处理它。

r选项可以防止这种情况发生。

eqn compiles descriptions of equations embedded within troff input files into commands that are understood by troff. If no files are given on the command line, the standard input is read. A file name of - causes the standard input to be read.

eqn searches for the file eqnrc in the directories given with the -M option first, then in /usr/lib/groff/site-tmac, /usr/share/groff/site-tmac, and finally in the standard macro directory /usr/share/groff/1.22.1/tmac. If it exists, eqn processes it before the other input files. The -R option prevents this.

查看英文版

查看中文版

checkeq 语法

eqn [-rvCNR] [-d xy] [-T name] [-M dir] [-f F] [-s n] [-p n] [-m n] [files...]
neqn [file]
checkeq [file]

-dxy

分别为嵌入式方程式的左端和右端指定定界符 x和y。源文件中的所有delim语句都将覆盖此内容。

-C

即使后面跟空格或换行符,也要识别.EQ和.EN。

-N

禁止在定界符内使用换行符。此选项使eqn可以从丢失的结束定界符中更好地恢复。

-v

打印版本号。

-r

仅缩小一个尺寸。

-mn

最小点大小为n。eqn不会将下标或上标的大小减小到小于n的大小。

-Tname

输出用于设备名称。这样做的唯一作用是定义一个值为1的宏名称。

通常,eqnrc将使用它来提供适合于输出设备的定义。默认输出设备是ps。

-Mdir

搜索目录为eqnrc之前的默认目录。

-R

不要加载eqnrc。

-fF

这等效于gfont F命令。

-sn

这等效于gsize n命令。

不建议使用此选项。当遇到等式时,eqn通常会将等式设置为当前点的大小。

-pn

这表示下标和上标应比周围的文本小n个点。

不建议使用此选项。通常,eqn使集下标和上标占周围文本大小的70%。

使用较新版本的GNU eqn

GNU eqn的大多数新功能都基于TeX。下面有一些关于TeX和GNU eqn之间差异的参考。

自动间距

eqn为方程式的每个组成部分指定一种类型,并使用该类型调整组成部分之间的间距。可能的类型是:

ordinary

普通字符,例如“ 1 ”或“ x ”

operator

大型运算符,例如“ > ”

binary

二进制运算符,例如' + '

relation

诸如' = ' 的关系

opening

诸如'  '

closing

右括号,例如'  '

punctuation

标点符号,例如'  '

inner

方括号中包含的子公式

suppress

抑制自动间距调整的间距

方程的组成部分可以通过以下两种方式之一获得类型:

type t e

这将产生一个包含e但类型为t的方程组件,其中t是上述类型之一。

例如,时间定义为

输入“ binary” \(mu

类型的名称不必用引号引起来,但是引号可以防止宏扩展。

chartype t text

未加引号的字符组被分成单个字符,并查找每个字符的类型。

这会更改为每个字符存储的类型;它说从现在开始文本中的字符的类型为t。例如,

字符型“标点符号”。,;:

每当它们随后出现在等式中时,都会使字符' 。,;: '具有标点符号。

类型t也可以是字母或数字。在这些情况下,chartype更改字符的字体类型。

新原语

e1 smallover e2

这类似于结束 ; smallover减小e1和e2的大小;

它还在e1或e2与分数栏之间放置了较少的垂直空间。

所述过原语对应于的TeX \超过在显示样式原始; smallover对应于非显示样式中的\ over。

vcenter e

这使e围绕数学轴垂直居中。数学轴是垂直位置,例如“ +”和“-”等字符居中。

也是分数栏的垂直位置。例如,sum被定义为

{输入“ operator” vcenter大小+5 \(* S}

e1 accent e2

这会将e2设置为e1的重音。假设e2处于小写字母的正确高度;

如果e1大于或小于小写字母,则e2将向下移动。例如,帽子被定义为

重音{“ ^”}

dotdot,dot,tilde,vec和dyad也使用重音原语定义。

e1 uaccent e2

这会将e2设置为e1下的重音。对于没有下降字符的字符,假定e2处于正确的高度;

如果e1具有下降器,则e2将向下移动。使用uaccent作为底线以下的代字重音预定义了下代(“ utilde”)。

split "text"

效果与

文本

但是文本不能被宏扩展,因为它被引用了;文本将被分割,各个字符之间的间距将被调整。

nosplit text

效果与

“文本”

但是由于未引用文本,因此需要进行宏扩展;文本不会被拆分,各个字符之间的间距也不会调整。

e opprime

这是素数的变体,充当e上的运算符。

在诸如opprime sub 1之类的情况下,它产生与质数不同的结果:

对于opprime,1将作为A的下标塞在质数下(如数学排版中的常规做法),而对于质数,1将成为a下标到主要字符。

opprime的优先级与bar和under的优先级相同,该优先级高于除重音和重音以外的所有优先级。

在不带引号的文本中'不是第一个字符会被视为opprime。

special text e

这使用名为text的troff宏从e构造了一个新对象。

当宏被调用时,该字符串0将包含输出e,

而数字寄存器0W,0H,0D,0skern和0skew将包含宽度,高度,深度,下标克恩,和歪斜的e。

对象的下标字距表示应将对象的下标塞进多少。该歪斜对象的重音表示应将重音放在对象中心的右侧。

宏必须将其修改为0,这样才能以其原点在当前点输出期望的结果,

并将当前水平位置增加对象的宽度。还必须修改数字寄存器,以使其与结果相对应。

例如,假设您想要一个通过在表达式上画一条对角线来“取消”表达式的构造。

.EQ
define cancel 'special Ca'
.EN
.de Ca
.  ds 0s \
\Z'\\*(0s'\
\v'\\n(0du'\
\D'l \\n(0wu -\\n(0hu-\\n(0du'\
\v'\\n(0hu'
..

然后,您可以使用cancel { e }取消表达式e

这是一个更复杂的构造,它在表达式周围绘制一个框:

.EQ
define box 'special Bx'
.EN
.de Bx
.  ds 0s \
\Z'\h'1n'\\*(0s'\
\Z'\
\v'\\n(0du+1n'\
\D'l \\n(0wu+2n 0'\
\D'l 0 -\\n(0hu-\\n(0du-2n'\
\D'l -\\n(0wu-2n 0'\
\D'l 0 \\n(0hu+\\n(0du+2n'\
'\
\h'\\n(0wu+2n'
.  nr 0w +2n
.  nr 0d +1n
.  nr 0h +1n
..

space n

整数n的正值(以em的百分之一)设置方程式之前的垂直间距,

负值设置方程式之后的垂直间距,以替换默认值。

该原语为groff的\ x转义提供了一个接口(但符号相反)。

如果方程式是图片的一部分,则此关键字无效。

扩展基元

col n { ... }

ccol n { ... }

lcol n { ... }

rcol n { ... }

pile n { ... }

cpile n { ... }

lpile n { ... }

rpile n { ... }

整数值n(百分之一em)使用groff的\ x转义符来增加行之间的垂直间距。

负值是可能的,但没有效果。如果矩阵中给出的值不止一个,则使用最大的值。

客制化

方程的外观由大量参数控制。这些可以使用set命令设置。

set p n

这将参数p设置为值n;n是整数。例如,

set x_height 45

表示eqn应该假设x高度为0.45 ems。

可能的参数如下。除非另有说明,否则值以em的百分之一为单位。这些描述仅是说明性的,而不是权威性的。

minimum_size

eqn不会设置任何小于此值的磅值。该值以磅为单位。

fat_offset

所述脂肪原语由叠印方程的两个拷贝由该量水平偏移鼓励了一个方程。

over_hang

分数条比分子和分母的最大宽度长两倍。

换句话说,它将超出分子和分母至少此数量。

accent_width

当bar或under应用于单个字符时,该行将很长。

通常,bar或under会产生一条线,其长度是所应用对象的宽度;在单个字符的情况下,这倾向于产生看起来太长的行。

delimiter_factor

用左图元和右图元生成的可扩展定界符的组合高度和深度,

将至少是分隔符所包围的子方程从轴延伸的最大数量的两倍的千分之二。

delimiter_shortfall

用左图元和右图元生成的可扩展定界符的高度和深度总和的差值,

应不小于定界符所包围的子方程远离轴和该数量的最大数量的两倍。

null_delimiter_space

在片段的每一侧都插入了这么多的水平空间。

script_space

下标和上标的宽度增加此数量。

thin_space

标点符号后会自动插入此空间量。

medium_space

此空间量会自动插入到二进制运算符的两侧。

Thick_space

此数量的空间会自动插入到关系的任一侧。

x_height

没有升序的小写字母的高度,例如'x'。

axis_height

字符中心(例如“ +”和“-”)的基线上方的高度。

对于您使用的字体,此值正确是很重要的。

default_rule_thickness

这应该设置为\(ru字符的粗细,或者设置为\ D转义序列产生的水平线的粗细。

num1

在以上命令将被至少该量上移分子。

num2

该smallover命令将被至少该量上移分子。

denom1

在以上命令将被至少该量分母降档。

denom2

该smallover命令将被至少该量分母降档。

sup1

通常,上标至少会上移此数量。

sup2

上标或较小余数的上限或分子内的上标将至少上移此数量。通常小于sup1。

sup3

分母或平方根或下标或下限内的上标至少上移该数量。通常小于sup2。

num1

下标通常会至少下移此数量。

num2

当下标和上标同时存在时,下标将至少下移此数量。

sup_drop

上标的基线将不超过在其上设置上标的对象顶部以下的数量。

sub_drop

下标的基线至少要远低于设置下标的对象的底部。

big_op_spacing1

上限的基线至少应高于设置该上限的对象的顶部。

big_op_spacing2

下限的基线至少要比设置该上限的对象的底部低很多。

big_op_spacing3

上限的底部至少要比设置该上限的对象的顶部高得多。

big_op_spacing4

下限的顶部至少要比设置该上限的对象的底部低很多。

big_op_spacing5

垂直空间将被添加到限制之上和之下。

baseline_sep

桩或矩阵中的行的基线通常会相隔很远。

在大多数情况下,该值应等于num1和denom1的总和。

shift_down

矩阵或堆中顶部基线和底部基线之间的中点将从轴上向下偏移这么多。

在大多数情况下,该值应等于axis_height。

column_sep

矩阵的各列之间将添加大量空间。

matrix_side_sep

将在矩阵的每一侧添加大量空间。

draw_lines

如果它不为零,则将使用\ D转义序列而不是\ l转义序列和\(ru字符来绘制线条。

body_height

等式的高度超过此高度的量将作为额外的空格添加到包含等式的行之前(使用\ x)。默认值为85。

body_depth

方程式深度超过此深度的量将作为额外空间添加到包含方程式的行之后(使用\ x)。默认值为35。

nroff

如果它不为零,则ndefine的行为将类似于define,而tdefine将被忽略,

否则tdefine的行为将类似于define,而ndefine将会被忽略。

默认值为0。对于ascii,latin1,utf8和cp1047设备,此值通常由eqnrc文件更改为1。

巨集

宏可以接受参数。在宏主体中,如果使用参数调用宏,则$ n,其中n在1到9之间,将被第n个参数替换;

如果参数少于n个,则将不替换任何参数。包含左括号的单词(其中已使用define命令定义了左括号之前的单词的部分)将被识别为带有参数的宏调用;左括号后到右括号匹配的字符将被视为逗号分隔的参数;嵌套括号内的逗号不会终止参数。

sdefine name X anything X

这类似于define命令,但是如果使用参数调用名称将无法识别。

include "file" copy "file"

包括的内容文件(包括和复制是同义词)。以.EQ或.EN开头的文件行将被忽略。

ifdef name X anything X

如果名称已通过define定义(或由于名称是输出设备而被自动定义),

则进行任何处理;否则忽略任何事情。X可以在未出现任何字符事情。

undef name

删除name的定义,使其变得未定义。

除上述宏之外,还提供以下定义:Alpha,Beta,...,Omega(与ALPHA,BETA,...,OMEGA相同),ldots(基线上的三个点)和dollar。

字型

eqn通常至少使用两种字体来设置公式:斜体表示字母,罗马字体表示其他所有字符。

现有的gfont命令更改用作斜体字体的字体。默认情况下,这是我。可以使用新的grfont命令更改用作罗马字体的字体。

grfont f

将罗马字体设置为f。

斜体原语使用gfont设置的当前斜体字体;罗马图元使用grfont设置的当前罗马字体。

还有一个新的gbfont命令,该命令更改了粗体原语使用的字体。如果仅使用罗马,斜体和粗体原语来更改方程式中的字体,则只需使用gfont,grfont和gbfont命令即可更改方程式使用的所有字体。

您可以使用上述chartype命令控制将哪些字符视为字母(因此设置为斜体)。

字母类型会导致将字符设置为斜体。数字类型将导致字符被设置为罗马字体。

档案

/usr/share/groff/1.19.2/tmac/eqnrc

eqn的初始化文件。

eqn [-rvCNR] [-d xy] [-T name] [-M dir] [-f F] [-s n] [-p n] [-m n] [files...]
neqn [file]
checkeq [file]

-dxy

Specify delimiters x and y for the left and right end, respectively, of in-line equations. Any delim statements in the source file overrides this.

-C

Recognize .EQ and .EN even when followed by a character other than space or newline.

-N

Don't allow newlines within delimiters. This option allows eqn to recover better from missing closing delimiters.

-v

Print the version number.

-r

Only one size reduction.

-mn

The minimum point-size is n. eqn will not reduce the size of subscripts or superscripts to a smaller size than n.

-Tname

The output is for device name. The only effect of this is to define a macro name with a value of 1. Typically eqnrc will use this to provide definitions appropriate for the output device. The default output device is ps.

-Mdir

Search dir for eqnrc before the default directories.

-R

Don't load eqnrc.

-fF

This is equivalent to a gfont F command.

-sn

This is equivalent to a gsize n command. This option is deprecated. eqn will normally set equations at whatever the current point size is when the equation is encountered.

-pn

This says that subscripts and superscripts should be n points smaller than the surrounding text. This option is deprecated. Normally eqn makes sets subscripts and superscripts at 70% of the size of the surrounding text.

Using newer versions of GNU eqn

Most of the new features of GNU eqn are based on TeX. There are some references to the differences between TeX and GNU eqn below.

Automatic spacing

eqn gives each component of an equation a type, and adjusts the spacing between components using that type. Possible types are:

ordinary

an ordinary character such as '1' or 'x'

operator

a large operator such as '>'

binary

a binary operator such as '+'

relation

a relation such as '='

opening

an opening bracket such as '('

closing

a closing bracket such as ')'

punctuation

a punctuation character such as ','

inner

a subformula contained within brackets

suppress

spacing that suppresses automatic spacing adjustment

Components of an equation get a type in one of two ways:

type t e

This yields an equation component that contains e but that has type t, where t is one of the types mentioned above. For example, times is defined as

type "binary" \(mu

The name of the type doesn't have to be quoted, but quoting protects from macro expansion.

chartype t text

Unquoted groups of characters are split up into individual characters, and the type of each character is looked up; this changes the type that is stored for each character; it says that the characters in text from now on have type t. For example,

chartype "punctuation" .,;:

would make the characters '.,;:' have type punctuation whenever they subsequently appeared in an equation. The type t can also be letter or digit; in these cases chartype changes the font type of the characters. See the Fonts subsection.

New Primitives

e1 smallover e2

This is similar to over; smallover reduces the size of e1 and e2; it also puts less vertical space between e1 or e2 and the fraction bar. The over primitive corresponds to the TeX \over primitive in display styles; smallover corresponds to \over in non-display styles.

vcenter e

This vertically centers e about the math axis. The math axis is the vertical position about which characters such as '+' and '-' are centered; also it is the vertical position used for the bar of fractions. For example, sum is defined as

{ type "operator" vcenter size +5 \(*S }

e1 accent e2

This sets e2 as an accent over e1e2 is assumed to be at the correct height for a lowercase letter; e2 will be moved down according if e1 is taller or shorter than a lowercase letter. For example, hat is defined as

accent { "^" }

dotdot, dot, tilde, vec, and dyad are also defined using the accent primitive.

e1 uaccent e2

This sets e2 as an accent under e1e2 is assumed to be at the correct height for a character without a descender; e2 will be moved down if e1 has a descender. An under-tilde ("utilde") is pre-defined using uaccent as a tilde accent below the baseline.

split "text"

This has the same effect as

text

but text is not subject to macro expansion because it is quoted; text will be split up and the spacing between individual characters will be adjusted.

nosplit text

This has the same effect as

"text"

but because text is not quoted it will be subject to macro expansion; text will not be split up and the spacing between individual characters will not be adjusted.

e opprime

This is a variant of prime that acts as an operator on e. It produces a different result from prime in a case such as A opprime sub 1: with opprime the 1 will be tucked under the prime as a subscript to the A (as is conventional in mathematical typesetting), whereas with prime the 1 will be a subscript to the prime character. The precedence of opprime is the same as that of bar and under, which is higher than that of everything except accent and uaccent. In unquoted text a ' that is not the first character will be treated like opprime.

special text e

This constructs a new object from e using a troff macro named text. When the macro is called, the string 0s will contain the output for e, and the number registers 0w, 0h, 0d, 0skern, and 0skew will contain the width, height, depth, subscript kern, and skew of e. The subscript kern of an object says how much a subscript on that object should be tucked in; the skew of an object says how far to the right of the center of the object an accent over the object should be placed. The macro must modify 0s so that it will output the desired result with its origin at the current point, and increase the current horizontal position by the width of the object. The number registers must also be modified so that they correspond to the result.

For example, suppose you wanted a construct that 'cancels' an expression by drawing a diagonal line through it.

.EQ
define cancel 'special Ca'
.EN
.de Ca
.  ds 0s \
\Z'\\*(0s'\
\v'\\n(0du'\
\D'l \\n(0wu -\\n(0hu-\\n(0du'\
\v'\\n(0hu'
..

Then you could cancel an expression e with cancel { e}

Here's a more complicated construct that draws a box round an expression:

.EQ
define box 'special Bx'
.EN
.de Bx
.  ds 0s \
\Z'\h'1n'\\*(0s'\
\Z'\
\v'\\n(0du+1n'\
\D'l \\n(0wu+2n 0'\
\D'l 0 -\\n(0hu-\\n(0du-2n'\
\D'l -\\n(0wu-2n 0'\
\D'l 0 \\n(0hu+\\n(0du+2n'\
'\
\h'\\n(0wu+2n'
.  nr 0w +2n
.  nr 0d +1n
.  nr 0h +1n
..

space n

A positive value of the integer n (in hundredths of an em) sets the vertical spacing before the equation, a negative value sets the spacing after the equation, replacing the default values. This primitive provides an interface to groff's \x escape (but with opposite sign).

This keyword has no effect if the equation is part of a pic picture.

Extended Primitives

col n { ... }

ccol n { ... }

lcol n { ... }

rcol n { ... }

pile n { ... }

cpile n { ... }

lpile n { ... }

rpile n { ... }

The integer value n (in hundredths of an em) increases the vertical spacing between rows, using groff's \x escape. Negative values are possible but have no effect. If there is more than a single value given in a matrix, the biggest one is used.

Customization

The appearance of equations is controlled by a large number of parameters. These can be set using the set command.

set p n

This sets parameter p to value nn is an integer. For example,

set x_height 45

says that eqn should assume an x height of 0.45 ems.

Possible parameters are as follows. Values are in units of hundredths of an em unless otherwise stated. These descriptions are intended to be expository rather than definitive.

minimum_size

eqn will not set anything at a smaller point-size than this. The value is in points.

fat_offset

The fat primitive emboldens an equation by overprinting two copies of the equation horizontally offset by this amount.

over_hang

A fraction bar will be longer by twice this amount than the maximum of the widths of the numerator and denominator; in other words, it will overhang the numerator and denominator by at least this amount.

accent_width

When bar or under is applied to a single character, the line will be this long. Normally, bar or under produces a line whose length is the width of the object to which it applies; in the case of a single character, this tends to produce a line that looks too long.

delimiter_factor

Extensible delimiters produced with the left and right primitives will have a combined height and depth of at least this many thousandths of twice the maximum amount by which the sub-equation that the delimiters enclose extends away from the axis.

delimiter_shortfall

Extensible delimiters produced with the left and right primitives will have a combined height and depth not less than the difference of twice the maximum amount by which the sub-equation that the delimiters enclose extends away from the axis and this amount.

null_delimiter_space

This much horizontal space is inserted on each side of a fraction.

script_space

The width of subscripts and superscripts is increased by this amount.

thin_space

This amount of space is automatically inserted after punctuation characters.

medium_space

This amount of space is automatically inserted on either side of binary operators.

thick_space

This amount of space is automatically inserted on either side of relations.

x_height

The height of lowercase letters without ascenders such as 'x'.

axis_height

The height above the baseline of the center of characters such as '+' and '-'. It is important that this value is correct for the font you are using.

default_rule_thickness

This should set to the thickness of the \(ru character, or the thickness of horizontal lines produced with the \D escape sequence.

num1

The over command will shift up the numerator by at least this amount.

num2

The smallover command will shift up the numerator by at least this amount.

denom1

The over command will shift down the denominator by at least this amount.

denom2

The smallover command will shift down the denominator by at least this amount.

sup1

Normally superscripts will be shifted up by at least this amount.

sup2

Superscripts within superscripts or upper limits or numerators of smallover fractions will be shifted up by at least this amount. This is usually less than sup1.

sup3

Superscripts within denominators or square roots or subscripts or lower limits will be shifted up by at least this amount. This is usually less than sup2.

sub1

Subscripts will normally be shifted down by at least this amount.

sub2

When there is both a subscript and a superscript, the subscript will be shifted down by at least this amount.

sup_drop

The baseline of a superscript will be no more than this much amount below the top of the object on which the superscript is set.

sub_drop

The baseline of a subscript will be at least this much below the bottom of the object on which the subscript is set.

big_op_spacing1

The baseline of an upper limit will be at least this much above the top of the object on which the limit is set.

big_op_spacing2

The baseline of a lower limit will be at least this much below the bottom of the object on which the limit is set.

big_op_spacing3

The bottom of an upper limit will be at least this much above the top of the object on which the limit is set.

big_op_spacing4

The top of a lower limit will be at least this much below the bottom of the object on which the limit is set.

big_op_spacing5

This much vertical space will be added above and below limits.

baseline_sep

The baselines of the rows in a pile or matrix will normally be this far apart. In most cases this should be equal to the sum of num1 and denom1.

shift_down

The midpoint between the top baseline and the bottom baseline in a matrix or pile will be shifted down by this much from the axis. In most cases this should be equal to axis_height.

column_sep

This much space will be added between columns in a matrix.

matrix_side_sep

This much space will be added at each side of a matrix.

draw_lines

If this is non-zero, lines will be drawn using the \D escape sequence, rather than with the \l escape sequence and the \(ru character.

body_height

The amount by which the height of the equation exceeds this will be added as extra space before the line containing the equation (using \x). The default value is 85.

body_depth

The amount by which the depth of the equation exceeds this will be added as extra space after the line containing the equation (using \x). The default value is 35.

nroff

If this is non-zero, then ndefine will behave like define and tdefine will be ignored, otherwise tdefine will behave like define and ndefine will be ignored. The default value is 0 This is typically changed to 1 by the eqnrc file for the ascii, latin1, utf8, and cp1047 devices.

Macros

Macros can take arguments. In a macro body, $n where n is between 1 and 9, will be replaced by the n-th argument if the macro is called with arguments; if there are fewer than n arguments, it will be replaced by nothing. A word containing a left parenthesis where the part of the word before the left parenthesis has been defined using the define command will be recognized as a macro call with arguments; characters following the left parenthesis up to a matching right parenthesis will be treated as comma-separated arguments; commas inside nested parentheses do not terminate an argument.

sdefine name X anything X

This is like the define command, but name will not be recognized if called with arguments.

include "file"

copy "file"

Include the contents of file (include and copy are synonyms). Lines of file beginning with .EQ or .EN will be ignored.

ifdef name X anything X

If name has been defined by define (or has been automatically defined because name is the output device) process anything; otherwise ignore anythingX can be any character not appearing in anything.

undef name

Remove definition of name, making it undefined.

Besides the macros mentioned above, the following definitions are available: Alpha, Beta, ..., Omega (this is the same as ALPHA, BETA, ..., OMEGA), ldots (three dots on the base line), and dollar.

Fonts

eqn normally uses at least two fonts to set an equation: an italic font for letters, and a roman font for everything else. The existing gfont command changes the font that is used as the italic font. By default, this is I. The font that is used as the roman font can be changed using the new grfont command.

grfont f

Set the roman font to f.

The italic primitive uses the current italic font set by gfont; the roman primitive uses the current roman font set by grfont. There is also a new gbfont command, which changes the font used by the bold primitive. If you only use the roman, italic and bold primitives to changes fonts within an equation, you can change all the fonts used by your equations just by using gfont, grfont and gbfont commands.

You can control which characters are treated as letters (and therefore set in italics) by using the chartype command described above. A type of letter will cause a character to be set in italic type. A type of digit will cause a character to be set in roman type.

Files

/usr/share/groff/1.19.2/tmac/eqnrc

eqn's Initialization file.

查看英文版

查看中文版

checkeq 示例

eqn myfile.txt

处理troff文件。

eqn myfile.txt

Process a troff file.

查看英文版

查看中文版

其他命令行

cut | cu | csplit | crontab | cpio | continue | compress | col | cmp | cksum | chsh | chroot | chkey | cd | chmod | cp | comm | chown | cal | calendar | clear | chfn | cancel | cat | cc | cfdisk | checknr | chgrp |

如此好文,分享给朋友
发表评论
验证码:
评论列表
共0条