%EC%9D%98%20%EC%84%B9%EC%85%98%20%EC%9D%B4%EB%A6%84%20%EB%92%A4%EC%97%90%20%EC%98%A4%EB%8A%94%20%ED%85%8D%EC%8A%A4%ED%8A%B8.png)
KOMA scrartcl을 사용하여 내 하위 섹션과 같은 줄에 텍스트를 넣고 여백에 섹션 번호를 넣고 싶습니다. 예를 들어:
1.1.1 하위 섹션 제목 이어지는 일부 텍스트
다음을 사용하여 이를 달성할 수 있습니다.
\RedeclareSectionCommand[%
afterskip=-10pt%
]{subsubsection}
하지만 여백에 숫자를 넣는 것에도 충돌이 있습니다. 다음 코드를 사용하여 페이지 여백에 섹션 번호를 배치하고 있지만 재선언을 사용하면 더 이상 여백에 번호가 배치되지 않습니다.
\renewcommand\sectionlinesformat[4]{%
\makebox[0pt][r]{#3}#4%
}
답변1
\sectionlinesformat
독립된 제목에 사용됩니다. 런인(run-in) 제목은 를 사용합니다 \sectioncatchphraseformat
. 따라서 이 명령도 다시 정의해야 합니다.
예:
\documentclass{scrartcl}
\usepackage{blindtext}% only for dummy text
\renewcommand\sectionlinesformat[4]{% used by free-standing headings with style=section
\makebox[0pt][r]{#3}#4%
}
\renewcommand\sectioncatchphraseformat[4]{% used by run-in headings with style=section
\makebox[0pt][r]{#3}#4%
}
\RedeclareSectionCommand[%
afterskip=-1em%
]{subsubsection}
\begin{document}
\blinddocument
\end{document}
또는 대안적으로:
\documentclass{scrartcl}
\usepackage{blindtext}% only for dummy text
\renewcommand\sectionlinesformat[4]{% used by free-standing headings with style=section
\makebox[0pt][r]{#3}#4%
}
\renewcommand\sectioncatchphraseformat[4]{% used by run-in headings with style=section
\makebox[0pt][r]{#3}#4%
}
\RedeclareSectionCommand[%
afterskip=1em,% note the positive value
runin=true% needs KOMA-Script version 3.26b or newer
]{subsubsection}
\begin{document}
\blinddocument
\end{document}
결과: