答案1
我不知道节名应该放在页边的什么位置,也不知道页码是否应该放在某处。所以这里只是使用包进行猜测scrlayer-scrpage
:
\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage[automark]{scrlayer-scrpage}[2016/10/03]
\clearpairofpagestyles
\cfoot*{\pagemark}
\DeclareNewLayer[
background,
oneside,
textarea,
addhoffset=\textwidth,
addhoffset=2em,% sep between text and the rotated section entry
mode=picture,
contents=\putLL{\rotatebox[origin=lB]{90}{\rightmark}}
]{margin.oneside}
\AddLayersToPageStyle{scrheadings}{margin.oneside}
\usepackage{blindtext}% dummy text
\begin{document}
\Blinddocument
\end{document}
如果章节标题可能很长或者您想在下面添加第二行\rightmark
,则可以使用 parbox,例如\textwidth
或\layerheight
作为宽度。
\documentclass[twocolumn]{article}
\usepackage{graphicx}
\usepackage[automark]{scrlayer-scrpage}[2016/10/03]
\clearpairofpagestyles
\cfoot*{\pagemark}
\DeclareNewLayer[
background,
oneside,
textarea,
addhoffset=\textwidth,
addhoffset=2em,% sep between text and the rotated section entry
mode=picture,
contents=\putLL{\rotatebox[origin=lB]{90}{\parbox{\layerheight}{\rightmark}}}
]{margin.oneside}
\AddLayersToPageStyle{scrheadings}{margin.oneside}
\usepackage{blindtext}% dummy text
\begin{document}
\section{Long text to test the output. Long text to test the output. Long text to test the output. Long text to test the output. Long text to test the output. Long text to test the output.}
\Blindtext
\Blinddocument
\end{document}