Re: [help-texinfo] Changing background color of the 'verbatim' environment
() k...@freefriends.org (Karl Berry) () Wed, 12 Sep 2012 22:01:34 GMT Breaking @cartouche over pages is TeXnically possible. So is supporting background colors for @example / @verbatim. It's just that I personally am never going to work on either one -- way too much effort for way too little return. Of course, I'd happily accept clean patches for them. Another approach is to define a syntax to associate key/value pairs w/ any particular environment. This could map to ‘class’ attributes for HTML output, and would anyway be available to the (S)XML output for further processing. Something like: @example (bg dark blue fg fireengine red phase-of-the-moon one, or \more\ (depending) texi:id the first @example example) ... @end example @verbatim (texi:inherit the first @example example) ... @end verbatim IOW, keys are symbols, values are strings, elements are separated by whitespace, and the lot is enclosed in parentheses -- classic plist. Info output can simply ignore that noise (or not). Some of the keys could be reserved for special handling, such as those whose names begin with texi:. Yeah, i know this is getting ugly real fast, but figure (sometimes) some beauty can be achieved by confining ugly and ignoring it. -- Thien-Thi Nguyen . GPG key: 4C807502 . NB: ttn at glug dot org is not me . . (and has not been since 2007 or so) . .ACCEPT NO SUBSTITUTES . ... please send technical questions to mailing lists ... pgpe0DU6nw4uP.pgp Description: PGP signature
Re: [help-texinfo] Changing background color of the 'verbatim' environment
On Thu, Sep 13, 2012 at 10:40:31AM +0200, Thien-Thi Nguyen wrote: () k...@freefriends.org (Karl Berry) () Wed, 12 Sep 2012 22:01:34 GMT Another approach is to define a syntax to associate key/value pairs w/ any particular environment. This could map to ‘class’ attributes for HTML output, and would anyway be available to the (S)XML output for further processing. Something like: This is already possible to do something similar with what you propose by using raw formatting. Something like @macro redbackground{something} @html div class=redbackground @end html \something\ @html /div @end html @end macro and supply the correct CSS information through one of the way to provide css information. But this only works if the format handles some customization which doesn't seems to be the case for TeX. @example (bg dark blue fg fireengine red phase-of-the-moon one, or \more\ (depending) texi:id the first @example example) ... @end example @verbatim (texi:inherit the first @example example) ... @end verbatim IOW, keys are symbols, values are strings, elements are separated by whitespace, and the lot is enclosed in parentheses -- classic plist. Info output can simply ignore that noise (or not). Some of the keys could be reserved for special handling, such as those whose names begin with texi:. That looks like a new layer above Texinfo which doesn't look like Texinfo at all. I think that this should better be put in raw formatting. If this is for processor of format foo, it is possible to add anything with (but notice that @ has to be escaped) @inlieraw{foo, bg dark blue fg fireengine red phase-of-the-moon one, or \more\ (depending) texi:id the first @@example example} Yeah, i know this is getting ugly real fast, but figure (sometimes) some beauty can be achieved by confining ugly and ignoring it. Those inlineraw constructs will be in the internal tree, but will be ignored by all formatters except for a formatter that explicitly handles this format (or pseudo format) and it will appear in the Texinfo XML as: inlinerawinlinerawformatfoo/inlinerawformatinlinerawcontent spaces= bg quot;dark bluequot; fg quot;fireengine redquot; phase-of-the-moon quot;one, or \quot;more\quot; (depending)quot; texi:id quot;the first arobase;example examplequot;/inlinerawcontent/inlineraw I don't think we need to add more specific things to the language (we already have enough inconsistencies with menus, @def*, @macro). Now if we have some argument we think are usefull for a whole class of output, we can add it to @example. For example, we could have @example C, red some C code @end example with C the language of the example and red the background. But I am not sure we need that. -- Pat
Re: [help-texinfo] Changing background color of the 'verbatim' environment
With respect, Masters: I would like to comment on Mr. Nguyen's remarks. (Bear with me a moment.) I have produced a handful of in-depth manuals at my job (I'm an Oracle/UNIX administrator for a large hospital network) -- a few using Texinfo, a few with DocBook. Over the past 12-18 months I have greatly vacillated in my mind trying to determine a single documentation standard for myself (and, by extension, the hospital). Here is what I've found: I started with Texinfo because of my near cult-member fascination with TeX (and LaTeX). I am so enamored with the beauty of TeX output that I often peruse manuals produced thereby (whose subject matter I actually do not need) simply to admire the richness of TeX. However, I was pretty dissatisfied with what I considered to be bland HTML output. So, I took up the task of learning DocBook (and, my God, what a freaking task that was) and its complicated toolchain. I had noticed the beautiful HTML formatting DocBook could make (e.g., http://www.postgresql.org/docs/9.2/static/index.html). I also chose 'dblatex' as the backend so I could have LaTeX-formatting. Although I was very satisfied with the HTML/LaTeX output of DocBook, I came to *hate* the complicated syntax. Additionally, XSLT seems to me a horror of computer science. Although using an editor such as XMLMind greatly helps, I would prefer to author in `vim' because after years of usages I'm highly productive in it. Having become so disgusted with all the XML-verbosity of DocBook, *I awoke to the beautiful simplicity of Texinfo* -- much like a prodigal son coming home. The simplicity of syntax, of toolchain, and of facilities (e.g., easily creating indexes and references). Though I prefer the HTML/LaTeX of DocBook, I realized I could alter the HTML by tweaking texi2html (I am a C and Perl programmer). And my understanding from Karl is that a LaTeX backend is in the pipeline (in which I'd love to participate). *** *So, I guess what I am saying is that I hope that Texinfo does not meander into XML-verbosity.* Actually, I'm begging that it does not. Respectfully, Jason
Re: [help-texinfo] Changing background color of the 'verbatim' environment
() Jason Massey janixs...@gmail.com () Thu, 13 Sep 2012 09:48:58 -0400 [the horror the horror] Yeah, XML is suboptimal. SXML is slightly better, but still rotten. *So, I guess what I am saying is that I hope that Texinfo does not meander into XML-verbosity.* Actually, I'm begging that it does not. I agree completely; the suggestion was made w/ a strict anti-meandering mindset. The idea is to allow pass-through specification, reserving the fewest special-handling specifications (w/ semantic perturbations) possible. Essentially, makeinfo says, You want to express your style? Fine, no skin off my nose. I'll let the downstream renderer know. If your specs confuse the downstream renderer, don't complain to me! Don't GI if you don't want GO! (See http://foldoc.org/GIGO.) Re verbosity, you can hardly get simpler than a Lisp plist. But that's besides the point (which is explained above). The document model already includes nodes w/ certain attributes (name, depth, relation to other nodes in the graph). The suggestion was to add pass-through attribute specification to environments, but the same idea could also be applied to the nodes (w/ strict anti-meandering mindset) themselves. The sooner makeinfo supports uniform pass-through specification, the sooner it can remove itself from the style-wishlist treadmill. -- Thien-Thi Nguyen . GPG key: 4C807502 pgpR3zliCYtQK.pgp Description: PGP signature
Re: [help-texinfo] Changing background color of the 'verbatim' environment
On Thu, Sep 13, 2012 at 08:07:47PM +0200, Thien-Thi Nguyen wrote: The sooner makeinfo supports uniform pass-through specification, the sooner it can remove itself from the style-wishlist treadmill. Aren't the @inlineraw, and @html... commands enough to pass-through whatever you want? -- Pat
Re: [help-texinfo] Changing background color of the 'verbatim' environment
The sooner makeinfo supports uniform pass-through specification, the sooner it can remove itself from the style-wishlist treadmill. Texinfo has never been on that treadmill and never will be, because it is not and never will be a goal to support output in any conceivable style/format/whatever desired. Put another way, Texinfo is not and has never been (La)TeX (much less XML). I think it would be quite wrong (and quite difficult) to add features such as you describe. Sorry. k