My publisher has some rather complicated demands regarding the footnote layout:
- footnote text always aligned left: for 1-digit footnotes indented 4mm, for 2-digit 5mm, for 3-digit 6mm
- footnote numbers (markers) aligned left
- on pages with a switch from 1- to 2-digit and from 2- to 3-digit footnotes all the footnote text should have an indent of the respectively larger group (5mm resp. 6mm), the footnote markers should still be aligned left, BUT the ones with the lesser digits should be aligned to the right-hand edge of the bigger numbers.
Is that possible at all?
The following answers were not working:
Indentation of footnotes depending on number of digits in footnote marks on the same page resulted in a switch of the indent not between 9 and 10 but between 3 and 4, and somehow fancyhdr
and titlesec
packages interfered with the result. And it also could not help with the alignement of the smaller numbers.
Right-align one and two digit footnote marks with KOMA does align the numbers at the right side, but for all numbers, not only for pages with a digit increase.
Because of the above mentioned interferences with other packages I've intentionally left some packages and preamble definitions in my MWE that on first sight do not have any connection to the problem.
MWE:
\documentclass[10pt]{book}
\usepackage[paperheight=22.2cm,paperwidth=14cm,bottom=2.11cm,top=1.6cm,right=1.6cm,textwidth=10.8cm,textheight=18.49cm,includeheadfoot]{geometry}
\setlength{\parindent}{3.5mm}
\usepackage{ebgaramond}
\usepackage{titlesec}
\usepackage{csquotes}
\usepackage{marvosym}
\usepackage{etoolbox}
\usepackage[hang]{footmisc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}}
\fancyhf{}
\fancyfoot[LE,RO]{\thepage}
\fancyhead[CO]{\fontsize{9.5}{10.5}\selectfont\scshape\MakeLowercase{\rightmark}}
\fancyhead[CE]{\fontsize{9.5}{10.5}\selectfont\scshape\MakeLowercase{\leftmark}}
\renewcommand{\headrulewidth}{0pt}
\usepackage{polyglossia}%
\setmainlanguage[babelshorthands=true]{german}
\setotherlanguage{hebrew}
\defaultfontfeatures{RawFeature={-clig}}
\setmainfont[Mapping=tex-text,Numbers=OldStyle,Ligatures=TeX]{EB Garamond}
\addfontfeature{Language=German}
\newfontfamily\hebrewfont{Linux Libertine O}
\makeatletter
\newcommand\chapsize{\@setfontsize\chapsize{13pt}{6}}
\newcommand\secsize{\@setfontsize\secsize{11.5pt}{6}}
\makeatother
\titleformat{\chapter}[hang]
{\chapsize\centering}{\thechapter.\ }{0pt}{}
\titleformat{\section}[hang]
{\secsize\centering}{\thesection\ }{0pt}{}
\titlespacing*{\chapter}{0pt}{0pt}{8mm}
\titlespacing*{\section}{0pt}{24pt}{4.233mm}
%fußnoten
\renewcommand\footnotelayout{\fontsize{8.8}{10.2}\selectfont}
\usepackage{scrextend}
\deffootnote{5mm}{5mm}{\makebox[5mm][l]{\phantom{99}\llap{\thefootnotemark}}}
\begin{document}
Text.\footnote{text}
Text.\footnote{text}\footnote{text}\footnote{text}
\clearpage
\footnote{text}\footnote{text}\footnote{text}
\footnote{text}\footnote{text}\footnote{text}\footnote{text}
\clearpage
\footnote{text}\footnote{text}
\setcounter{footnote}{98}
\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}\footnote{text}
\end{document}
The way it should look like:
The way it looks like with the MWE:
Compiling with XeLaTeX, general book class (KOMA not an option because of collision with fancyhdr and others).
/footnote
as well as/footcite
commands?