1

I'm preparing a book. There is a requirement that the individual sections are available as separate files, so I'm using the subfile package. I would really like to keep the ability to name my TeX files after the section titles, which include spaces and accents, and that all works with XeLaTeX. MWE:

\documentclass{scrbook}
\usepackage{subfiles}

\begin{document}

\subfile{"á é/ő ű.tex"} % file contents are irrelevant to problem

\end{document}

However if I add to the preamble

\usepackage{csquotes}
\MakeOuterQuote{"}

I get an error:

! Missing \endcsname inserted.
<to be read again>
\begingroup
l.10 \subfile{"á é/ő ű.tex"}
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

Is it possible to use this active quote and include subfiles with spaces in the path and have these two features not break each other? I suspect the easy solution would be if the \subfile macro could use something else as the delimiter.

marczellm
  • 11,809
  • 6
    I'm not saying that is impossible - perhaps some tricks with \detokenize work - but why are you making the compilation so fragile? It can cost you many hours to handle problems with accents, funny chars and spaces. – Ulrike Fischer Dec 06 '18 at 22:22
  • @UlrikeFischer long story. Consider it a project requirement. Or we can discuss in chat – marczellm Dec 07 '18 at 09:50
  • How about \DisableQuotes and \EnableQuotes around your \subfile calls? Btw, this question is a nice example for https://tex.stackexchange.com/a/472729/105447. – gusbrs Feb 12 '19 at 11:19
  • You might also want to take a look at csquotes docs, section "10.5 Active Quotes in Special Contexts". babel and underscore might help you there. – gusbrs Feb 12 '19 at 11:24

1 Answers1

1

The solution turned out to be simple: you can use ' as the delimiter too. So you can do this and it works:

\documentclass{scrbook}
\usepackage{subfiles}
\usepackage{csquotes}
\MakeOuterQuote{"}
\begin{document}

\subfile{'á é/ő ű.tex'}

\end{document}
marczellm
  • 11,809