bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non-obvious help needed


From: Patrice Dumas
Subject: Re: non-obvious help needed
Date: Wed, 8 Aug 2012 01:48:48 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Mon, Aug 06, 2012 at 11:22:58AM -0700, Bruce Korb wrote:
> Hi Eli,
> 
> If I am understanding correctly, the texi stance is, "You should never
> want to do that, so we should be able to fiddle it any way we like".
> I'd prefer the position that unless there is a compelling reason to
> eat one of my hyphens, it should not be necessary to go through
> gauntlets to keep hyphens from being eaten.

The point is not that hyphens are being eaten or not, the point is that
--- -- `` and '' are how 4 characters are expressed in texinfo sources
(em-dash, en-dash and double opening quotes and double closing quotes).
So, if you don't want those to have their normal meaning you have to
escape the construct that is a synonym for those characters.  - may be 
escaped as @minus{}, you can also use @w, like address@hidden

Another thing you'll have to take care of is punctuation.  'From 14.3.2
Ending a Sentence'

 Use @. instead of a period, @! instead of an exclamation point, and @?
 instead of a question mark at the end of a sentence that ends with a 
 capital letter. Otherwise, TeX will think the letter is an abbreviation 
 and will not insert the correct end-of-sentence spacing.

Last, with the CVS version, you also have to protect # at the beginning
of lines, for instance like

   @asis{#}

Empty lines delimitate paragraphs.

Of course you have to escape @ } { as @@address@hidden@}.


Otherwise, I don't remember of any other construct that may have a
special meaning in Texinfo.

> via some texinfo derivative (.info or .html, for example).  I guess
> I could be very happy if I had some way to tell texi to leave my
> hyphens alone -- and any other magically handled characters, too,
> that I may not know about.  It really is not clear in the docs that
> hyphens are treated specially.

It is described in '1.9 General Syntactic' Conventions in the Texinfo
manual.  In this section there is also a link to '14.5 Inserting
Quotation Marks' for the double quotes.  The hash char is explained in
details in '19.6 External Macro Processors: Line Directives' in the
manual in the CVS version.

> My preference is not based on my not wanting to write texi docs
> the texinfo way, but rather I want to be able to extract plain text
> paragraphs and have them rendered with the same characters in the
> various output formats.  I do not have the ability to compel
> clients to type descriptive text the texinfo way.  :(
> 
> Thank you for anything you can do to help that isn't too hard to do.

I think you can try the following (I haven't tested and the last is a
perl regular expression):

s/address@hidden/@\1/g
s/---/address@hidden@w{}-/g
s/--/address@hidden/g
s/''/'@w{}'/g
s/``/address@hidden/g
s/\([A-Z]\)\([.?!]\)/address@hidden/g
s/^(\s*)#(\s*\(line)? (\d+)(( "([^"]+)")(\s+\d+)*)?\s*)$/address@hidden/

-- 
Pat



reply via email to

[Prev in Thread] Current Thread [Next in Thread]