# \subtitle in fancyhdr

KOMA class allows titles (\title{}) and subtitles (\subtitle{}). I want to make a header that automatically inserts both.

In the standard article class the title can be achieved using the command \runtitle:

\usepackage{fancyhdr}
\pagestyle{fancy}


but is there a similar \subtitle command? Ideally:

\usepackage{fancyhdr}
\pagestyle{fancy}

• You can usually put almost anything you want in the fancyhead. Try something like this: In the Preamble, \def\subtitle#1{\def\mysubtitle{#1}} then \subtitle{Your Subtitle} then in the fancyhdr portion, \fancyhead[R]{\mysubtitle}. You can also use code to style it, perhaps if you want italics or small caps. – user103221 Jan 26 '17 at 0:19
• But how does this automatically pull from the content in KOMA's \subtitle{} command? – invictus Jan 26 '17 at 3:51
• also this straight up does not work – invictus Jan 26 '17 at 3:55
• fancyhdr and koma-script are incompatible. Better use scrlayer-scrpage for your headers and footers. – Johannes_B Jan 26 '17 at 7:29
• Sorry, I was not making a KOMA-specific comment. Just general purpose. Works for me, but I am using an entirely different setup, which does not already have a \subtitle{} command. – user103221 Jan 26 '17 at 15:42

Use the KOMA-script package scrlayer-scrpage. I guess the header will get pretty crowded that way.

\documentclass[headinclude]{scrbook}
\usepackage{scrlayer-scrpage}
\usepackage{blindtext}