开发者

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]

开发者 https://www.devze.com 2023-02-22 07:04 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. 开发者_JAVA技巧 Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers. 开发者_JAVA技巧

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

how 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}}
0

精彩评论

暂无评论...
验证码 换一张
取 消