2

I am laying out a Bible using memoir. I have been totally happy with it except for the superscript verse numbers.

My basic setup is as follows (I do have a lot of other code in the .tex file obviously, but I think these are the most relevant to the situation):

\documentclass{memoir}

\usepackage{titlesec}
\setsecnumdepth{subsection}

\renewcommand\thesubsection{\arabic{subsection}}
\renewcommand{\subsection}
    {\textsuperscript{\thesubsection}\vspace{0em}   
     \hspace{-.2em}\ignorespaces}

\begin{document}

\section{}
\subsection{} Verse 1 text with the verse number in superscript before the text. \subsection{} Verse 2 text here with a superscript verse number before the text. \subsection{} Verse 3, etc.

\end{document}

The end product is supposed to be the Bible text in paragraph form, with verses inline as opposed to each verse set off on their own. I got everything working properly except when I finally got the \subsection{} to display inline the subsection numbers turned into o:

Notice the superscript o's where the verse numbers ought to be

I will totally grant that, as a newbie, I may have gone about it all wrong. Perhaps this is answered elsewhere but I am still learning the lingo and haven't yet found the right solution to the problem. Totally hoping to get this right and lay my inadequacies at the mercy of the community.

1 Answer 1

1

First of all: I doubt that the rewrite of \subsection is the best idea at all...

Using titlesec and memoir is perhaps also not the best strategy...

Now the main reason why \thesubsection prints 0 all the while: \refstepcounter{subsection} has been missing in the redefinition of \subsection -- the subsection counter is never increased then and remains fixed to 0 (unless explicitly changed with some \setcounter etc. call)

If no cross-referencing is desired, \stepcounter{subsection} can be used as well, but I don't recommend this there.

\documentclass{memoir}

\usepackage{titlesec}
\setsecnumdepth{subsection}

\renewcommand\thesubsection{\arabic{subsection}}
\renewcommand{\subsection}
    {\refstepcounter{subsection}\textsuperscript{\thesubsection}\vspace{0em}   
     \hspace{-.2em}\ignorespaces}

\begin{document}

\section{}
\subsection{} Verse 1 text with the verse number in superscript before the text. \subsection{} Verse 2 text here with a superscript verse number before the text. \subsection{} Verse 3, etc.

\end{document}

enter image description here

2
  • Thank you for that. In light of your first two statements, is there a better route you'd recommend? I don't want a simple fix to a numeration issue here either make things more difficult in the long run or break other pieces I may need. This particular project is not going to have the bells and whistles of what you'd see in a Study Bible (no extensive footnotes, no thorough cross-referencing, no blocks of information before or after books, etc.) By and large this is meant to be a reader's version, with the main body of the text as the focus. Dec 11, 2017 at 15:16
  • @EddieGonzalez: The simple fix is that what can be provided on not much more than the code you have provided
    – user31729
    Dec 11, 2017 at 16:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .