summaryrefslogtreecommitdiff
path: root/info/examples/tlc3/example-sources/4-3-5.ltx
diff options
context:
space:
mode:
Diffstat (limited to 'info/examples/tlc3/example-sources/4-3-5.ltx')
-rw-r--r--info/examples/tlc3/example-sources/4-3-5.ltx36
1 files changed, 36 insertions, 0 deletions
diff --git a/info/examples/tlc3/example-sources/4-3-5.ltx b/info/examples/tlc3/example-sources/4-3-5.ltx
new file mode 100644
index 0000000000..8bd5d6c9df
--- /dev/null
+++ b/info/examples/tlc3/example-sources/4-3-5.ltx
@@ -0,0 +1,36 @@
+%%
+%% The LaTeX Companion, 3ed
+%%
+%% Example 4-3-5 on page I-337 in "lineno --- Numbering lines of text".
+%%
+%% Copyright (C) 2022 Frank Mittelbach
+%%
+%% It may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%%
+%% See https://www.latex-project.org/lppl.txt for details.
+%%
+
+\documentclass{tlc3exa}
+\pagestyle{empty}
+\setcounter{page}{6}
+\setlength\textwidth{231.0pt}
+
+\addtolength\textwidth{-30pt}
+\newcommand\sample{ Some text to experiment
+ with line numbering.}
+%StartShownPreambleCommands
+\usepackage{lipsum,lineno}
+\linenumbers
+%StopShownPreambleCommands
+
+\begin{document}
+\lipsum[1][1-2] (A)\linelabel{first}
+\lipsum[1][3-4] (B)\linelabel{second}
+\lipsum[1][5-6] \par
+\nolinenumbers
+In the text we have labels on
+lines~\ref{first} and~\ref{second},
+but not on line~\lineref[+3]{second}.
+\end{document}