
Para generar espacio entre \section estoy usando \titlespace*{\section}{0cm}{1cm}{0.5cm}, haciendo lo mismo para la subsección. ¿Es posible generar espacios entre títulos entre comandos propios? Necesito tres líneas en blanco antes de "Notas" y una después de "Notas".
\documentclass[10pt]{scrbook}
\usepackage{lipsum} % dummy text
\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{helvet}
\usepackage{endnotes}
\usepackage{titlesec}
% Spacing between section and text
% Syntax: \titlespacing*{<command>}{<left>}{<before-sep>}{<after-sep>}
\titlespacing*{\subsection}{0cm}{1cm}{0.5cm}
\titlespacing*{\section}{0cm}{1cm}{1cm}
%ENDNOTENLAYOUT%
\renewcommand\enoteformat{\noindent\setlength\hangindent{0.5cm}\makebox[0.5cm][l]{\theenmark\,}}
\def\enotesize{\footnotesize}
\renewcommand{\notesname}{\normalsize\textit{Notes}}
\let\footnote=\endnote
\pagestyle{plain}
\begin{document}
\section{Beispiel}
\lipsum[1]
\subsection*{Endnotes}
\footnote{\lipsum[1]}\lipsum[2]
\footnote{\lipsum[1]}
\lipsum[1]
\theendnotes
\end{document}
Respuesta1
Tenga en cuenta que no se recomienda utilizarlo titlesec
junto con una clase KOMA-Script. Así que usaré \RedeclareSectionCommand
para cambiar los saltos antes y después de los títulos de las secciones.
\enoteheading
usos \section*
para el encabezado de la nota. Por lo tanto, puede anteponer a \RedeclareSectionCommand
para obtener el resultado deseado. Tenga en cuenta que no estoy seguro de si \enoteheading
debería estar realmente en el mismo nivel de sección que \section
? Pero debido a la estrella no hay entrada TOC ni número de sección. Entonces tal vez no sea un problema.
\usepackage{xpatch}
\xpretocmd\enoteheading{%
\RedeclareSectionCommand[
beforeskip=3\baselineskip,
afterskip=\baselineskip,
font=\normalsize\itshape
]{section}%
}{}{\PatchFailed}
\renewcommand{\notesname}{Notes}
Código:
\documentclass[10pt]{scrbook}
\usepackage{lipsum} % dummy text
\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{helvet}
\usepackage{endnotes}
\RedeclareSectionCommand[
beforeskip=-1cm,
afterskip=1cm
]{section}
\RedeclareSectionCommand[
beforeskip=-1cm,
afterskip=.5cm
]{subsection}
%ENDNOTENLAYOUT%
\renewcommand\enoteformat{\noindent\setlength\hangindent{0.5cm}\makebox[0.5cm][l]{\theenmark\,}}
\def\enotesize{\footnotesize}
\usepackage{xpatch}
\xpretocmd\enoteheading{%
\RedeclareSectionCommand[
beforeskip=3\baselineskip,
afterskip=\baselineskip,
font=\normalsize\itshape
]{section}%
}{}{\PatchFailed}
\renewcommand{\notesname}{Notes}
\let\footnote=\endnote
\pagestyle{plain}
\begin{document}
\section{Beispiel}
\lipsum[1]
\subsection*{Endnotes}
\footnote{\lipsum[1]}\lipsum[2]
\footnote{\lipsum[1]}
\lipsum[1]
\theendnotes
\end{document}
Si tienes un realmenteversión antigua de KOMA-Script (3.14 o anterior)entonces es más fácil de usartitlesec
\documentclass[10pt]{scrbook}
\usepackage{lipsum} % dummy text
\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{helvet}
\usepackage{endnotes}
\usepackage{titlesec}
% Spacing between section and text
% Syntax: \titlespacing*{<command>}{<left>}{<before-sep>}{<after-sep>}
\titlespacing*{\subsection}{0cm}{1cm}{0.5cm}
\titlespacing*{\section}{0cm}{1cm}{1cm}
%ENDNOTENLAYOUT%
\renewcommand\enoteformat{\noindent\setlength\hangindent{0.5cm}\makebox[0.5cm][l]{\theenmark\,}}
\def\enotesize{\footnotesize}
%
\usepackage{xpatch}
\xpretocmd\enoteheading{%
\titlespacing*{\section}{0cm}{3\baselineskip}{1\baselineskip}%
}{}{\PatchFailed}
\renewcommand{\notesname}{\normalsize\textit{Notes}}
\let\footnote=\endnote
\pagestyle{plain}
\begin{document}
\section{Beispiel}
\lipsum[1]
\subsection*{Endnotes}
\footnote{\lipsum[1]}\lipsum[2]
\footnote{\lipsum[1]}
\lipsum[1]
\theendnotes
\end{document}