3

I'm having some troubles defining the size of the titles, subtitles, sub-subtitles and the text of my document. Basically, I'd like to control the size. As you can see in my example, the "Sub-subsection" is smaller than the actual text, and that doesn't look fine to me.

\documentclass[twoside,parskip=half]{scrartcl}
\usepackage[british]{babel}
\bibliographystyle{nature}    
\usepackage[latin1,utf8]{inputenc}
\usepackage{microtype}
\usepackage[hmarginratio=1:1,columnsep=30pt]{geometry}
\usepackage{geometry}
\geometry{a4paper,left=25mm,right=25mm, top=25mm, bottom=25mm, headsep=10mm} 
\usepackage{multicol} 
\usepackage{hyperref} 
\usepackage{paralist}
\usepackage{abstract}
\renewcommand{\abstractnamefont}{\normalfont\bfseries} 

\usepackage{titlesec} 
\renewcommand\thesection{\Roman{section}.} 
\renewcommand\thesubsection{\arabic{subsection}}

\titleformat*{\subsection}{\normalfont\bfseries}
\titleformat*{\subsubsection}{\normalfont\selectfont}

\usepackage{fancyhdr} 
\pagestyle{fancy} 
\fancyhead{} 
\fancyhead[C]{Title $\bullet$ Course $\bullet$ 2014}
\setlength{\skip\footins}{10mm}

\title{\fontsize{24pt}{5pt}\selectfont\textbf{Title}} 
\subtitle{\fontsize{16pt}{20pt}\selectfont\textbf{Subtitle}} 

\author{
\large
\textsc{Name Surname}\\[3mm] 
\normalsize University name \\ 
\normalsize \href{mailto:name@domain.com}{name@domain.com}  
\vspace{-3mm}
}
\date{}

\begin{document}
\maketitle 
\thispagestyle{fancy} 

\begin{abstract}
Ut venenatis sodales leo et imperdiet. Pellentesque sagittis volutpat feugiat. Nunc in dictum libero. Sed sed dui leo. Curabitur condimentum laoreet metus vitae tempus. Vestibulum id feugiat risus, ac feugiat libero. Mauris ultricies eget risus et venenatis. Donec gravida mauris sed interdum vulputate. Morbi nunc quam, finibus vitae tincidunt a, vulputate eget sapien. 

\end{abstract}

\vspace{7mm}
\begin{tabular}{p{1,5cm}p{12,00cm}p{1,5cm}}   
&\textbf{Keywords}: keyword 001 $\cdot$ keyword 002  $\cdot$ keyword 003 $\cdot$ keyword 004\\
\end{tabular} 
\vspace{11mm}

\begin{multicols}{2}
\section{Section 1}
Vestibulum vel ipsum vel urna iaculis tincidunt ut eu arcu. Etiam in ante dui. Suspendisse porta lacus et facilisis suscipit. Donec congue egestas nunc, ut ullamcorper felis ultricies ut. Vivamus eu lorem risus. Vivamus sollicitudin bibendum ornare. Duis dignissim metus sed eleifend posuere. In consequat aliquet sapien, at faucibus ipsum. 

\section{Section 2}
\subsection{Sub-section 1}
\subsubsection{Sub-subsection}
Aliquam ultricies eleifend bibendum. Pellentesque eu augue orci. Integer ut dolor aliquet enim semper aliquam. Suspendisse sit amet volutpat ex. Pellentesque lacinia dignissim molestie. Cras consectetur efficitur purus, id viverra enim tincidunt quis. Morbi sed blandit nulla, eu sodales purus. Aenean nec semper risus. Sed malesuada finibus tellus vitae eleifend. Etiam ut cursus ipsum, ac faucibus ligula. Morbi non est sed ligula fringilla finibus. Sed interdum euismod ex nec tincidunt. Pellentesque ut ipsum enim. Quisque aliquet dolor ac lectus congue, nec pellentesque metus eleifend. Nullam sit amet lacus nulla. 

\subsubsection{Sub-section 2}
Phasellus commodo augue vitae enim interdum, et tincidunt leo consectetur. Sed in mi sit amet velit aliquet dapibus. Phasellus ut massa a arcu aliquam rhoncus ultricies quis mi. Cras a tortor egestas, luctus purus a, mollis lacus. Mauris eget molestie neque, dapibus lobortis ligula. Sed id luctus tortor. Donec elementum lacus vitae tincidunt imperdiet. Praesent in facilisis ligula. Nam venenatis sed eros quis consequat. Maecenas sit amet eros sed purus convallis pretium. Suspendisse potenti. Cras sed ultricies diam. Nullam feugiat scelerisque leo vitae facilisis. Praesent quis felis ante. Aenean in justo magna. 

\end{multicols}

\end{document}

Any suggestions to improve my document?

killthepixelnow
  • 454
  • 5
  • 14
  • Since you are using Koma-Script, don't use titlesec, geometry, fancyhdr etc. but instead use the facilities offered by the class and (if required) complementary packages. In any case, don't load packages twice (e.g. geometry) and don't specify multiple options to inputenc (e.g. one only of utf8, latin1). Whether using geometry or the facilities of Koma-Script, don't then specify page layout manually. Also, isn't that a misuse of \setlength anyway? – cfr Oct 17 '14 at 00:14
  • Note that simply reading the output on the console when you compile will give you lots of hints since you are using Koma. (It will complain loudly about the use of packages which break stuff.) – cfr Oct 17 '14 at 00:40
  • @cfr Sorry but I created this document from different examples but I don't know exactly what I'm doing. So I can't really understand what you're trying to explain... What is Koma-Script? – killthepixelnow Oct 17 '14 at 08:10
  • The class you are using is part of Koma-Script. Try texdoc scrartcl to see the manual. – cfr Oct 17 '14 at 13:03
  • @ Still don't get it. I'm not a programmer and I have a vague idea of what the code does. I assembled this example from different templates but it was a painstaking process. I sruggled to get the style but it's not behaving how I want. How do you know I'm using Koma-Script? How do I execute "texdoc scrartcl"? – killthepixelnow Oct 17 '14 at 15:12
  • See http://ctan.org/pkg/scrartcl. http://ctan.org/pkg/koma-script-examples might be helpful, although I'm not familiar with the examples - only (a bit) with the manual. – cfr Oct 17 '14 at 15:21

1 Answers1

5

Generally you are best off using the mechanisms offered by the document class and standard size commands for fonts. The subsubsection font in your example is the same size as the normal text, if you want it bigger, trying using \large. In the KOMA classes you do this via \setkomafont, e.g.

\setkomafont{subsubsection}{\normalfont\large}

or if you only want to change the size and not the style

\addtokomafont{subsubsection}{\large}

If you wished to set the font size explicitly then it would be

\setkomafont{subsubsection}{\normalfont\fontsize{14}{16}\selectfont}

or

\addtokomafont{subsubsection}{\fontsize{14}{16}\selectfont}

Note the arguments to \fontsize are just numbers (denoting pointsizes) not dimensions, the second number should be larger than the first, it indicates the line skip to be used for this font. The basic font size for the document is specified by the a fontsize option to the documentclass, e.g.

\documentclass[fontsize=12pt]{scrartcl}

As other have said you should not use fancyhdr or titlesec. For your purposes the latter is replaced by simple \setkomfont commands, the former by the scrlayer-scrpage package.

As regards the geometry package, in your case you seem to want to specify the margins precisely, in which case using this package is the only option.

Here is an implementation of some of these things in your example.

Sample output

\documentclass[twoside,parskip=half,numbers=noendperiod,abstract=true]{scrartcl}

\usepackage[british]{babel}
\bibliographystyle{nature}    
\usepackage[utf8]{inputenc}
\usepackage{microtype,textcomp}
\usepackage[a4paper,left=25mm,right=25mm,top=25mm,bottom=25mm,
            headsep=10mm]{geometry} 

\usepackage{multicol} 
\usepackage{hyperref} 
\usepackage{paralist}

\renewcommand*{\thesection}{\Roman{section}.} 
\renewcommand*{\thesubsection}{\arabic{subsection}}

\setkomafont{title}{\normalfont\bfseries}
\setkomafont{subtitle}{\normalfont\Large\bfseries}
\setkomafont{subsection}{\normalfont\large\bfseries}
\setkomafont{subsubsection}{\normalfont\large}
\setkomafont{author}{\large}

\usepackage{scrlayer-scrpage} 
\pagestyle{scrheadings} 
\ihead{}\ohead{}\chead{\headmark}
\setkomafont{pageheadfoot}{\normalfont}
\markboth{Title \textbullet{} Course \textbullet{} 2014}{Title \textbullet{}
  Course \textbullet{} 2014} 

\title{Title}
\subtitle{Subtitle}

\author{\textsc{Name Surname}\\[2ex]
\normalsize University name \\ 
\normalsize \href{mailto:name@domain.com}{name@domain.com}}
\date{}

\begin{document}
\maketitle
\thispagestyle{scrheadings}
\unskip\vspace{-1.5\baselineskip}

\begin{abstract}
  Ut venenatis sodales leo et imperdiet. Pellentesque sagittis
  volutpat feugiat. Nunc in dictum libero. Sed sed dui leo. Curabitur
  condimentum laoreet metus vitae tempus. Vestibulum id feugiat risus,
  ac feugiat libero. Mauris ultricies eget risus et venenatis. Donec
  gravida mauris sed interdum vulputate. Morbi nunc quam, finibus
  vitae tincidunt a, vulputate eget sapien.
\end{abstract}

\begin{center}
  \textbf{Keywords}: keyword 001 \textperiodcentered{} keyword 002
  \textperiodcentered{} keyword 003 \textperiodcentered{} keyword 004
\end{center}

\medskip

\begin{multicols}{2}

\section{Section 1}
Vestibulum vel ipsum vel urna iaculis tincidunt ut eu arcu. Etiam in
ante dui. Suspendisse porta lacus et facilisis suscipit. Donec congue
egestas nunc, ut ullamcorper felis ultricies ut. Vivamus eu lorem
risus. Vivamus sollicitudin bibendum ornare. Duis dignissim metus sed
eleifend posuere. In consequat aliquet sapien, at faucibus ipsum.

\section{Section 2}
\subsection{Sub-section 1}
\subsubsection{Sub-subsection}
Aliquam ultricies eleifend bibendum. Pellentesque eu augue
orci. Integer ut dolor aliquet enim semper aliquam. Suspendisse sit
amet volutpat ex. Pellentesque lacinia dignissim molestie. Cras
consectetur efficitur purus, id viverra enim tincidunt quis. Morbi sed
blandit nulla, eu sodales purus. Aenean nec semper risus. Sed
malesuada finibus tellus vitae eleifend. Etiam ut cursus ipsum, ac
faucibus ligula. Morbi non est sed ligula fringilla finibus. Sed
interdum euismod ex nec tincidunt. Pellentesque ut ipsum enim. Quisque
aliquet dolor ac lectus congue, nec pellentesque metus
eleifend. Nullam sit amet lacus nulla.

  \subsubsection{Sub-section 2}
  Phasellus commodo augue vitae enim interdum, et tincidunt leo
  consectetur. Sed in mi sit amet velit aliquet dapibus. Phasellus ut
  massa a arcu aliquam rhoncus ultricies quis mi. Cras a tortor
  egestas, luctus purus a, mollis lacus. Mauris eget molestie neque,
  dapibus lobortis ligula. Sed id luctus tortor. Donec elementum lacus
  vitae tincidunt imperdiet. Praesent in facilisis ligula. Nam
  venenatis sed eros quis consequat. Maecenas sit amet eros sed purus
  convallis pretium. Suspendisse potenti. Cras sed ultricies
  diam. Nullam feugiat scelerisque leo vitae facilisis. Praesent quis
  felis ante. Aenean in justo magna.

\end{multicols}

\end{document} 

In answer to additional points in the comments

  • to get a line under the header use headsepline=true either as a document option or perhaps better as

     \KOMAoptions{headsepline=true}
    

    where you are defining the heading style

  • to increase the space to footnotes, use the footnotsep option of the geometry package. This is equivalent to setting \skip\footins, but keeps your page specification in one place.

  • the title element has size \huge by default and the above font changing commands do not affect this.

Andrew Swann
  • 95,762
  • thanks for the thorough explanation. I've got a question, when compiling I receive the following error: "! Package scrkbase Error: font of element `author' can't be set" What's the issue? – killthepixelnow Oct 19 '14 at 15:38
  • Strange. No complaint here, and the documentation clearly states this is allowed. Is your distribution up to date? – Andrew Swann Oct 19 '14 at 16:46
  • I am using TeXWorks for Mac. I'm not sure what do you mean with the distribution. – killthepixelnow Oct 19 '14 at 17:30
  • @killthepixelnow MacTeX is your distribution, then, I assume. Is it up to date? (Are you using MacTeX 2014 and have you updated it recently?) TeXWorks is just an editor. It doesn't compile anything itself. – cfr Oct 20 '14 at 00:19
  • 1
    If you look in the log file it will tell you which version of the KOMA packages have been loaded. Mine is 2013/12/19 v3.12. – Andrew Swann Oct 20 '14 at 07:10
  • @ Andrew Swann OK, I have the last version of TeXworks (0.4.5). However, the log file states the following: "Document Class: scrartcl 2012/07/29 v3.11b KOMA-Script document class (article)" – killthepixelnow Oct 20 '14 at 10:32
  • 1
    As cfr says, TeXworks is just the editor, there is a underlying tex distribution, either MikTeX or texlive. See http://tex.stackexchange.com/q/55437/15925 on how to update that. – Andrew Swann Oct 20 '14 at 11:03
  • Great! It took a while to update it but it's done now. – killthepixelnow Oct 20 '14 at 13:58
  • Question, I used "\setlength{\skip\footins}{10mm}" before to separate the footnotes from the main text. Is it OK to use it with KOMA? Besides that, is there a way to add a line below the header ("Title - Course - 2014")? – killthepixelnow Oct 20 '14 at 14:01
  • 1
    I have added some text to the end of the question to answer these points. – Andrew Swann Oct 20 '14 at 14:20
  • @AndrewSwann I don't want to open a new topic just to ask for a simple thing: in this particular example,how do I indicate the separation size between columns? I tried "\setlength\columnsep{20pt}" but it didn't work. – killthepixelnow Nov 02 '14 at 17:04
  • 1
    That is the correct parameter to set. Make sure you do that after mulicol has been loaded, and perhaps after \begin{document} or just before the first use of the environment multicols. 20pt may be close to the default value, so try something like 50pt just to see whether it is working. – Andrew Swann Nov 02 '14 at 18:41
  • I want to state, that it is better for inexperienced users to add to a komafont, rather than setting it by hand. \addtokomafont{disposition}{\itshape} – Johannes_B Jan 25 '15 at 19:25
  • 1
    @Johannes_B Good point - I have now added this to my answer – Andrew Swann Jan 26 '15 at 10:36