First of all I want to wish you a Merry Christmas to all of you, I am writing for the following doubt.

I have long ago tried to compose in LaTeX a document with a structure similar to that of the Bible, basically being able to compose a paragraph divided into numbered verses.

I don't think to be the first or the only one who has had this concern, searching a little on the web, I found this question that helped me to structure a test of what I want to do. I am referring specifically to the solution proposed by @Ruben.

In my test I found some details that I need to improve:

  • Add a short name option for \book as the titles of the books I handle are quite long and in the headers of the pages do not fit.

  • Add at least 2 sub-levels to the verse whose counters are referenced to the verse, the last level I think can be resolved with a numbered list using the enumitem package.

  • I need to use sections in some cases, but I'm not sure if their numbering will collide with the one of the verses or if they can be independent of each other.

My MWE (taken from the answer I mentioned above):



                {.25ex \@plus.25ex \@minus.1ex}%
  \setlength{\biblechapskip}{1em plus .33em minus .2em}
    \advance\biblechap@svdopt by -1\fi
  \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}

\title{A new document based on the Bible}



\book{First book with a very long title that does not fit in the header.}
\verse In the beginning God created the heaven and the earth.
\verse And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters.
\verse \lipsum[3]

\verse \lipsum[4]
\verse \lipsum[5]
\verse \lipsum[6]

I understand that the substantial part is inside the \makeatletter and \makeatother commands, however, there are code options that are not quite clear to me. I checked a bit how to use the \newcounter command but I'm not clear how I could relate it to others. Could they help me?

  • 2
    You seem to be asking three unrelated questions here. You should ask each in a separate TeX.SX "question". You'll stand a better chance of getting a satisfactory answer to each one of them. – Ruben Dec 29 '16 at 17:50
  • The issue with \book is easy to fix, but I don't understand the multilevel request on the verses. The Bible is separated into Testaments/books/chapters/verses -- I don't see the need for multilevel verses or sections. Could you give an example of this – user31729 Feb 26 '17 at 22:56
  • @ChristianHupferis I know that the Bible has no verses in multi-level, but what I am trying to solve is how to write a text that follows the geometrical method of Spinoza using verses from several levels, instead of write it as a series of nested lists. – Aradnix Feb 27 '17 at 7:05
  • @Aradnix: I don't know this Spinoza method. I am sorry, but at the moment this question is too broad. I can provide a short answer for the \book issue, however. And by the way: Your comment didn't reach me, because of the typo ;-) I returned only by chance – user31729 Feb 27 '17 at 8:17
  • @ChristianHupfer well if this question is too broad you can erase it. – Aradnix Mar 8 '17 at 4:46

Have a look at the 'changectr' package. It does interesting things like restrict counting to individual chapters or sections, or allows you to have a numbering series throughout.

So in your case, you would have \counterwithin{verse}{chapter} and \counterwithin{chapter}{book}

Every time the chapter counter is increased, it would start from verse 1 in the style of the bible.

I use the same idea with counterwithout{section}{chapter} to have the sections numbered throughout the book, as ye see in some older texts.

  • 1
    The package is called chngcntr ;-) – user31729 Dec 25 '16 at 15:16
  • @wendy.krieger: If you already have \counterwithin{verse}{chapter} can you make an additional \counterwithin{verse}{book}? Otherwise, how to handle the books that are not divided into chapters? – dedded Dec 29 '16 at 18:13

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