2

I often take notes about some techniques or similar stuff and list advantages and disadvantages in the end. If I just write

Some description.

Advantages:
- first item
- second item

Disadvantages:
- first item
- second item

, it looks bad after exporting it to PDF via LaTeX:

To avoid this problem, I use the LaTeX command \paragraph:

Some description.

\paragraph{Advantages:}
- first item
- second item

\paragraph{Disadvantages:}
- first item
- second item

Is there a way to do this directly in Org (like the bullet lists which are integrated into Org)?

Because it was requested, here is the document I'm currently working on: https://pastebin.com/LxhrJc44 It can server as an example of what this question is about.

1

One way to do this is to format your notes using headings:

Some description.

* Advantages:
- first item
- second item

* Disadvantages:
- first item
- second item

and then setting:

#+OPTIONS: num:nil

in your org file so that the export produces unnumbered sections.

  • I don't want to use headings for that because I use headings for structuring. Furthermore, I'd have to skip headings to make sure that the current heading is a paragraph in the LaTeX export. Your example does not yield paragraphs but sections because you only used single asterisks. – UTF-8 Jul 31 '18 at 15:27
  • I suggest you expand your question to show the full structure of your org file in that case. – rpluim Jul 31 '18 at 16:00
  • @UTF-8 Please see at first what paragraphs are in org-mode: orgmode.org/worg/dev/org-syntax.html#Paragraphs. There is no special "paragraph" heading. The approach of this answer looks very promising to me especially with #+OPTIONS: num:nil. – Tobias Jul 31 '18 at 16:04
  • @Tobias I didn't mean those paragraphs but the LaTeX command \paragraph. It's not about some specific document but about the general concept. I want to use sections for structuring. Anyway, I added the document I'm currently working on in its current state to the question. Good luck dealing with my messy lecture notes which – to make things worse – are in German. ^^ – UTF-8 Jul 31 '18 at 17:08
  • @UTF-8 You could use lists with two hierarchies. First hierarchy is Advantages/Disadvantages second hierarchy are the actual items. – Tobias Jul 31 '18 at 17:18
0

One possible solution is to add the following at the beginning of your Org document:

#+LATEX_HEADER: \usepackage{enumitem}\setlist[itemize]{nosep}

Note that the enumitem LaTeX package allows for a plethora of options, which you can adapt to your specific taste.

  • Thanks for your effort. However, I think that you misunderstood the question. The problem got nothing to do with vertical spacing. It want "Advantages" and "Disadvantages" to be bold (or "Vorteile" and "Nachteile" in my German document or whatever) and I want the list to be indented relative to those labels. This is exactly what the LaTeX command \paragraph does which is why i use it. My question is whether there is a good way to do this in Org without explicitly writing the command \paragraph. Of course, I could misuse sectioning as already proposed, but that wouldn't be a good solution. – UTF-8 Jul 31 '18 at 19:51
  • If you just want bold text, you can just write these words *like this*. – DoMiNeLa10 Jul 31 '18 at 20:09
  • Doesn't solve the indentation problem. There also are other use cases for LaTeX paragraphs. – UTF-8 Aug 1 '18 at 9:09
0

IIUC, this seems to be the standard "indentation of a first line of a paragraph in a section (other than the first)" problem.

You can try \noindent:

\noindent Advantages:
 - foo
 - bar

or if you want to set it globally, you can try setting the parindent to 0:

#+LATEX_HEADER: \setlength{\parindent}{0pt}

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.