
Ich habe ein kleines Problem damit, dass Randnotizen mit Zeilennummern auf den geraden Seiten eines Buches kollidieren. Ich möchte die Ränder anpassen, damit die Notizen dort bleiben können, wo sie sind. Ich denke, das bedeutet, dass ich den äußeren Rand und den MarginParsep auf geraden Seiten vergrößern muss.
Unten finden Sie ein minimales funktionierendes Beispiel:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{lineno}
\usepackage{geometry}
\usepackage{marginnote}
\title{lineNumbersAndMarginNotes}
\begin{document}
\begin{linenumbers*}
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginpar{\fbox{\parbox{10ex}{Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\newpage
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginnote{\fbox{\parbox{10ex}{Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\end{linenumbers*}
\end{document}
Mich interessiert vor allem, wie man die Geometrie auf den Seiten mit geraden Seiten beeinflussen kann. Danke,
Antwort1
Hier gibt es 2 Probleme:
- Die
marginpar
Breite ist kleiner als nötig, um die Randnotizen unterzubringen. Dies kann behoben werden, indem die Breite mit eingestellt wirdgeometry
. - Die Zeilennummern und die Noten konkurrieren um dasselbe Territorium.
Es gibt zwei offensichtliche Lösungen. Eine besteht darin, die Seitenzahlen umzudrehen, sodass sie den Randnotizen gegenüberliegen:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[switch*]{lineno}
\usepackage[marginparwidth=12.5ex]{geometry}
\usepackage{marginnote}
\title{lineNumbersAndMarginNotes}
\begin{document}
\begin{linenumbers*}
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginpar{\fbox{\parbox{10ex}{Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\vfill
\newpage
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginnote{\fbox{\parbox{10ex}{Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\end{linenumbers*}
\end{document}
Dies hat den Vorteil der Symmetrie.
Alternativ können Sie die Ausrichtung der Randnotizen ändern und die Größe weiter vergrößern, marginpar
um bei Bedarf Platz für die Zeilennummern und Notizen zu schaffen:
\usepackage{lineno}
\usepackage[marginparwidth=15ex]{geometry}
\usepackage{marginnote}
\renewcommand*{\raggedleftmarginnote}{\raggedright}
\renewcommand*{\raggedrightmarginnote}{\raggedleft}
Ich würde auch empfehlen, den Text in den Notizen nicht zu blockieren, da dies bei einer so geringen Breite nicht gut funktioniert. Die Verwendung von ragged2e
könnte ebenfalls hilfreich sein.
Antwort2
Sie können das Paket mithilfe marginparsep
von geometry
:
\usepackage[marginparsep=7mm]{geometry} %% adjust 7mm at will
Code:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{lineno}
\usepackage[marginparsep=7mm]{geometry}
\usepackage{marginnote}
\title{lineNumbersAndMarginNotes}
\begin{document}
\begin{linenumbers*}
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginpar{\fbox{\parbox{10ex}{Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\newpage
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginnote{\fbox{\parbox{10ex}{Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\end{linenumbers*}
\end{document}
Möglicherweise möchten Sie \raggedright
es hineinlegen und es für Ihren Komfort auch \parbox
anpassen .marginparwidth
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{lineno}
\usepackage[marginparwidth=12ex,marginparsep=7mm]{geometry}
\usepackage{marginnote}
\title{lineNumbersAndMarginNotes}
\begin{document}
\begin{linenumbers*}
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginpar{\fbox{\parbox{10ex}{\raggedright Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\newpage
Here is some text that has line numbers, the text is not important, but it needs to have a few lines otherwise it won't demonstrate the issue I would like to figure out. I don't just want a plug in solution\marginnote{\fbox{\parbox{10ex}{\raggedright Here is a margin note, I think}}}, I'd really like to understand how to get the \texttt{geometry} package to act differently on odd and even pages.
\end{linenumbers*}
\end{document}