Re: [Groff] conditional logic based on device?

2008-02-20 Thread Michael(tm) Smith
Werner LEMBERG <[EMAIL PROTECTED]>, 2008-02-20 18:53 +0100: > > > > .if n \" for nroff processing input > > > > > > > .if t \" for troff/groff processing input > > > > I read the groff info node about conditionals, but just didn't know > > how to specify a condition tha

Re: [Groff] Troff to XML

2008-02-20 Thread Meg McRoberts
A general answer -- sort of ;-) I was involved in some trial projects converting *roff text to sgml and xml. Automated scripts did a fairly decent job with some exceptions, like tables. We had to make some arbitrary decisions. For example, in *roff, we marked text as bold, italic, etc, but in t

Re: [Groff] WARNING: tbl with auto-incrementing registers!

2008-02-20 Thread Gunnar Ritter
(Ted Harding) <[EMAIL PROTECTED]> wrote: > I don't see any way of working round this, given the way > 'tbl' works, The content of T{ T} is evaluated only once. Gunnar

Re: [Groff] Troff to XML

2008-02-20 Thread Werner LEMBERG
> Last days I've been thinking about if Troff (& Tex/LaTeX) could be > converted to XML without losing any information. [...] > > Is it possible to convert Troff macro's to XML (and back) in a > 'exact' way. Have a look at doclifter. http://catb.org/~esr/doclifter/ Werner

[Groff] Troff to XML

2008-02-20 Thread Pieter Verberne
Hi list, Last days I've been thinking about if Troff (& Tex/LaTeX) could be converted to XML without losing any information. Much like SweetXML(1) is for XML: SweetXML is an alternate syntax for XML, designed to make configuration files more concise and readable by adding a bit of syntactic sug

Re: [Groff] WARNING: tbl with auto-incrementing registers!

2008-02-20 Thread Ted Harding
On 20-Feb-08 17:59:22, Denis M. Wilson wrote: > I've often used these registers in tables. Re-initialising the > register inside the table works for me. Ted's example comes out > right as follows: > > > \#.LP > .nr EQno 0 1 > .TS > tab(#); > l l. > .nr EQno 0 1 > \n+[EQno]#\n+[EQno] > .TE > > De

Re: [Groff] WARNING: tbl with auto-incrementing registers!

2008-02-20 Thread Denis M. Wilson
I've often used these registers in tables. Re-initialising the register inside the table works for me. Ted's example comes out right as follows: \#.LP .nr EQno 0 1 .TS tab(#); l l. .nr EQno 0 1 \n+[EQno]#\n+[EQno] .TE Denis M. Wilson

Re: [Groff] conditional logic based on device?

2008-02-20 Thread Werner LEMBERG
> > > .if n \" for nroff processing input > > > > > .if t \" for troff/groff processing input > > I read the groff info node about conditionals, but just didn't know > how to specify a condition that would only affect console output. Hmm. groff.texinfo has an index ent

Re: [Groff] conditional logic based on device?

2008-02-20 Thread Michael(tm) Smith
Werner LEMBERG <[EMAIL PROTECTED]>, 2008-02-19 10:15 +0100: > Clarke has already mentioned the `n' and `t' conditionals. If this > distinction isn't fine enough, use the \*[.T] string register which > holds the name of the output device. Example: > > .ie '\*[.T]'ps' \{\ > ... > .\} > .e

Re: [Groff] conditional logic based on device?

2008-02-20 Thread Michael(tm) Smith
Clarke Echols <[EMAIL PROTECTED]>, 2008-02-18 23:59 -0700: [...] > You can use the requests: > > > .if n \" for nroff processing input > > > .if t \" for troff/groff processing input > > Of course the code has to be enclosed within \{ and \} pairs for > each .if con