trivlist
sets \leftmargin
and \labelwidth
to 0pt
, and \labelsep
to 5pt
.
In case 1 you are simply adding some length (\labelsep
, which has a default value of 5pt
) before the label; so you push the label ("Theorem" in your example) to the right by a value of 5pt
; hadn't you added this length, the label would protrude 5pt
into the left margin of the document (which is exactly what happens in case 2).
Something similar happens in case 4, with the only difference that the horizontal length used to push the label to the right is 1in
; in this case, the leftmost character of the label will be 1in-5pt
away from the left margin of the document.
In case 2 you have the default behaviour of trivlist
; since \labelsep
is 5pt
, the leftmost character of the label will be pushed 5pt
to the left and will protrude 5pt
of the left margin of the document; the rightmost character of the label will be separated by the default \labelsep
value from the following text.
The separation between the rightmost character of the label and the beginning of the item body in the three considered cases is \labelsep
(5pt
).
Case 3 is the only one in which the default value of \labelsep
really changes; two things happen in this case: since you set \labelsep
to 1in
the label will be pushed to the left and will be separated from the item body by this value; the default label will protrude 1in
to the left of your document; however, since you used \hskip\labelsep
inside the label, the label ("Theorem") will be pushed to the right 1in
; all in all, the leftmost character of the label will coincide with the left margin of the document and the rightmost character of the label will be 1in
(the value set for \labelsep
) away from the following text.
Here's a simple document in which I illustrate your four cases together, and the result just explained; I added some thick rules to help visualize the lengths given in the explanation; the showframe
option for geometry
only was used to show the left margin of the document:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{amsthm}
\newtheorem*{theorem}{Theorem}
\newcommand\Text{{\itshape Lorem Ipsum.}}
\begin{document}
\noindent Case 1:
\begin{trivlist}
\item[\hskip \labelsep\textbf{Theorem.}]\Text
\end{trivlist}
\noindent Case 2:
\begin{trivlist}
\item[\textbf{Theorem.}]\Text
\end{trivlist}
\vskip-\baselineskip\llap{\rule{5pt}{3pt}}
\vskip\baselineskip
{
\noindent Case 3:
\setlength{\labelsep}{1in}
\begin{trivlist}
\item[\hskip\labelsep\textbf{Theorem.}]\Text
\end{trivlist}
\vskip-\baselineskip{\bfseries Theorem.}\rule{1in}{3pt}\Text
\vskip\baselineskip
}
\noindent Case 4:
\begin{trivlist}
\item[\hskip 1in\textbf{Theorem.}]\Text
\end{trivlist}
\vskip-\baselineskip\rule{\dimexpr1in-5pt\relax}{3pt}{\bfseries Theorem.} \Text
\end{document}
In the LaTeX kernel one finds the following definitions for the default theorem-like structures built with \newtheorem
:
\def\@begintheorem#1#2{\trivlist
\item[\hskip\labelsep{\bfseries #1\ #2}]\itshape}
\def\@opargbegintheorem#1#2#3{\trivlist
\item[\hskip \labelsep{\bfseries #1\ #2\ (#3)}]\itshape}
Since the defualt value for \labelsep
in trivlist
is 5pt
, without the use of \item[\hskip\labelsep...]
the label for the theorems would protrude 5pt into the left margin of the document.
One way to visualize what's going on in your example code (and in the design for particular layouts, in general) is to use the layouts
package; the \currentlist
command can be used to extract the values for the different lengths in each of your example code:
\documentclass{article}
\usepackage[showframe]{geometry}
\usepackage{amsthm}
\usepackage{layouts}
\newtheorem*{theorem}{Theorem}
\newcommand\Text{{\itshape Lorem Ipsum.}}
\begin{document}
\begin{trivlist}
\item[a]\Text
\currentlist
\begin{figure}
\listdesign
\caption{Layout of current list}
\end{figure}
\end{trivlist}
\clearpage
\begin{trivlist}
\item[a]\Text
\item[\hskip\labelsep\textbf{Theorem.}]\Text
\currentlist
\begin{figure}
\listdesign
\caption{Layout of current list}
\end{figure}
\end{trivlist}
\clearpage
\begin{trivlist}
\item[a]\Text
\item[\hskip 1in\textbf{Theorem.}]\Text
\currentlist
\begin{figure}
\listdesign
\caption{Layout of current list}
\end{figure}
\end{trivlist}
\clearpage
\setlength{\labelsep}{1in}
\begin{trivlist}
\item[a]\Text
\item[\hskip\labelsep\textbf{Theorem.}]\Text
\currentlist
\begin{figure}
\listdesign
\caption{Layout of current list}
\end{figure}
\end{trivlist}
\end{document}
As a final note, \itshape is a switch in declarative form, to be used in the following form
\itshape text
or
{\itshape text}
to keep the effect local to the group.
Best Answer
You should, first of all, define an environment (or command) for this, so you can change the formatting in all epigraphs with a single change to the definition.
Your aim can be achieved with a
tabular
; specify right alignment, no padding on the left and a 2em padding on the right, so thetabular
argument should beHere's the definition.
Then your epigraph can be typeset with
However, you should look at the
epigraph
package that has many features for this kind of things.