我需要将“内容”一词移到右边。我该怎么做?
\documentclass[11pt,a4paper,oneside,openright]{book}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[titles]{tocloft}
\usepackage{minitoc}
\usepackage{theorem}
\newtheorem{theorem}{Theorem}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=blue,
urlcolor=blue,
citecolor=red,
linktoc=page
%pdfpagemode=FullScreen,
}
\begin{document}
\dominitoc
\frontmatter
\tableofcontents
\mainmatter
\chapter{This is the first chapter}
{\hypersetup{linkcolor=black}
\minitoc
}
\section{section}
This is a citation~\cite{ref1}. Theorem~\ref{thm1} provides some interesting information.
\begin{theorem}\label{thm1}
Rain gets you wet.
\end{theorem}
\section{section}
\section{section}
\bibliographystyle{alpha}
\begin{thebibliography}{Smi19}
\bibitem[Smi19]{ref1}
John Smith.
\newblock Citing in red.
\newblock {\em Journal of Hyperlink Colors}, 2019.
\end{thebibliography}
\end{document}
答案1
使用tocloft
不带[titles]
选项的包:
\usepackage{tocloft}
\renewcommand*{\cfttoctitlefont}{\hfill\large\bfseries} % for ToC title
\renewcommand*{\cftloftitlefont}{\hfill\large\bfseries} % for LoF title
\renewcommand*{\cftlottitlefont}{\hfill\large\bfseries} % for LoT title