I am trying to customise the aspect of a scrbook to look like a book I have.
In my case, sections should be formatted as follows: the font face should be Conques Demi, the font size 26 pt, the font colour a particular shade of dark red (CMYK: 0% 87% 87% 50%) with a 1 pt thick line rule of the same colour that is large the width of a column, the label should be in upper case and aligned to right.
Since I have not managed to realise how to draw coloured line rules with KOMA scripts, I tried to abstain that results with other packages. If you know how to get the exact result that I described above, please feel free to show me how in KOMA! Thanks in advance!
Anyway I managed to mimic the font face, size and colour, the rule and the alignment, but I started to experience problems when I tried to make the label uppercase. Note that the problem persists even if I remove any reference to the fontspec package and all its commands. Consider the following minimal working example:
\documentclass[twocolumn]{scrbook}
\usepackage{xcolor}
\usepackage{sectsty}
\usepackage{fontspec}
\setcounter{secnumdepth}{0}
\definecolor{darkred}{cmyk}{0.0,0.87,0.87,0.50}
\newfontfamily\myfont[]{Conques}
\sectionfont{\raggedleft\myfont\Huge\color{darkred}\sectionrule{0pt}{0pt}{-2pt}{1pt}} %
\begin{document}
\mainmatter
\section{A Section} % (fold)
\label{sec:a_section}
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
% section a_section (end)
\end{document}
As other answers (to simpler cases) suggest, in order to uppercase the section's label, I am expected to add \uppercase to the end of the \sectionfont{...} command. If I do so, however, I am warned that a { is missing and that \begin{document} is closed by \end{DOCUMENT}. If I open the resulting .pdf, all the document is uppercase except for an additional A Section the appear just below the first occurrence and the rule is gone.
This is due to the fact, I think, that \uppercase is a parametric command while here it is used as an "absolute" statement. In my opinion, in fact, the second occurrence of A Section is due to \uppercase messing with the definition of the section's headings for the table of content, which in turn becomes empty.
According to my researches, there is no such "absolute" \uppercase equivalent.
Some answers suggest to use \MakeUppercase instead as in some cases it is more "respectful" of the surrounding environment. If I do so, however, I get the following result: the string [0pt][r] at the beginning of an empty line with a rule that is finishing out of the vertical column border; the proper section's label appears below, not uppercased, with no rule, but correctly moved to the right. Even if this might suggest to reorder the commands within \sectionfont{...}, no permutation actually works.
I have even tried with the textcase package and its \MakeTextUppercase command as well, with no luck at all.
Can someone please tell me where I am wrong and how to fix the issue?

sectstydoesn't allow to put at the end a command with argument; it'stitlesecthat has this feature. However, also the KoMa-Script classes should have some facility for this job, without the need of external packages. – egreg Jan 18 '13 at 14:23\sectionrule{0pt}{0pt}{-2pt}{1pt}. Do you know if they indeed do allow that? I'm editing my question to include this possibility. – Stefano Bragaglia Jan 18 '13 at 14:53