
scrlttr2
와 함께 인용문을 사용하면서 양면 설정을 실험하던 중 tcolorbox
이상한 점을 발견했습니다. 다음 예에서는 인용 환경 상자 외부 텍스트의 줄 간격을 보여줍니다. 이는 양면 모드에서만 나타나며 재정의하는 호출 beforeafter skip=\baselineskip
에서만 나타납니다 . 인용 환경이나 양면성에 관한 어떤 것과도 분명히 연결되어 있지 않기 때문에 이것이 원인이 무엇인지 의아해합니다.tcolorboxenvironment
quoting
%\documentclass[12pt, sections, headheight=30pt, headinclude,
%firstfoot=false, enlargefirstpage=true,
%foldmarks=false,foldmarks=blmtP, fromalign=center, fromphone,
%fromemail, version=last, backaddress=false, subject=titled
%{scrlttr2}
\documentclass[12pt, sections, headheight=30pt, headinclude,
firstfoot=false, enlargefirstpage=true,
foldmarks=false,foldmarks=blmtP, fromalign=center, fromphone,
fromemail, version=last, backaddress=false, subject=titled, twoside]
{scrlttr2}
\usepackage[most]{tcolorbox}
\usepackage{quoting}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}
\tcolorboxenvironment{quoting}{beforeafter skip=\baselineskip, boxrule=2pt, sharp corners, breakable, skin=enhanced, colback=white}
%\tcolorboxenvironment{quoting}{boxrule=2pt, sharp corners, breakable, skin=enhanced, colback=white}
\ExplSyntaxOn
\NewDocumentCommand{\dummy}{m m m}
{
\prg_replicate:nn { #3 }
{
\prg_replicate:nn { #2 } { #1 \hfill } \dummy_endline:
}
}
\cs_new:Npn \dummy_endline:
{ { \parfillskip=0pt\par } }
\ExplSyntaxOff
\begin{document}
\setkomavar{fromname}{Name}
\setkomavar{fromaddress}{Address}
\renewcommand{\phonename}{Landline}
\renewcommand{\mobilephonename}{Mobile}
\setkomavar{frommobilephone}{Mobile}
\setkomavar{fromemail}{Email}
\setkomavar{signature}{(\usekomavar{fromname})}
\setkomavar{subject}{Subject}
\setkomavar{date}{\today}
\setkomavar{firsthead}{%
\parbox{\linewidth}{\centering
\textbf{\jobname.tex} \input{"| hg log -v -l 1 \jobname.tex --template '{node} {date|isodate}'"}
\ifhmode \\ \fi
{\fontfamily{pzc}\selectfont
\hspace{\textwidth}
\usekomavar{fromname}\\
\usekomavar{fromaddress}\\
\usekomavar*{mobilephoneseparator}\usekomavar{mobilephoneseparator}\usekomavar{frommobilephone}\\
\usekomavar*{emailseparator}\usekomavar{emailseparator}\usekomavar{fromemail}
}
}%
}
\makeatletter
\@addtoplength{firstheadvpos}{30pt}
\@addtoplength{toaddrvpos}{40pt}
\@addtoplength{refvpos}{10pt}
\@addtoplength{sigbeforevskip}{20pt}
\makeatletter\@setplength{sigindent}{0.5\linewidth}\makeatother
\makeatother
\def\today{20th February, 2019}
\begin{letter}{
Someone\\
Company\\
Building\\
Street\\
City
}
\opening{Hi}
\dummy{HelloWorld!}{3}{5}
\begin{quoting}
\dummy{AlohaWorld!}{3}{3}
\end{quoting}
\dummy{BonjourWorld!}{3}{3}
\begin{quoting}
\begin{tabular}{p{4.5in}r}
\textbf{\dummy{CiaoWorld!}{3}{1} } & \\
\dummy{CiaoWorld!}{3}{2} & \dummy{CiaoWorld!}{1}{1}
\end{tabular}
\end{quoting}
\closing{Yours Sincerely,}
\end{letter}
\end{document}
부록: 내가 실제로 보고 있는 것과 더 비슷해 보이는 단순화된 버전입니다.
\documentclass[12pt,sections,headheight=30pt,headinclude,firstfoot=false,enlargefirstpage=true,foldmarks=false,foldmarks=blmtP,fromalign=center,,version=last, backaddress=false, subject=titled, twoside=semi]{scrlttr2}
%\documentclass[12pt,sections,headheight=30pt,headinclude,firstfoot=false,enlargefirstpage=true,foldmarks=false,foldmarks=blmtP,fromalign=center,version=last, backaddress=false, subject=titled]{scrlttr2}
\usepackage{quoting}
\usepackage[most]{tcolorbox}
\usepackage[T1]{fontenc}
\usepackage{fouriernc}
\tcolorboxenvironment{quoting}{beforeafter skip=\baselineskip, boxrule=2pt,sharp corners,breakable,skin=enhanced,colback=white}
%\tcolorboxenvironment{quoting}{boxrule=2pt,sharp corners,breakable,skin=enhanced,colback=white}
\begin{document}
%\setkomavar{subject}{Subject Subject Subject Subject Subject Subject Subject Subject Subject Subject Subject }
\setkomavar{subject}{Subject}
\makeatletter
\@addtoplength{firstheadvpos}{30pt}
\@addtoplength{toaddrvpos}{40pt}
\@addtoplength{refvpos}{10pt}
\@addtoplength{sigbeforevskip}{20pt}
\makeatletter\@setplength{sigindent}{0.5\linewidth}\makeatother
\makeatother
\begin{letter}{
To Address
}
\opening{Hi,}
Line 1.\\
Line 2.\\
Line 3.\\
Line 1.\\
Line 2.\\
\begin{quoting}
Line 1\\
Line 2\\
\end{quoting}
Line 1\\
Line 2\\
\begin{quoting}
Line 1\\
Line 2\\
\end{quoting}
\closing{Yours Sincerely,}
\end{letter}
\end{document}
결과 2페이지 파일의 첫 번째 페이지는 아래에 표시되며, 이는 문제를 표시합니다.
답변1
twoside를 사용하면 클래스가 활성화됩니다(다른 클래스가 자주 수행하는 것처럼) \flushbottom
. 이는 LaTeX가 페이지를 채우려고 시도하고 이를 위해 parskip을 늘린다는 의미입니다.
beforeafter skip=\baselineskip,
를 제거 하면 문자가 한 페이지에 들어가므로 효과가 사라집니다 .
oneside 모드에서는 add 와 동일하게 됩니다 \flushbottom
.
문제를 피하려면 추가하십시오.\raggedbottom
답변2
양면 모드를 사용하는 것은 버전 3.17부터 \flushbottom
버그였습니다 . v3.27.3111 에서는 환경 정의를 추가하여 scrlttr2
수정되었습니다 . 이번 변경 전scrlttr2
\raggedbottom
letter
\documentclass[twoside]{scrlttr2}
\usepackage{mwe}
\begin{document}
\begin{letter}{You\\There}
\opening{Hi,}
\blindtext\par\blindtext
\noindent\rule{\textwidth}{.5\textheight}
\blindtext
\closing{Bye}
\end{letter}
\end{document}
경고 메시지가 표시되었습니다.
Underfull \vbox (badness 10000) has occurred while \output is active [1
그리고
KOMA-Script 3.27.3111 사용(이것은KOMA 스크립트 사전 출시) 결과는 다음과 같습니다.
경고 메시지 없이.
참고로 추가사항이 있습니다다가오는 KOMA-Script 3.27의 변경 사항(독일어로 링크된 페이지)