
Document Classes ⇒ insert file name in the document (header, footer)
Re: insert file name in the document (header, footer)
Thanks a lot. That worked for \documentclass[a4paper,10pt]{report} 

NEW: TikZ book now 40% off at Amazon.com for a short time.
insert file name in the document (header, footer)
Well, here they areStefan_K wrote:Perhaps we can help if you show us the class file,
- Attachments
-
- mwe_dissert.tex
- tex
- (316 Bytes) Downloaded 228 times
-
- dissert.cls
- cls
- (18.27 KiB) Downloaded 231 times
- Stefan Kottwitz
- Site Admin
- Posts: 10323
- Joined: Mon Mar 10, 2008 9:44 pm
insert file name in the document (header, footer)
The dissert class redefines \ps@headings, that's causing it.
Using the internal macro \@oddhead too you could write into your preamble:
and don't use \markboth, dissert.cls doesn't support that standard LaTeX macro.
Stefan
Using the internal macro \@oddhead too you could write into your preamble:
Code: Select all
\makeatletter
\def\@oddhead{\jobname\hfil\thepage}
\makeatother
Stefan
LaTeX.org admin
Re: insert file name in the document (header, footer)
Amaizing! It worked! Thank you!
The second part of the question... how can I insert the file neme on the first page only?
The second part of the question... how can I insert the file neme on the first page only?

- Stefan Kottwitz
- Site Admin
- Posts: 10323
- Joined: Mon Mar 10, 2008 9:44 pm
insert file name in the document (header, footer)
Similar, after the first page, after \newpage:
Stefan
Code: Select all
\makeatletter
\renewcommand*\@oddhead{\hfil\thepage}
\makeatother
LaTeX.org admin
Re: insert file name in the document (header, footer)
Thanks a lot!
By the way, what does it mean * before \@oddhead ?
By the way, what does it mean * before \@oddhead ?
- Stefan Kottwitz
- Site Admin
- Posts: 10323
- Joined: Mon Mar 10, 2008 9:44 pm
insert file name in the document (header, footer)
The star marks a "short command", that means a parameter cannot span over more than one paragraph, it cannot contain \par. This makes it easier to find possible errors, that's why I prefer the starred form when I know the parameter cannot contain paragraph breaks, I'm used to it. See also Short and Long Commands.
Stefan
Stefan
LaTeX.org admin
Re: insert file name in the document (header, footer)
Thanks! \jobname works great. I couldn't find this anywhere else.
Brian