如果您能帮我制作一些漂亮的页码,那就太好了。我说的漂亮是指我发布的图片上的页码。如果你们当中有人有自己喜欢的页码,或者可能对此感兴趣,如果您能在这里发布,那就太好了,这样像我这样的初学者就可以为他们的 latex 文档选择页码了。
我有与第一张图片几乎相同的页码布局,但页码必须位于中央,否则标准页码将再次出现。
亲切的问候。
最小示例:
\documentclass[12pt,a4paper]{article}%generelt
\usepackage[utf8]{inputenc}%europæisk skrifttegn
\usepackage[danish]{babel}%dansk
\usepackage{amsmath}%matematik
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}%billedimplementering
\usepackage[left=1.5cm,right=1.5cm,top=2.5cm,bottom=2cm]{geometry}%størrelsesforhold
\usepackage{cleveref}%refere med \cref og \cpageref
\usepackage[hidelinks]{hyperref}%URL
\hypersetup{hidelinks,breaklinks=true,urlcolor=color2,citecolor=color1,linkcolor=color1,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\usepackage{caption}%figurtekster
\captionsetup{margin=10pt,font=it,labelfont=it}
\usepackage[T1]{fontenc}%skrifttype
\usepackage{chemfig}%kemi
\usepackage[version=3]{mhchem}
\usepackage{fancyhdr}%overskrifter
\pagestyle{fancy}
\usepackage{lastpage}%sideantal
\thispagestyle{empty}% for cropping
\usepackage{microtype}
\begin{document}%dokumentbegyndelse
\begingroup
\noindent
\bfseries
\begin{tabular}{|p{\dimexpr0.5\textwidth-2\tabcolsep}p{\dimexpr0.5\textwidth-2\tabcolsep}|}
\hline
Received: & Approved: \cr
& Date: \cr
& Signature: \cr
(for the instructor) & \cr
\hline
\end{tabular}
\endgroup
\bigskip
\begingroup
\centering
\obeylines
\scshape
\lsstyle
\normalsize MY LESSON
\vspace{0.01ex}
\Huge Aflevering 3
\vspace{0.1ex}
\normalsize MY NAME \\{\small STUDENTNUMBER} \linebreak
\hspace{1ex}
\begin{normalsize}
Institute for ...........
\end{normalsize}
\large MY UNIVERSITY
{\normalsize \today}
\endgroup
\clearpage
\pagebreak
\twocolumn
\rhead{\scshape{\today}}
\lhead{\scshape{MY NAME}}
\cfoot{\scshape{Side \thepage \ af \pageref{LastPage}}}
\setlength\headheight{15pt}
答案1
包裹页面可以为您提供“第 n 页,共 m 页”样式的页码。以下是使用 fancyhdr 进行设置的一种方法:
\usepackage{pageslts}
\pagenumbering{arabic}
\fancyfoot[C]{Page \thepage{} of \lastpageref*{VeryLastPage}}
该命令的星号版本会阻止最后一页的页码成为最后一页的链接,当链接带有颜色时,我发现视觉上很丑陋。
答案2
下面是另一个示例:
\documentclass[12pt,a4paper]{article}%generelt
\usepackage[utf8]{inputenc}%europæisk skrifttegn
\usepackage[danish]{babel}%dansk
\usepackage{amsmath}%matematik
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}%billedimplementering
\usepackage[left=1.5cm,right=1.5cm,top=2.5cm,bottom=2cm]{geometry}%størrelsesforhold
\usepackage{cleveref}%refere med \cref og \cpageref
\usepackage[hidelinks]{hyperref}%URL
\hypersetup{hidelinks,breaklinks=true,urlcolor=color2,citecolor=color1,linkcolor=color1,bookmarksopen=false,pdftitle={Title},pdfauthor={Author}}
\usepackage{caption}%figurtekster
\captionsetup{margin=10pt,font=it,labelfont=it}
\usepackage[T1]{fontenc}%skrifttype
\usepackage{chemfig}%kemi
\usepackage[version=3]{mhchem}
\usepackage{fancyhdr}%overskrifter
\pagestyle{fancy}
\usepackage{lastpage}%sideantal
\thispagestyle{empty}% for cropping
\usepackage{microtype}
\begin{document}%dokumentbegyndelse
\begingroup
\noindent
\bfseries
\begin{tabular}{|p{\dimexpr0.5\textwidth-2\tabcolsep}p{\dimexpr0.5\textwidth-2\tabcolsep}|}
\hline
Received: & Approved: \cr
& Date: \cr
& Signature: \cr
(for the instructor) & \cr
\hline
\end{tabular}
\endgroup
\bigskip
\begingroup
\centering
\obeylines
\scshape
\lsstyle
\normalsize MY LESSON
\vspace{0.01ex}
\Huge Aflevering 3
\vspace{0.1ex}
\normalsize MY NAME \\{\small STUDENTNUMBER} \linebreak
\hspace{1ex}
\begin{normalsize}
Institute for ...........
\end{normalsize}
\large MY UNIVERSITY
{\normalsize \today}
\endgroup
\clearpage
\pagebreak
\twocolumn
\rhead{\scshape{\today}}
\lhead{\scshape{MY NAME}}
\cfoot{\parbox{\textwidth}{\hrulefill\kern-0.6ex\raisebox{-0.5ex}{$\Bigl[$\makebox[2em][c]{\thepage}$\Bigr]$}\kern-0.5ex\hrulefill}}
\setlength\headheight{15pt}
Some text
\end{document}
另一个例子:
\cfoot{$\overset{\textcolor{olive}{\resizebox{!}{0.65em}{${\cdots}$}}}{\makebox[2em][c]{\thepage}}$}