Can't handle filenames with spaces

Bug #510940 reported by gwern
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
context (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: context

[06:26 PM] 471Mb$ uname -a
Linux craft 2.6.28-17-generic #58-Ubuntu SMP Tue Dec 1 18:57:07 UTC 2009 i686 GNU/Linux
[06:26 PM] 471Mb$ apt-cache show context
Package: context
Priority: optional
Section: universe/tex
Installed-Size: 33712
Maintainer: Ubuntu MOTU Developers <email address hidden>
Original-Maintainer: Debian TeX maintainers <email address hidden>
Architecture: all
Version: 2008.05.21-1
Replaces: texlive-context
Provides: texlive-context
Depends: lmodern (>= 1.01), ruby, tex-common (>= 1.4), texlive-base (>= 2007), texlive-base-bin (>= 2007), texlive-metapost (>= 2007)
Recommends: luatex
Suggests: context-doc-nonfree, context-nonfree, fontforge, libxml-parser-perl, perl-tk
Conflicts: tetex-bin (<< 2007), texlive-context
Filename: pool/universe/c/context/context_2008.05.21-1_all.deb
Size: 9238430
MD5sum: b60c28da1e7a9940160d9b79bc30edb9
SHA1: 8d07cfab1f018c368f2afb01e4ce3f3c7ff36ea2
SHA256: 797f5794dccfbbc08e13b54640655efbb072b46c8298c043f35a57c5f49666d2
Description: powerful TeX format
 ConTeXt is a document-production system based, like LaTeX, on the TeX
 typesetting system. Whereas LaTeX insulates the writer from
 typographical details, ConTeXt takes a complementary approach by
 providing structured interfaces for handling typography, including
 extensive support for colors, backgrounds, hyperlinks, presentations,
 figure-text integration, and conditional compilation. It gives the
 user extensive control over formatting while making it easy to create
 new layouts and styles without learning the TeX macro language.
 ConTeXt's unified design averts the package clashes that can happen
 with LaTeX.
 .
 ConTeXt also integrates MetaFun, a superset of MetaPost and a powerful
 system for vector graphics. MetaFun can be used as a stand-alone
 system to produce figures, but its strength lies in enhancing ConTeXt
 documents with accurate graphic elements.
 .
 ConTeXt allows the users to specify formatting commands in English,
 Dutch, German, French, or Italian, and to use different typesetting
 engines (PDFTeX, XeTeX, Aleph, and soon LuaTeX) without changing the
 user interface. ConTeXt is developed rapidly, often in response to
 requests from the friendly user community.
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

[06:26 PM] 471Mb$ /usr/bin/texexec Front\ Page.tex
TeXExec | processing document 'Front'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | processing document 'Page.tex'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | runtime: 0.048238
[06:26 PM] 471Mb$ /usr/bin/texexec "Front Page.tex"
TeXExec | processing document 'Front'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | processing document 'Page.tex'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | runtime: 0.047943
[06:26 PM] 471Mb$ /usr/bin/texexec 'Front Page.tex'
TeXExec | processing document 'Front'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | processing document 'Page.tex'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | runtime: 0.048787
[06:26 PM] 471Mb$ /usr/bin/texexec *.tex
TeXExec | processing document 'Front'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | processing document 'Page.tex'
TeXExec | no ctx file found
TeXExec | nothing to process
TeXExec | runtime: 0.058287

Texexec should be able to handle spaces like every other application. This trips me up nearly every time I use it, and forced me to use workarounds to strip out spaces when Gitit calls texexec to make PDFs.

Revision history for this message
gwern (gwern0) wrote :
Revision history for this message
Adam Reviczky (reviczky) wrote :

"It is highly recommended, that all input files, i.e. the ConTEXt source and other included files such as image files, have only the letters a–z, digits and dashes in their names, that is in the names of their full paths, otherwise you can easily get into problems. Especially the characters *, ?, the space character and some more are known to cause problems, sometimes because of ConTEXt itself (internal pattern matching), sometimes because of issues with the underlying operating system. The dot ‘.' is somewhat special: it's used to separate the suffix from the rest of the file-name, but at other places in the path it can cause trouble just like ‘*' or ‘?'." (http://pmrb.free.fr/contextref.pdf)

This is IMHO a "Won't Fix".
As a workaround you can try "context" instead of "texexec", seem to work on your example, but no guarantees.

Changed in context (Ubuntu):
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
gwern (gwern0) wrote :

Your quote is pretty revealing; the code is *that* broken when it comes to handling just file names? Makes one wonder what other twine and baling wire is holding together other pieces.

Revision history for this message
Adam Reviczky (reviczky) wrote :

I had similar problems with the tilde, see this thread: http://www.ntg.nl/pipermail/ntg-context/2011/057338.html

The "." dot issue comes up too quite often. You can search the mailing list.

All I can tell you is that this is how it is and won't/can't change. Certainly not for texexec, as the development on that front is frozen. But then again, on my machine the space issue is not present with "context", but again that might be different on other machines, see quote above.

Revision history for this message
Adam Reviczky (reviczky) wrote :

Also you can use a filesystem level based workaround, just make a symlink without special characters, like the space, to your file with the space and texexec will run just fine. That way you can keep your filename.

ln -s Front\ Page.tex frontpage.tex
texexec frontpage.tex

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.