答案1
您可以使用 tikz 和 scrpage2。我得到了以下结果:
代码如下:
\documentclass[twoside]{scrartcl}
% also works with oneside option and with non Koma Class like article
% Package used for custom page numbers
\usepackage{scrpage2}
% package for drawing
\usepackage{tikz}
% package used for tests
\usepackage{etoolbox}
% Define lemon color
\definecolor{lemon}{HTML}{cedead}
% Sep up Page numbering font
\renewcommand*{\pnumfont}{%
\normalfont\sffamily\Large\color{black!40}}
% create new custom page style "fancy"
\newpagestyle{fancy}{%
{} %head twoside even
{} %head twoside odd
{} %head oneside
}{%
{\tikzpagemark[e]} %foot twoside even
{\hfill\tikzpagemark} %foot twoside odd
{\hfill\tikzpagemark} %foot oneside}
}
% This command creates the custom page numbers
% If optional parameter is used \tikzpagemark creates pagemark for the left side
\newcommand{\tikzpagemark}[1][]{%
\begin{tikzpicture}[overlay]
\node at (\notblank{#1}{-}{}3mm,\textheight+\footskip-3pt)
[minimum width=1.1cm,minimum height=1.1cm,
below \notblank{#1}{left}{right}](n)
{\pagemark};
\draw[color=lemon,line width=3pt] (n.north east) -- (n.north west);
\draw[color=lemon,line width=1pt] (n.south east) -- (n.south west);
\end{tikzpicture}}
\pagestyle{fancy}
\usepackage{lipsum}
\begin{document}
This is some text
Some more text.
\lipsum[1-10]
\end{document}