When I LaTeX a file names test 1.tex with the code \edef\temp{\jobname.txt}\show\temp, I get
> \temp=macro:
->test*1.txt.
This seems to work fine with LaTeX's internal commands, but if I then mix this with \write18, it fails. For example, something like
\newwrite\tempwrite
\immediate\openout\tempwrite\temp\relax
\immediate\write\tempwrite{test}
\immediate\closeout\tempwrite
\immediate\write18{rm "\temp"}
How can I get a version of \jobname that actually uses spaces instead of stars? (Can I do something fancy with catcodes to make \write18 transform stars into spaces?)
*s) with pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010) under Ubuntu Linux. A minimal example that causes the*s to appear would be helpful. – Martin Scharrer♦ Apr 4 '11 at 23:32*has catcode 10?? Try\edef\temp{\jobname}\def\showr#1{\show#1\showr}\expandafter\showr\temp{.\show}. – Bruno Le Floch Apr 5 '11 at 18:08\edef\temp{\jobname}\def\showr#1{\show#1\showr}\expandafter\showr\temp{.\show}the next time I have access to a windows machine with LaTeX. – Jason Apr 6 '11 at 9:46\showrsequence just shows me the name of the file, with *s instead of spaces (it doesn't say, e.g., "the letter a"). I triedecho "\edef\temp{\jobname}\def\showr#1{\message{\detokenize{#1}}\showthe\catcode`#1\showr}\expandafter\showr\temp{.\show}" > "temp a1a_.tex" && latex "temp a1a_.tex"and it gave me the characterstemp*a1a_with catcodes 11,11,11,11,12,11,12,11,8. – Jason Apr 8 '11 at 21:44