XeLaTeX 和带有 nocite 的 bib 条目

XeLaTeX 和带有 nocite 的 bib 条目

我第一次使用 xelatex 编译我的文档。我想知道我到底做错了什么,因为它没有用nocite命令生成任何 bibtex 条目。

主文件 -

%!TEX TS-program = xelatex
\documentclass[]{pranav-cv}
\usepackage{filecontents}
\usepackage[backend=biber]{biblatex}

\begin{filecontents}{cv.bib}
  @INPROCEEDINGS{eindhoven_intern,
    author={Tendulkar, Pranav and Stuijk, Sander},
    booktitle={Reconfigurable Architectures Workshop, RAW 13 Proceedings}, 
    title={A Case Study into Predictable and Composable MPSoC Reconfiguration},
    year={2013},
    month={may},
  publisher={IEEE Computer Society Press}}
\end{filecontents}
\addbibresource{cv.bib}

\begin{document}

\section{publications}

\begin{refsection}
\nocite{*}
\printbibliography
\end{refsection}

\end{document}

类文件 -

\ProvidesClass{pranav-cv}[2012/04/30 CV class]
\NeedsTeXFormat{LaTeX2e}

%\DeclareOption{print}{\def\@cv@print{}}
%\DeclareOption*{%
%  \PassOptionsToClass{\CurrentOption}{article}%
%}
%\ProcessOptions\relax

\LoadClass{article}
\RequirePackage[left=6.1cm,top=2cm,right=1.5cm,bottom=2.5cm,nohead,nofoot]{geometry}
\RequirePackage{hyperref}
\RequirePackage{tikz}
\RequirePackage[quiet]{fontspec}

\RequirePackage[quiet]{fontspec}

\newfontfamily\bodyfont[]{Helvetica Neue LT Std}
\newfontfamily\thinfont[]{Helvetica Neue LT Std 25 Ultra Light}
\newfontfamily\headingfont[]{Helvetica Neue LT Std 77 Bold Condensed}

\defaultfontfeatures{Mapping=tex-text}
\setmainfont[Mapping=tex-text, Color=textcolor]{Helvetica Neue LT Std 45 Light}

\newcommand{\header}[3]{%
    \begin{tikzpicture}[remember picture,overlay]
      \node [rectangle, fill=fillheader, anchor=north, minimum width=\paperwidth, minimum height=4cm] (box) at (current page.north){};
      \node [anchor=center] (name) at (box) {%
      \fontsize{40pt}{72pt}\color{header}{\thinfont #1}{\bodyfont #2}};  
      \node [anchor=north] at (name.south) {\fontsize{14pt}{24pt}\color{header}\thinfont #3};  
    \end{tikzpicture}
    \vspace{2.5cm}
    \vspace{-2\parskip}
}


%%%%%%%%%%
% Colors %
%%%%%%%%%%

\RequirePackage{xcolor}
\definecolor{white}{RGB}{255,255,255}
\definecolor{darkgray}{HTML}{333333}
\definecolor{gray}{HTML}{4D4D4D}
\definecolor{lightgray}{HTML}{999999}
\definecolor{green}{HTML}{C2E15F}
\definecolor{orange}{HTML}{FDA333}
\definecolor{purple}{HTML}{D3A4F9}
\definecolor{red}{HTML}{FB4485}
\definecolor{blue}{HTML}{6CE0F1}

\ifdefined\@cv@print
  \colorlet{green}{gray}
  \colorlet{orange}{gray}
  \colorlet{purple}{gray}
  \colorlet{red}{gray}
  \colorlet{blue}{gray}
  \colorlet{fillheader}{white}
  \colorlet{header}{gray}
\else
  \colorlet{fillheader}{gray}
  \colorlet{header}{white}
\fi
\colorlet{textcolor}{gray}
\colorlet{headercolor}{gray}

\RequirePackage[absolute,overlay]{textpos}
\setlength{\TPHorizModule}{1cm}
\setlength{\TPVertModule}{1cm}
\newenvironment{aside}{%
  \let\oldsection\section
  \renewcommand{\section}[1]{
    \par\vspace{\baselineskip}{\Large\headingfont\color{headercolor} ##1}
  }
  \begin{textblock}{4.6}(0.5, 4.33)
  \begin{flushright}
  \obeycr
}{%
  \restorecr
  \end{flushright}
  \end{textblock}
  \let\section\oldsection
}

%%%%%%%%%%%%%
% Structure %
%%%%%%%%%%%%%
\RequirePackage{parskip}

\newcounter{colorCounter}
\def\@sectioncolor#1#2#3{%
  {%
    \color{%
      \ifcase\value{colorCounter}%
        blue\or%
        red\or%
        orange\or%
        green\or%
        purple\else%
        headercolor\fi%
    } #1#2#3%
  }%
  \stepcounter{colorCounter}%
}

\renewcommand{\section}[1]{
  \par\vspace{\parskip}
  {%
    \LARGE\headingfont\color{headercolor}%
    \@sectioncolor #1%
  }
  \par\vspace{\parskip}
}

\renewcommand{\subsection}[2]{
  \par\vspace{.5\parskip}%
  \Large\headingfont\color{headercolor} #2%
  \par\vspace{.25\parskip}%
}

\pagestyle{empty}

%%%%%%%%%%%%%%%%%%%%
% List environment %
%%%%%%%%%%%%%%%%%%%%

\setlength{\tabcolsep}{0pt}
\newenvironment{entrylist}{%
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}
}{%
  \end{tabular*}
}
\renewcommand{\bfseries}{\headingfont\color{headercolor}}
\newcommand{\entry}[4]{%
  #1&\parbox[t]{11.8cm}{%
    \textbf{#2}%
    \hfill%
    {\footnotesize\addfontfeature{Color=lightgray} #3}\\%
    #4\vspace{\parsep}%
  }\\}

变种blg

[1] Config.pm:300> INFO - This is Biber 0.9.9
[1] Config.pm:303> INFO - Logfile is 'cv.blg'
[3] biber:145> INFO - === Wed Mar 27, 2013, 07:26:55
[3] Biber.pm:271> INFO - Reading 'cv.bcf'
[25] Biber.pm:586> INFO - Found 0 citekeys in bib section 0
[25] Biber.pm:570> INFO - Using all citekeys in bib section 1
[25] Biber.pm:586> INFO - Found 0 citekeys in bib section 0
[35] Biber.pm:2585> INFO - Processing bib section 1
[53] Biber.pm:2677> INFO - Looking for bibtex format file 'cv.bib' for section 1
[54] bibtex.pm:829> INFO - Decoding LaTeX character macros into UTF-8
[68] bibtex.pm:833> INFO - Finished Decoding LaTeX character macros into UTF-8
[68] bibtex.pm:704> INFO - Found BibTeX data source 'cv.bib'
[112] Biber.pm:2480> INFO - Sorting list 'MAIN' keys
[112] Biber.pm:2484> INFO - No sort tailoring available for locale 'en_US.UTF-8'
[127] Biber.pm:2480> INFO - Sorting list 'SHORTHANDS' keys
[128] Biber.pm:2484> INFO - No sort tailoring available for locale 'en_US.UTF-8'
[133] bbl.pm:427> INFO - Writing 'cv.bbl' with encoding 'UTF-8'
[133] bbl.pm:498> INFO - Output to cv.bbl

我发出的编译命令是 -

xelatex cv.tex
bibtex cv 
xelatex cv.tex
xelatex cv.tex

我甚至尝试使用biber,但是没有带来任何结果。请注意,我没有编写类文件,但它运行良好。

答案1

错误在于,该类重新定义时\section没有给出 *-variant 的机会,因此 LaTeX 会感到困惑,因为默认情况下会\printbibliography调用\section*{\refname}

定义一个空的书目标题,因为您已经提供了标题。

\documentclass[]{pranav-cv}
\usepackage{filecontents}
\usepackage[backend=biber]{biblatex}
\defbibheading{empty}{}

\begin{filecontents*}{\jobname.bib}
  @INPROCEEDINGS{eindhoven_intern,
    author={Tendulkar, Pranav and Stuijk, Sander},
    booktitle={Reconfigurable Architectures Workshop, RAW 13 Proceedings},
    title={A Case Study into Predictable and Composable MPSoC Reconfiguration},
    year={2013},
    month={may},
  publisher={IEEE Computer Society Press}}
\end{filecontents*}
\addbibresource{\jobname.bib}

\begin{document}


\section{publications}

\begin{refsection}
\nocite{*}
\printbibliography[heading=empty]
\end{refsection}

\end{document}

我认为refsection在这里没用,但是当然,在您的简历中细分参考书目可能是必要的。

相关内容