Adjusting spacing around section/subsection titles with koma-script

With the KOMA-script scrreprt class the vertical spacing before and after chapter titles can be adjusted the following way:


However, I can’t find a way to do the same with section, subsection (and, possibly, subsubsection) titles. I know there is the titlesec package with the command


but using KOMA-Script with titlesec gives me the warning “Usage of package `titlesec’ together with a KOMA-Script class is not recommended”. Is there some other way to adjust the vertical spacing around section headings that is compatible with the KOMA-Script classes?

Writing equations with neatly defined parameters [duplicate]

This question already has an answer here:

KOMA + bigfoot + lineno seem to produce vertical gaps in some cases

in a lengthy critical edition, I am using KOMA-Script, bigfoot and lineno. In certain cases, all involving footnotes, there are vertical gaps on the page containing the footnotes. This affects roughly 10-15% of the pages with footnotes (which is why I had some trouble to create a MWE or to isolate which packages might be the culprit).

I have been excluding packages one by one to track it down and it seems, that the problem is connected to these three packages. The following example will result in the last line of page 1 (line no. 42) to have an extra gap above it.
If you remove either of the footnoteB, or disable line numbering, the gap will disappear (which is why I assume that it might be the combination of lineno and bigfoot).

It took me some time to figure out the following example, it is the shortest I could so far come up with; I have not yet been able to pin-point one specific reason, hence I cannot even say for certain whether this is the “right” example or just one showing the phenomenon more or less ‘by accident’.

documentclass[fontsize=10pt, twoside, paper=b5, headings=normal,
open=any, DIV=11, footlines=1, BCOR=10mm, index=totoc]{scrbook}
usepackage[pagewise, switch*, modulo]{lineno}



intelligunt confuse et absque distinctione quod | patet in prima operatione. quia
ideote eodem modo intelligunt hominem animal et | rationale et album. sed logica
docet quod etiam primarii conceptus qui sunt primi | intentiones sunt ab
invicem distinguibiles intelligibiliter. quia animal | habet intelligi sub communiori
conceptu 5 quam homo. Septima ratio quia | praedicamenta sunt entia realia. et
tamen sub ordine ad aliquod accidens | rationis in logica considerantur. Unde infootnoteB{dfg}
predicamentis ponuntur alique propri|etates predicamentorum reales ad denotandum
quod sunt encia realia | ut in predicamento substantie. Commune est omni
substantie in subiecto non esse〈.〉 | Hec sunt argumenta Montanorum Thomis10
tarum〈.〉 Et est unus de illis | qui dixit quod universale capitur dupliciter〈.〉 Uno
modo pro significato. sic universale est secunda inten|tio concretive sumpta et
universalitas abstractive sumpta. Alio modo pro de|nominato id est pro subiectofootnoteB{test}
quod denominat. Dixit secundo quod intentio prima | est essentia naturaea vel
quidditas absolutab et secundum se apprehensa. In|tentio secunda dicitur concep15
tus comparativus secundum quod intellectus comparat naturas〈.〉 | Et dixit quod
natura universalis dupliciter concipitur per intellectum. Uno modo abso|lute. sic
omnis scientia considerat naturam universalem. Alio modo concipit natura universalis
ab | intellectu per eius speciem intelligibilem comparative. inquantum
comparatur ad in|tellectum a quo capit unitatem. et ad inferiora a quibus capit
20 multipli|citatem. sic solum in logica consideratur et substat intentionibus. hec
ille. | Et ego arguo sic. Omnis scientia habetur per demonstrationem. logica
est | scientia. ergo logica habetur per demonstrationem. Maior est nota. quia
scien|tia est habitus conclusionis per demonstationem acquisitus. sed nulla demonstra|
tio potest fieri ex secundis intentionibus. ergo logica non est de secundis
25 intenti|onibus. quia scientia per eadem acquiritur circa que est. Minor syllogismi
pro|batur. quia Omnis demonstratio fit ex necessariis veris primis. sed secunde
in|tentiones sunt ultime in ordine entium. et non sunt necessarie. quia depen- ||
[5v [A5v]] denta contingenti operatione intellectus. Secundo. Nullum ens intentio|
nale potest concurrere ad generationem entis realis. sed secunde intentiones
30 sunt | entia rationis. et logica est habitus realis. ergo non possunt concurrere ad
ac|quisitionem logice〈.〉 Tertio propter quod unumquodque tale et illud magis.
sed secunde | intentiones considerantur in logica propter primas. ergo prima magis.
Maior | 3 topicorum. 1 posteriorum
patet 3 Topicorum in fine et 1 posteriorum. Minor probatur. quia
dicit Avicen|na quod logica est de secundis adiunctis primis quasi consideraret se35
cundas propter | primas. Quarto Secunde intentiones principaliter accipiuntur a
proprieta|tibus rerum. ergo proprietates rerum principaliter considerantur in logica.
sed pro|prietates rerum sunt reales. ergo res sunt cause intentionum. probatur
| prima pars maioris per S anctum Tho mam de universalibus trac. 2 opus 2⒍ B eatus Tho mas
Quinto | Quero ex te quare intellectus tuus non potest attribuere homini hanc |
40 intentionem secundam genus. Si dicis quia proprietas hominis non est talis quod
| multiplicetur per species. ergo convenit homini ex natura rei illa intentio species
| et non genus. Ex illo arguo sic Quicumque considerat aliquod accidens | propter
principium. ille magis considerat principium et radicem super qua fun|datur.
et ex qua sequitur hoc accidens. Sed logicus considerat secundas intentiones |
propter unam radicem vel fecunditatem sive sit .a. sive .b. ergo principaliter con- 5
si|derat hoc principium vel formale primarum intentionum. Confirmatur per |
B eatus Tho mas S anctum Tho mam de natura generis ca. ⒌ ubi dicit quod universale capitur
dupliciter Uno | modo pro ipsa natura cui intellectus propter aliquid in ea inventum
inten|tionem attribuit. et sic universalia que rerum naturas significant
7 metaphi sice predicantur in quid. | animal namque est substantia illius de quo predicatur et 10
B eatus Tho mas similiter homo. Idem patet 7 metaphisi|ce. lec. ⒔ In oppositum tamen et pro
veritate est D octoris S ancti 4 meta|phisice. lec. 4 in opusculo de universalibus
trac. 2 Et quia h oc magis Thoma|stris aliquibus reluctabor. ideo eum inferius
in testem vocabo. Et | arguo sic. Si logica est de primis intentionibus. vel natura
considera|ta in logica consideratur sub eadem ratione sicut in aliis scientiis. vel 15
non | Si primum. sequitur quod logica ratione obiecti erit scientia realis quod est
4 metaphi sice contra Aristotelem 4 metaphisice. et contra S anctum Tho mam undiquaque. Si
secundum Tunc | quero vel illa natura realis universalis consideratur sub eadem
unitate. vel sub alia | unitate Si dicis sub alia unitate Quero Utrum sit unitas
rationis vel | unitas rei. Utrum sit absoluta vel respectiva. Non potes dicere quod

Any help is highly appreciated; if there is another way to provide a line numbering that will work around this problem, I’ll be glad to give it a try.


As requested, here is a snapshot of the last few lines including the footnote:
The gap is between lines 41 and 42

Include logo in title page with KOMA-script

I would like to ask if there is an easy way how to include some graphics (logo) on the title page (I’m using scrreprt class from KOMA-script). Until now I’ve done it like this:

title {
  normalfont normalsize includegraphics[width=0.3textwidth]{img/logo}
  huge ARIO project

But I feel that this is not the right way. And I wasn’t able to find any tutorial. Thanks.

How to remove period after part number in TOC (KOMA used)

How to remove period after part number in TOC (KOMA used)?
My solution was to set tocloft package, which is provide command cftpartaftersnum but I do not want to use it for some compatibility reasons.
enter image description here

%  autodot% DELETED

RaggedRightParindent also indents caption titles with subcaption package

I am using the KOMA-Script class scrreprt with the ragged2e package to achieve ragged right document text. I still want to retain paragraph indentation (and have no inter-paragraph spacing, i.e., parskip=0), so I set RaggedRightParindent{2em}, but this seems to also affect my float captions when the subcaption package is loaded.


usepackage {mwe}%
usepackage[document]{ragged2e} % for creating ragged right edge etc
setlength{RaggedRightParindent}{2em}% sets the indent size of the first line
usepackage{subcaption}% for creating figures in figures





      caption{The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. }


which produces:

enter image description here

How can I get rid of this indentation? (I still want to keep these packages if possible…)

Patch part to do something with optional and mandatory argument

I am basically trying to patch part of scrreprt to do something with the optional argument (if present) or the mandatory argument instead. In the example below the short caption would be added in red to the TOC and the long caption in blue (underneath its respective part).

But my code below basically doesn’t do anything. This seems very related to this problem, and I have tried something similar with regexpatch, but without success. I am trying to get to a solution where part can be used by other packages, e.g. hyperref without interference.











part{Only Long Caption}

part[Short Caption]{Long Caption}


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.




        This is a non-sense proof to show that I have 
        serious problems with the geometry and setspace package!
        1 \    2\ 3\ 4\ 5\6\
        [ 1+ 1 =2]


    Some nice equations:
        1 +1 = 2 \1+1 =3 \    1+1 =3 \1+1 =3 \  1+1 =3 \1+1 =3 

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}  %
  { 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.


%%%%%%%%%%%%%%%%%%%%%%%% Acronyms
 short = LBD , 
 long = Lipoproteinas de baja densidad ,
 foreign = Low-Density Lipoprotein
 short = VOP , 
 long = Velocidad de onda de pulso ,
 foreign = Pulse Wave Velocity
 short = IFS , 
 long = Interacción fluido-sólido ,
 foreign = Fluid-Solid/Structure Interaction

 short = HGO , 
 long = modelo de Holzapfel-Gasser-Ogden

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

 short = ADINA ,
 long  =  Automatic Dynamic Incremental Nonlinear Analysis ,
 class = software



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[include-classes=software, name={Software}]    

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

! Improper alphabetic constant.
<to be read again>
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>


! 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.

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