MakerPress / atlas-public-feedback

Public feedback and issue tracking for Atlas
22 stars 0 forks source link

Numbered Lists #400

Closed troymott closed 10 years ago

troymott commented 10 years ago

I have numbered lists that have code and notes in between the numbers. For the code we are using [source, python] to prettify the code. Everything looks good, however, the numbering starts over with every numbered line, so I get a (1, 1, 1, etc. instead of 1, 2, 3, etc.).

Is there anything I can do to have proper numbering in the list?

Thanks,

Troy

zaremba commented 10 years ago

Hi @troymott. Can you point me to the project where you're experiencing this?

Thanks, Adam

troymott commented 10 years ago

It is the project in my list named: Make: Intermediate Raspberry Pi Projects. You will see an example of this in Section4.asciidoc, under the heading titled "Adding the required packages".

Thanks,

Troy

christopappas commented 10 years ago

Hi @troymott

In this case, you will want to use the list continuation marker "+". For any numbered list item to "see" the previous list item so it can increment properly, you would use the list continuation marker between the previous list item and any intervening code blocks or notes. Here's some example asciidoc:

. List Item One

. List Item Two
+
[source,python]
----
some code
----
+
.Note
[NOTE]
====
some note here
====

. List Item Three
+
[source,python]
----
some code
----

. List Item Four

You can think of the continuation markers as indenting the intervening code/notes one level so the next list item can see the previous. Also, to be clear, the continuation markers can "indent" any combination and number of code/notes per any given numbered list item.

Let me know if you have any questions!

Thanks, Chris

troymott commented 10 years ago

Awesome, Chris, thank you so much, I really appreciate it!