how to insert the actual or current filename (the name of the file I'm working saved in a folder) in .tex or latex document? [closed]
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this questionhow to insert the actual or current filename (the name of the file saved in a folder) in .tex or latex document? In Writer (OpenOffice) is normal to use it in a foot or header document, but in .tex documents is there a way to do it? I need it to print it in the foot. Thanks
You can use the currfile package.
Here is how you put the current file name generically into a document:
\documentclass{article}
\usepackage{currfile}
\title{Article}
\author{Author}
%\date{}
\begin{document}
\maketitle
The current file is: \currfilename.\\
\end{document}
Here is how you put the current file name in the footer:
\documentclass{article}
\usepackage{currfile}
\title{Article}
\author{Author}
%\date{}
\usepackage{fancyhdr}
\pagestyle{plain}
\renewcommand{\headrulewidth}{0pt} %get rid of header
\fancyfoot[L]{\currfilename} %put current file in footer
\begin{document}
\maketitle
\thispagestyle{fancy}% sets the current page style to 'fancy'
Your text goes here.\\
\end{document}
Using footnote ...
\let\thefootnote\relax\footnotetext{\tiny{This is the last page of \jobname.pdf}}
精彩评论