2

I'm trying to customize the header of my srcartcl. I found this question which lead me to use \deftriplepagestyle to include an image into my header. Neat!

\deftriplepagestyle{default}
{}
{}
{\includegraphics[height=0.6cm,valign=c]{myCoolLogo}-Software} 
{}
{\pagemark}
{}

However, I would also want to include the section name (and maybe number) into the header and I cannot find any solutions on the web, which allow both (section names and image).

(How) can this be done?

4
  • Have a look at the documentation. It is simpler than you think. \deftriplepagestyle is far too complex for normal use.
    – Johannes_B
    Commented Jan 23, 2017 at 13:44
  • I did. What I found was \automark{section}. But I do not see how I could pass an Image to automark and using \deftriplepagestyle together with automark Latex seems to ignore automark. Probably because it defines a completely new style which I then use, while automark changes the "default" style. Actually I called my style "default" in the hopes to overwrite this default style and still get the effect of automark.
    – Soraltan
    Commented Jan 23, 2017 at 14:12
  • Probably you don't even need an extra package, KOMA-script provides a lot of commands for running headings. Take an hour to read the sections in the manual. You get it with texdoc scrguien on the command line. »scrguien« is »scrguide in english«.
    – Keks Dose
    Commented Jan 23, 2017 at 15:07
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. Commented Oct 30, 2017 at 16:43

1 Answer 1

2

Don't use the interface for advanced users, use the simple interface for normal users.

\documentclass[
headheight=22pt
]{scrartcl}
\usepackage{scrlayer-scrpage}
\usepackage{graphicx}
\usepackage{blindtext}
\automark{section}
\ohead{\includegraphics[height=.6cm]{example-image-1x1}}
\begin{document}
\Blinddocument
\end{document}
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .