Currently I'm using
\newcommand{\newchapter}[1]{\rule{\linewidth}{0.25pt} \vspace*{-0.30cm} \\ \textbf{\textcolor{red}{\Large #1}} \vspace*{-0.15cm}\\\rule{\linewidth}{0.25pt}\par}
to make section like headers. But it feels wrong doing so while latex has the concept of real sections
(and by using restyled sections the content is just much more portable (copy paste it to another document)).
See here a MWE:
\documentclass{scrartcl}
\usepackage{fontspec} % LuaLaTeX
\usepackage{multicol} % use \begin{multicols}{num} text \end{multicols} and the text will be automatically distributed
\usepackage{scrlayer-scrpage} % header and footer
\usepackage{xcolor}
% ----- Settings -----
\KOMAoptions{
paper=a4, % set papersize
paper=landscape, % set paperformat
fontsize=6.6pt, % set fontsize
parskip=half, % half a line will seperate paragraphs
headings=normal, % headings in normalsize
twoside=false, % onesided document
twocolumn=false, % one columned pages
numbers=autoendperiod, % automatic punctuation in outline
}
% turn off header and footer
\pagestyle{empty}
\areaset{835pt}{585pt}
% indentation
\setlength{\parindent}{0pt}
\setlength{\parskip}{0pt plus 0.5ex}
% big red titles for chapters
\newcommand{\newchapter}[1]{\rule{\linewidth}{0.25pt} \vspace*{-0.30cm} \\ \textbf{\textcolor{red}{\Large #1}} \vspace*{-0.15cm}\\\rule{\linewidth}{0.25pt}\par}
% blue titles for single topics within a chapter
\newcommand{\topic}[1]{\textbf{\textcolor{blue}{#1}}}
% green and bold text for important concepts
\newcommand{\term}[2][]{%
\if n#1\else\hangindent=1em\hangafter=1\fi%
\textbf{\textcolor{green!50!black}{#2}}%
}
\renewcommand{\baselinestretch}{1.3}
\setlength{\columnseprule}{.01pt}
\begin{document}
\begin{multicols}{3}
\newchapter{NewChapter}
\topic{Topic}
\term{Term}
\newpage
force pagebreak
\end{multicols}
\end{document}
(don't wonder about the maybe weird fontsize/papersize, it is supposed to be this way to fit as much as possible on the page)
So I'd like to use section
instead of newchapter
, subsection
instead of topic
and paragraph
instead of term
.
Is there a way to do this (and if yes how)? Note the missing linebreaks after topic
and term
(but I'd be ok if these linebreaks couldn't be prevented)
Sorry if this is a pretty obvious question, but I already looked into \RedeclareSectionCommand
and \setkomafont
(would work for the colors, but I'm not sure about the hangindent
(term) and the \rule
(newchapter) especially the \rule
after the chapter text).
Note: I'm compiling with lualatex
, but this shouldn't have a relevant effect.
Note for Bounty:
newChapter
and topic
are solved (see esdd
s answer), but I'm still struggling with the hangindent
for \term
. I know I can do \newcommand{\term}[1]{\paragraph{#1}\hangindent=1em\hangafter=1}
but still I'd like to use \paragraph
in the document-body so that its easy to change the formatting.