[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#225687: tetex-bin: LaTeX segfaults when run by auctex on filename with space



Matt Swift <swift@alum.mit.edu> schrieb:

> Package: tetex-bin
> Version: 2.0.2-5.1
> Severity: normal
>
> This invocation of LaTeX segfaults:
>
>     latex --src-specials '\nonstopmode\input{foo bar.tex}'
>
> (AucTeX invokes LaTeX this way.)
>
> If you remove the --src-specials or the space in the filename, or you
> invoke it by
>
>     latex 'foo bar.tex'
>
> it behaves as expected.

Yes, indeed. But what I expect (and what happens on my system) is the
following error:

,----
| ! LaTeX Error: Missing \begin{document}.
| 
| See the LaTeX manual or LaTeX Companion for explanation.
| Type  H <return>  for immediate help.
|  ...                                              
|                                                   
| <*> \nonstopmode\input{test space.tex}
|                                       
| Missing character: There is no s in font nullfont!
| Missing character: There is no p in font nullfont!
| Missing character: There is no a in font nullfont!
| Missing character: There is no c in font nullfont!
| Missing character: There is no e in font nullfont!
| Missing character: There is no . in font nullfont!
| Missing character: There is no t in font nullfont!
| Missing character: There is no e in font nullfont!
| Missing character: There is no x in font nullfont!
| 
| ! LaTeX Error: File `test space.tex' not found.
| 
| Type X to quit or <RETURN> to proceed,
| or enter new name. (Default extension: tex)
| 
| Enter file name: 
| ! Emergency stop.
| <read *> 
|          
| <*> \nonstopmode\input{test space.tex}
|                                       ^^M
`----

And this error is a limitation of TeX's \input primitive, which reads
any whitespace as the end of a filename. There are some TeX
implementations (e.g. MikTeX on MS Windows Systems) which accept spaces
in filenames if they are quoted. 

But I think spaces in filenames should be avoided in any case (how do
you know whether there's one space or two in a row?).

So let's sort things:

- There is a bug in the src-specials implementation that leads to a
  segfault instead of a TeX error

- There is a built-in TeX limitation which could be regarded as a
  wishlist bug. And it seems possible that this can be fixed.

Both are in principle upstream issues, but as for the last thing I
suspect it would be up to Linux users of tetex to find a fix.

Any comments?

Regards, Frank
-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie




Reply to: