Main.tex
\documentclass{scrartcl}
\usepackage{standalone}
\begin{document}
\section{A}
\includestandalone{Subfile}
\end{document}
Subfile.tex
\documentclass[crop=false,float=true,class=scrartcl]{standalone}
\usepackage{standalone}
\begin{document}
\textbf{b}
\subsection{B}
\end{document}
Results
- Subfile.tex runs fine.
- Main.tex can find Subfile.tex
- Main.tex errors at first use of
\section
or\subsection
. - If
\input
is instead used, Main.tex works fine. - Tested with shell escape, to no avail.
Shell Escape
Used arara for shell escape attempts:
% arara: lmkclean
% arara: pdflatex: { draft: yes, shell: yes }
% arara: pdflatex: { synctex: yes, shell: yes }
% arara: lmkclean
\documentclass[crop=false,float=true,class=scrartcl]{standalone}
Error Consistently Received
(./Subfile.tex
! LaTeX Error: Something's wrong--perhaps a missing \item.
l.11 \subsection{B}
standalone
was not written with section in mind but for diagrams and similar boxed content, so I would call it a limitation not a bug ;-) – Martin Scharrer♦ Jun 18 '15 at 16:57