1

I want a numbered list of instructions where one or more steps show commands to be typed in. I use BEGIN_SRC blocks and when exported to LaTeX the numbering has started over. Even using [@4] doesn't work

* Instructions
To do the thing
1. Wax on
2. Wax off
3. From the cmd line
#+BEGIN_SRC bash
$> cd foo
$> bar --out results.txt
#+END_SRC
4. Lather
5. Rinse
6. Repeat

How can I have the list stay continously numbered?

  • Have you tried indenting the src block so it's under item 3. ? In your question the block is not indented. I think this will fix problem. – Melioratus Oct 15 '15 at 4:02
1

As @Melioratus suggests, you need to indent item contents (including the source block) in order to keep the list in place:

* Instructions
To do the thing
  1. Wax on
  2. Wax off
  3. From the cmd line
     #+BEGIN_SRC bash
     $> cd foo
     $> bar --out results.txt
     #+END_SRC
  4. Lather
  5. Rinse
  6. Repeat
  • Yes, the advice worked and I see how to do this now. – user1625344 Oct 16 '15 at 1:59

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.