Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am already using grffile to ensure that all files are found on the file system (windows 7), but now I have an example where the second file is not found.

\documentclass[]{scrbook} % 
\usepackage[%
   extendedchars, encoding, multidot, space,
   filenameencoding=latin1, % Windows XP, Vista, 7
]{grffile}
\RequirePackage{pdfpages}
\begin{document}
\includepdf{fonts/fontsample - Latin Modern Family.pdf}
\includepdf{fonts/fontsample - Charter, Bera Sans, Luxi Mono.pdf}
\end{document}

The error is

LaTeX Error: File `fonts/fontsample - Charter' not found.

How can I ensure that a comma is a valid char for a filename in \includepdf ?

share|improve this question
1  
The grffile package might help. But IMNSHO it's better to avoid filenames like these with TeX. –  Martin Schröder Jan 29 '13 at 18:54
    
Do you really need commas in the filenames ? It's really a coz' I can choice. It might cause more trouble even after you figure this one out. –  percusse Jan 29 '13 at 18:55
    
No i do not. The file names are generated by script that creates these files. But I would be interested in a solution if there is a simple one. –  Matthias Pospiech Jan 29 '13 at 18:56
1  
The \includepdf command executes internally \AM@readlist that gets as argument a comma separated list; it's probably done for avoiding code duplication with \includepdfmerge, but has the effect of not accepting file names with commas. –  egreg Jan 29 '13 at 22:48
2  
Try \includepdf{{...}}, i.e., protect the filename in quotes. –  Aditya Jan 30 '13 at 6:17

1 Answer 1

The grffile package might help. But IMNSHO it's better to avoid filenames like these with TeX.

If you really need such file name you can use:

\includepdf{\string"fonts/fontsample - Charter, Bera Sans, Luxi Mono.pdf"}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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