Omit the date in maketitle *without blanking the date*


So, this is building on Omitting the date when using maketitle; but I’d still like to include the date in the page footer. This means date{} isn’t an option. (Of course, I’d like to get rid of the superfluous spacing in maketitle as well.)

I’m using KOMA (specifically, scrartcl); but I couldn’t hunt down a built-in way to disable this; does that exist? If not, can I use the {titling} package to do this?

documentclass[paper=a4]{scrartcl}
usepackage{scrlayer-scrpage}
automark[subsection]{section}
pagestyle{scrheadings}

title{Something}
author{Some Body}

ofoot{today}

usepackage{blindtext}
begin{document}
   maketitle
   blinddocument
end{document}

titlesec is not properly working with koma script


I am new to latex and I am using titlesec for formatting the chapter headings with titlesec.

usepackage{titlesec}

titleformat{chapter}[display]
{bfserieshuge}
{filleftLargechaptertitlename~thechapter}
{1ex}
{titlerulevspace{1.5ex}filright}
[vspace{1ex}titlerule]

but
I am not getting my chapter heading properly. I just get plain text.

I am also getting this warning.
enter image description here
Is this a reason for it?

I have a created small MME

documentclass{scrbook}
usepackage[T1]{fontenc}
usepackage[scaled]{beramono}
usepackage{graphicx}
usepackage{titlesec}
titleformat{chapter}[display]
  {bfserieshuge}
  {filleftLargechaptertitlename~thechapter}
  {1ex}
  {titlerulevspace{1.5ex}filright}
  [vspace{1ex}titlerule]
begin{document}
chapter{Introduction}
label{ch:Introduction}
end{document}

I would like to have following result without package titlesec. enter image description here

Overfull hbox warnings for the glossary option “style=long” when using KOMA-Script?


I always get an overfull hbox warning when I compile a glossary with the glossaries package and the option style=long. Also the warning occurs only with KOMA-Script classes and not with the standard classes.
Normally I’m using lualatex, but pdflatex produces the same warnings.
When I have more than 10 acronyms I get a similar second overfull hbox warning.

Does anyone have an idea what the problem is? Or do I just have to live with it?

Here a MWE which produces the warnings:

 documentclass{scrartcl}
%documentclass{article}

 usepackage[nomain,acronym,xindy,style=long]{glossaries}

 makeglossaries

newacronym{a}{a}{a}
newacronym{b}{b}{b}
newacronym{c}{c}{c}
newacronym{d}{d}{d}
newacronym{e}{e}{e}
newacronym{f}{f}{f}
newacronym{g}{g}{g}
newacronym{h}{h}{h}
newacronym{i}{i}{i}
newacronym{j}{j}{j}
newacronym{k}{k}{k}
%newacronym{l}{l}{l}
%newacronym{m}{m}{m}
%newacronym{n}{n}{n}
%newacronym{o}{o}{o}
%newacronym{p}{p}{p}

begin{document}
glsaddallunused[acronymtype]
printglossary[type=acronymtype,]
end{document} 

Including a signature image in scrlttr2


Hi there: I have a letter template using scrlttr2 and I am trying to insert a signature image. I was using the code posted here texblog and it sort of works. It throws an undefined sequence error, but, if you force the compilation through to the end, it actually produces a document that looks like what it is supposed to. What can I do to improve this? MWE is below. Thank you.

documentclass[fontsize=12pt, UScommercial9,paper=letter]{scrlttr2}
usepackage[space]{grffile} %This is necessary because the fromlogo is on a     drive with spaces in its path name
KOMAoptions{fromlogo=on}
usepackage{blindtext}
usepackage{graphicx}
setkomavar{fromlogo}{includegraphics[width=3cm]{example-image-golden}} %In my code, this is a link to my company's logo

renewcommand{raggedsignature}{raggedright} % make the signature ragged right
setkomavar{subject}{Test}

begin{document}
begin{letter}{Address\
City\
Province
}

opening{To Whom It May Concern}  

blindtext

closing{Yours truly,\
fromsig{includegraphics[scale=0.5]{example-image-golden}}\ %In my code this is a link to my signature file
fromname{My name}
} %eg. Regards

end{letter}
end{document}

Layout of the KOMA script guide


The KOMA script guide states the following on page 26:

The literature gives different values for good line lengths, depending
on the author. To some extent, this is related to the native language
of the author. Since the eye jumps from word to word, short words make
this task easier. Considering all languages and fonts, a line length
of 60 to 70 characters, including spaces and punctuation, forms a
usable compromise. This requires well-chosen leading, but LaTeX’s
default is usually good enough. Longer line lengths should only be
considered for highly-developed readers who spend several hours daily
reading. However, even for such readers, line lengths greater than 80
characters are unsuitable.

Yet, the KOMA script guide has a line length of > 100 characters. Why is that? Are there exceptions to these rules that apply here?

Similarly, the guide states the following on page 24, which is apparently also violated by the KOMA script guide:

In a single-sided document, the left and the right margin should have
equal widths. The relation of the upper margin to the lower margin
should be 1:2. In a double-sided document (e. g. a book) however, the
complete inner margin (the margin at the spine) should be the same as
each of the two outer margins; in other words, a single page
contributes only half of the inner margin.

Are there any special reasons for the differences between the claims being made and the actual layout being used in the same document?

An answer I found here indicates that the layout of the book is sound while the online version deviates and, further, that “margins have been cut to allow more legible text on the typical computer screen. You can look upon this as a service for the user or as one of the restrictions of the free version compared to the book.” Yet, why would longer lines be legible on a computer screen if the following statement from the KOMA script guide is true (as mentioned above): “Longer line lengths should only be considered for highly-developed readers who spend several hours daily reading. However, even for such readers, line lengths greater than 80 characters are unsuitable.”

Reordering KOMA-Script title (not titlepage) in custom class


I’m trying to define custom styles for the KOMA-Script title which is later inserted using the maketitle command currently using a mix of the KOMA-Script setkomafont command and the patchcmd command from the etoolbox package.

To clear up any confusion, here’s a short mwe.cls:

NeedsTeXFormat{LaTeX2e}
ProvidesClass{mwe}[2015/12/07 mwe0.1]
LoadClass[paper=a4, fontsize=11pt]{scrartcl}
RequirePackage{etoolbox}

ProcessOptionsrelax

setkomafont{subject}{normalfont}
setkomafont{title}{normalfontscshape}
setkomafont{subtitle}{normalfont}
setkomafont{author}{normalfont}
setkomafont{date}{normalfont}

patchcmd{@maketitle}{huge}{fontsize{32}{36}selectfont}{}{}
patchcmd{@maketitle}{@title}{vspace{-18pt}@title{}}{}{}
patchcmd{@maketitle}{@subtitle}{@subtitle{} \ @@subject{}}{}{} % this line apparently does not have any effect
%patchcmd{@maketitle}{@subject}{}{}{} % if this line is commented out, the subject is hidden, not appended to the subtitle

endinput

And the corresponding mwe.tex:

documentclass{mwe}

subject{Subject}
title{Title}
subtitle{Subtitle}
author{Author}
date{today}


begin{document}
maketitle

Further content...
end{document}

What I’m trying to achieve is that the subject is displayed after the subtitle – I’m not using publisher or another built-in title command as a workaround to stay semantically correct.

To me it appears like patching the subtitle command does not succeed, probably because of a different internal processing name for the command, but I didn’t find anything about it in the KOMA-Script documentation.

page number in header next to chapter/section name


I’d like to place the page number next to the chapter/section name in the white space that’s not underlined (like in the classicthesis package (I had a look at that package but it seems like the package that’s used their is deprecated)). Unfortunately my attempt doesn’t realy work cos it places the page number always on the right side (even on theleft page).

documentclass[
fontsize=12pt,                  
open=right,         
twoside = true,
paper=a4]
{scrreprt}

usepackage[english,]{babel}
usepackage[T1]{fontenc}        
usepackage[utf8]{inputenc}
usepackage{blindtext}

usepackage{fancyhdr}
pagestyle{fancy}   
fancyhf{}                                              
usepackage{lmodern}




newcommand{funnypagenumberright}{
    setlength{unitlength}{1in}%
    begin{picture}(0,0)%
    put(.1,0){{thepage}}
    end{picture}}

newcommand{funnypagenumberleft}{
    setlength{unitlength}{1in}%
    begin{picture}(-0.1,0)%
    put(0,0){{thepage}}
    end{picture}}

begin{document}
    rhead{}
    lhead{} 
    rfoot{}
    lfoot{} 
    fancyhead[LE]{nouppercase{leftmark~funnypagenumberleft}}
    fancyhead[RO]{nouppercase{rightmark~funnypagenumberright}}
blinddocument
end{document}

enter image description here

Reduce space between footnotes and footer without geometry


I have the problem that I am not able to set the correct space between the footnotes and the footline. There is way too much space yet. Here is an example what it looks like:

enter image description here

I found an example that I can fix it with the geometry-package and set the footkip height using usepackage[footskip=8mm]{geometry}. The problem is that loading the geometry package even without an option destroys my KOMA layout. Here is the layout without the loaded geometry package:

enter image description here

And this happens when I load the geometry package without any options:

enter image description here

The geometry package destroys alot of the page layout. So how else can I reduce the space between the footnote and the footnoteline? It would be perfect having a space of 1 or 1.5 lines of the height of a line of a footnote. I also tried to lower footheight=1cm in the document class but then I get an error that the footheight is too low.

Here is a MWE:

documentclass[a4paper, twoside=false, DIV=12, BCOR=5mm, bibliography=totocnumbered, headheight=1cm, footheight=1cm, numbers=autoendperiod]{scrartcl}
usepackage[multiple, bottom]{footmisc}
usepackage{layout}
usepackage{lipsum}

% Set up headers and footers
% Automark fills the leftmark and rightmark placeholders with the section and subsection
% Autooneside is needed by automark
usepackage[automark, autooneside=false, headsepline, footsepline]{scrlayer-scrpage}
usepackage{xpatch}
clearpairofpagestyles
ihead{ifstr{rightmark}{leftmark}{}{leftmark}}
ohead{ifstr{rightmark}{leftmark}{}{rightmark}}
ofoot{pagemark~hspace*{1mm}} 

% Page Style for page which shall contain the page number only
newpairofpagestyles{pagenumbersonly}{
    ofoot{pagemark~hspace*{1mm}}
}
AddToLayerPageStyleOptions{pagenumbersonly}{oninit=KOMAoptions{headsepline=false}}

% Fixing pagestyle for pages containing section command
xpretocmd{section}{vspace*{1cm}thispagestyle{pagenumbersonly}}{}{}

%Fixing headline for the bibliography section
xpretocmd{bibliography}{ihead{leftmark}}{}{}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% DOCUMENT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

begin{document}

    layout
    lipsum[10]footnote{ABC}lipsum{DEF}footnote{GHI}lipsumlipsumlipsum

end{document}

To ensure that no package inferes the layout, these are all of my used packages:

usepackage[automark, autooneside=false, headsepline, footsepline]{scrlayer-scrpage}
usepackage[ngerman]{babel}                             
usepackage[utf8]{inputenc}                         
usepackage[T1]{fontenc}                                    
usepackage{lmodern}                                            
usepackage[all]{nowidow}                                   
usepackage{microtype}                                      
usepackage{siunitx}                                        
usepackage[table]{xcolor}                          
usepackage{booktabs}                                           
usepackage{graphicx}                                           
usepackage{listings, lstautogobble}            
usepackage{lscape}                                             
usepackage{pdflscape}                                  
usepackage{pdfpages}
usepackage{tikz-er2}                                           
usepackage{acronym}                                        
usepackage{changepage}                                     
usepackage{layout}
usepackage{amsmath}
usepackage{amsthm}
usepackage{amsfonts}
usepackage{textcomp}
usepackage{setspace}                                           
usepackage{lipsum}                                             
usepackage[multiple, bottom]{footmisc}
usepackage[fixlanguage]{babelbib}
usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref}
usepackage{xpatch}

Thanks in advance

How to assign TWO parents to LaTeX counter?


I am working on a own LaTeX (using KOMA-Script) class, based on scrartcl.

The document structure is supposed to provide sections and subsections, as well as own environments (exercises, solutions, examples &c.).

Those environments are to follow in the hierarchy directly after section, IF no subsection is declared and after subsection IF it is declared, respectively.

I am looking for a way to automatically reset the counters of such environments, say the counter exc of the exercise-environment, everytime the counters section OR subsection are changed.

You can find a minimal example here:


documentclass{scrartcl}

usepackage{etoolbox}

newcounter{exc}[section]
%%% HERE OUGHT TO BE SOMETHING LIKE [section, subsection], IF YOU KNOW, WHAT I MEAN 

newenvironment{exc}%
    % begin
    {par%
    refstepcounter{exc}% count
    ifnumequal{value{subsection}}{0}% find correct level
        % subsection level
        {addxcontentsline{toc}{subsection}%
            {Ex.~thesection.theexc}% add to toc on subsection level
          noindentmbox{Exercise~thesection.theexc}\[baselineskip] 
        }%
        % subsubsection level
        {addxcontentsline{toc}{subsubsection}%
            {Ex.~thesubsection.theexc}% add to toc on subsubsection level
          noindentmbox{Exercise~thesubsection.theexc}\[baselineskip]
        }%
    }%
    % end
    {parclearpage}

begin{document}

tableofcontents

section{Hello}

  begin{exc} Lalala. end{exc}

  begin{exc} Lalala. end{exc}

section{World}

subsection{my little world}

  begin{exc} Lalala. end{exc}

subsection{your big life}

 begin{exc} Lalala. end{exc} %% HERE'S THE PROBLEM.

section{Bye!}

 begin{exc} Lalala. end{exc}

end{document} `

fancyref's fref produces a line which is to long


I have the problem, that the line, where I have a fref, is longer than the lines in the rest of the document.

I am using KOMA Script with latexmk and xelatex, to generate the document.

I have created a document with the same problem.

documentclass[paper=A4,openany]{scrbook}
RequirePackage[ngerman]{babel}
usepackage[german,vario]{fancyref}

KOMAoptions{
    draft=true,                 %TODO: set this variable to false, if final.
    BCOR=0mm,                   %bind-correct factor
    DIV=15                     %see scrguide: 
                                %   DIV=15: Border-up=19,80mm
                                %       Boder-inside=14,00mm
                                %       Print-Space=168,00mm x 237,60mm
}

begin{document}
chapter{blaaa}
section{bbbb}
blah blah blah blah blah blah blah blah blah blah blah blah bluh bluh bluh bläh
blah blah blah blah blah blah blah blah blah blah blah blah bluh bluh bluh bläh
blah blah blah blah blah blah blah blah blah blah blah blah bluh bluh bluh bläh
blah blah blah blah blah blah blah blah blah blah blah blah bluh bluh bluh bläh

Basdfsassf giit si see Mniiinasdfs, im LXL-Binfsg aaa textit{blaaaaaaaaa} blaaaaaaaaa. (siehe fref{sec:subtest}

blah blah blah blah blah blah blah blah blah blah blah blah bluh bluh bluh bläh (siehe fref{sec:subtest}
appendix
chapter{aaa}
section{test}
subsection{subtest}label{sec:subtest}
end{document}

You can also see the problem in the following screenshot:
enter image description here

As far as I know this problem occurs not very often, but how can I tell latex to put the reference number to the next line and leave the “Abschnitt” in the current line?

I don’t want to enter a manual linebreak before the fref.

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam