2

I trying to make underlined title (of the parts) at KOMA-script, but it doesn't works well....

Can you guide me how to do this?

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

\makeatletter

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


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.

\addtokomafont{disposition}{\rmfamily}

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

\makeatother

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

\part{PARTONE}

Hello!
\end{document}

P.S. If I put the \underline tag it's doesn't work, or flush the title to right (I'm Hebrew user).

Thank you!

Johannes_B
  • 24,235
  • 10
  • 93
  • 248
heblyx
  • 2,571

1 Answers1

2

With an uptodate KOMA-Script Version (at least version 3.25)

\renewcommand\partlineswithprefixformat[3]{\hfill\underline{#2#3}\hfill}

seems to work. Then the redefinition of \raggedpart is not needed.

esdd
  • 85,675