Koma-script "srcbook"을 사용하여 양면 문서의 머리글 및 바닥글 수정

Koma-script "srcbook"을 사용하여 양면 문서의 머리글 및 바닥글 수정

논문을 쓰고 있는데 KOMA급을 사용하고 있는데 scrbook문서 스타일을 바꾸다가 막혔어요.

첫째, 머리글과 바닥글에 문제가 있습니다. 내가 원하는 형식은 짝수 페이지와 홀수 페이지에 대해 각각 다음과 같아야 합니다.

짝수 페이지의 경우 오른쪽에 장 이름을, 오른쪽에 페이지 번호를 입력하고 싶습니다.

홀수 페이지의 경우 왼쪽 섹션 이름과 왼쪽 페이지 번호를 알고 싶습니다.

내 문서의 서문은 다음과 같습니다

\documentclass[twoside,12pt,headsepline,chapterprefix=true]{scrbook} 
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{slashed}
\usepackage{mathtools}
\usepackage{scrlayer-scrpage}
\usepackage{biblatex}
\usepackage{csquotes}
\usepackage{hyperref}
\pagestyle{scrheadings}
\automark{chapter}
\automark*[section]{}

하지만 이것은 나에게 다음과 같은 형식을 제공합니다 여기에 이미지 설명을 입력하세요 여기에 이미지 설명을 입력하세요

장과 섹션 이름은 원하는 위치 반대편에 나타나고 페이지 번호도 바닥글에 나타납니다. 내가 찾고 있는 형식을 얻는 방법을 아는 사람이 있습니까? 또한 "Chapter 2"를 없애고 헤더에 장 이름만 넣고 싶습니다.

둘째, 양면 형식을 사용하고 있기 때문에 각 장 뒤에 빈 페이지가 있습니다. 제목 페이지, 감사의 글, 초록, 목차 뒤에 빈 시트를 두고 싶지만 문서의 나머지 부분에는 넣지 않으려고 합니다. 그게 가능할까요?

편집: 이 코드는 현재 문서와 동일한 형식을 제공합니다.

\documentclass[twoside,12pt,headsepline,chapterprefix=true]{scrbook} 
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{slashed}
\usepackage{mathtools}
\usepackage{scrlayer-scrpage}
\usepackage{lipsum}
\pagestyle{scrheadings}
\automark{chapter}
\automark*[section]{}
\begin{document}
\frontmatter
\tableofcontents
\chapter{Acknowledgements}
\lipsum[1-3]
\chapter{Abstract}
\lipsum[4-5]
\mainmatter
\chapter{ Cha 2}
\lipsum[6-15]
\section{section 1}
\lipsum[16-22]
\end{document}

답변1

페이지 번호가 페이지(예: 장 페이지)의 외부 헤더에도 있어야 한다고 가정하면 plain다음을 사용할 수 있습니다.

\clearpairofpagestyles
\ohead*{\pagemark}
\ihead{\headmark}

페이지 헤더에서 장 번호를 제거하려면 다음을 사용하세요.

\renewcommand*\chaptermarkformat{}

주요 문제의 빈 페이지를 제거하려면 \mainmatterKOMA-Script 옵션을 설정하도록 패치할 수 있습니다 open=any.

\usepackage{xpatch}
\xapptocmd{\mainmatter}{\KOMAoptions{open=any}}{}{\PatchFailed}

예:

\documentclass[
  %twoside,% default
  12pt,headsepline,chapterprefix=true
]{scrbook} 
\usepackage{lipsum}% only for dummy text
%\usepackage[utf8]{inputenc}% only needed for outdated TeX distributions
\usepackage{graphicx}
%\usepackage{amsmath}
\usepackage{slashed}
\usepackage{mathtools}% loads amsmath
\usepackage{scrlayer-scrpage}% sets page style scrheadings automatically
%\pagestyle{scrheadings}
\automark[section]{chapter}
\renewcommand*\chaptermarkformat{}% removes chapter number from page header

\clearpairofpagestyles
\ohead*{\pagemark}
\ihead{\headmark}

\usepackage{xpatch}
\xapptocmd{\mainmatter}{\KOMAoptions{open=any}}{}{\PatchFailed}

\begin{document}
\frontmatter
\tableofcontents
\chapter{Acknowledgements}
\lipsum[1-3]
\chapter{Abstract}
\lipsum[4-5]
\mainmatter
\chapter{Cha 1}
\lipsum[6-15]
\section{section 1}
\lipsum[16-22]
\chapter{Foo}
\lipsum[23-50]
\end{document}

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

참고로 저는 짧게 했어요

\automark{chapter}
\automark*[section]{}

에게

\automark[section]{chapter}

하지만 아마도 당신은 원할 것입니다

\automark[chapter]{chapter}
\automark*[section]{}

관련 정보