From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: Wishlist: LaTeX export: automatically append backslash to "." unless at end of sentence Date: Fri, 19 Aug 2011 09:07:49 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuUQ9-0005cQ-QQ for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 15:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuUQ8-00019j-3e for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 15:07:57 -0400 Received: from oproxy9.bluehost.com ([69.89.24.6]:60820) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QuUQ7-00018L-QJ for emacs-orgmode@gnu.org; Fri, 19 Aug 2011 15:07:56 -0400 In-Reply-To: (Andras Major's message of "Fri, 19 Aug 2011 08:50:52 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andras Major Cc: emacs-orgmode Andras Major 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=C3=A1s > > --=20 Thomas S. Dye http://www.tsdye.com