ページ番号(ページ上)を特定のテキストに置き換えることはできますか?

ページ番号(ページ上)を特定のテキストに置き換えることはできますか?

ページ全体がスペースに書かれているので、これが必要です。ページ番号が書かれている変数の内容を設定できますか? または、もっと簡単に、そのスペースに特定のテキストを書き込むにはどうすればよいですか? ページごとに変更する必要があります。各ページに設定します。

ありがとう

レナート

答え1

fancyhdr以下は、パッケージを使用してページ番号を特定のテキストに置き換える方法を示す例です。

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{My Text}

\begin{document}

\section{Introduction}
This is some text.

\newpage

\section{Conclusion}
This is some more text.

\end{document}

特定のページでのみページ番号を特定のテキストに置き換えたい場合は、次の\thispagestyleコマンドを使用します。

\documentclass{article}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\rfoot{\thepage}

\fancypagestyle{myfancystyle}{
  \fancyhf{}
  \rfoot{My Text}
}

\begin{document}

\section{Introduction}
This is some text.

\newpage

\thispagestyle{myfancystyle}

\section{Conclusion}
This is some more text.

\end{document}

関連情報