1

I have some verbatim text containing a tilde, =some ~ text=. Now, org-mode is supposed to leave the tilde alone. However, upon exporting with the latex backend, I get the following in my .tex: \texttt{some \textasciitilde{} text}, which is not the same, as it is rendered as a "high" tilde versus a centered tilde.

Now, in normal text I can work around this by some Latex command that forces the centered tilde. However, this is inpossible in verbatim, as commands do get translated to Latex as-is, so it would say \texttt{some \midtide text} instead.

Anyone that knows why this is? A solution would be to insert =@@latex:~@@= which is some "super-verbatim" that actually does just plop in the tilde, however this only works on the Latex backend. As I also export to HTML I would like to keep my document as backend-unaware as possible.

| improve this question | | | | |
0

This is a problem with the CM fonts. The link shows some workarounds, but for your purposes (going from an org mode file to a PDF) I think the easiest/best thing to do is to use a different set of fonts. You can try Palatino e.g. by adding this to your org mode file:

#+LATEX_HEADER: \usepackage{palatino}

You'll have to install whatever fonts you decide to use, but that might be an advantage: a lot of people dislike the CM fonts and prefer something else. If you like the Palatino look, you can add it permanently by adding something like this to your initialization file:

(eval-after-load "org"
     (add-to-list 'org-latex-packages-alist '("" "palatino" nil)))
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.