I occasionally found that comma cannot be used in names of .mp4 and .swf files imported by \includemedia macro defined in media9 package although comma is allowed in names of a graphics file imported with \includegraphics. Can someone provide a complete list of symbols allowed in names of various types of files? This can be system-dependent list as seen from this post: What are the allowed characters in filenames? My favorite OS is Windows 10.

Update: Recall that most books on LaTeX provide list of symbols allowed in a source text. It would be useful to have a similar list of symbols which can be safely used in filenames on various OS.

  • 3
    My list of allowed symbols is a-z, A-Z, 0-9, _ and - and at most one period. It saves me a lot of trouble. – Ulrike Fischer Jan 6 '16 at 13:43
  • @UlrikeFischer: your list is insufficient for me since I write parameters of a generated video into filename. – Igor Kotelnikov Jan 6 '16 at 14:46
  • Besides the range given by @UlrikeFischer, .:;?!/"'*+,>=<$@([])^|~#&%\{} and "`" may work as well. File names with commas must be enclosed in braces. – AlexG Jan 6 '16 at 14:52
  • @IgorKotelnikov Why is this list insufficient? You can form delimiters using _ and - (and combinations thereof). Could you give an example how the parameters look like that you need to put into the filename? – cryingshadow Jan 6 '16 at 14:54
  • @Igor: I can encode the complete video only with zeros and ones. So actually the chars are redundant. You can naturally try out other symbols. But even if the OS accepts an unusual symbol you can't be sure that a package like media9 can handle it. Debugging and correcting such problems can cost you a lot of time, so you will have to decide if it is worth is. I spent my time with other things. – Ulrike Fischer Jan 6 '16 at 15:02

The implementation of media9 tries hard to allow for characters that may appear in URLs (see RFC 2396), which are, besides the ranges given in U.Fischers comment:


File names with commas passed via the addresource=... option must be enclosed in braces {...}. Otherwise they are interpreted as option separators.

Some of the characters in the above list must be escaped, since they have a special meaning in (La)TeX:

\# \& \% \\ \{\}

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.