emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Wishlist: LaTeX export: automatically append backslash to "." un


From: Thomas S. Dye
Subject: Re: [O] Wishlist: LaTeX export: automatically append backslash to "." unless at end of sentence
Date: Fri, 19 Aug 2011 09:07:49 -1000

Andras Major <address@hidden> writes:

> Hi,
>
> in TeX and LaTeX, the width of the glue (blank space) after a "." can
> be one of two different values, depending on the context.  There is
> always a longer space between sentences than after a "." that doesn't
> mark the end of a sentence (abbreviations, dates, etc.).  Since
> TeX/LaTeX usually can't recognize the latter case by itself, one can
> help out by writing ".\ " or ".~" explicitly to enforce a short space.
> Without these hints, printed output will look typographically wrong.
>
> Org-mode export doesn't allow me to easily include these hints without
> affecting readability and export to other formats.  Therefore I ask
> that LaTeX export places ". " or ".\ " in the output automatically
> depending on the context:

Org-mode has a straightforward way to include these hints that makes it
possible to take care of export to other formats:

org-entities-user is a variable defined in `org-entities.el'.
Its value is nil

Documentation:
User-defined entities used in Org-mode to produce special characters.
Each entry in this list is a list of strings.  It associates the name
of the entity that can be inserted into an Org file as \name with the
appropriate replacements for the different export backends.  The order
of the fields is the following

name                 As a string, without the leading backslash
LaTeX replacement    In ready LaTeX, no further processing will take place
LaTeX mathp          A Boolean, either t or nil.  t if this entity needs
                     to be in math mode.
HTML replacement     In ready HTML, no further processing will take place.
                     Usually this will be an &...; entity.
ASCII replacement    Plain ASCII, no extensions.  Symbols that cannot be
                     represented will be left as they are, but see the.
                     variable `org-entities-ascii-explanatory'.
Latin1 replacement   Use the special characters available in latin1.
utf-8 replacement    Use the special characters available in utf-8.

If you define new entities here that require specific LaTeX packages to be
loaded, add these packages to `org-export-latex-packages-alist'.

An example due to Lawrence Mitchell is here:

http://orgmode.org/worg/org-tutorials/org-latex-export.html#sec-10-1

With some care, it is possible to keep readability fairly close to what
it is in LaTeX markup.

hth,
Tom

>
> - If, in the source, the "." precedes a double space " " or a newline,
>   use ". ".
>
> - In any other case, use ".\ ".
>
> The reason this would work is the Emacs convention of writing ASCII
> such that there is at least one more space (at least two) between
> sentences.  I believe that the Emacs fill-* functions also make use of
> this convention.
>
> Thanks,
>
>   András
>
>

-- 
Thomas S. Dye
http://www.tsdye.com



reply via email to

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