gsalzer / subfiles

class and package for multi-file projects in LaTeX
LaTeX Project Public License v1.3c
25 stars 1 forks source link

Need expl3 package #21

Closed BertrandSim closed 3 years ago

BertrandSim commented 3 years ago

Hi there, I tried using the subfiles package with a minimal example, but it seems that the subfiles package uses the \ExplSyntaxOn and \ExplSyntaxOff commands, both of which are from the expl3 package.

Without including expl3, I get an error, which from the log file, points to line 30 of subfiles.sty, containing \ExplSyntaxOn command described earlier.

While including the line \usepackage{expl3} in the preamble is a workaround, I'm wondering if it can be fixed, so that I do not have to specify that line explicitly in the main document.

FYI, I'm running MikTex 2.9, vimtex, latexmk, subfiles v2.2, import v6.2

Here are the relevant files in the minimal example:

% main.tex
\documentclass{report}

% \usepackage{expl3}
% including the expl3 package fixes the error 
%   of undefined control sequence in subfiles.sty:30 --> \ExplSyntaxOn

\usepackage{subfiles}

\begin{document}
\tableofcontents
\subfile{chapter1.tex}
\end{document}
%chapter1.tex
\documentclass[main.tex]{subfiles}

\begin{document}

\chapter{Intro}
\label{ch:intro}
Here comes some text

\end{document}
gsalzer commented 3 years ago

Thanks for your report. I see three ways to solve the problem:

BertrandSim commented 3 years ago

Well it turns out my MikTeX version is rather old. I decided to go with your first option and yes, updating MikTeX fixed the issue. Feel free to close this issue.

Thank you for your help. I appreciate it!