I would like to have a name of the (source) file to be inserted in the dvi (and subsequentlt in pdf) output (perhaps without extention).
Is there any way to do it without modifing header or footer manually?

thanx
NEW: TikZ book now 40% off at Amazon.com for a short time.
You just have to use the \jobname command to place that file name wherever you want.Cherepan wrote:[...] I would like to have a name of the (source) file to be inserted in the dvi (and subsequentlt in pdf) output (perhaps without extention). [...]
It seems to me like you are using the standard headers produced by \pagestyle{headings}. For an automation you should take a look at packages like fancyhdr or titlesec and create headers (and footers) with them.Cherepan wrote:[...] Is there any way to do it without modifing header or footer manually? [...]
Could you please point out some literature how to use this commad. Quick Googling has not helped.localghost wrote:You just have to use the \jobname command to place that file name wherever you want.
Code: Select all
\documentclass[a4paper,10pt]{report}
\pagestyle{headings}
\begin{document}
\markboth{\jobname}{\jobname}
text
\newpage
text
\end{document}
Is the name that I should give differ from the one I save the file with?Stefan_K wrote:<...>
Save it, give the file a name and compile, <...>
Shame on me!!! I did!!!Stefan_K wrote:Did you call it head.tex?
Stefan
Just use \markboth{}{} on/before the second page.Cherepan wrote:Is there a way to make the file name to apper only on the first page?
Perhaps we can help if you show us the class file, you could post dissert.cls as attachment here accompanied by a minimal working example.Cherepan wrote:Still, that does not work with "dissert" (a class for writing a thesis in Russian academia) document class at all.
NEW: TikZ book now 40% off at Amazon.com for a short time.