Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make non-breaking spaces (ties) in Org-mode that exports properly to LaTeX
    primarykey
    data
    text
    <p>In (La)TeX non-breaking spaces are called ties and they are made by <code>~</code>. Ties are for instance used after abbreviations so that there is no line break directly after them and so that dots ending abbrevations are not treated as ending sentences. The latter use is important because standardly LaTeX puts a longer space after dots than between words.</p> <p>When exporting from Org-mode to LaTeX <code>~</code> is treated as an explicit character and not as a tie. Ignoring the use of non-breaking spaces is not an alternative because it leads to the wrong spacing (see the second sentence in the example above). One alternative is to force Org-mode to treat <code>~</code> as LaTeX with <a href="http://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code"><code>#+BEGIN_LaTeX ~ #+END_LaTeX</code></a> but it is verbose and export to other formats breaks. Finally, using UTF-8 non-breaking spaces, as suggested in <a href="http://comments.gmane.org/gmane.emacs.orgmode/24716">http://comments.gmane.org/gmane.emacs.orgmode/24716</a>, does not work because LaTeX does not treat it as a space. So, how can I use non-breaking spaces in Org-mode that are properly exported to LaTeX?</p> <p>Here is an example to clarify. The first sentence fails because <code>~</code> is treated as an explicit character. The second sentence fails, obviously, because the last dot is treated as ending a sentence by LaTeX. The third sentence exports properly but it is verbose and breaks export to other formats. The fourth line (separated by an UTF-8 non-breaking space which is inserted by <kbd>C-x 8 Space</kbd>) fails because it is not treated as a space by LaTeX:</p> <pre><code>#+title:Title e.g.~example e.g. example #+BEGIN_LaTeX e.g.~example #+END_LaTeX e.g. example </code></pre> <p>This exports (<kbd>C-x C-e L</kbd>) to the following LaTeX code:</p> <pre class="lang-latex prettyprint-override"><code>e.g.\~{}example e.g. example e.g.~example e.g. example </code></pre> <p>Which renders as:</p> <p><img src="https://i.stack.imgur.com/1reJH.png" alt="LaTeX rendered"></p> <p>I am running Org-mode 7.6 in Emacs 23.3.1.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload