hola-hula
When printing the bibliographic entries, I want to print extra information together with the year at the LHS. Basically, this information is avaiable as a field `info` in the bibliographic entry. This `info` is to be printed below `year` at the LHS.
When I used `tabular`, an extra line is created, thus making it not so nice looking. Also for whatever reason `info` is not printed at all.
Additionally, I'd appreciate if you can remove the `year` from the RHS (as it is now redundant).
The working example uses [this answer](https://topanswers.xyz/tex?q=1499#a1727).
```
\documentclass{article}
\usepackage[backend=biber,maxbibnames=99,defernumbers=true,sorting=ydnt,giveninits=true,]{biblatex}
\begin{filecontents*}{myreferences.bib}
@article{sponge1,
author = {Sponge Bob Squrepants},
year = {2000},
title = {No Title},
journal = {Some awesome journal},
info = {high}
}
@article{sponge2,
author = {Sponge Bob Squrepants and
Patrick Star},
year = {2001},
title = {No Title Again},
journal = {Some awesome journal},
info = {low}
}
\end{filecontents*}
\addbibresource{myreferences.bib}
\defbibenvironment{bibliography}
{\list
{\printfield{year}}
%%%%%%% Spread it into two lines to print `info` in the following line, something like
%{\begin{tabular}[c]{@{}c@{}} \printfield{year} \\ \printfield{info} \end{tabular}}
{\setlength{\labelwidth}{2em}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{##1\hss}}
{\endlist}
{\item}
\begin{document}
\nocite{*}\printbibliography
\end{document}
```
Top Answer
samcarter
A lot of questions at once, let's try to go through them:
- a quick hack to use a multiline label: you can hide the height of it with the `\smash{}` macro and then use a minipage to make the top align to your bib entry
(caveat: the layout might be off for very short bib entries that only have one line on the right. As a quick hack, add `note = {\newline\mbox{}\nopunct}` to these entries).
- for removing the year, you can redefine the `date` and `issue+date` date macros. This should take care of the year for most entry types. For online entries, I left the date seen in it because this contains extra information like the day.
- Instead of adding new fields types like `info`, it is easier to use one of the predefined ones for the user to use, like `usera`. To be able to use `info` in your .bib file you can map it to one of the existing fields.
```
\documentclass{article}
\usepackage[backend=biber,maxbibnames=99,defernumbers=true,sorting=ydnt,giveninits=true,]{biblatex}
\begin{filecontents*}[overwrite]{myreferences.bib}
@article{sponge1,
author = {Sponge Bob Squrepants},
year = {2000},
title = {No Title},
journal = {Some awesome journal},
info = {high}
}
@article{sponge2,
author = {Sponge Bob Squrepants and
Patrick Star},
year = {2001},
title = {No Title Again},
journal = {Some awesome journal},
info = {low}
}
\end{filecontents*}
% declaring new field for info
\DeclareSourcemap{
\maps[datatype=bibtex,overwrite=true]{
\map{
\step[fieldsource=info, final=true]
\step[fieldset=usera, origfieldval, final=true]
}
}
}
\addbibresource{myreferences.bib}
\defbibenvironment{bibliography}
{\list
{\smash{\begin{minipage}[t]{2em}
\printfield{year}\linebreak \printfield{usera}
\end{minipage}}}
{\setlength{\labelwidth}{2em}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{##1\hss}}
{\endlist}
{\item}
\renewbibmacro*{date}{}
\renewbibmacro*{issue+date}{%
\ifboolexpr{
test {\iffieldundef{issue}}
}{}{
\printtext[parens]{%
\printfield{issue}%
}%
\newunit
}%
}
\begin{document}
\nocite{*}\printbibliography
\end{document}
```
