5

The following used to work in TeX Live 2015 compiled with LuaLaTeX, but does not work in TeX Live 2016:

\documentclass{minimal}
\usepackage{grffile}  % Extended file name support for graphics
\usepackage[final]{pdfpages}

\begin{document}
\includepdf[landscape,nup=1x2,trim=2.25cm 2.5cm 2.25cm 2cm,pages=-]{cours algèbre.pdf}
\end{document}

The error message is:

Package luatex.def Error: File `cours algèbre.pdf' not found.

However, it works with PDFLaTeX and XeLaTeX! (For PDFLaTeX this is quite surprising as I have not specified anywhere that my source encoding is UTF-8.)

The reason I used LuaLaTeX initially was that it produced a slightly smaller PDF than XeLaTeX and twice smaller PDF than PDFLaTeX.

Here is a minimal example, with \includegraphics instead of \includepdf, which also compiles with PDFLaTeX and XeLaTeX, but not with LuaLaTeX:

\documentclass{article}
\usepackage{grffile}  % Extended file name support for graphics
\usepackage{graphics}

\begin{document}
\includegraphics{a b.pdf}
\end{document}

I am using TeX Live on Mac OS.


Update 2020-03-02

At least with TeX Live 2019, grffile package is no longer needed, file names with spaces work without it.

Alexey
  • 2,099
  • Does enclosing the filename in " quotes help? – Steven B. Segletes Aug 30 '16 at 11:31
  • No, but it actually produces a different error: "Package pdfpages Error: Cannot find file `"cours algèbre.pdf"'." – Alexey Aug 30 '16 at 11:43
  • Is there the issue if the filename does not contain the diacritic? – Steven B. Segletes Aug 30 '16 at 11:50
  • 1
    See this question, perhaps: http://tex.stackexchange.com/questions/120526/how-to-use-the-import-package-with-folders-containing-accented-non-english-let – Steven B. Segletes Aug 30 '16 at 11:52
  • 1
    If i use just algèbre.pdf, it compiles ok. – Alexey Aug 30 '16 at 11:57
  • 1
    Please don't use minimal for examples. – cfr Aug 30 '16 at 12:12
  • 2
    The char with accent is one problem: For me on windows it doesn't work (neither with pdflatex nor lualatex). The space is another: In luatex.def the definition of \GPT@IfFileExists has changed, it no longer checks for \pdf@filesize and so breaks grffile. @DavidCarlisle. – Ulrike Fischer Aug 30 '16 at 12:16
  • @cfr why? In any case, this was the file that worked with TeX Live 2015. I am not going to reinstall TeX Live 2015 just to see if i can replace minimal with something. – Alexey Aug 30 '16 at 12:22
  • 2
    Because minimal is not designed for minimal examples and can cause spurious errors. Even if you know that it is OK in this particular case because you've read the code and know that what it doesn't do doesn't matter here, using it in examples is a bad idea as less experienced users will, naturally enough, assume it is a class designed for typesetting minimal examples, which it certainly is not. There is a Q&A specifically about this if you search. I am not claiming it is causing the problem you are asking about, but that there are independent reasons not to use it. – cfr Aug 30 '16 at 14:37
  • Ok. However, what someone may unreasonably assume is not my responsibility. – Alexey Aug 30 '16 at 14:52
  • You want help, but don't want to be minimally helpful to newbies? Fine. I'll add you to my extremely short blacklist which currently contains 1 user whose user name I've forgotten and was, therefore, going entirely unused. At least it will come in useful again. Admittedly, you may not have wanted my help, but now you don't have that option. – cfr Sep 02 '16 at 00:10
  • @crf "less experienced users will, naturally enough, assume it is a class designed for typesetting minimal examples" -- I do not see why this assumption is natural, or how someone's hypothetical unreasonable assumptions can be relevant to discussing a given issue. As to the argument that (according to you, i am not a specialist) minimal document class can cause spurious errors, i have added a minimal examples with article document class. My first example was not a minimal example but just a close reproduction of my source that worked with TL-2015 but not with TL-2016. – Alexey Sep 02 '16 at 09:32
  • Remark: for the "surprising" part it's because utf8 is default in new versions input encodings - Is there any reason to use inputenc? - TeX - LaTeX Stack Exchange . Also actually there's another potential issue to look out for with accented characters file name in pdflatex https://tex.stackexchange.com/questions/185191/how-to-use-pdfpages-with-files-with-utf8-chars-in-the-name – user202729 Jun 13 '22 at 11:00

0 Answers0