part
我的 KOMA 文档中有样式设计。它需要:
- 删除“部分”文本
- 改变字体
- 将文本刷新至右下方。
我已经阅读了一些内容,删除了“部分”文本并更改了字体。但我不知道如何使文本与右下角对齐。请问您能帮我吗?
梅威瑟:
\documentclass[11pt]{scrbook}
\usepackage{newtxtext}
\usepackage{xcolor}
\usepackage[paperwidth=210mm,paperheight=235mm,top=20mm,bottom=25mm,inner=25mm,outer=65mm,marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm]{geometry}
\definecolor{basic}{cmyk}{1.0,0.7,0.5,0}
\setkomafont{disposition}{\rmfamily}
\setkomafont{part}{\fontsize{36pt}{36pt}\selectfont\color{basic}}
\setkomafont{partnumber}{\fontsize{36pt}{36pt}\selectfont\color{basic}}
\renewcommand*{\partformat}{\thepart.}
\begin{document}
\part{Teorija in problemi}
\end{document}
结果: 设计:
答案1
这招奏效了:
\documentclass[11pt]{scrbook}
\usepackage{lipsum}
\usepackage{newtxtext}
\usepackage{xcolor}
\usepackage[paperwidth=210mm,paperheight=235mm,top=20mm,bottom=25mm,inner=25mm,outer=65mm,marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm]{geometry}
\usepackage[ilines,headsepline]{scrpage2}
\setheadwidth[0pt]{textwithmarginpar}
\renewcommand*{\raggedpart}{\raggedleft}
\renewcommand*{\partheadstartvskip}{\null\vfill}
\definecolor{basic}{cmyk}{1.0,0.7,0.5,0}
\setkomafont{disposition}{\rmfamily}
\setkomafont{part}{\fontsize{36pt}{36pt}\selectfont\color{basic}}
\setkomafont{partnumber}{\fontsize{36pt}{36pt}\selectfont\color{basic}}
\renewcommand*{\partformat}{\thepart.}
\begin{document}
\frontmatter
\lipsum[1-5]
\mainmatter
\newgeometry{top=20mm,bottom=25mm,inner=25mm,outer=17mm,marginparsep=7mm,marginparwidth=0mm,headsep=4mm,headheight=6mm}
\part{Teorija in problemi}
\restoregeometry
\lipsum[1-5]
\end{document}
答案2
一种简单但有点“黑客”的方法:只需在字体定义中添加一些填充:
\documentclass[11pt]{scrbook}
\usepackage{newtxtext}
\usepackage{xcolor}
\usepackage[paperwidth=210mm,paperheight=235mm,top=20mm,bottom=25mm,inner=25mm,outer=65mm,marginparsep=7mm,marginparwidth=48mm,headsep=4mm,headheight=6mm]{geometry}
\definecolor{basic}{cmyk}{1.0,0.7,0.5,0}
\setkomafont{disposition}{\rmfamily}
\setkomafont{part}{\hfill\fontsize{36pt}{36pt}\selectfont\color{basic}}
\setkomafont{partnumber}{\vfill\hfill\fontsize{36pt}{36pt}\selectfont\color{basic}}
\renewcommand*{\partformat}{\thepart.}
\begin{document}
\part{Teorija in problemi}
\end{document}