I like the use of hanging section numbers in the margin. But when I move to the Appendices, I would like to revert the behavior back to normal.
Additionally, I'd like to start the name of the appendix on a new line (but not in the ToC), for example:
Appendix A
Something appended
Below is a MWE with the issue, but cref and everything EXCEPT the hanging Appendix X issue and it is lacking a line break between Appendix X and the name of the appendix:
\documentclass[12pt,
twoside=false,
letterpaper,
hidelinks,
parskip=half+,
%onehalfspacing, % see setstrecj after \begin{document}
bibliography=numbered,
numbers=noenddot]{scrartcl}
\renewcommand\sectionlinesformat[4]{% used by free-standing headings with style=section
\makebox[0pt][r]{#3}#4}
%\usepackage{appendix} % use this if you want Appendix in the TOC
\usepackage[titletoc,title]{appendix} % use this if you want Appendix in the TOC
\usepackage{hyperref}
\usepackage[nameinlink,noabbrev,capitalize]{cleveref} % cref
\crefname{appsec}{Appendix}{Appendices}
\begin{document}
\tableofcontents
\section{Some section with number in the margin}
Reference to \cref{appb}
\begin{appendices}
\crefalias{section}{appsec} %
\section{Something appended} \label{appa}
And here is a MWE example of my hacky workaround. This is how I want things to appear, but I lose the ability to use cref, and if I want to add subsections the numbering falls apart:
\documentclass[12pt,
twoside=false,
letterpaper,
hidelinks,
parskip=half+,
%onehalfspacing, % see setstrecj after \begin{document}
bibliography=numbered,
numbers=noenddot]{scrartcl}
\renewcommand\sectionlinesformat[4]{% used by free-standing headings with style=section
\makebox[0pt][r]{#3}#4}
%\usepackage{appendix} % use this if you want Appendix in the TOC
\usepackage[titletoc,title]{appendix} % use this if you want Appendix in the TOC
\usepackage{hyperref}
\usepackage[nameinlink,noabbrev,capitalize]{cleveref} % cref
\crefname{appsec}{Appendix}{Appendices}
\begin{document}
\tableofcontents
\section{Some section with number in the margin}
Reference to \hyperref[appb]{Appendix B}
\section*{Appendix A\\Something appended} \label{appa}
\addcontentsline{toc}{section}{Appendix A Something appended}
\section*{Appendix A\\Another thing appended} \label{appb}
\addcontentsline{toc}{section}{Appendix B Something appended}
\end{document}
\othersectionlevelsformat
, correct? I am usingscrartcl
however, and a create my appendices with the section command.