아래 대신 장 및 섹션 제목 옆에 있는 Headsepline

아래 대신 장 및 섹션 제목 옆에 있는 Headsepline

~ 안에이 논문-로 만든회상록클래스 - 저자가 사용하는헤드라인아래 대신 헤더 콘텐츠 옆에:

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

같은 것을 달성하는 것이 가능합니까?KOMA스크립트그리고scrlayer-scrpage, 장 제목이 있는 짝수 페이지와 섹션 제목이 있는 홀수 페이지 모두에 대해?

연결된 예제와 달리 다음을 얻고 싶습니다.

짝수 페이지:

장 제목 _________________________________________________

홀수 페이지:

__________________________________ 섹션 번호 섹션 제목

페이지 번호는 바닥글에 있으므로 관련이 없습니다.


다음은 MWE를 사용하는 방법입니다.

\documentclass{scrbook}

\RequirePackage[headsepline,automark]{scrlayer-scrpage}

\renewcommand*{\chaptermarkformat}{\scshape}
\KOMAoption{headsepline}{0.1pt}
\pagestyle{scrheadings}

\usepackage{blindtext}

\begin{document}

\chapter{Hello World!}
\section{Section One}
\blindmathpaper
\blindmathpaper
\blindmathpaper

\end{document} 

폐지하려고 했는데헤드라인\chaptermarkformat및 를 \sectionmarkformat사용하여 수정 하는 hrulefill것이 좋은 방법인 것 같습니다. 그러나 나는 그것을 제대로 할 수 없습니다.

\documentclass{scrbook}

\RequirePackage[automark]{scrlayer-scrpage}

\renewcommand*{\chaptermarkformat}[1]{\scshape \hspace{2ex} \hrulefill}

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

(챕터 이름은 왼쪽에 있어야 하며 간격이 잘못되었습니다.)


와 함께

\renewcommand*{\sectionmarkformat}[1]{\hrulefill \hspace{2ex} \thesection \hspace{1ex} \rightmark }

홀수 페이지는 괜찮아 보이지만 조금 다르게 처리해야 할 것 같습니다. 예를 들어 여기서 수동으로 간격을 설정해야 하는 이유는 다음과 같습니다.\thesection \hspace{1ex} \rightmark

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

답변1

다음은 제안 사항입니다.\hrulefill

\documentclass{scrbook}
\usepackage[automark]{scrlayer-scrpage}

\lehead{\headmark{} \hrulefill}
\rohead{\hrulefill{} \headmark}

\renewcommand*{\chaptermarkformat}{}
\addtokomafont{pagehead}{\scshape}

\usepackage{blindtext}

\begin{document}
\Blinddocument
\end{document}

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

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


또는 다음 옵션을 사용하려는 경우 headmarks=.1pt:

\documentclass{scrbook}
\usepackage{xcolor}
\usepackage[automark,headsepline=.1pt]{scrlayer-scrpage}

\RemoveLayersFromPageStyle{scrheadings}{scrheadings.head.below.line}
\DeclareNewLayer[
  clone=scrheadings.head.odd,
  contents={\GetLayerContents{scrheadings.head.below.line}}
]{scrheadings.head.odd.line}
\DeclareNewLayer[
  clone=scrheadings.head.odd.line,
  evenpage
]{scrheadings.head.even.line}
\AddLayersToPageStyleBeforeLayer{scrheadings}%
  {scrheadings.head.odd.line}{scrheadings.head.odd}
\AddLayersToPageStyleBeforeLayer{scrheadings}%
  {scrheadings.head.even.line}{scrheadings.head.even}

\lehead{\setlength\fboxsep{0pt}\colorbox{white}{\headmark\strut\enskip}}
\rohead{\setlength\fboxsep{0pt}\colorbox{white}{\enskip\headmark\strut}}

\renewcommand*{\chaptermarkformat}{}
\addtokomafont{pagehead}{\scshape}

\usepackage{blindtext}

\begin{document}
\Blinddocument
\end{document}

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

관련 정보