以下是 MWE:
% Preview source code
%% LyX 2.3.1-1 created this file. For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew]{scrartcl}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{Frank Ruehl CLM}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\parindent}{0bp}
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\AtBeginDocument{
\renewcommand\footnoterule{%
\kern -3pt
\hbox to \textwidth{\hfill\vrule height 0.4pt width .4\textwidth}
\kern 2.6pt
}}
\usepackage{adforn}
\usepackage{xcolor}
\addtokomafont{disposition}{\rmfamily}
\setkomafont{part}{\itshape\fontsize{26pt}{26pt}\selectfont}
\setkomafont{partnumber}{\fontsize{26pt}{26pt}\selectfont}
\renewcommand\partheadmidvskip{}
\renewcommand*{\partformat}{Part~ :\thepart~~}
\renewcommand\partlineswithprefixformat[3]{\hfill\underline{{\adforn{36}#2#3\adforn{64}}}\hfill}
\makeatother
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}
\part{ABCD}
\section{abcd}
\end{document}
我知道图片是希伯来语。但是我将 MWE 改为英语:)
我怎样才能使两个adforn
符号大小相等?
谢谢你!
答案1
您必须\usekomafont{part}
添加\adforn{36}
:
\renewcommand\partlineswithprefixformat[3]{%
\hfill
\underline{\usekomafont{part}\adforn{36}#2#3\adforn{64}}
\hfill
}
结果:
说明:是预格式化的部分标题,包括影响第二个 adforn 符号的#3
元素的字体设置。为了演示这一点,您可以分组:part
#2#3
\renewcommand\partlineswithprefixformat[3]{%
\hfill
\underline{\adforn{36}{#2#3}\adforn{64}}% #2#3 in an additional group
\hfill
}
结果: