5

I'm using siunitx extensively in my lab reports, but I'm unable to get units to appear correctly when previewing latex fragments.

This is what the latex fragment looks like:

raw

... with preview applied:

previewed

The final result is just fine:

rendered

I've looked at the documentation for preview-latex, but it's not clear what I need to add to preview-default-preamble or preview-default-option-list in order to use a particular latex package in the preview. How do I include packages for use in rendering the preview? In addition, I'm using \sisetup{per-mode=fraction} to get the units formatted in the way that I like; is there a way to include this in the list of options?

1 Answer 1

3

You can include packages for rendering latex fragments - and all latex export from org I guess - along with their options via org-latex-packages-alist. In your case

(add-to-list 'org-latex-packages-alist '("per-mode=fraction" "siunitx" t))

This will most likely not help you with the question being 2 1/2 years old, but maybe someone else comes along looking for the same thing :)

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.