
Ich bereite gerade eine Abschlussarbeit vor, deren Absätze nummeriert sein müssen. Das Folgende funktioniert für meine Zwecke ungefähr einwandfrei:
\documentclass[12pt, twoside]{book}
\newcounter{chapcount}[chapter]
\newcounter{parnum}
\newlength{\parnumwidth}
\setlength{\parnumwidth}{4em}
\newcommand{\N}{%
\noindent\refstepcounter{chapcount}%
\makebox[0pt][r]{\makebox[\parnumwidth][l]{\textbf{\arabic{chapter}-
\arabic{chapcount}}}}%
\hspace*{\parindent}\ignorespaces}
\setlength{\parindent}{0em}
\begin{document}
\chapter{Introduction}
\N This is a numbered paragraph.
\N This is another paragraph.
\end{document}
Ich frage mich jedoch, ob es möglich ist, die Nummerierung im linken Rand einer linken Seite und im rechten Rand der rechten Seite anzuordnen – ein recht gängiges Layout für Lehrbücher und dergleichen:
Antwort1
Sie können das verwenden \marginpar
, in dem diese Funktion integriert ist.
\documentclass[12pt, twoside]{book}
\newcounter{chapcount}[chapter]
\renewcommand\thechapcount{\thechapter.\arabic{chapcount}}
\newcommand{\N}{%
\par
\noindent\refstepcounter{chapcount}%
\marginpar[\raggedleft \textbf{\thechapcount}]{\raggedright \textbf{\thechapcount}}}
\setlength{\parindent}{0em}
\begin{document}
\chapter{Introduction}
\N This is a numbered paragraph.
\N This is another paragraph.
\clearpage
\N This is a numbered paragraph.
\N This is another paragraph.
\end{document}