sidecite horizontal alignment
RemDelaporteMathurin opened this issue · 6 comments
Description
Hi @fmarotta
I'm encountering this issue with sidecite
where long citations get misaligned (see below).
Is this a bug or am I doing something wrong?
Thanks!
Minimal Working Example
\documentclass{kaobook}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{kaobiblio}
\usepackage{kaotheorems}
\usepackage{kaorefs}
\addbibresource{mybib.bib} % Bibliography file
\RenewDocumentCommand{\formatmargincitation}{m}{
\parencite{#1} \citeauthor*{#1} (\citeyear{#1})\\
}
\begin{document}
\title{Bug Report}
\author{Author}
\date{\today}
\frontmatter
\maketitle
\mainmatter
\setchapterstyle{kao}
\chapter{First Chapter}
\blindtext
\sidecite{short}
\sidecite{long}
\end{document}
mybib.bib
@article{short,
title = {Title1},
journal = {Journal of Nuclear Materials},
author = {Shortname},
year = {2015},
}
@article{long,
title = {Title2},
journal = {Journal of Nuclear Materials},
author = {VEEEERYLONGAUTHORNAME},
year = {2015},
}
Expected behavior:
Alignment of the two citations
@fmarotta maybe there's a flag in sidecite that forces the alignment to the left?
@RemDelaporteMathurin Hi, does this fix the issue?
\RenewDocumentCommand{\formatmargincitation}{m}{% <- This comment avoids inserting a space.
\parencite{#1} \citeauthor*{#1} (\citeyear{#1})%
}
Hi @pi8027 it does fix it! and it's well aligned now.
However there still is some were spacing in the name... any idea?
@RemDelaporteMathurin If you just want to put a space of the same width after every [n], I would suggest:
\RenewDocumentCommand{\formatmargincitation}{m}{%
\parencite{#1}\;\citeauthor*{#1} (\citeyear{#1})%
}
Here, \;
has a fixed width of 5 mu. You may also replace it with \hspace
.
@pi8027 Thanks! it fixed the space after [n]
is there a way to deactivate the text justification? Like on this screenshot the space between "Hammon" and "et" is really big!
Or maybe simply remove "et al"?
Hi, perhaps this?
\RenewDocumentCommand{\formatmargincitation}{m}{%
{\RaggedRight\parencite{#1}\;\citeauthor*{#1} (\citeyear{#1})}%
}