[Groff] how to use logical operators

2010-04-06 Thread Richard Ray
I know this is wrong Would someone fix it .ds a foo .ds b bar . .if d a & d b \{\ \*[a] \*[b] .\} Richard

Re: [Groff] how to use logical operators

2010-04-06 Thread Werner LEMBERG
> I know this is wrong > Would someone fix it > > .ds a foo > .ds b bar > . > .if d a & d b \{\ > \*[a] \*[b] > .\} > > Richard > Solution: .ds a foo .ds b bar . .if d a \ . if d b \{\ \*[a] \*[b] .\} >From groff.info, section `Operators in Conditionals': Note that these operators [like `

Re: [Groff] Horizontal positioning, .nr vs \R

2010-04-06 Thread Tadziu Hoffmann
> Can you please adjust my `R' file to > trigger the bug or problem? Use a line length of 1.6 inches. By the way: instead of \h'0' you can also use \v'0', \X'', or probably a lot of other things that put "something else" in the output. By the way 2: instead of setting a register to the current

Re: [Groff] how to use logical operators

2010-04-06 Thread Richard Ray
On Tue, 6 Apr 2010, Werner LEMBERG wrote: I know this is wrong Would someone fix it .ds a foo .ds b bar . .if d a & d b \{\ \*[a] \*[b] .\} Richard Solution: .ds a foo .ds b bar . .if d a \ . if d b \{\ \*[a] \*[b] .\} From groff.info, section `Operators in Conditionals': Note that t

RE: [Groff] how to use logical operators

2010-04-06 Thread Ted Harding
On 06-Apr-10 13:54:31, Richard Ray wrote: > I know this is wrong > Would someone fix it > > .ds a foo > .ds b bar > . > .if d a & d b \{\ > \*[a] \*[b] > .\} > > Richard The following works: .ds a foo .ds b bar .if d a \{\ .if d b \{\ \*[a] \*[b] .\} .\} (You can test it by following ".ds b ba

[Groff] howto pass args to macro

2010-04-06 Thread Richard Ray
I want to pass multiple arguments to a macro and each argument may be composed of multiple words/characters I figured out this works but is there a way without defining individual strings .nf .de P \\*[\\$1] \\*[\\$2] \\*[\\$3] .. . .ds x a b c .ds y d e .ds z f g h i .P x y z Richard

Re: [Groff] howto pass args to macro

2010-04-06 Thread Tadziu Hoffmann
> I want to pass multiple arguments to a macro and each argument may be > composed of multiple words/characters > I figured out this works but is there a way without defining individual > strings > > [snip] Put the arguments in double quotes, like this: .de P 1 = \\$1 2 = \\$2 3

Re: [Groff] howto pass args to macro

2010-04-06 Thread Clarke Echols
I don't know if I'm missing something obvious in the question... If your source file defines macro P as stated, why not: .de P \\$1 \\$2 \\$3 .. then in the text file: .P "a b c" "d e" "f g h i" Whitespace is inserted by the macro between \\$1, \\$2, and \\$3. This is similar to how it's don