Problem with large gaps in scrreprt with setspace


I am using the documentclass scrreport with the twoside option. Therefore, latex tries to stretch the content on a whole page rather then leaving a gap on the bottom of the page. This produces sometimes large gaps. This is the most extreme case that I was able to produce (notice the gap on top and below of the proof):

enter image description here

I find these gaps totally acceptable. However, when I include the setspace package,
I often have to cope with much larger gaps, as I was able to produce in the following example:

enter image description here

Is it possible to avoid those gaps and still use scrreport and setspace? Here is the code that produces the huge gaps.

documentclass[twoside=true]{scrreprt}

usepackage{setspace}
usepackage{amsthm}
newtheorem{prop}{Proposition}[section]
usepackage{amsmath}
usepackage{blindtext}

begin{document}

    begin{prop}
        label{itExists2}
        This is a non-sense proof to show that I have 
        serious problems with the geometry and setspace package!
    end{prop} 
    begin{proof}
        begin{align*}
        1 \    2\ 3\ 4\ 5\6\
        end{align*}
        Hi
        [ 1+ 1 =2]
    end{proof} 

    blindtextblindtext

    Some nice equations:
    begin{align*}      
        1 +1 = 2 \1+1 =3 \    1+1 =3 \1+1 =3 \  1+1 =3 \1+1 =3 
    end{align*}
end{document}

This is how it looks if everything fits on the page:
enter image description here

How to make nice chapter headings without titlesec


I am looking for a way to make the first page for a chapter (a.k.a. the chapter heading) have approximately the upper half of the first page with a chapter number and title, and the text of the chapter start about half way down the page.

I have seen several options using titlesec such as:

usepackage[ ]{titlesec}  %
titleformat{chapter}[display]
  { normalsize huge  color{black}}
  {flushright normalsize color{RoyalRed} MakeUppercase { chaptertitlename } hspace{1 ex} { fontsize{60}{60}selectfont color{RoyalRed} sffamily  thechapter }} {10 pt}{huge}  

This works acceptably, producing something like (ignore the blue in this graphic):

enter image description here

except I don’t want to use titlesec because I get the following warning:

Class scrbook Warning: Usage of package `titlesec' together
(scrbook)              with a KOMA-Script class is not recommended.
(scrbook)              I'd suggest to use the package only
(scrbook)              if you really need it, because it breaks several
(scrbook)              KOMA-Script features, i.e., option `headings' and
(scrbook)              the extended optional argument of the section
(scrbook)              commands .
(scrbook)              Nevertheless, using requested
(scrbook)              package `titlesec' on input line 43.

I am relatively new to LaTex in general, but my sense is that the KOMA packages are well designed and well documented, so within the maelstrom of LaTex formatting capabilities, I would like to remain hitched to the using KOMA properly. So the question is, how can I get the same sort of chapter title effect without using titlesec?

Problems with acro package and greek babel?


Well, I need to create an acronym list in my thesis, I was using the acronympackage before for that. Since I updated several package and my old preamble had too much error, I decided to create another main.tex file and build there again the preamble. Has been hard to do and order the packages for avoid errors. All was fine until yesterday when I added greek polytonic for few notes that I compose like sidenotes with the snotez package, and then started the problems.

At first the errors were related to babel and greek, bunt now that works fine. My problem now are the acronyms that yesterday were fine.

My MWE:

documentclass[paper=letter,headings=big,bibliography=totoc,DIV=9]{scrbook}
KOMAoptions{headsepline=true,fontsize=10pt,draft=false}
usepackage{typearea}
usepackage[greek.polutoniko,spanish.mexico]{babel}
usepackage[utf8]{inputenc}
usepackage[LGR,T1]{fontenc}
usepackage{snotez}
%%%%%%%%%%%%%%%%%%%%%%%% Acronyms
usepackage[single=false,macros=false,xspace=false]{acro}
DeclareAcronym{lbd}{
 short = LBD , 
 long = Lipoproteinas de baja densidad ,
 foreign = Low-Density Lipoprotein
}
DeclareAcronym{vop}{
 short = VOP , 
 long = Velocidad de onda de pulso ,
 foreign = Pulse Wave Velocity
}
DeclareAcronym{ifs}{
 short = IFS , 
 long = Interacción fluido-sólido ,
 foreign = Fluid-Solid/Structure Interaction
}

DeclareAcronym{hgo}{
 short = HGO , 
 long = modelo de Holzapfel-Gasser-Ogden
}

DeclareAcronym{aha}{
 short = AHA , 
 long = Asociación Americana del Corazón ,
 foreign = American Heart Asociation
}
DeclareAcronym{wss}{
 short = WSS , 
 long = Esfuerzo cortante de pared ,
 foreign = Wall Shear Stress
}    

DeclareAcronym{adina}{
 short = ADINA ,
 long  =  Automatic Dynamic Incremental Nonlinear Analysis ,
 class = software
}    

begin{document}

minisec{Arteriosclerosis}

Es un término genéricosidenote{Del griego {selectlanguage{greek} textgreek{'arthr'ia}} emph{arteria} y {selectlanguage{greek} textgreek{skl'hrwsic}} emph{cicatriz, rigidez}.} que fue creado por Jean Georges Chrétien Frédéric Martin Lobstein.

Este capítulo tiene como objetivo proporcionar una descripción de las ecuaciones matemáticas que rigen y el algoritmo desarrollado para la modelación computacional ac{ifs} del flujo sanguíneo y las geometrías del modelo utilizadas en el estudio.

La ac{dfc} descompone la geometría en pequeñas celdas y por tanto tiene como objetivo resolver las ecuaciones que rigen para cada celda.

En la actualidad, varios paquetes de software como ac{adina} proporcionan esta capacidad. Todos estos programas emplean el método de elementos finitos para resolver las ecuaciones de flujo. Este es el método preferido para resolver simulaciones ac{ifs} de problemas estructurales, ya que es uno de los mejores métodos disponibles. 

printacronyms[exclude-classes=software]
printacronyms[include-classes=software, name={Software}]    
end{document}

When I try to compile I get few errors, one of them says:

! Improper alphabetic constant.
<to be read again>
global
l.186 cnltx@tmpa
A one-character control sequence belongs after a ` mark.
So I'm essentially inserting  here.
! Missing number, treated as zero.
<to be read again>

another:

! Undefined control sequence.
<argument> 2
9/9/17 v1.1 Trim spaces around a token list
l.6 Trim spaces around a token list]
The control sequence at the end of the top line
of your error message was never def'ed. If you have
misspelled it (e.g., `hobx'), type `I' and the correct
spelling (e.g., `Ihbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

In the first case I understand that the error is because the cnltx package wasn’t load before or something else. I don’t use it, and I want to believe that one of the several packages I’ve got should load it.

If you want to see the original log file is here, and the real preamble is this.

Changing the font size in koma-script modifies page margins


I’d like to use the koma-script scrartcl class with a font size of 10pt, but when I use the document option 10pt, not only the font size decreases but also the space user for the text. Especially the footer margin (between the page number and the bottom of the page) is enlarged and this looks unpleasant to me.

Minimal document with 11pt font size:

documentclass[a4paper]{scrartcl}
usepackage{lipsum}
begin{document}
lipsum[1-20]
end{document}

Minimal document with option 10pt (and large footer margin):

documentclass[a4paper,10pt]{scrartcl}
usepackage{lipsum}
begin{document}
lipsum[1-20]
end{document}

Why does changing the document font size affect the margins so much? How can I set the font size to 10pt and not influence the margins of the page?

My system is configured to use a paper size of A4 by default and I’m compiling my documents with pdflatex.

Amsmath's binom looking weird


Using the MWE

documentclass[fontsize=8pt, a4paper, DIV12]{scrbook}

usepackage{amsmath}

begin{document}
[ e^t = x^{(5)} - 2x^{(3)} + dot{x}
 = sum_{k = 0}^{5} binom{5}{k} p^{(k)}(t) e^t
 -2sum_{k = 0}^{3} binom{3}{k} p^{(k)}(t) e^t
 + sum_{k = 0}^{1} binom{1}{k} p^{(k)}(t) e^t
]
end{document}

I get the output

Formula with strange looking binomial coefficients

with strange looking binomial coefficients. Root cause is the font size.

Is there any way to get the usual look without changing font size?

Page header too high with scrlayer-scrpage


I’m designing an exercise sheet and need some help with the header. It looks as it should with my code, but is way too high on the page. Changing the headheight does not seem to have any effect, only that LaTeX complains if i choose it too low.

Is there a way to get it lower onto the page? Or do i have to do the two-line header in another way?

Additionally, i’d like to know if there’s an easy possibility to only show the header on those pages where a new section begins, and not on the other pages (e.g. on the first two pages, but not the last one in the example).

documentclass[paper=a4, twoside=true, fontsize=11pt, parskip=half, headheight=1cm, DIV=12]{scrartcl}

% Designing the head of the page
usepackage[automark,headsepline]{scrlayer-scrpage}
pagestyle{scrheadings}
ihead{{normalfontbfseries Exercise Sheet thesection  for some Lecture, Summer 2015}\
    normalfont Due date: Thursday, 01. January 2015, 10:00}
ohead{{normalfontbfseries Prof. Dr. John Doe}\
    normalfont email@professor.com}
chead{}

usepackage{blindtext}

begin{document}
blinddocument
end{document}

thispagestyle{empty} on last page doesn´t work


I need a site without page style at the end of a document. But the command doesn´t work. How can I solve this?

documentclass[BCOR=10mm,DIV=11]
{scrreprt}
usepackage{setspace}
usepackage{blindtext}
usepackage[
    automark,                               %% Kapitelangaben in Kopfzeile automatisch erstellen
    headsepline, 
    footsepline, 
    plainheadsepline, 
    plainfootsepline
]{scrlayer-scrpage}

setkomafont{captionlabel}{bfseries}           %% Label-Bildunterschrift fett
setkomafont{pageheadfoot}{small}          %% Kopfzeile klein
%setheadsepline{0.4pt}                         %% Kopf-Linie
%setfootsepline{0.4pt}                         %% Fuß-Linie

pagestyle{scrheadings}
ihead[]{}
chead[]{}
ohead[headmark]{headmark}

ifoot[]{}
cfoot[pagemark]{pagemark}
ofoot[]{}

AfterTOCHead{singlespacing}
onehalfspacing
KOMAoptions{DIV=last}

begin{document}

begin{spacing}{1}
title{Titel}
author{1}
end{spacing}

begin{spacing}{1}
maketitle
end{spacing}

tableofcontents

chapter{Test}
subsection{1}
subsection{2}
Blindtext

chapter{Test1}
subsection{1}
subsection{2}
Blindtext

chapter{Test2}
subsection{1}
subsection{2}
Blindtext

chapter{Test3}
subsection{1}
subsection{2}
Blindtext

chapter{Test4}
subsection{1}
subsection{2}
Blindtext

chapter{Test4}
subsection{1}
subsection{2}
Blindtext

chapter{Test4}
subsection{1}
subsection{2}
Blindtext

chapter{Test4}
subsection{1}
subsection{2}
Blindtext

chapter{Test4}
subsection{1}
subsection{2}
Blindtext

chapter{Test4}
subsection{1}
subsection{2}
Blindtext

thispagestyle{empty}
chapter*{Erklärung}
%begin{flushleft}
vspace*{10ex}
%noindenttextit{Hiermit versichere ich, dass ich die vorliegende Abschlussarbeit selbstständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel verwendet %habe.} parvspace{1ex}
%noindent
noindenttextit{Ich erkläre hiermit eidesstattlich, dass ich die vorliegende Arbeit selbständig angefertigt habe. Die aus fremden Quellen übernommenen Gedanken 
sind als solche kenntlich gemacht. Die Arbeit wurde bisher keiner anderen Prüfungsbehörde vorgelegt und auch nicht veröffentlicht. Ich bin mir bewusst, dass eine unwahre Erklärung rechtliche Folgen haben kann.}parvspace{3ex}
noindent
rule[0.0cm]{4.3cm}{0.4pt}par
noindent
parvspace{8ex}

noindenttextit{Seitens des Verfassers bestehen keine Einwände, die Arbeit für die öffentliche Nutzung zur Verfügung zu stellen.} parvspace{3ex}
noindent
rule[0.0cm]{4.3cm}{0.4pt}par
noindent
%end{flushleft}
end{document}

Remove last dot in title numbering


My current document is processed like this:

1. Some chapter
1.1. Some section
1.1.1. Some subsection

Appendix A.
Some appendix

What I want to have:

1 Some chapter
1.1 Some section
1.1.1 Some subsection

Appendix A: Some appendix

So I want the last dots of the numbering removed for the main part. For the appendix, I want a colon instead of the dot and the title in the same line.

A small example, including all packages used:

documentclass[appendixprefix=true,11pt,a4paper]{scrreprt}
%The packages used in my document
usepackage{listings}
usepackage{mathtools}
usepackage{graphicx}
usepackage{enumitem}
usepackage{chngcntr}
usepackage[usenames,dvipsnames]{color}
%Appendix definition (Write "Appendix A")
makeatletter
newcommandappendix@numberline[1]{appendixname #1: }
g@addto@macroappendix{%
  addtocontents{toc}{
    letprotectnumberlineprotectappendix@numberline}%
}
makeatother

begin{document}
chapter{First chapter}
section{First section}
subsection{First subsection}
appendix
chapter{Last chapter}
end{document}

How can I make the colon and the title in the same line. And how do I remove the last dots of the titles?


Symbol1′s answer doesn’t work. Error message:

Undefined control sequence. @makechapterhead ...mdepth >m@ne if@mainmatter
huge bfseries @chapapp ... l.108 chapter{Definition of the Problem}

what is the value of thecontentslabel for a chapter*


I am customizing my toc, but cannot figure out what the value of thecontentslabel is for chapters that are marked not to be numbered…

In general where are these commands described? I don’t know where the manual is. Tried KOMA-Script but didn’t find anything.

Bleed correction for chapterthumbs in KOMA


I want to send a dissertation document with chapterthumbs to the printing house. The document is written in KOMA-Script and a good solution for bleed correction is found here. Since chapterthumbs are sitting at the edge of the pages in black I want to make sure that there is a bleed correction for that too before sending out the document. Otherwise, due to imprecise cutting process (which is expected), unwanted white margins could appear at the edge of the pages where chapterthumbs are sitting.

Question
How to provide a bleed correction for the chapterthumbs themselves, i.e. extend their black color to the bleed correction area as in the image below?

Output

enter image description here

Consider the MWE below, where chapterthumbs are provided and bleed correction using crop package. What is missing is bleed correction for the chapterthumbs themselves.

MWE Code

documentclass[paper=a4, twoside=semi]{scrbook} % A4 is 210mm x 297mm
usepackage[cross,center,width=216mm,height=303mm]{crop} % bleed is 6mm
usepackage{blindtext}
usepackage{calc}%
usepackage{chapterthumb}% package should be installed in the same active folder
usepackage{etoolbox}%
usepackage{nameref}%
usepackage{totcount}
regtotcounter{chapter}%
%=====================Bibliography=============================
usepackage{biblatex}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{rand_objective_1971,
    title = {Objective criteria for the evaluation of clustering methods},
    volume = {66},
    pages = {846},
    number = {336},
    journaltitle = {Journal of the American Statistical Association},
    author = {Rand, William M.},
    date = {1971}
}

end{filecontents}
addbibresource{jobname.bib}
%=========================Chapter thumbs========================
AtBeginDocument{%
ifnumequal{numbertotvalue{chapter}}{0}{%
renewcommand{chapterthumbwidth}{paperheight}%
renewcommand{chapterthumbskip}{paperheight}%
}{%
typeout{There are numbertotvalue{chapter} chapter in this document}%
renewcommand{chapterthumbskip}{paperheight/numbertotvalue{chapter}}%
renewcommand{chapterthumbwidth}{paperheight/numbertotvalue{chapter}}%
}%
}%

lohead[putchapterthumb]{putchapterthumb}
addtokomafont{chapterthumb}{bfseries}

newrobustcmd{SetChapterThumbHeader}{%
lohead[putchapterthumb]{putchapterthumb}%
}%

newrobustcmd{ClearChapterThumbHeader}{%
lohead[]{}%
}%

newrobustcmd{refcommand}[1]{%
nameref*{#1}%
}%

newtoggle{UseChapterThumb}%
toggletrue{UseChapterThumb}%

renewcommand*{chapterthumbformat}{refcommand{chapter::title::numbervalue{chapter}}}%

makeatletter

newcounter{totalchaptercounter}%

newrobustcmd{CreateUniqueChapterLabel}[1]{% 
refstepcounter{totalchaptercounter}%
label{chapter::title::numbervalue{totalchaptercounter}}%
}%


letLaTeXStandardChapterchapter%

newcommand{chapter@noopt}[1]{%
iftoggle{UseChapterThumb}{SetChapterThumbHeader}{ClearChapterThumbHeader}
LaTeXStandardChapter{#1}%
CreateUniqueChapterLabel{#1}%
}%

newcommand{chapter@opt}[2][]{%
iftoggle{UseChapterThumb}{SetChapterThumbHeader}{ClearChapterThumbHeader}
LaTeXStandardChapter[#1]{#2}%
CreateUniqueChapterLabel{#2}% Must appear after chapter title is done
}%


newcommand{unstarredchapter}{%
@ifnextchar[{chapter@opt}{chapter@noopt}%
}%

newcommand{starredchapter}[1]{%
ClearChapterThumbHeader% Clear the headers -> no chapterthumb here 
LaTeXStandardChapter*{#1}%   
}%

renewcommand{chapter}{%
@ifstar{starredchapter}{unstarredchapter}%
}%


letLaTeXStandardTOCtableofcontents%
renewcommand{tableofcontents}{%
begingroup%
renewcommand{chapter}{LaTeXStandardChapter}%
LaTeXStandardTOC%
endgroup%
}%


letLaTeXStandardLOFlistoffigures%
renewcommand{listoffigures}{%
begingroup%
renewcommand{chapter}{LaTeXStandardChapter}
LaTeXStandardLOF%
endgroup
}%

letLaTeXStandardLOTlistoftables%
renewcommand{listoftables}{%
begingroup%
renewcommand{chapter}{LaTeXStandardChapter}
LaTeXStandardLOT%
endgroup
}%


letLaTeXStandardPrintBibliographyprintbibliography%


newrobustcmd{commonprintbibliographysetup}[1][]{%
iftoggle{UseChapterThumb}{SetChapterThumbHeaderrefstepcounter{chapter}}{ClearChapterThumbHeader}
LaTeXStandardPrintBibliography[#1]
iftoggle{UseChapterThumb}{%
immediatewrite@auxout{%
stringnewlabel{chapter::title::numbervalue{chapter}}{{thepage}{thepage}{Bibliography}{}}%
}%
}{}%
}%



newrobustcmd{printbibliography@@noopt}{%
commonprintbibliographysetup[]%
}%

newrobustcmd{printbibliography@@opt}[1][]{%
commonprintbibliographysetup[#1]%
}

renewcommand{printbibliography}{%
@ifnextchar[{printbibliography@@opt}{printbibliography@@noopt}%
}%

makeatother
%==================================================
title{Title of the Dissertation}
author{Author Name} 
publishers{Faculty Name}

begin{document}
maketitle
pagestyle{plain}
pagenumbering{roman}
tableofcontents
listoffigures
listoftables
cleardoublepage

chapter*{Acknowledgments}
addcontentsline{toc}{chapter}{Acknowledgments}

chapter*{Abstract}
addcontentsline{toc}{chapter}{Abstract}
cleardoublepage
lohead[putchapterthumb]{putchapterthumb}
mainmatter
pagestyle{scrheadings}

chapter{Introduction}
begin{figure}
caption{dummy figure}
end{figure}

chapter{Materials & Methods} 

chapter{Results} 
begin{table}
caption{dummy table}
end{table}

chapter{Discussion}
In his reference parencite{rand_objective_1971}, the author did a nice job.
backmatter
cleardoublepage
printbibliography[heading=bibintoc]
end{document}

Update1: MWE based on Symbol’s solution
I wonder what might cause this inequality in the crosses.

enter image description here

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