scrartcl에서 제목과 위쪽 여백 사이의 공간 줄이기

scrartcl에서 제목과 위쪽 여백 사이의 공간 줄이기

아래 KOMA-Script 클래스를 사용하여 예제 문서에서 제목과 위쪽 여백 사이의 공간을 어떻게 줄일 수 있습니까 scrartcl?

\documentclass[a4paper,11pt]{scrartcl}
\usepackage{blindtext}
\title{This is a nice title!}
\subtitle{This is an even nicer subtitle!}
\author{John Doe}
\begin{document}
\maketitle
\section{Introduction}
\blindtext
\blindtext
\end{document}

나는 이미 시도했다이것솔루션은titling패키지가 사용되었지만 \subtitle더 이상 표시되지 않습니다.

\vspace{-10px}나는 using 이나 그와 유사한 빠르고 더러운 솔루션을 찾고 있습니다 .

답변1

글쎄, 빠르고 깔끔하게 만들고 싶다면 \vspace{-1cm}제목 명령에 다음을 추가하기만 하면 됩니다.

\title{\vspace{-1cm}This is a nice title!}

귀하의 필요에 맞게 변경하십시오 1cm. 다음 MWe에서는 showframe타이핑 영역과 여백을 시각화하기 위해 패키지를 추가했습니다.

다음 MWE를 사용하면

\documentclass[a4paper,11pt]{scrartcl}

\usepackage{blindtext}
\usepackage{showframe}

\title{\vspace{-1cm}This is a nice title!}
%\title{This is a nice title!}
\subtitle{This is an even nicer subtitle!}
\author{John Doe}


\begin{document}

\maketitle
\section{Introduction}
\blindtext
\blindtext
\end{document}

결과는 다음과 같습니다.

결과 PDF

답변2

부인 성명:이 답변은소스 코드scrartcl.cls~처럼지금이야, 그리고 그 내용이 변경되면 이 해킹이 무효화될 수 있습니다. 영감을 받았어요이 답변으로. 하지만, 제목을 편집할 필요가 없어 좋습니다.

\documentclass{scrartcl}
\usepackage{blindtext} % Just for the demo.
\title{This is a nice title!}
\subtitle{This is an even nicer subtitle!}
\author{John Doe}

\usepackage{xpatch}
\makeatletter
\xpatchcmd{\@maketitle}{\vskip2em}{% Insert here the space you want between the top margin and the title.
    \vspace{-10em} % Example of smaller margin. 
}{}{}
\xpatchcmd{\@maketitle}{\vskip.5em}{% Insert here the space you want between the title and the subtitle
    \vskip5em % Example of bigger margin.
}{}{}
\makeatother

\begin{document}
\maketitle
\section{Introduction}
\blindtext
\blindtext
\end{document}

준다

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

관련 정보