0

When I do an export to latex from org mode lists are treated as follows:

a list item that has text has a newline (\\ in the tex file) at the end of that item if there is any text for that item. If there is no text (an empty list item) that item does not end in "\\". This makes the list rather unbalanced when compiled to pdf. I have used \setlist to adjust spacings but the fact remains that the newline is there. I have also tried \n: nil but that has not changed anything which makes me suspect that that option is not effective for lines in lists. I have redefined org-latex-item and that solves the problem but I don't really like redefining stock functions. Does anyone know of a more "correct" way to resolve this particular problem?

12
  • 1
    Please provide an example: that's always a good idea. That prevents misunderstandings, people going down wrong paths, and various other problems. In particular, what kind(s) of lists are you talking about? In my simple experiment, there is no \\ to be seen anywhere in the TeX file. Can you reproduce the problem if you start with emacs -Q? Commented Nov 4 at 19:03
  • I'll have to recreate it as now I've replaced the function. When I get a chance I'll revert to the stock function and generate the .tex file again Commented Nov 4 at 19:55
  • I can't do a ton of testing (at work) but I can confirm that it is due to an included package or latex setting. Not in my init file but in my org file. I'll weed it out and post once I figure it out in case anyone cares. Commented Nov 4 at 21:04
  • Well, not necessarily a latex setting but here it is: #+OPTIONS: \n:t creates the \\ in the tex file after text in a list item but not for a blank list item #+OPTIONS: \n: nil does nothing - typo by me that I think I cut and pasted from a web search #+OPTIONS: \n:nil turns off the \\ until it is turned back on again. Commented Nov 4 at 21:18
  • so I can either turn the option on and off for each list or just rewrite the function to remove it. Thanks for setting me on the right path by getting me to make the simplest test file possible. Commented Nov 4 at 21:26

0

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.