0

When I export an Org document to text, the title (along with the decorative ASCII art above and below it) is centered. What's the best way to suppress the centering, and simply have it start at the left margin?

1
  • Please do post the same question to emacs.SE and StackOverflow. Choose one to keep and delete the other. Thx.
    – Drew
    Aug 10 at 22:31

1 Answer 1

0

I am not aware of an easy way to modify the header within the ASCII backend exporter. As a workaround, macro replacement can get what you are looking for quickly while maintaining ASCII's cleanness.

  1. In your ASCII file, add this line to the top of your content (after your keywords).
{{{title}}} 

If you'd like, you can wrap this block with JUSTIFYLEFT, which is unique to the ASCII backend. It is not strictly necessary, but can help to prevent this title from moving if you change your export justification globally.

#+BEGIN_JUSTIFYLEFT
{{{title}}} 
#+END_JUSTIFYLEFT

If you'd like to keep beginning information such as authorship, use the macro replacement for that.

{{{author}}}

Learn more about macro replacement here in the org manual.

Also, if you'd like your Table of Contents to be after your title, use a block like this when you declare your title. The options keyword should be at the start of your file.

#+OPTIONS: toc:nil

{{{title}}}
#+TOC: headlines 2
  1. When you export to ASCII, make sure you turn on BODY_ONLY. This is usually bound to C-b in the export dispatcher. If you do not turn on BODY_ONLY, the original header will appear alongside your macro replacement.

The export dispatcher with the option for body only turned on.

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.