This is a follow up to controlling the gap between footer and body of text. Remember, the goal is to max text within a page. To that end, how can I use the drop or wrap shapes to work using titlesec (no examples]2). How to set parameters—I guess using \titleformat—of titlesec such that the first header looks as follows?
"Gibberish[as long a skip as possible]Ch. 1"?
Finally, how can I reduce the gap between chapter's header and the top of the page?
\documentclass[a6paper, DIV=20]{scrreprt}
%\documentclass{scrreprt}
\usepackage{fontawesome}
\usepackage[T1]{fontenc}
\usepackage{lastpage}
\usepackage{lipsum} % Dummy Text
\usepackage{titlesec}
\usepackage{titleps}
\usepackage{xparse}
\usepackage{tabularx}
\usepackage{hyperref}
\setlength{\footskip}{24pt}
\renewcommand*\familydefault{\sfdefault}
\NewDocumentCommand{\chapterLabel}{}{Ch. \thechapter}
\NewDocumentCommand{\chapterMark}{}{U HAVE TO DEFINE IT!}
\NewDocumentCommand{\setchapterMark}{m}
{%
\RenewDocumentCommand{\chapterMark}{}{#1}
}
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\NewDocumentCommand{\myheader}
{mm}
{%
\begin{tabularx}{\textwidth}{@{}XR@{}}#1\end{tabularx}
}
%\newpagestyle{〈name〉}
%[〈global-style〉]
%{〈commands〉}
%setfoot[〈even-left〉][〈even-center〉][〈even-right〉]
%{〈odd-left〉}{〈odd-center〉}{〈odd-right〉}
\newpagestyle{main}
{
\setfoot{\thepage/\pageref{LastPage}}
{}
{\chapterLabel}
}
\newpagestyle{special}
{
\setfoot{\thepage/\pageref{LastPage}}
{}
{\chapterMark}
}
%\titleformat{〈command〉}[〈shape〉]{〈format〉}{〈label〉}{〈sep〉}{〈before-code〉}[〈after-code〉]
%\pagenumbering{gobble}
\pagestyle{main}
\assignpagestyle{\chapter}{empty}
% \titleformat{\chapter} % command
% [drop]%hang|block|display|runin|leftmargin|rightmargin|drop|wrap|frame
% {}% format
% {\chapterLabel}% label
% {}% sep
% {}% before code
% [〈after-code〉]
\begin{document}
\title{Lorem Ipsum}
\author{Dolor S. Amet}
\maketitle
\chapter{Gibberish}
\lipsum[1-2]
\clearpage
\pagestyle{empty}
\setchapterMark{\faBook}
\pagestyle{special}
%\chapter*{\chapterMark~Bibliography}
\chapter*{\myheader{Bibliography}{\chapterMark}}
Let's make that ....
\newpage
... span a second page
\end{document}










\titlespacing*command. However, there might be conflicts using titlesec with a koma-script document class. – Bernard Oct 03 '19 at 08:17titlesecand KoMa classes don't go along. – egreg Oct 04 '19 at 11:57