Added example of the «quoting» package

This commit is contained in:
Kenneth John Odle 2023-10-29 13:58:16 -04:00
parent 7c7b101f99
commit 5791b466ed
2 changed files with 37 additions and 2 deletions

BIN
images/left-quote.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -12,6 +12,7 @@
\usepackage{tabularray}
\usepackage{lipsum}
\usepackage{nicefrac}
\usepackage{quoting}
\raggedbottom
@ -500,7 +501,7 @@ This text will be left-aligned with a ragged right edge.
\end{Verbatim}
\begin{flushleft}
You dont know about me without you have read a book by the name of The Adventures of Tom Sawyer; but that aint no matter. That book was made by Mr. Mark Twain, and he told the truth, mainly. There was things which he stretched, but mainly he told the truth. That is nothing. I never seen anybody but lied one time or another, without it was Aunt Polly, or the widow, or maybe Mary. Aunt Polly—Toms Aunt Polly, she is—and Mary, and the Widow Douglas is all told about in that book, which is mostly a true book, with some stretchers, as I said before.\end{flushleft}
You dont know about me without you have read a book by the name of \textit{The Adventures of Tom Sawyer}; but that aint no matter. That book was made by Mr. Mark Twain, and he told the truth, mainly. There was things which he stretched, but mainly he told the truth. That is nothing. I never seen anybody but lied one time or another, without it was Aunt Polly, or the widow, or maybe Mary. Aunt Polly—Toms Aunt Polly, she is—and Mary, and the Widow Douglas is all told about in that book, which is mostly a true book, with some stretchers, as I said before.\end{flushleft}
\subsection{Right-Aligned Text}
@ -513,7 +514,7 @@ This text will be left-aligned with a ragged right edge.
\end{Verbatim}
\begin{flushright}
You dont know about me without you have read a book by the name of The Adventures of Tom Sawyer; but that aint no matter. That book was made by Mr. Mark Twain, and he told the truth, mainly. There was things which he stretched, but mainly he told the truth. That is nothing. I never seen anybody but lied one time or another, without it was Aunt Polly, or the widow, or maybe Mary. Aunt Polly—Toms Aunt Polly, she is—and Mary, and the Widow Douglas is all told about in that book, which is mostly a true book, with some stretchers, as I said before.
You dont know about me without you have read a book by the name of \textit{The Adventures of Tom Sawyer}; but that aint no matter. That book was made by Mr. Mark Twain, and he told the truth, mainly. There was things which he stretched, but mainly he told the truth. That is nothing. I never seen anybody but lied one time or another, without it was Aunt Polly, or the widow, or maybe Mary. Aunt Polly—Toms Aunt Polly, she is—and Mary, and the Widow Douglas is all told about in that book, which is mostly a true book, with some stretchers, as I said before.
\end{flushright}
\section{Vertical Space}
@ -897,6 +898,40 @@ The \texttt{quotation} environment indents the first line of each paragraph, so
As you can see in the above examples, the indentation is not consistent in those environments, and neither of them provide a good means of providing an attribution, which is commonly typeset as right-justified. The \texttt{quoting} package provides a number of options which are not available within the default environments of \LaTeX{}. However, it still does not provide a means of attributing the quotations. The best way may be to do it outside of whichever quotations environment you end up using.
For example, this code:
\begin{Verbatim}[frame=lines, numbers=left, xleftmargin=5mm, framesep=3mm, breaklines=true, label=\fbox{Quoting Example}]
\begin{quoting}[
indentfirst=false,
font=itshape,
begintext={\includegraphics[scale=0.5]{left-quote}},
endtext=''
]
\item Once more unto the breach, dear friends, once more;
\end{quoting}
\begin{flushright}
—William Shakespeare, \textit{Henry V}, Act II, Scene 1
\end{flushright}
\end{Verbatim}
produces this example:
\begin{quoting}[
indentfirst=false,
font=itshape,
begintext={\includegraphics[scale=0.5]{left-quote}},
endtext=''
]
\item Once more unto the breach, dear friends, once more;
\end{quoting}
\begin{flushright}
—William Shakespeare, \textit{Henry V}, Act II, Scene 1
\end{flushright}
\noindent{}I can probably live with that.
\chapter{Math in \LaTeX{}}
\LaTeX{} has a couple of different environments that are useful for typesetting math (\texttt{align} and \texttt{array}, but they get a little beyond what I want to cover here. In addition, there are other packages (in particular \texttt{amsmath} and \texttt{mathtools}) that greatly extend the power of LaTeX to handle mathematical typesettings, but again, they are beyond the scope of this book.