altacv + biblatex:出版物未显示/编译

altacv + biblatex:出版物未显示/编译

我在用着altacv编写我的简历。我的 tex 文件是sample.tex文件包含在包中。出于某种原因,我无法正确打印出版物。我有以下情况:

\nocite或者\printbibliography

\usepackage{biblatex}
\addbibresource{alex.bib}
\begin{document}

\begin{paracol}{2}
...

\cvsection{Publications}

\nocite{*} % alternatively: \printbibliography

\switchcolumn

...

\end{paracol}
\end{document}

无论哪种选择都会导致部分标题为“出版物”,但不会显示alex.bib文件中的条目。

\printbibliography[]{...}

我也\nocite{*}尝试过:

\printbibliography[heading=pubtype,title={\printinfo{\faFile*[regular]}{Articles}}, type=article]
\printbibliography[heading=pubtype,title={\printinfo{\faBook*[regular]}{Manuals}}, type=manual]
\printbibliography[heading=pubtype,title={\printinfo{\faMediumM*[regular]}{Misc}}, type=misc]

这会产生以下错误:

! Package biblatex Error: Heading 'pubtype' not found.

See the biblatex package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.170 ...File*[regular]}{Articles}}, type=article]

? ^D
! Emergency stop.
 ...

l.170 ...File*[regular]}{Articles}}, type=article]

!  ==> Fatal error occurred, no output PDF file produced!

我在网上搜索解决方案,但没有找到任何解决方案。非常感谢您的帮助!

答案1

您需要添加两个都 \printbibliography\nocite{*} 列出.bib文件中包含的所有参考资料。

sample.tex这是包含在发行版中的简化版本。sample.bib文件也包含在内。

运行pdflatex+++调出引用biberpdflatexpdflatex

% !TeX TS-program = pdflatex

\documentclass[10pt,a4paper]{altacv}

\geometry{left=1.25cm,right=1.25cm,top=1.5cm,bottom=1.5cm,columnsep=1.2cm}

\usepackage{paracol}

% next commands taken from pubs-authoryear.cfg <<<<<<<<<<<<<<<
\usepackage[backend=biber,style=apa6,sorting=ydnt]{biblatex}
\defbibheading{pubtype}{\cvsubsection{#1}}
\renewcommand{\bibsetup}{\vspace*{-\baselineskip}}
\AtEveryBibitem{\makebox[\bibhang][l]{\itemmarker}}
\setlength{\bibitemsep}{0.25\baselineskip}
\setlength{\bibhang}{1.25em}


%% sample.bib contains your publications
\addbibresource{sample.bib}

\begin{document}
\sffamily

\columnratio{0.6}   

\begin{paracol}{2}

    \cvsection{Publications}
    
    \nocite{*}
    
    \printbibliography[heading=pubtype,title={\printinfo{\faBook}{Books}},type=book]
    
    \divider
    
    \printbibliography[heading=pubtype,title={\printinfo{\faFile*[regular]}{Journal Articles}},type=article]
    
    \divider
    
    \printbibliography[heading=pubtype,title={\printinfo{\faUsers}{Conference Proceedings}},type=inproceedings]
\end{paracol}


\end{document}

b

这些biblatex命令是文件中包含的命令pubs-authoryear.cfg

相关内容