8

When I use LaTeX in a Windows system I can easily use the \input command with a file whose name contains accented letters, but in a Linux system I get the message

! LaTeX Error: File `Préambule.tex' not found.

How to fix that?

  • 2
    expunge special characters from file names, LaTeX doesn't like them. really, it'll make your life easier – Au101 Feb 1 '16 at 21:20
  • 2
    You might try \input{\detokenize{Préambule}}, but it's just a guess. – egreg Feb 1 '16 at 21:29
6

I tried on a Ubuntu system, first by creating a file named Préambule.tex and making a test file containing

\documentclass{article}
\begin{document}
\input{\detokenize{Préambule.tex}}
\end{document}

I compiled with pdflatex and this is the terminal output

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/size10.clo))
No file test.aux.
(./Préambule.tex) (./test.aux) )
No pages of output.
Transcript written on test.log.

So the file has correctly been found and input. However, it's usually better avoiding accented characters (and spaces) in file names.

  • thank you very much it works fine with the \detokenize command (wich iI did not know). So using \input in a windows system is different because there is no need to add \detokenize – Hafid Boukhoulda Feb 2 '16 at 6:46
  • @BoukhouldaHafid That's much operating system dependent; also the input encoding used for the file has a role; this is why it's best avoiding non ASCII characters in file names. – egreg Feb 2 '16 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.