1

I want to centering the title of the part, and it's not working:

\renewcommand*\raggedpart{\centering}
\setkomafont{part}{\itshape\fontsize{26pt}{26pt}\selectfont}
\setkomafont{partnumber}{\fontsize{26pt}{26pt}\selectfont}
\renewcommand\partheadmidvskip{}
\renewcommand*{\partformat}{part~ :\thepart~~}

I also tried without the * (at the first line):

\renewcommand\raggedpart{\centering}
\setkomafont{part}{\itshape\fontsize{26pt}{26pt}\selectfont}
\setkomafont{partnumber}{\fontsize{26pt}{26pt}\selectfont}
\renewcommand\partheadmidvskip{}
\renewcommand*{\partformat}{part~ :\thepart~~}

both doesn't work....
So, how can I center the title?

Edit:
I also try this: \let\raggedpart\centering but it's still doesn't work...

Here is the file:

% 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}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\parindent}{0bp}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\addtokomafont{disposition}{\rmfamily}

\newcommand*\raggedchapter{\centering}
\let\raggedpart\centering
\setkomafont{part}{\itshape\fontsize{26pt}{26pt}\selectfont}
\setkomafont{partnumber}{\fontsize{26pt}{26pt}\selectfont}
\renewcommand\partheadmidvskip{}
\renewcommand*{\partformat}{Part~ :\thepart~~}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}

\part{PART ONE}

Hello!
\end{document}

Thank you!

  • Please add a MWE that shows your issue. I can not reproduce it neither with scrartcl nor with scrreprt or scrbook. Using scrreprt or scrbook the part title is centred by default. – esdd Nov 3 '18 at 9:32
2

\raggedpart is redefined in scrartcl-xetex-bidi.def by

\def\raggedpart{\if@RTL\raggedleft\else\raggedright\fi}

So you have to redefine \raggedpart after \setdefaultlanguage{hebrew} or to use

\AtBeginDocument{\renewcommand*{\raggedpart}{\centering}}

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.