scrlayer-scrpage로 인해 페이지 헤더가 너무 높습니다.

scrlayer-scrpage로 인해 페이지 헤더가 너무 높습니다.

연습 시트를 디자인하고 있는데 헤더에 대한 도움이 필요합니다. 내 코드에서는 정상적으로 보이지만 페이지에서는 너무 높습니다. 변경해도 headheight아무런 효과가 없는 것 같습니다. 단지 LaTeX가 너무 낮게 선택하면 불평할 뿐입니다.

페이지 아래로 내릴 수 있는 방법이 있나요? 아니면 다른 방법으로 두 줄 헤더를 작성해야 합니까?

또한 새 섹션이 시작되는 페이지에만 헤더를 표시하고 다른 페이지에는 표시하지 않을 수 있는지 알고 싶습니다(예: 처음 두 페이지에는 있지만 예제의 마지막 페이지에는 표시되지 않음). .

\documentclass[paper=a4, twoside=true, fontsize=11pt, parskip=half, headheight=1cm, DIV=12]{scrartcl}

% Designing the head of the page
\usepackage[automark,headsepline]{scrlayer-scrpage}
\pagestyle{scrheadings}
\ihead{{\normalfont\bfseries Exercise Sheet \thesection\  for some Lecture, Summer 2015}\\
    \normalfont Due date: Thursday, 01. January 2015, 10:00}
\ohead{{\normalfont\bfseries Prof. Dr. John Doe}\\
    \normalfont [email protected]}
\chead{}

\usepackage{blindtext}

\begin{document}
\blinddocument
\end{document}

답변1

아마도 당신은 옵션을 찾고있을 것입니다 headinclude=true. 이 옵션을 명시적으로 설정할 수 있습니다 \documentclass[...,headinclude=true,...]{scrartcl}. 아니면 headsepline클래스 옵션으로 옵션을 설정할 수도 있습니다 . 그러면 headinclude=true자동으로 설정됩니다.

페이지에서 섹션이 시작되는 경우 헤더만 있어야 하는 경우 plain페이지 스타일을 사용하고 명령 다음에 scrheadings사용하도록 전환하세요.\thispagestyle{scrheadings}\section

\documentclass[
  twoside=true,
  parskip=half,
  headlines=2,
  headsepline,% headinclude=true is also set
  DIV=12
  ]{scrartcl}
% Designing the head of the page
\usepackage[
    %automark,% why? \headmark etc. are not used in your code
    %headsepline
  ]{scrlayer-scrpage}
\ihead{\textbf{Exercise Sheet \thesection\  for some Lecture, Summer 2015}\\
    Due date: Thursday, 01. January 2015, 10:00}
\ohead{\textbf{Prof. Dr. John Doe}\\
    [email protected]}
\chead{}

\setkomafont{pagehead}{\normalfont}

\pagestyle{plain}

\usepackage{blindtext}

\begin{document}
\section{First section}\thispagestyle{scrheadings}
\subsection{First subsection}
\Blindtext
\subsection{Second subsection}
\Blindtext
\section{Second section}\thispagestyle{scrheadings}
\subsection{First subsection}
\Blindtext
\subsection{Second subsection}
\Blindtext
\end{document}

여기에 이미지 설명을 입력하세요

또는 명령 etoolbox을 로드하여 패치 할 수 있습니다.\section

\documentclass[
  twoside=true,
  parskip=half,
  headlines=2,
  headsepline,% headinclude=true is also set
  DIV=12
  ]{scrartcl}
% Designing the head of the page
\usepackage[
    %automark,% why? you define the header manually in your code
    %headsepline
  ]{scrlayer-scrpage}
\ihead{\textbf{Exercise Sheet \thesection\  for some Lecture, Summer 2015}\\
    Due date: Thursday, 01. January 2015, 10:00}
\ohead{\textbf{Prof. Dr. John Doe}\\
    [email protected]}
\chead{}

\setkomafont{pagehead}{\normalfont}

\pagestyle{plain}

\usepackage{etoolbox}
\pretocmd\section{\thispagestyle{scrheadings}}{}{}

\usepackage{blindtext}

\begin{document}
\section{First section}
\subsection{First subsection}
\Blindtext
\subsection{Second subsection}
\Blindtext
\section{Second section}
\subsection{First subsection}
\Blindtext
\subsection{Second subsection}
\Blindtext
\end{document}

답변2

KOMA-Script에는 인쇄 영역을 구축하거나 더 잘 계산하는 자체 알고리즘이 있습니다.

예를 들어 DIV=12. KOMA-Script 매뉴얼에서 이것이 어떻게 작동하는지 읽을 수 있습니다. 여기에만 해당됩니다. 숫자가 클수록(예 12: ) KOMA-Script를 사용하면 여백이 작아집니다. 더 큰 여백을 원할 경우 DIV에 더 작은 숫자(예: )를 사용하십시오 DIV=9.

showframe이를 시각화하기 위해 MWE에 패키지를 추가하여 입력 영역을 표시했습니다. 에 대해 여러 숫자를 사용하여 내 MWE를 사용해 보세요 DIV. 그런 다음 글꼴 크기를 변경하고 여러 DIV로 다시 시도하십시오. 차이가 보일 것입니다.

특별한 여백을 사용하려면 geometry대신 패키지를 사용하는 것이 좋습니다.

테스트를 위해 약간 예쁜 인쇄가 포함된 MWE:

\documentclass[%
  paper=a4
%,twoside=true      % why for an article??????????????
 ,fontsize=11pt     % relevant for typing area
 ,parskip=half
 ,headheight=28pt   % 28pt minimum; depends on fontsize
 ,DIV=9             % relevant for typing area: try 9, 10, 11, 12
]{scrartcl}

\usepackage{blindtext} % for dummy text
\usepackage{showframe} % shows typing area

% Designing the head of the page
\usepackage[%
  automark
 ,headsepline
]{scrlayer-scrpage}
\pagestyle{scrheadings}

\ihead{{\normalfont\bfseries Exercise Sheet \thesection\  for some Lecture, Summer 2015}\\
    \normalfont Due date: Thursday, 01. January 2015, 10:00}
\ohead{{\normalfont\bfseries Prof. Dr. John Doe}\\
    \normalfont [email protected]}
\chead{}


\begin{document}
\blinddocument
\thispagestyle{empty}
\blindtext
\end{document}

페이지에 헤더를 원하지 않으면 \thispagestyle{empty}MWE의 마지막 두 줄에 표시된 대로 명령을 사용할 수 있습니다.

관련 정보