2

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?

1
  • 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
    Commented Oct 15, 2015 at 4:02

1 Answer 1

2

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
1
  • Yes, the advice worked and I see how to do this now. Commented Oct 16, 2015 at 1:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.