![ページ番号のみを含むページの上部に水平線を作成する方法はありますか?](https://rvso.com/image/286959/%E3%83%9A%E3%83%BC%E3%82%B8%E7%95%AA%E5%8F%B7%E3%81%AE%E3%81%BF%E3%82%92%E5%90%AB%E3%82%80%E3%83%9A%E3%83%BC%E3%82%B8%E3%81%AE%E4%B8%8A%E9%83%A8%E3%81%AB%E6%B0%B4%E5%B9%B3%E7%B7%9A%E3%82%92%E4%BD%9C%E6%88%90%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%EF%BC%9F.png)
次のようなスタイルの本を書こうとしました。上部の水平線に「Sisältö」という単語やページ番号以外のテキストが表示されないように変更する方法はありますか?
\documentclass[10pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel}
\usepackage{blindtext}
\usepackage[a5paper]{geometry}
%\usepackage[a5paper, top=2in, bottom=1.5in, left=1in, right=1in]{geometry}
\usepackage{scrextend}
\changefontsizes{10.0pt} % Change base font size
\usepackage{lettrine}
\usepackage{fancyhdr}
\fancyhead[LE,RO]{\thepage}
\fancyfoot{}
\fancyhead[RO,LE]{\thepage}
\fancyhead[LO]{\leftmark}
\fancyhead[RE]{\rightmark}
\cfoot{} % get rid of the page number
\linespread{1.3}
\vbadness=20000
\pagestyle{fancy}
\begin{document}
\tableofcontents
\newpage
\section*{Chapter one}
\addcontentsline{toc}{section}{beginning}
First lines.
\newpage
\section*{Chapter two}
\addcontentsline{toc}{section}{somewhere}
Some text.
\newpage
\section*{Chapter two}
\addcontentsline{toc}{section}{end}
The end.
\end{document}
答え1
ヘッダーにルールとページ番号のみを表示し、フッターには何も表示しない場合は、
\pagestyle{fancy}
\fancyhf{} % clear all fields
\fancyhead[RO,LE]{\thepage}
以上です。 に関連する他の設定は行わないでくださいfancyhdr
。