我正在使用 biblatex 数字样式与 tikzposter 结合使用,对于跨多行的参考文献,文本无法正确对齐。我尝试过 minipage 环境,但似乎也无济于事。
梅威瑟:
\documentclass{tikzposter}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{greenwade93,
author = "George D. Greenwade",
title = "The {C}omprehensive {T}ex {A}rchive {N}etwork ({CTAN})",
year = "1993",
journal = "TUGBoat",
volume = "14",
number = "3",
pages = "342--351"
}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
\end{filecontents}
\usepackage[backend=bibtex,style=numeric,sorting=none]{biblatex}
\bibliography{\jobname.bib}
\begin{document}
\begin{columns}
\column{.2}
\block{References}{
\nocite{*}
\begin{minipage}{\linewidth}
\begin{center}\mbox{}\vspace{-\baselineskip}
\printbibliography[heading=none]
\end{center}
\end{minipage}
}
\end{columns}
\end{document}
答案1
显然,\settowidth
并非在所有情况下都能按预期工作。特别是,除非在 中调用,否则tikzposter
命令会返回。0pt
block
使用现代的biblatex
快速解决方法是使用该locallabelwidth
选项,将长度计算推迟到实际\printbibliography
,并且只考虑实际出现在该参考书目中的条目。
\documentclass{tikzposter}
\usepackage[backend=bibtex, style=numeric, sorting=none, locallabelwidth]{biblatex}
\bibliography{biblatex-examples.bib}
\begin{document}
\begin{columns}
\column{.2}
\block{References}{
\nocite{sigfridsson,worman}
\begin{minipage}{\linewidth}
\begin{center}\mbox{}\vspace{-\baselineskip}
\printbibliography[heading=none]
\end{center}
\end{minipage}
}
\end{columns}
\end{document}