Os números das linhas colidem com as notas de margem nas páginas pares de um livro

Os números das linhas colidem com as notas de margem nas páginas pares de um livro

Estou tendo um problema com notas de margem colidindo com números de linha nas páginas pares de um livro. Gostaria de ajustar as margens para que as notas fiquem onde estão. Acho que isso significa que preciso aumentar a margem externa e o marginparsep nas páginas pares.

Um exemplo mínimo de trabalho está incluído abaixo:

\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}

Estou mais interessado em como afetar a geometria nas páginas pares. Obrigado,

Responder1

Existem 2 problemas aqui:

  1. A marginparlargura é menor do que o necessário para acomodar as notas de margem. Isso pode ser corrigido definindo a largura usando geometry.
  2. Os números das linhas e as notas competem pelo mesmo território.

Existem 2 soluções óbvias. Uma é virar os números das páginas para que fiquem opostos às notas de margem:

\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}

números invertidos

Isso tem a vantagem da simetria.

Alternativamente, você pode alterar o alinhamento das notas de margem, aumentando ainda mais o tamanho marginparpara acomodar os números das linhas e as notas quando necessário:

\usepackage{lineno}
\usepackage[marginparwidth=15ex]{geometry}
\usepackage{marginnote}
\renewcommand*{\raggedleftmarginnote}{\raggedright}
\renewcommand*{\raggedrightmarginnote}{\raggedleft}

notas de margem realinhadas

Eu também recomendaria não justificar o texto dentro das notas, pois isso não funcionará bem com uma largura tão estreita. Usar ragged2etambém pode ajudar.

Responder2

Você pode aumentar o pacote marginparsepusando geometry:

\usepackage[marginparsep=7mm]{geometry}   %% adjust 7mm at will

Código:

\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}

insira a descrição da imagem aqui

Você pode colocar \raggedrightdentro \parboxe ajustar marginparwidthtambém para sua conveniência.

\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}

insira a descrição da imagem aqui

informação relacionada