是否可以在xelatex中创建带有此类数字的页脚? [英] Is it possible to create a footer with numbers like this in xelatex?

查看:55
本文介绍了是否可以在xelatex中创建带有此类数字的页脚?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在xelatex中像上面那样创建页脚?第一页上要对齐的数字在右侧,第二页上要对齐的数字.顶部边框将是一个不错的补充,但这不是必需的.我不需要数字旁边的任何文本(节名称).

Is it possible to create footers like above in xelatex? on the first page the number to be aligned on the right and on the second page on the left side. The top border would be a nice addition but it is not necessary. I don't need any text (section names) beside the numbers.

\documentclass[11pt,a4paper]{article}
                  \usepackage{fontspec}
                  \setmainfont{Charis SIL}
                  \usepackage{geometry}
                  \geometry{a4paper, left=1in, right=1in,
                             top=0.5in, bottom=0.65in}
                  \setlength{\parindent}{0pt}
                  \setlength{\parskip}{1em}
                  \setcounter{secnumdepth}{0}
                  \usepackage{sectsty}
                  \sectionfont{\huge}
                  \subsectionfont{\Large}
                  \subsubsectionfont{\large}
                  \paragraphfont{\normalsize}
                  \usepackage{hyperref}
                  \subparagraphfont{\normalsize}
                  \renewcommand{\baselinestretch}{1.5}"

推荐答案

如果使用的是 twoside documentclass选项,则可以使用 fancyhdr 包添加此类内容一条脚线:

If you are using the twoside documentclass option, then you can use the fancyhdr package to add such a footline:

\documentclass[11pt,a4paper,twoside]{article}
\usepackage{fontspec}
\setmainfont{Charis SIL}
\usepackage{geometry}
\geometry{a4paper, left=1in, right=1in,
top=0.5in, bottom=0.65in}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1em}
\setcounter{secnumdepth}{0}
\usepackage{sectsty}
\sectionfont{\huge}
\subsectionfont{\Large}
\subsubsectionfont{\large}
\paragraphfont{\normalsize}
\usepackage{hyperref}
\subparagraphfont{\normalsize}
\renewcommand{\baselinestretch}{1.5}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{1pt}
\fancyhead{} 
\fancyfoot{} 
\fancyfoot[LE,RO]{\thepage}

\usepackage{duckuments}

\begin{document}

\duckument

\end{document}

这篇关于是否可以在xelatex中创建带有此类数字的页脚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆