4

enter image description here

Here is the 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}

I know the picture is at Hebrew. but I change the MWE to English :)
How can I make that the both adforn symbols will be size equals?

Thakn you!

5

You have to add a \usekomafont{part} for the \adforn{36}:

\renewcommand\partlineswithprefixformat[3]{%
  \hfill
  \underline{\usekomafont{part}\adforn{36}#2#3\adforn{64}}
  \hfill
}

Result:

enter image description here


Explanation: #3 is the preformated part title including the font settings for element part which affects the second adforn symbol. To demonstrate this you can group #2#3:

\renewcommand\partlineswithprefixformat[3]{%
  \hfill
  \underline{\adforn{36}{#2#3}\adforn{64}}% #2#3 in an additional group
  \hfill
}

Result:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.