自定义样式页脚中的中心页码

自定义样式页脚中的中心页码

我正在尝试创建一个自定义页脚,其边缘有一些装饰,并且页码位于中间。

以下是一个例子:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{tikz}
\usepackage{lipsum}
\usepackage{fourier-orns}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,fill=gray!50,inner sep=2pt] (char) {#1};}}
\fancyhf{}           
\fancyfoot[L]{\raisebox{-1.9pt}[10pt][10pt]{\decoone \floweroneright \decotwo \aldineleft \decothreeright \decofourright \leafleft} \hrulefill~ \circled{\thepage} \hrulefill~ \raisebox{-1.9pt}[10pt][10pt]{\leafright \decofourleft \decothreeleft  \aldineright \decotwo \floweroneleft \decoone}}

\title{test}
\author{Test}
\date{June 2022}

\begin{document}

\maketitle

\section{Introduction}
\lipsum{}
\newpage
\section{section 1}
\lipsum{}
\end{document}

结果如下:

页

唯一的问题是,在页脚中,页码没有完全居中:

页脚

页码左侧的空间大于页码右侧的空间。页码稍微向右推了一点。我相信这是因为我使用的是左侧fancyfoot[L],但使用中心[C]根本不起作用。

有没有办法让这个页脚的页码正确居中?

相关内容