Componga el texto inmediatamente antes de que \lettrine pierda capital

Componga el texto inmediatamente antes de que \lettrine pierda capital

¿Cómo agrego texto en la 'barra lateral'? Soy consciente de que "barra lateral" probablemente sea la palabra incorrecta. Por favor déjame saber cuál es el término correcto. Me refiero al texto a la izquierda de la letra mayúscula ("El Día de Acción de Gracias").

Una idea: estoy trabajando en replicar unFolio de 72 páginas del Libro de Oración Común Episcopal de 1785. Hago esto por diversión y para asegurar que más personas tengan fácil acceso a la maravillosa prosa del 1785 BCP. Soy nuevo en LaTeX y he estado trabajando con el lenguaje durante unos días. Ah, y utilicé ABBYY FineReader Pro 11 para el trabajo de OCR. La buena gente de la sede de ABBYY necesita recibir la nota sobre las personas que utilizan OCR en documentos antiguos: ¡su programa cree que la s larga es una f!

Mi código es:

\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}

Una captura de pantalla del original. Una captura de pantalla de la recreación (usando TeXstudio

¡Gracias!

PD: buscando artículos sobre cómo aprender LaTeX (especialmente para personas con LD) y cómo participar en este Stack.
PPS: Descubrí que "Te bendecimos por tu paciencia con nosotros" realmente me llamó la atención. El BCP moderno (y, francamente, las oraciones en general) rara vez bendicen a Dios; generalmente son intercesiones para la bendición de Dios. Lástima que esto se haya eliminado de versiones posteriores.

Respuesta1

Qué tal esto:

\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}

Respuesta2

La respuesta anterior de Jon es absolutamente correcta, pero pensé en agregar una implementación LaTeX-y más automatizada de la solución. LaTeX se trata de marcar su documento de manera lógica, ¿no? El uso de entornos le permite mantener coherentes fragmentos lógicos completos del documento.

Supongo que cada oración que reproduzca tendrá algunas cosas en común:

  • capital caído
  • un título a la izquierda de la capital caída (como en su imagen)
  • Aménal final.

Construyamos algo a partir de esto:

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

Esto es bastante bueno: ahora podemos hablar de oraciones como

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

y hacer todo ese trabajo por nosotros.


Tenga en cuenta que en este momento no podemos usar ese loversizetruco que Jon señaló. Podemos ponerle un argumento opcional para permitir eso:

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

¡Ahora nosotros también podemos lucir bien!

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

¿Qué pasa si queremos poder definir también opcionalmente el ancho de la 'barra lateral' (tampoco sé cómo llamarla…)? No puedes definir dos argumentos opcionales con \newcommand (o su amigo newenvironment), pero xparsepuedes hacerlo:

\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
}

De hecho, xparsees extremadamente poderoso: puede definir algunas sintaxis bastante cómodas.muyfácilmente. (Ver texdoc xparse, particularmente la página 2). Considere el ejemplo completo.con el que todavía estoy jugando.

% 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}

lo que produce lo siguiente:

producción

(El único cambio adicional que hice fue aumentar ligeramente el texto de la 'barra lateral' con \raisebox. Creo que de esta manera se ve un poco más cercano).

Respuesta3

Una variación de la solución de Sean, con una sintaxis simplificada; el texto “preludio” se da como opción \lettrine, solo es cuestión de definir una nueva clave. El ancho de este preludio es, por defecto, el ancho natural, rodeado por un quad en ambos extremos. prewidthSe puede proporcionar una clave para cambiar este ancho, como se muestra en los ejemplos.

El estándar loversizese puede modificar en el preámbulo, por lo que no es necesario especificarlo en cada uso.

\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}

Por lo tanto, la sintaxis de \begin{prayer}es la misma que la sintaxis de \lettrine.

El “Amén” se establece en dos cuadrantes de la última palabra (no se permiten saltos de línea); en el código se muestra cómo empujarlo hacia el margen derecho, si lo desea.

ingrese la descripción de la imagen aquí

Para preludios de dos líneas, aquí tienes una posibilidad: sustituir el código de \makeatlettera \makeatotherpor

\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

Entonces la entrada

\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}

(tenga en cuenta que es mejor indicar el salto de línea) producirá

ingrese la descripción de la imagen aquí

información relacionada