emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: tsd@tsdye.com (Thomas S. Dye)
To: Andras Major <andras.g.major@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Wishlist: LaTeX export: automatically append backslash to "." unless at end of sentence
Date: Fri, 19 Aug 2011 09:07:49 -1000	[thread overview]
Message-ID: <m1ty9di5iy.fsf@tsdye.com> (raw)
In-Reply-To: <CALPHr6xSRrVyNEXMhV=Q1X4mswLDxMqUGw40D11QtGoPLhwfoA@mail.gmail.com> (Andras Major's message of "Fri, 19 Aug 2011 08:50:52 +0200")

Andras Major <andras.g.major@gmail.com> 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

  parent reply	other threads:[~2011-08-19 19:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19  6:50 Wishlist: LaTeX export: automatically append backslash to "." unless at end of sentence Andras Major
2011-08-19  9:35 ` Daniel Bausch
2011-08-19 10:00 ` Stefan Nobis
2011-08-19 11:03   ` András Major
2011-08-19 13:51     ` William Henney
2011-08-19 18:39       ` András Major
2011-08-19 19:50         ` Sebastien Vauban
2011-08-19 11:22 ` Carsten Dominik
2011-08-19 14:55 ` Rasmus
2011-08-19 15:02   ` suvayu ali
2011-08-19 19:07 ` Thomas S. Dye [this message]
2011-08-19 21:16 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1ty9di5iy.fsf@tsdye.com \
    --to=tsd@tsdye.com \
    --cc=andras.g.major@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).