this post was submitted on 15 Apr 2026
3 points (100.0% liked)

Emacs

612 readers
1 users here now

founded 2 years ago
MODERATORS
 

So, I started to use orgmode for writing the documentation for my latest software project. This means, that I have code blocks and lots of special characters in my document. I will have to export this whole file to LaTex/pdf, so my colleague can bind it into his project documentation and this is exactly where my problems are. First of all: how can I turn of the need to manually stop the code execution for code blocks when exporting? I have the single line src_bash{} blocks but also the multiline versions:

#+begin_src bash :
#code
#+ends_src

The next thing is, that my function names include underscores, which in orgmode translates to making the following text lowercase. I tried using \ to escape it, but that only breaks it in a new way and I seriously cant comprehend how this so called zero width space is supposed to be used.

you are viewing a single comment's thread
view the rest of the comments
[–] flamingos@feddit.uk 2 points 2 weeks ago (1 children)

You need to use a symbol, not a string:

(setq org-export-with-superscripts '{}
      org-use-sub-superscripts '{})

write something like this: log_{critical}_{error}

That's what you'd need to write to have subscript, with the above set:

  • log_critical => log_critical
  • log_{critical} => log~critical~
[–] cows_are_underrated@feddit.org 0 points 2 weeks ago (1 children)

So I have set them like this:

(setq org-use-sub-superscripts '{}

      org-export-with-superscripts '{})

and it still does not render correctly. Writing log_critical and log_{critical} gets rendered as log~critical~

[–] flamingos@feddit.uk 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Weird, are they getting overridden by something else in your config (a package or something). In an org-mode buffer, what's the output of C-h v org-export-with-sub-superscripts?

Edit: worked out the issues, I wrote the one of the variable names wrong, it should be org-export-with-sub-superscripts not org-export-with-superscripts

[–] cows_are_underrated@feddit.org 1 points 2 weeks ago (1 children)

That fixed it. :3

May I ask you something else? Do you know how I can configure the layout of tables in Orgmode? Currently my table looks like this:

What I am missing is a separator between each column. I tried out various things through the LaTex attributes as it has been described here, but most stuff either broke my caption or didnt change anything at all about the table. I have not configured my table anything beyond giving it a caption.

[–] flamingos@feddit.uk 1 points 2 weeks ago (1 children)

Sorry, I don't use Latex and am entirely unfamiliar with it, I mostly use org-mode to export to HTML where CSS would be used for this. This Stack Overflow thread says you can add :align |c|c|c| to #+attr_latex to get columns. Apparently column groups also will add these lines, which works in the ODT export but not the HTML one so may work in the Latex one.

This blog post has a walkthrough on using an alternative table extension that may be helpful.

[–] cows_are_underrated@feddit.org 1 points 2 weeks ago

Thank you very much.