本の偶数ページで行番号が余白の注釈と衝突する

本の偶数ページで行番号が余白の注釈と衝突する

本の偶数ページで余白の注釈が行番号と衝突するという問題が少しあります。注釈がそのまま残るように余白を調整したいと思います。これは、外側の余白と偶数ページの marginparsep を増やす必要があることを意味すると思います。

最小限の動作例を以下に示します。

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

私は主に、平らな面のページの形状にどのような影響を与えるかに興味があります。ありがとうございます。

答え1

ここでは 2 つの問題があります。

  1. marginparが、余白のメモを収容するのに必要な幅よりも狭くなっています。 を使用して幅を設定することで、これを修正できますgeometry
  2. 行番号と音符は同じ領域を争っています。

明らかな解決策が 2 つあります。1 つは、ページ番号を反転して、余白の注釈と反対になるようにすることです。

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

反転した数字

これには対称性の利点があります。

marginparあるいは、余白の注釈の配置を変更し、必要に応じて行番号と注釈を収容できるようにサイズをさらに大きくすることもできます。

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

再配置された余白の注釈

また、ノート内のテキストを両端揃えにしないことをお勧めします。幅が狭いため、この方法はうまく機能しないからです。 を使用するとragged2e役立つかもしれません。

答え2

marginparsep使用するパッケージを増やすことができますgeometry:

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

コード:

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

ここに画像の説明を入力してください

利便性のために、\raggedrightを内側に入れて\parboxも調整するとよいかもしれません。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}

ここに画像の説明を入力してください

関連情報