Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How do I add 'sidebar' text? I'm aware that 'sidebar' is likely the wrong word to use. Please let me know what the correct term is. I'm referring to the text to the left of the dropped cap ("The Thanksgiving".)

Some insight: I am working on replicating a 72-page folio of the 1785 Episcopal Book of Common Prayer. I'm doing this for fun and to ensure that more people have easy access to the wonderful prose of the 1785 BCP. I am new to LaTeX, and have been working with the language for but a few days. Oh, and I used ABBYY FineReader Pro 11 for the OCR job. The good people o'er yonder at ABBYY headquarters need to get the memo about people using OCR on old documents—their program thinks the long s is an f!

My code is:

\documentclass{article}
\usepackage{lettrine}
\usepackage{fontspec}
    \defaultfontfeatures{Ligatures={Historical}}
    \setmainfont[Ligatures={Common,Rare}]{Adobe Caslon Pro}

\begin{document}
   \lettrine{T}{O} our prayers, O Lord, we join our unfeigned thanks for all thy
   mercies; for our being, our reaſon, and all other endowments and faculties of ſoul
   and body; for our health, friends, food, and raiment, and all the other comforts and
   conveniences of life. Above all we adore thy mercy in ſending thy only Son into the
   world to redeem us from ſin and eternal death, and in giving us the knowledge and           
   ſenſe of our duty towards thee. We bleſs thee for thy patience with us, notwithſtanding
   our many and great provocations; for all the directions, aſſiſtances, and comforts of thy
   Holy Spirit; for thy continual care and watchful providence over us through the whole
   courſe of our lives; and particularly for the mercies and benefits of the paſt day:
   Beſecching thee to continue theſe thy bleſſings to us; and to give is grace to ſhow
   our thankfulneſs in a ſincere obedience to his laws through whoſe merits and
   interceſſion we received them all, thy Son our Saviour Jeſus Chriſt. \textit{Amen.}
\end{document}

A screencap of the original A screencap of the recreation (using TeXstudio

Thanks!

P.S.: Looking for articles on learning LaTeX (esp. for people with LD) and getting involved in this Stack.
P.P.S: I found that "We bleſs thee for thy patience with us" really spoke to me. The modern BCP (and, frankly, prayers in general) rarely bless God—they're usually intercessions for the blessing of God. Pity that this was removed from later versions.

share|improve this question
1  
Welcome to TeX.SX! I would think to use a custom box, but there might be some complications from the lettrine. (And we're very friendly here :) Just go on chat, say you like ducks, and you'll be instantly popular.) –  Sean Allred Dec 30 '13 at 4:30
2  
That was my thought, yes, but it seems (at least on the surface) that \lettrine introduces a \par token; that is, it starts a new paragraph. …… which it does (take a look at the output of texdef -t latex -p lettrine @lettrine.) All this meaning that whatever text you put in the box would still be on a separate line from the dropped capital. –  Sean Allred Dec 30 '13 at 4:35
2  
One minor point: compare the difference between your first line, and using \lettrine[loversize=0.1]{T}{O}. The second mandatory argument to \lettrine sets the text in small caps, which ignores your capital 'O', and this makes the lettrine 'T' look odd. You could do \lettrine{T}{o}, but that won't look right either because of the 'O Lord' later in the line. –  jon Dec 30 '13 at 4:44
1  
texdef is a command-line tool to see the definition of a macro; it told me that \lettrine was always going to start a new paragraph, wherever it is in your source file. I said it was LaTeX with -t latex and I loaded the appropriate package with -p lettrine. \@lettrine is the command that actually prints the letter there. –  Sean Allred Dec 30 '13 at 4:47
1  
You could potentially use a pretty ugly workaround using the image= keyword. Definitely not ideal, though. Besides that, I don't see much in the documentation (texdoc lettrine) to suggest this is strictly supported. –  Sean Allred Dec 30 '13 at 4:49

3 Answers 3

up vote 14 down vote accepted

How about this:

\documentclass{article}
\usepackage{lettrine}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={Historical}}
\setmainfont[Ligatures={Common,Rare}]{Adobe Caslon Pro}

\newcommand \prelude[1] {\makebox[8em][c]{\em\scriptsize #1.}}

\begin{document}
   \lettrine[ante={\prelude{The Thanksgiving}}, loversize=0.1]{T}{O} 
   our prayers, O Lord, we join our unfeigned thanks for all thy
   mercies; for our being, our reaſon, and all other endowments and faculties of ſoul
   and body; for our health, friends, food, and raiment, and all the other comforts and
   conveniences of life. Above all we adore thy mercy in ſending thy only Son into the
   world to redeem us from ſin and eternal death, and in giving us the knowledge and           
   ſenſe of our duty towards thee. We bleſs thee for thy patience with us, notwithſtanding
   our many and great provocations; for all the directions, aſſiſtances, and comforts of thy
   Holy Spirit; for thy continual care and watchful providence over us through the whole
   courſe of our lives; and particularly for the mercies and benefits of the paſt day:
   Beſecching thee to continue theſe thy bleſſings to us; and to give is grace to ſhow
   our thankfulneſs in a ſincere obedience to his laws through whoſe merits and
   interceſſion we received them all, thy Son our Saviour Jeſus Chriſt. \qquad \textit{Amen.}
\end{document}
share|improve this answer
    
How did that slip my eye… +1! –  Sean Allred Dec 30 '13 at 4:54
    
Jon, thanks again for your input. However, when I run the script (what would one call it?) in TeXstudio, I get an error: File ended while scanning use of \@lettrine I assume, however, that I am in error. :-) –  Phil Vollman Dec 30 '13 at 4:55
    
@PhilVollman -- Ooops: missing a closing brace! One sec. –  jon Dec 30 '13 at 4:57
    
Jon, would you mind if I implemented as an edit-in the \makebox stuff? –  Sean Allred Dec 30 '13 at 4:58
2  
@PhilVollman I would start by trying to find an even closer font match to the original, and then measure the size of the text block and set it in a page of that size (see the geometry package). Text seems a bit smaller in the original, too. If you find the right shaping, TeX should approximate the original setter's work much more closely. –  Sean Allred Dec 30 '13 at 5:26

Jon's answer above is absolutely correct, but I thought I'd add a more automated, LaTeX-y implementation of the solution. LaTeX is all about marking up your document logically, yes? Using environments allows you to keep entire logical chunks of the document consistent.

Every prayer you reproduce, I assume, will have a few things in common:

  • dropped capital
  • a title to the left of the dropped capital (as in your picture)
  • Amen at the end.

Let's build something from this:

\usepackage{xparse}
\NewDocumentEnvironment{prayer}{m m m}{%
  \lettrine[ante=\prelude{#1}]{#2}{#3}%
}{
  \unskip % removes excess space
  \qquad
  \textit{Amen.}\par
}

This is pretty great—now we can talk about prayers like

\begin{prayer}{The Thanksgiving}{T}{O}
  our prayers, ...
\end{prayer}

and have all of that work done for us.


Note that right now, we can't use that loversize trick Jon noted. We can put it an optional argument to allow that:

\usepackage{xparse}
\NewDocumentEnvironment{prayer}{O{} m m m}{%
  \lettrine[ante=\prelude{#2},#1]{#3}{#4}%
}{
  \unskip % removes excess space
  \qquad
  \textit{Amen.}\par
}

Now we can look nice, too!

\begin{prayer}[loverline=.15]{The Thanksgiving}{T}{O}
  our prayers, ...
\end{prayer}

What if we want to be able to also optionally define the width of the 'sidebar' (I don't know what else to call it, either…)? You couldn't define two optional arguments with \newcommand (or its friend, newenvironment), but xparse can do that:

\usepackage{xparse}
\NewDocumentEnvironment{prayer}{O{} m O{8em} m m}{%
  % note I've taken out \prelude now; it is no longer general enough.
  \lettrine[ante={\makebox[#3][c]{\itshape\scriptsize #2.}}, #1]{#4}{#5}%
}{
  \unskip
  \qquad
  \textit{Amen.}\par
}

In fact, xparse is extremely powerful: it can define some pretty crazy-convenient syntaxes very easily. (See texdoc xparse, particularly page 2.) Consider the complete example that I'm still toying with.

% xelatex bcp.tex
% pdfcrop bcp.pdf
% convert  -density 600 bcp-crop.pdf bcp.png
\documentclass{article}
\usepackage{lettrine}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={Historical}}
\setmainfont[Ligatures={Common,Rare}]{Hoefler Text}
% Unfortunately, I do not own Caslon Pro

\usepackage{xparse}

% Starts an environment like this:
%
%   \begin{prayer}[extra options for lettrine]%
%                 {'sidebar' text}%
%                 [width of sidebar]
%     Dropped text \endl no longer dropped
%   \end{prayer}
%
%   Will automatically drop the first letter encountered and continue
%   the \lettrine until an \endl is encountered.
\NewDocumentEnvironment{prayer}{O{} m O{8em} m u{\endl}}{%
  \lettrine[ante={\raisebox{.5ex}
                 {\makebox[#3][c]{\itshape\scriptsize #2.}}},
            #1]%
           {#4}{#5}%
}{
  \unskip
  \qquad
  \textit{Amen.}\par
}
\pagestyle{empty}
\begin{document}
\begin{prayer}[loversize=.15]{The Thankſgiving}
  TO \endl our prayers, O Lord, we join our unfeigned thanks for all thy mercies;
  for our being, our reaſon, and all other endowments and faculties of
  ſoul and body; for our health, friends, food, and raiment, and all
  the other comforts and conveniences of life.  Above all we adore thy
  mercy in ſending thy only Son into the world to redeem us from ſin
  and eternal death, and in giving us the knowledge and ſenſe of our
  duty towards thee.  We bleſs thee for thy patience with us,
  notwithſtanding our many and great provocations; for all the
  directions, aſſiſtances, and comforts of thy Holy Spirit; for thy
  continual care and watchful providence over us through the whole
  courſe of our lives; and particularly for the mercies and benefits
  of the paſt day: Beſecching thee to continue theſe thy bleſſings to
  us; and to give is grace to ſhow our thankfulneſs in a ſincere
  obedience to his laws through whoſe merits and interceſſion we
  received them all, thy Son our Saviour Jeſus Chriſt.
\end{prayer}
\end{document}

which yields the following:

output

(The only additional change I made was raising the 'sidebar' text slightly with \raisebox. I think it looks slightly closer this way.)

share|improve this answer

A variation of Sean's solution, with a simplified syntax; the “prelude” text is given as an option to \lettrine, it's just a matter of defining a new key. The width of this prelude is, by default, the natural width, surrounded by one quad at both ends. A prewidth key can be given for changing this width, as shown in the examples.

The standard loversize can be modified in the preamble, so it's not necessary to specify it at every usage.

\documentclass{article}
\usepackage{lettrine}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={Historical}}
\setmainfont[Ligatures={Common,Rare}]{Hoefler Text}
% Unfortunately, I do not own Caslon Pro

\makeatletter
\define@key{L}{prelude}{%
  \renewcommand*{\L@ante}{%
    \quad\makebox[\L@prewidth][c]{\em\scriptsize #1.}\quad
  }%
}
\define@key{L}{prewidth}{\renewcommand*{\L@prewidth}{#1}}
\newcommand{\L@prewidth}{\width}
\renewcommand{\DefaultLoversize}{0.15}
\makeatother

\usepackage{xparse}

\NewDocumentEnvironment{prayer}{O{}mm}{%
  \lettrine[#1]{#2}{#3}%
}{%
  % if you want the Amen at a quad from the last word
  \unskip\nolinebreak\qquad\textit{Amen.}\par
  % if instead you want the Amen at the right margin
  % comment the line above and uncomment the following three lines
  %{\nobreak\hfill\penalty50\hskip1em\null\nobreak
  % \hfill\textit{Amen.}%
  % \parfillskip=0pt \finalhyphendemerits=0 \par}%
}

\begin{document}

\begin{prayer}[prelude=The Thankſgiving]{T}{O}
our prayers, O Lord, we join our unfeigned thanks for all thy mercies;
for our being, our reaſon, and all other endowments and faculties of
ſoul and body; for our health, friends, food, and raiment, and all
the other comforts and conveniences of life.  Above all we adore thy
mercy in ſending thy only Son into the world to redeem us from ſin
and eternal death, and in giving us the knowledge and ſenſe of our
duty towards thee.  We bleſs thee for thy patience with us,
notwithſtanding our many and great provocations; for all the
directions, aſſiſtances, and comforts of thy Holy Spirit; for thy
continual care and watchful providence over us through the whole
courſe of our lives; and particularly for the mercies and benefits
of the paſt day: Beſecching thee to continue theſe thy bleſſings to
us; and to give is grace to ſhow our thankfulneſs in a ſincere
obedience to his laws through whoſe merits and interceſſion we
received them all, thy Son our Saviour Jeſus Chriſt.
\end{prayer}

\begin{prayer}[prewidth=6em,prelude=The Thankſgiving]{T}{O}
our prayers, O Lord, we join our unfeigned thanks for all thy mercies;
for our being, our reaſon, and all other endowments and faculties of
ſoul and body; for our health, friends, food, and raiment, and all
the other comforts and conveniences of life.  Above all we adore thy
mercy in ſending thy only Son into the world to redeem us from ſin
and eternal death, and in giving us the knowledge and ſenſe of our
duty towards thee.  We bleſs thee for thy patience with us,
notwithſtanding our many and great provocations; for all the
directions, aſſiſtances, and comforts of thy Holy Spirit; for thy
continual care and watchful providence over us through the whole
courſe of our lives; and particularly for the mercies and benefits
of the paſt day: Beſecching thee to continue theſe thy bleſſings to
us; and to give is grace to ſhow our thankfulneſs in a ſincere
obedience to his laws through whoſe merits and interceſſion we
received them all, thy Son our Saviour Jeſus Chriſt.
\end{prayer}

\begin{prayer}[prewidth=8em,prelude=The Thankſgiving]{T}{O}
our prayers, O Lord, we join our unfeigned thanks for all thy mercies;
for our being, our reaſon, and all other endowments and faculties of
ſoul and body; for our health, friends, food, and raiment, and all
the other comforts and conveniences of life.  Above all we adore thy
mercy in ſending thy only Son into the world to redeem us from ſin
and eternal death, and in giving us the knowledge and ſenſe of our
duty towards thee.  We bleſs thee for thy patience with us,
notwithſtanding our many and great provocations; for all the
directions, aſſiſtances, and comforts of thy Holy Spirit; for thy
continual care and watchful providence over us through the whole
courſe of our lives; and particularly for the mercies and benefits
of the paſt day: Beſecching thee to continue theſe thy bleſſings to
us; and to give is grace to ſhow our thankfulneſs in a ſincere
obedience to his laws through whoſe merits and interceſſion we
received them all, thy Son our Saviour Jeſus Chriſt.
\end{prayer}
\end{document}

Therefore the syntax of \begin{prayer} is the same as the syntax of \lettrine.

The “Amen” is set at two quads from the last word (no line break allowed); in the code it's shown how to push it to the right margin, if desired.

enter image description here

For two line preludes, here's a possibility: substitute the code from \makeatletter to \makeatother with

\usepackage{varwidth}
\makeatletter
\define@key{L}{prelude}{%
  \renewcommand*{\L@ante}{%
    \quad
    \makebox[\L@prewidth][c]{%
      \begin{varwidth}[t]{12em}
      \em\scriptsize #1.
      \end{varwidth}%
    }\quad
  }%
}
\define@key{L}{prewidth}{\renewcommand*{\L@prewidth}{#1}}
\newcommand{\L@prewidth}{\width}
\renewcommand{\DefaultLoversize}{0.15}
\makeatother

Then the input

\begin{prayer}[
  prelude=The Thankſgiving\\ and Chriſtmas
]{T}{O}
our prayers, O Lord, we join our unfeigned thanks for all thy mercies;
for our being, our reaſon, and all other endowments and faculties of
ſoul and body; for our health, friends, food, and raiment, and all
the other comforts and conveniences of life.  Above all we adore thy
...
\end{prayer}

(note that it's better to indicate the line break) will produce

enter image description here

share|improve this answer
    
A much more useful solution, all things considered ... and one I wouldn't have thought of trying! In order to be truly robust, I think \parbox will be better than \makebox because some "preludes" will be quite long and will need to break into two lines. (@PhilVollman has a comment/question somewhere to that effect.) Maybe something like \parbox[c]{\L@prewidth} where \newcommand{\L@prewidth}{<some max. width>}..? –  jon Dec 30 '13 at 19:09
    
@jon Probably varwidth instead of \parbox is better. I'll add it later. –  egreg Dec 30 '13 at 19:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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