gbranden pushed a commit to branch master in repository groff. commit 1b32452ffca5a5f1adddb3b0ba35d79e069a72f8 Author: G. Branden Robinson <g.branden.robin...@gmail.com> AuthorDate: Wed Jul 23 12:09:56 2025 -0500
groff_diff(7): Relocate material. Arrange subsection "Altered requests" before "New requests", paralleling the organization of register documentation. --- man/groff_diff.7.man | 1068 +++++++++++++++++++++++++------------------------- 1 file changed, 534 insertions(+), 534 deletions(-) diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man index a9c291ad8..b693fa184 100644 --- a/man/groff_diff.7.man +++ b/man/groff_diff.7.man @@ -1612,188 +1612,458 @@ and .BR pso ). . . +.br +.ne 6v .\" ==================================================================== -.SS "New requests" +.SS "Altered requests" .\" ==================================================================== . -Several GNU -.I troff \" GNU -requests work like AT&T -.IR troff 's \" AT&T -.RB \[lq] as \[rq] -and -.B ds -requests, -accepting an optional leading neutral double quote, -notated -.\" Use single quotes here for quotation to avoid the perversity of an -.\" output device lacking directional double quotes rendering the -.\" following as `"["]"`. -.RB \[oq][ \[dq] ]\[cq], -in an argument that the formatter reads -in copy mode to the end of the input line, -permitting inclusion of leading spaces. +.TP +.BI .bd\~ "special-font font" +Stop emboldening +.I special-font +when +.I font +is selected. . +.\" XXX: +.\" Possibly allow prefixing an integer with `\&` to force +.\" interpretation of this form. +.I special-font +must be a font name, +not a mounting position. . -.TP 8n \" ".break" + 2n -.BI .aln\~ "new-register existing-register" -Create alias -(additional name) -.I new-register -of -.IR existing-register . +.TP +.BR .cf\~ [ \[dq] ]\c +.I file +Break and copy the contents of +.I file +as \[lq]throughput\[rq] to +GNU +.IR troff 's \" GNU +output. . -If -.I existing-register -is undefined, +If a diversion is in use, GNU .I troff \" GNU -produces a warning in category -.RB \[lq] reg \[rq] -and ignores the request. -. -See section \[lq]Warnings\[rq] of -.MR @g@groff 1 -regarding the enablement and suppression of warnings. -. -To remove a register alias, -invoke -.B rr -on its name. -. -A register's contents do not become inaccessible until it has no more -names. +performs the copy only when the diversion is emitted. . +In AT&T +.IR troff , \" AT&T +the contents of +.I file +are immediately copied to the output regardless of whether a diversion +is being written to; +this behavior is so anomalous that it must be considered a bug. . -.TP -.BI .als\~ "new-name existing-name" -Create alias -(additional name) -.I new-name -of request, -string, -macro, -or diversion -.IR existing-name , -causing the names to refer to the same stored object. . -If -.I existing-name -is undefined, +.IP GNU .I troff \" GNU -produces a warning in category -.RB \[lq] mac \[rq] -and ignores the request. +removes a leading neutral double quote +.RB \[oq] \[dq] \[cq] +from the argument, +permitting initial embedded spaces in it, +and reads it to the end of the input line in copy mode. . If -.I new-name -already exists, -its contents are lost unless already aliased. -. -See section \[lq]Warnings\[rq] of -.MR @g@groff 1 -regarding the enablement and suppression of warnings. -. -To remove an alias, -invoke -.B rm -on its name. -. -The object itself is not destroyed until it has no more names. -. -. -.IP -When a request, -macro, -string, -or diversion is aliased, -redefinitions and appendments \[lq]write through\[rq] alias names. -. -To replace an alias with a separately defined object, -remove its name first. +.I file +does not exist or is not readable, +a warning in category +.RB \[lq] file \[rq] +is emitted +and the request has no other effect. . . +.br +.ne 6v .TP -.BI .am1\~ name\~\c +.BI .de\~ name\~\c .RI [ end-name ] -As -.RB \[lq] am \[rq], -but +.TQ +.BI .am\~ name\~\c +.RI [ end-name ] +.TQ +.BI .ds\~ name\~\c +.RB [[ \[dq] ]\c +.IR contents ] +.TQ +.BI .as\~ name\~\c +.RB [[ \[dq] ]\c +.IR contents ] +In compatibility mode, +these requests behave similarly to +.BR de1 , +.BR am1 , +.BR ds1 , +and +.BR as1 , +respectively: GNU .I troff \" GNU -disables compatibility mode while interpreting the appendment to -.I name: -it inserts a +inserts a .I "compatibility save" -token at the beginning of the appendment, +token at its beginning of +.I contents and a .I "compatibility restore" -token at its end. -. -The requests -.RB \[lq] am \[rq], -.BR am1 , -.BR de , -and -.B de1 -can thus be intermixed freely -since the compatibility save/\:restore tokens -affect only the parts of the macro populated by -.B am1 -and -.BR de1 . +token at its end, +causing compatibility mode to switch on during interpolation +of the applicable macro or string definition, +or appendment thereto. . . .TP -.BI .ami\~ name\~\c -.RI [ end-name ] -Append to macro indirectly. +.BI .hy\~ n +New values 16 and\~32 are available; +the former enables hyphenation before the last character in a word, +and the latter enables hyphenation after the first character in a word. . -See -.B dei -below. +If invoked without an argument, +the mode configured by the +.B hydefault +request is selected. . . .TP -.BI .ami1\~ name\~\c -.RI [ end-name ] -As -.BR ami , -but +.BI .lf\~ input-line-number\~\c +.RB [[ \[dq] ]\c +.IR file-identifier ] +In GNU +.I troff \" GNU +the first argument becomes the input line number of the +.I next +line the formatter reads. +It also +removes a leading neutral double quote +.RB \[oq] \[dq] \[cq] +from +.I file-identifier, +permitting initial embedded spaces in it, +and reads it to the end of the input line in copy mode. +. +. +.TP +.BR .nx\~ [[ \[dq] ]\c +.IR file ] GNU .I troff \" GNU -disables compatibility mode -while interpreting the appendment to the macro -named by the contents of string -.I name; -see -.B am1 -above. +removes a leading neutral double quote +.RB \[oq] \[dq] \[cq] +from +.IR file , +permitting initial embedded spaces in it, +and reads it to the end of the input line in copy mode. . . .TP -.BI .as1\~ name\~\c -.RB [[ \[dq] ]\c -.IR contents ] -As -.RB \[lq] as \[rq], -but +.BR .pi\~ [ \[dq] ]\c +.I command GNU .I troff \" GNU -disables compatibility mode -while interpreting the appendment to the string -.I name: -it inserts a -.I "compatibility save" -token at the beginning of the appendment, -and a -.I "compatibility restore" -token at its end. +strips a leading neutral double quote from the argument, +permitting initial embedded spaces in it. . -The requests -.RB \[lq] as \[rq], -.BR as1 , +. +.TP +.BI .pm\~ name\~\c +\&.\|.\|. +GNU +.I troff \" GNU +reports, +to the standard error stream, +the JSON-encoded name and contents of each macro, +string, +or diversion +.IR name . +. +. +.TP +.BR .so\~ [ \[dq] ]\c +.I file +GNU +.I troff \" GNU +removes a leading neutral double quote +.RB \[oq] \[dq] \[cq] +from +.IR file , +permitting initial embedded spaces in it, +and reads it to the end of the input line in copy mode. +. +GNU +.I troff \" GNU +searches for +.I file +in any directories specified by +.B \-I +command-line options, +followed by the current working directory. +. +If +.I file +does not exist or is not readable, +GNU +.I troff \" GNU +emits a warning in category +.RB \[lq] file \[rq]. +. +. +.TP +.BI .ss\~ word-space-size\~\c +.RI [ additional-sentence-space-size ] +A second argument sets the amount of additional space separating +sentences on the same output line. +. +If omitted, +this amount is set to +.IR word-space-size . +. +Both arguments are in twelfths of current font's space width +(typically one-fourth to one-third em for Western scripts; +see +.MR groff_font @MAN5EXT@ ). +. +The default for both parameters is\~12. +. +Negative values are erroneous. +. +. +.TP +.BR .sy\~ [ \[dq] ]\c +.I command +GNU +.I troff \" GNU +strips a leading neutral double quote from the argument, +permitting initial embedded spaces in it. +. +. +.TP +.BR .ta\~ [[\c +.IR "n1 n2\~" .\|.\|.\~ nn \~]\c +.BR T \~\c \" space in roman because we must use 2-font macro with \c +.IR "r1 r2\~" .\|.\|.\~ rn ] +GNU +.I troff \" GNU +supports an extended syntax to specify repeating tab stops after +the +.RB \[lq] T \[rq] +mark. +. +These values are always taken as relative distances from the previous +tab stop. +. +This is the idiomatic way to specify tab stops at equal intervals in +.IR groff . +. +GNU +.IR troff 's \" GNU +startup value is +.RB \[lq] "T 0.5i" \[rq]. +. +. +.IP +The syntax summary above instructs +.I groff +to set tabs at positions +.IR n1 , +.IR n2 , +\&.\|.\|.\|, +.IR nn , +then at +.IR nn \|+\| r1 , +.IR nn \|+\| r2 , +\&.\|.\|.\|, +.IR nn \|+\| rn , +then at +.IR nn \|+\| rn \|+\| r1 , +.IR nn \|+\| rn \|+\| r2 , +\&.\|.\|.\|, +.IR nn \|+\| rn \|+\| rn , +and so on. +. +. +.\" ==================================================================== +.SS "New requests" +.\" ==================================================================== +. +Several GNU +.I troff \" GNU +requests work like AT&T +.IR troff 's \" AT&T +.RB \[lq] as \[rq] +and +.B ds +requests, +accepting an optional leading neutral double quote, +notated +.\" Use single quotes here for quotation to avoid the perversity of an +.\" output device lacking directional double quotes rendering the +.\" following as `"["]"`. +.RB \[oq][ \[dq] ]\[cq], +in an argument that the formatter reads +in copy mode to the end of the input line, +permitting inclusion of leading spaces. +. +. +.TP 8n \" ".break" + 2n +.BI .aln\~ "new-register existing-register" +Create alias +(additional name) +.I new-register +of +.IR existing-register . +. +If +.I existing-register +is undefined, +GNU +.I troff \" GNU +produces a warning in category +.RB \[lq] reg \[rq] +and ignores the request. +. +See section \[lq]Warnings\[rq] of +.MR @g@groff 1 +regarding the enablement and suppression of warnings. +. +To remove a register alias, +invoke +.B rr +on its name. +. +A register's contents do not become inaccessible until it has no more +names. +. +. +.TP +.BI .als\~ "new-name existing-name" +Create alias +(additional name) +.I new-name +of request, +string, +macro, +or diversion +.IR existing-name , +causing the names to refer to the same stored object. +. +If +.I existing-name +is undefined, +GNU +.I troff \" GNU +produces a warning in category +.RB \[lq] mac \[rq] +and ignores the request. +. +If +.I new-name +already exists, +its contents are lost unless already aliased. +. +See section \[lq]Warnings\[rq] of +.MR @g@groff 1 +regarding the enablement and suppression of warnings. +. +To remove an alias, +invoke +.B rm +on its name. +. +The object itself is not destroyed until it has no more names. +. +. +.IP +When a request, +macro, +string, +or diversion is aliased, +redefinitions and appendments \[lq]write through\[rq] alias names. +. +To replace an alias with a separately defined object, +remove its name first. +. +. +.TP +.BI .am1\~ name\~\c +.RI [ end-name ] +As +.RB \[lq] am \[rq], +but +GNU +.I troff \" GNU +disables compatibility mode while interpreting the appendment to +.I name: +it inserts a +.I "compatibility save" +token at the beginning of the appendment, +and a +.I "compatibility restore" +token at its end. +. +The requests +.RB \[lq] am \[rq], +.BR am1 , +.BR de , +and +.B de1 +can thus be intermixed freely +since the compatibility save/\:restore tokens +affect only the parts of the macro populated by +.B am1 +and +.BR de1 . +. +. +.TP +.BI .ami\~ name\~\c +.RI [ end-name ] +Append to macro indirectly. +. +See +.B dei +below. +. +. +.TP +.BI .ami1\~ name\~\c +.RI [ end-name ] +As +.BR ami , +but +GNU +.I troff \" GNU +disables compatibility mode +while interpreting the appendment to the macro +named by the contents of string +.I name; +see +.B am1 +above. +. +. +.TP +.BI .as1\~ name\~\c +.RB [[ \[dq] ]\c +.IR contents ] +As +.RB \[lq] as \[rq], +but +GNU +.I troff \" GNU +disables compatibility mode +while interpreting the appendment to the string +.I name: +it inserts a +.I "compatibility save" +token at the beginning of the appendment, +and a +.I "compatibility restore" +token at its end. +. +The requests +.RB \[lq] as \[rq], +.BR as1 , .BR ds , and .B ds1 @@ -4198,430 +4468,160 @@ and .RB \[lq] ".warn 1" \[rq] disables all warnings except those about missing glyphs. . -If no argument is given, -all warning categories are enabled. -. -. -.TP -.BI .warnscale\~ scaling-unit -Select scaling unit used in certain warnings \" `output_warning()` -(one of -.BR u , -.BR i , -.BR c , -.BR p , -or -.BR P ; -default: -.BR i ). -. -Ignored on -.IR nroff -mode -output devices, -for which these diagnostics report the vertical page location in lines, -and the horizontal page location in ens. -. -. -.TP -.BI .while \~cond-expr\~anything -Evaluate the conditional expression -.IR cond-expr , -and repeatedly execute -.I anything -unless and until -.I cond-expr -evaluates false. -. -.I anything, -which is often a conditional block, -is referred to as the -.RB \[lq] while \[rq] -request's -.I body. -. -. -.IP -GNU -.I troff \" GNU -treats the body of a -.RB \[lq] while \[rq] -request similarly to that of a -.B de -request -(albeit one not read in copy mode), -but stores it under an internal name and deletes it when the loop -finishes. -. -The operation of a macro containing a -.RB \[lq] while \[rq] -request can slow significantly if its -body is large. -. -Each time the macro is executed, -the -.RB \[lq] while \[rq] -body is parsed and stored again. -. -An often better solution\[em]and one that is more portable, -since AT&T -.I troff \" AT&T -lacked the -.RB \[lq] while \[rq] -request\[em]is to instead write a recursive macro. -. -It will be parsed only once (unless you redefine it). -. -To prevent infinite loops, -the default number of available recursion levels is 1,000 or somewhat -less (because things other than macro calls can be on the input stack). -. -You can disable this protective measure, -or alter the limit, -by setting the -.B slimit -register. -. -See section \[lq]Debugging\[rq] below. -. -. -.IP -If a -.RB \[lq] while \[rq] -body begins with a conditional block, -its closing brace must end an input line. -. -. -.IP -The -.RB \[lq] break \[rq] -and -.RB \[lq] continue \[rq] -requests alter a -.RB \[lq] while \[rq] -loop's flow of control. -. -. -.TP -.BI .write\~ stream\~\c -.RB [[ \[dq] ]\c -.IR character-sequence ] -Write -.IR character-sequence , -a sequence of ordinary characters, -spaces, -or tabs -.\" ...or, technically, backspace and delete characters, but let's not -.\" dwell on that. -read in copy mode, -to -.IR stream , -which must previously have been the subject of an -.RB \[lq] open \[rq] -(or -.BR opena ) -request, -followed by a newline. -. -GNU -.I troff \" GNU -flushes the stream after writing to it. -. -. -.TP -.BI .writec\~ stream\~\c -.RB [[ \[dq] ]\c -.IR character-sequence ] -As -.RB \[lq] write \[rq], -but does not append a newline to -.IR contents . -. -. -.TP -.BI .writem\~ "stream name" -Write the contents of the macro or string -.I name -to -.IR stream , -which must previously have been the subject of an -.RB \[lq] open \[rq] -(or -.BR \%opena ) -request. -. -The contents of -.I name -are read in copy mode. -. -. -.br -.ne 6v -.\" ==================================================================== -.SS "Altered requests" -.\" ==================================================================== -. -.TP -.BI .bd\~ "special-font font" -Stop emboldening -.I special-font -when -.I font -is selected. -. -.\" XXX: -.\" Possibly allow prefixing an integer with `\&` to force -.\" interpretation of this form. -.I special-font -must be a font name, -not a mounting position. -. -.TP -.BR .cf\~ [ \[dq] ]\c -.I file -Break and copy the contents of -.I file -as \[lq]throughput\[rq] to -GNU -.IR troff 's \" GNU -output. -. -If a diversion is in use, -GNU -.I troff \" GNU -performs the copy only when the diversion is emitted. -. -In AT&T -.IR troff , \" AT&T -the contents of -.I file -are immediately copied to the output regardless of whether a diversion -is being written to; -this behavior is so anomalous that it must be considered a bug. -. -. -.IP -GNU -.I troff \" GNU -removes a leading neutral double quote -.RB \[oq] \[dq] \[cq] -from the argument, -permitting initial embedded spaces in it, -and reads it to the end of the input line in copy mode. -. -If -.I file -does not exist or is not readable, -a warning in category -.RB \[lq] file \[rq] -is emitted -and the request has no other effect. -. -. -.br -.ne 6v -.TP -.BI .de\~ name\~\c -.RI [ end-name ] -.TQ -.BI .am\~ name\~\c -.RI [ end-name ] -.TQ -.BI .ds\~ name\~\c -.RB [[ \[dq] ]\c -.IR contents ] -.TQ -.BI .as\~ name\~\c -.RB [[ \[dq] ]\c -.IR contents ] -In compatibility mode, -these requests behave similarly to -.BR de1 , -.BR am1 , -.BR ds1 , -and -.BR as1 , -respectively: -GNU -.I troff \" GNU -inserts a -.I "compatibility save" -token at its beginning of -.I contents -and a -.I "compatibility restore" -token at its end, -causing compatibility mode to switch on during interpolation -of the applicable macro or string definition, -or appendment thereto. -. +If no argument is given, +all warning categories are enabled. +. . .TP -.BI .hy\~ n -New values 16 and\~32 are available; -the former enables hyphenation before the last character in a word, -and the latter enables hyphenation after the first character in a word. +.BI .warnscale\~ scaling-unit +Select scaling unit used in certain warnings \" `output_warning()` +(one of +.BR u , +.BR i , +.BR c , +.BR p , +or +.BR P ; +default: +.BR i ). . -If invoked without an argument, -the mode configured by the -.B hydefault -request is selected. +Ignored on +.IR nroff -mode +output devices, +for which these diagnostics report the vertical page location in lines, +and the horizontal page location in ens. . . .TP -.BI .lf\~ input-line-number\~\c -.RB [[ \[dq] ]\c -.IR file-identifier ] -In GNU -.I troff \" GNU -the first argument becomes the input line number of the -.I next -line the formatter reads. -It also -removes a leading neutral double quote -.RB \[oq] \[dq] \[cq] -from -.I file-identifier, -permitting initial embedded spaces in it, -and reads it to the end of the input line in copy mode. -. +.BI .while \~cond-expr\~anything +Evaluate the conditional expression +.IR cond-expr , +and repeatedly execute +.I anything +unless and until +.I cond-expr +evaluates false. . -.TP -.BR .nx\~ [[ \[dq] ]\c -.IR file ] -GNU -.I troff \" GNU -removes a leading neutral double quote -.RB \[oq] \[dq] \[cq] -from -.IR file , -permitting initial embedded spaces in it, -and reads it to the end of the input line in copy mode. +.I anything, +which is often a conditional block, +is referred to as the +.RB \[lq] while \[rq] +request's +.I body. . . -.TP -.BR .pi\~ [ \[dq] ]\c -.I command +.IP GNU .I troff \" GNU -strips a leading neutral double quote from the argument, -permitting initial embedded spaces in it. -. +treats the body of a +.RB \[lq] while \[rq] +request similarly to that of a +.B de +request +(albeit one not read in copy mode), +but stores it under an internal name and deletes it when the loop +finishes. . -.TP -.BI .pm\~ name\~\c -\&.\|.\|. -GNU -.I troff \" GNU -reports, -to the standard error stream, -the JSON-encoded name and contents of each macro, -string, -or diversion -.IR name . +The operation of a macro containing a +.RB \[lq] while \[rq] +request can slow significantly if its +body is large. . +Each time the macro is executed, +the +.RB \[lq] while \[rq] +body is parsed and stored again. . -.TP -.BR .so\~ [ \[dq] ]\c -.I file -GNU -.I troff \" GNU -removes a leading neutral double quote -.RB \[oq] \[dq] \[cq] -from -.IR file , -permitting initial embedded spaces in it, -and reads it to the end of the input line in copy mode. +An often better solution\[em]and one that is more portable, +since AT&T +.I troff \" AT&T +lacked the +.RB \[lq] while \[rq] +request\[em]is to instead write a recursive macro. . -GNU -.I troff \" GNU -searches for -.I file -in any directories specified by -.B \-I -command-line options, -followed by the current working directory. +It will be parsed only once (unless you redefine it). . -If -.I file -does not exist or is not readable, -GNU -.I troff \" GNU -emits a warning in category -.RB \[lq] file \[rq]. +To prevent infinite loops, +the default number of available recursion levels is 1,000 or somewhat +less (because things other than macro calls can be on the input stack). . +You can disable this protective measure, +or alter the limit, +by setting the +.B slimit +register. . -.TP -.BI .ss\~ word-space-size\~\c -.RI [ additional-sentence-space-size ] -A second argument sets the amount of additional space separating -sentences on the same output line. +See section \[lq]Debugging\[rq] below. . -If omitted, -this amount is set to -.IR word-space-size . . -Both arguments are in twelfths of current font's space width -(typically one-fourth to one-third em for Western scripts; -see -.MR groff_font @MAN5EXT@ ). +.IP +If a +.RB \[lq] while \[rq] +body begins with a conditional block, +its closing brace must end an input line. . -The default for both parameters is\~12. . -Negative values are erroneous. +.IP +The +.RB \[lq] break \[rq] +and +.RB \[lq] continue \[rq] +requests alter a +.RB \[lq] while \[rq] +loop's flow of control. . . .TP -.BR .sy\~ [ \[dq] ]\c -.I command -GNU -.I troff \" GNU -strips a leading neutral double quote from the argument, -permitting initial embedded spaces in it. -. +.BI .write\~ stream\~\c +.RB [[ \[dq] ]\c +.IR character-sequence ] +Write +.IR character-sequence , +a sequence of ordinary characters, +spaces, +or tabs +.\" ...or, technically, backspace and delete characters, but let's not +.\" dwell on that. +read in copy mode, +to +.IR stream , +which must previously have been the subject of an +.RB \[lq] open \[rq] +(or +.BR opena ) +request, +followed by a newline. . -.TP -.BR .ta\~ [[\c -.IR "n1 n2\~" .\|.\|.\~ nn \~]\c -.BR T \~\c \" space in roman because we must use 2-font macro with \c -.IR "r1 r2\~" .\|.\|.\~ rn ] GNU .I troff \" GNU -supports an extended syntax to specify repeating tab stops after -the -.RB \[lq] T \[rq] -mark. +flushes the stream after writing to it. . -These values are always taken as relative distances from the previous -tab stop. . -This is the idiomatic way to specify tab stops at equal intervals in -.IR groff . +.TP +.BI .writec\~ stream\~\c +.RB [[ \[dq] ]\c +.IR character-sequence ] +As +.RB \[lq] write \[rq], +but does not append a newline to +.IR contents . . -GNU -.IR troff 's \" GNU -startup value is -.RB \[lq] "T 0.5i" \[rq]. . +.TP +.BI .writem\~ "stream name" +Write the contents of the macro or string +.I name +to +.IR stream , +which must previously have been the subject of an +.RB \[lq] open \[rq] +(or +.BR \%opena ) +request. . -.IP -The syntax summary above instructs -.I groff -to set tabs at positions -.IR n1 , -.IR n2 , -\&.\|.\|.\|, -.IR nn , -then at -.IR nn \|+\| r1 , -.IR nn \|+\| r2 , -\&.\|.\|.\|, -.IR nn \|+\| rn , -then at -.IR nn \|+\| rn \|+\| r1 , -.IR nn \|+\| rn \|+\| r2 , -\&.\|.\|.\|, -.IR nn \|+\| rn \|+\| rn , -and so on. +The contents of +.I name +are read in copy mode. . . .br _______________________________________________ groff-commit mailing list groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit