XeLaTeX 标题中的印度语脚本大小

XeLaTeX 标题中的印度语脚本大小

我使用的是 XeLaTeX(Windows 上的 TeX Live 2012),我的梵文文档完全是天城文。甚至页码、章节编号和章节名称都是天城文。我使用但很奇怪,和fancyhdr的输出大小不同。虽然的文本很小,但的文本很大,除了小节编号。我如何控制的大小以使其与相同?这是一个工作示例。lheadrheadlheadrheadrheadlhead

\documentclass{article}
\usepackage{lipsum}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\setmainlanguage{hindi}
\setotherlanguage{english}
\setmainfont[Script=Devanagari]{Arial Unicode MS} 
\newfontfamily\devanagarifont[Script=Devanagari]{Arial Unicode MS}
\newfontfamily{\englishfont}{Times New Roman}
\newcommand{\devanagarinumeral}[1]{%
   \devanagaridigits{\number\csname c@#1\endcsname}}
\usepackage{hyperref}
\begin{document}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhf{}
\lhead{\fancyplain{}{अमुकग्रन्थे}} 
\rhead{\fancyplain{}{\rightmark}}
\cfoot{\fancyplain{}{\thepage}}
\renewcommand{\thesection}{\devanagarinumeral{section}} 
\renewcommand{\thesubsection}{\small{\devanagarinumeral{section}.\devanagarinumeral{subsection}}}   
\renewcommand{\thepage}{\Large \devanagarinumeral{page}}
\section[\texorpdfstring{\Large प्रथमोऽध्यायः}{Chapter 1}]{प्रथमोऽध्यायः}
\subsection[\texorpdfstring{\Large प्रथमः पादः}{Part 1}]{प्रथमः पादः}
\begin{english}
\lipsum[1-10]
\end{english}
\end{document}

答案1

您已经使用\Large

\section[\texorpdfstring{\Large प्रथमोऽध्यायः}{Chapter 1}]{प्रथमोऽध्यायः}

可选参数用于连续标题。如果删除\Large,问题就解决了。同样,在

\renewcommand{\thesubsection}{\small{\devanagarinumeral{section}.\devanagarinumeral{subsection}}}   
\renewcommand{\thepage}{\Large \devanagarinumeral{page}}

\small\Large不必要的。

完整代码:

\documentclass{article}
\usepackage{lipsum}
\usepackage{polyglossia}
\usepackage{fancyhdr}
\setmainlanguage{hindi}
\setotherlanguage{english}
\setmainfont[Script=Devanagari]{Arial Unicode MS}
\newfontfamily\devanagarifont[Script=Devanagari]{Arial Unicode MS}
\newfontfamily{\englishfont}{Times New Roman}
\newcommand{\devanagarinumeral}[1]{%
   \devanagaridigits{\number\csname c@#1\endcsname}}
\usepackage{hyperref}
\begin{document}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhf{}
\lhead{{अमुकग्रन्थे}}
\rhead{{\normalsize\rightmark}}
\cfoot{{\thepage}}
\renewcommand{\thesection}{\devanagarinumeral{section}}
\renewcommand{\thesubsection}{{\devanagarinumeral{section}.\devanagarinumeral{subsection}}}
\renewcommand{\thepage}{\devanagarinumeral{page}}
\section[\texorpdfstring{प्रथमोऽध्यायः}{Chapter 1}]{प्रथमोऽध्यायः}
\subsection[\texorpdfstring{\Large प्रथमः पादः}{Part 1}]{प्रथमः पादः}
\begin{english}
\lipsum[1-10]
\end{english}
\end{document}

在此处输入图片描述

相关内容