
本の偶数ページで余白の注釈が行番号と衝突するという問題が少しあります。注釈がそのまま残るように余白を調整したいと思います。これは、外側の余白と偶数ページの 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 つの問題があります。
- 幅
marginpar
が、余白のメモを収容するのに必要な幅よりも狭くなっています。 を使用して幅を設定することで、これを修正できますgeometry
。 - 行番号と音符は同じ領域を争っています。
明らかな解決策が 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}