2

I'm trying to use the package siunitx to format my scientific notations/values more nicely, but I can't get one thing to work, possibly due to my pdf-process.

I type in my orgfile something like this: \ang{95;13;14}N.

Expecting it to output: 95°13'14". In stead it outputs ∠{95;13;14}N.

I #+INCLUDE: this file with my LaTeX settings:

# page setup
#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [a4paper] 
#+LaTeX_CLASS_OPTIONS: [12pt] 
#+LaTeX_CLASS_OPTIONS: [twoside] 

# placement of TOC anywhere
#+LaTeX_HEADER: \usepackage{titletoc}

# mathtools
#+LaTeX_HEADER: \usepackage{mathtools}

# fix margin
#+LaTeX_HEADER: \usepackage[innermargin=1.5in,outermargin=1.25in,vmargin=1.25in]{geometry}

# citation style
#+LaTeX_HEADER: \usepackage[authordate,bibencoding=utf8,strict,backend=biber,url=false,natbib]{biblatex-chicago}
# (internal) links
#+LaTeX_HEADER: \hypersetup{colorlinks=true,citecolor=blue,linkcolor=blue,citebordercolor={0 1 0},linktocpage,pdfstartview=FitH,anchorcolor=blue,filecolor=blue,menucolor=blue,urlcolor=blue}
# don't forget to #+LATEX_HEADER: \addbibresource

# chemical formulae
#+LaTeX_HEADER: \usepackage[version=4]{mhchem}

# SI units simplified
#+LaTeX_HEADER: \usepackage{siunitx}

And I use this line for my latex-pdf process in my init file:

(setq org-latex-pdf-process
     '("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))

Any ideas how to resolve this?

EDIT

I've opened up the exported .tex file and there I can see the problem: org mode has exported \(\angle\)\{65;;\}N, so it seems like emacs is extending \ang into \angle. If I manually edit the tex file and export it works correctly. Any idea how to stop it from doing this?

2 Answers 2

1

Disable entities. Or if you want to keep using entities remove the "ang" entry.

(with-eval-after-load 'org-entities
  (setq org-entities
        (cl-remove-if (lambda (x) (and (listp x) (equal (car x) "ang"))) org-entities)))
1

I simply had to make sure to add math delimiters as described in @LaTeX{} fragments.

\(\ang{45;23;23}\)N

2
  • This still doesn't solve everything for me though. If I want to add chemical equations with isotopes in text-mode with \ce{^{13}C} for example, it returns {¹³C}. Forcing it to math-mode works but will result in different outlining right?
    – Japhir
    Commented Jul 29, 2016 at 23:10
  • here they say that \ce{} always needs math delimiters, so I guess it's no problem :).
    – Japhir
    Commented Jul 30, 2016 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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