When typesetting a file (using TeXworks on a Windows machine) which includes white spaces, then the jobname will contain the file name enclosed with double quotes. pdflatex Local\ Guide.tex will set jobname to "Local Guide" and currfilename to "Local Guide".tex.

This is somewhat undesirable for me. Is there any way to eliminate the quotation marks? My corporate design requires the file name to appear in the page footer -- including the file extension .tex but excluding the quotes.


1 Answer 1


The quotes are (or should be) balanced 'behind the scenes'. Thus we can just strip off a set, for example


The idea here is that "#2" will match the 'real' name whether or not there were any quotes around the original name. We can't change \jobname (or rather we can't change the internal data which it uses), so I've called the 'simplified' value a different name. That also avoids the case where something else uses \jobname and does need the quotes.

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.