3

Suppose I want to define \newcommand{\versesep}{\textbullet} to be used to separate, say, Bible verses. What is the suggested method to define the horizontal space before and after the character?

7

Something like this?? Unlike the \kern alternative, the \hspace will be absorbed at margins, allowing proper alignment/flushing. The particular numbers for the gap can be chosen by the OP.

Thus use of minus (or plus) in defining the gapsize allows for some slop to be built in to the gap, which can be useful especially for narrow column documents.

\documentclass{article}
\def\versegap{\hspace{1pt minus.5pt}}
\newcommand\versesep{\versegap\textbullet\versegap}
\textwidth3in
\begin{document}
God created the heavens and the earth,\versesep the earth was a formless void and

xxxGod created the heavens and the earth,\versesep the earth was a formless void and

xxxxxxGod created the heavens and the earth,\versesep the earth was a formless void and
\end{document}

enter image description here

If you wanted to avoid a linebreak following the bullet, then this variation could be used:

\documentclass{article}
\def\versegap{\hspace{1pt minus.5pt}}
\def\versekern{\kern\glueexpr1pt minus.5pt\relax}
\newcommand\versesep{\versegap\textbullet\versekern\nobreak}
\textwidth3in
\begin{document}
God created the heavens and the earth,\versesep the earth was a formless void and

xxxGod created the heavens and the earth,\versesep the earth was a formless void and

xxxxxxGod created the heavens and the earth,\versesep the earth was a formless void and
\end{document}

enter image description here

  • Certainly +1, but could you explain why \kern\glueexpr1pt not simply \kern 1pt, please? – Przemysław Scherwentke Dec 8 '17 at 13:48
  • @PrzemysławScherwentke Using \glueexpr1pt minus.5pt\relax allows for the some shrinkage to be be built into the non-breaking gap. – Steven B. Segletes Dec 8 '17 at 13:51

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.