biblatex \printbibliography 无换行

biblatex \printbibliography 无换行

我试图将真实的引用纳入我的简历中,效果很好,只是参考书目以换行符开头。

我怎样才能将其除去?

这是我的极简文字:

\documentclass[11pt,a4paper]{moderncv}

\moderncvstyle{classic}  
\moderncvcolor{blue}       

% character encoding
\usepackage[english,ngerman]{babel}
\usepackage[ansinew]{inputenc}            

\usepackage[
  babel,
  german=quotes
]{csquotes}

\AfterPreamble{\hypersetup{
  colorlinks=true,
%   hidelinks, %printig
  linkcolor=gray,
  urlcolor=blue
}}


\usepackage[
  backend=biber,      
  style=apa,           
  sortcites=true,       
  sorting=nyt,          
  hyperref=true,        
  backref=true,         
  alldates=iso8601      
]{biblatex}
\addbibresource{./biblatex.bib}
\DeclareLanguageMapping{ngerman}{ngerman-apa}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\firstname{John}
\familyname{Doe}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\section{normal layout}


\cvline{2006}{what the layout normaly looks like}

\section{worng layout with a unwanted bonus row}

\begin{refsection}
  \nocite{zongker_chicken_2006}
  \nocite{zongker_chicken_2007}
  \cvline{all}{\printbibliography[heading=none]}
\end{refsection}

\end{document}

这是 biblatex.bib:

@article{zongker_chicken_2006,
    title = {Chicken chicken chicken: Chicken chicken},
    volume = {12},
    url = {http://www.superfrink.net/athenaeum/dougz.pdf},
    shorttitle = {Chicken chicken chicken},
    pages = {16--21},
    number = {5},
    journaltitle = {Annals of Improbable Research},
    author = {Zongker, Doug},
    urldate = {2013-04-05},
    date = {2006}
}

@article{zongker_chicken_2007,
    title = {Chicken chicken chicken: Chicken chicken},
    volume = {12},
    url = {http://www.superfrink.net/athenaeum/dougz.pdf},
    shorttitle = {Chicken chicken chicken},
    pages = {16--21},
    number = {5},
    journaltitle = {Annals of Improbable Research},
    author = {Zongker, Doug},
    urldate = {2013-04-05},
    date = {2007}
}

我得到的和我想要的: 在此处输入图片描述

答案1

这是一种 hack,并不能保证。正如 jon 在评论中提到的,这实际上不受支持。

\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}

\usepackage[
  babel,
  german=quotes
]{csquotes}

\AfterPreamble{\hypersetup{
  colorlinks=true,
  linkcolor=gray,
  urlcolor=blue
}}

\usepackage{enumitem}
\newlist{cvbiblist}{itemize}{1}
\setlist[cvbiblist]{label=, leftmargin=\bibhang, labelindent=0pt, listparindent=0pt, itemindent=-\leftmargin, itemsep=\bibitemsep, parsep=\bibparsep}
\usepackage[
  backend=biber,
  style=apa,
  sortcites=true,
  sorting=nyt,
  hyperref=true,
  backref=true,
  alldates=iso8601
]{biblatex}
\begin{filecontents}{\jobname.bib}
@article{zongker_chicken_2006,
    title = {Chicken chicken chicken: Chicken chicken},
    volume = {12},
    url = {http://www.superfrink.net/athenaeum/dougz.pdf},
    shorttitle = {Chicken chicken chicken},
    pages = {16--21},
    number = {5},
    journaltitle = {Annals of Improbable Research},
    author = {Zongker, Doug},
    urldate = {2013-04-05},
    date = {2006}
}

@article{zongker_chicken_2007,
    title = {Chicken chicken chicken: Chicken chicken},
    volume = {12},
    url = {http://www.superfrink.net/athenaeum/dougz.pdf},
    shorttitle = {Chicken chicken chicken},
    pages = {16--21},
    number = {5},
    journaltitle = {Annals of Improbable Research},
    author = {Zongker, Doug},
    urldate = {2013-04-05},
    date = {2007}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareLanguageMapping{ngerman}{ngerman-apa}
\defbibenvironment{cvbib}{\vspace*{-1.5\baselineskip}\begin{cvbiblist}}{\end{cvbiblist}}{\item}

\firstname{John}
\familyname{Doe}

\begin{document}
\section{normal layout}
\cvline{2006}{what the layout normaly looks like}

\section{worng layout with a unwanted bonus row}
\begin{refsection}
  \nocite{zongker_chicken_2006}
  \nocite{zongker_chicken_2007}
  \cvline{all}{%
    \printbibliography[env=cvbib,heading=none]%
  }
\end{refsection}

\end{document}

简历被盗

说实话,我不确定它是否enumitem能做很多事情。我以为我可以用它来调整垂直间距,但做不到。

答案2

我使用了 cfr 和 Ulrike Fischer 提供的方法并做了一些修改,因为 enumitem 会弄乱文本的其余部分。

\documentclass[11pt,a4paper]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage[english,ngerman]{babel}
\usepackage[utf8]{inputenc}

\usepackage[
  babel,
  german=quotes
]{csquotes}

\AfterPreamble{\hypersetup{
  colorlinks=true,
  linkcolor=gray,
  urlcolor=blue
}}

\usepackage{enumitem}
\setlist[itemize,1]{nosep,after=\vspace{-\baselineskip}}

\usepackage[
  backend=biber,
  style=apa,
  sortcites=true,
  sorting=nyt,
  hyperref=true,
  backref=true,
  alldates=iso8601
]{biblatex}

\begin{filecontents}{\jobname.bib}
@article{zongker_chicken_2006,
    title = {Chicken chicken chicken: Chicken chicken},
    volume = {12},
    url = {http://www.superfrink.net/athenaeum/dougz.pdf},
    shorttitle = {Chicken chicken chicken},
    pages = {16--21},
    number = {5},
    journaltitle = {Annals of Improbable Research},
    author = {Zongker, Doug},
    urldate = {2013-04-05},
    date = {2006}
}

@article{zongker_chicken_2007,
    title = {Chicken chicken chicken: Chicken chicken},
    volume = {12},
    url = {http://www.superfrink.net/athenaeum/dougz.pdf},
    shorttitle = {Chicken chicken chicken},
    pages = {16--21},
    number = {5},
    journaltitle = {Annals of Improbable Research},
    author = {Zongker, Doug},
    urldate = {2013-04-05},
    date = {2007}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareLanguageMapping{ngerman}{ngerman-apa}

\firstname{John}
\familyname{Doe}

\begin{document}
\section{normal layout}
\cvline{2006}{what the layout normaly looks like}

\section{first method by cfr}
\begin{refsection}
  \nocite{zongker_chicken_2006}
  \nocite{zongker_chicken_2007}
  \cvline{all}{\vspace*{-1.5\baselineskip} \printbibliography[heading=none]
  }
\end{refsection}


\section{ second method by Ulrike Fischer}
\cvline{all}{\fullcite{zongker_chicken_2006}}
\cvline{   }{\fullcite{zongker_chicken_2006}}


\end{document}

输出结果如下: 输出

相关内容