MWEB:无法识别 \jobname.bib 的内容

MWEB:无法识别 \jobname.bib 的内容

我还有一个问题,我想制作一个 MWEB,但它 (LaTeX/TexStudio) 无法识别 的内容\jobname.bib。我需要帮助来弄清楚问题是什么。这是我的代码:

%CLASS and GEOMETRY and PDFs
\documentclass{report}
\usepackage[
    a4paper,
    bindingoffset=0.5cm, left=2.6cm,right=2.6cm,top=2.6cm,bottom=3cm, 
    footskip=.67cm]
    {geometry}
\usepackage{pdfpages}

%FONT and language
\usepackage{gensymb}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\usepackage{xeCJK}
\usepackage{ruby}
\renewcommand{\rubysize}{0.5} % default: 0.4
\renewcommand{\rubysep}{-0.3ex}
\setCJKmainfont{TakaoMincho}

%FLOATS - table and graphics
\usepackage{float}
\usepackage{array} 
\usepackage{longtable}
\setlength\tabcolsep{2mm}
\usepackage{enumitem}
\setlist{noitemsep}

% TOC og LOFT mellemrum
\usepackage{tocloft}
\setlength{\cftbeforesecskip}{2mm} 
\setlength{\cftbeforefigskip}{2mm} 
\setlength{\cftbeforetabskip}{2mm}
\setcounter{secnumdepth}{-3}

%GRAPHICS
\usepackage{graphicx}
\usepackage{tcolorbox}

%SHORT CUTS
\newcommand{\sub}[1]{\textsubscript{#1}}
\newcommand{\ul}[1]{\underline{#1}}
\newcommand{\arrl}{\textleftarrow}
\newcommand{\arrr}{\textrightarrow}
\newcommand{\arrlr}{\textleftrightarrow}

\newcommand{\prs}[1]{PrS\sub{#1}}
\newcommand{\pos}[1]{PoS\sub{#1}}
\newcommand{\obs}[1]{ObS\sub{#1}}
\newcommand{\ds}[1]{DS\sub{#1}}

%BIBLIOGRAPHY
\usepackage[
    backend=biber,
    sortlocale=danish,
    firstinits=true,
    style=authoryear-icomp,
    dashed=false,
    doi=false,
    isbn=false,
    url=true,]
    {biblatex}
\DeclareNameAlias{sortname}{family-given}
\renewbibmacro{in:}{%
    \ifboolexpr{%
        test {\ifentrytype{article}}%
        or
        test {\ifentrytype{inproceedings}}%
    }{}{\printtext{\bibstring{in}\intitlepunct}}%
    }
\makeatletter
\newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{99}#1}
\makeatother
\DeclareCiteCommand{\fullcite}[\tempmaxup] %sets name order to last-first 
    {\usebibmacro{prenote}}
    {\usedriver
        {\DeclareNameAlias{sortname}{default}}
        {\thefield{entrytype}}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

\addbibresource{\jobname.bib}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @incollection{winslow2018,
        title = {Theorizing {{Lesson Study}}: {{Two}} Related Frameworks and Two {{Danish}} Case-Studies},
        booktitle = {({{To}} Appear) {{Mathematics Lesson Study Around}} the {{World}}: {{Theoretical}} and Methodological Issues},
        series = {Springer book series of ICME},
        publisher = {{Springer}},
        date = {2018},
        author = {Winsløw, Carl and Bahn, Jacob and Rasmussen, Klaus},
        editor = {Quaresma, Marisa and Winsløw, Carl and Clivaz, Stéphane and da Ponte, João and Ní Shúilleabháin, Aoibhinn and Takahashi, Akihiko},

    }
    @article{bahn2017c,
        title = {Evolution of Teachers' Anticipation of Didactical Situations in the Course of Three Lesson Studies},
        journaltitle = {(article submitted for) Annales de didactique et de Sciences Cognitives},
        date = {2017},
        author = {Bahn, Jacob},

    }

    @inproceedings{bahn2017d,
        location = {{Nagoya, Japan}},
        title = {How Infrastructures of Lesson Studies Impact on Teachers' Learning},
        eventtitle = {(Paper Submitted to) {{WALS Conference}} 2017},
        year = {2017/11/24-26},
        author = {Bahn, Jacob},

    }
\end{filecontents}

%TITLE and AUTHOR and FRONTPAGE
\usepackage{authblk}
\usepackage{eso-pic}

%FONT 
\setmainfont{Liberation Serif}

\begin{document}
\chapter{List of all papers and abstracts produced }
\noindent \fullcite{bahn2017c}.
\bigskip \noindent \fullcite{bahn2017d}.
\bigskip \noindent \fullcite{winslow2018}.
\section{References} % REFERENCES  ---------------------------------
\sloppy
\printbibliography[heading=none]
\end{document}

答案1

嗯,首先确保文件是用 utf8 编码的。

我将您的代码简化为更适合 MWE 的代码,并将包的使用移至filecontentsMWE 的开头。

我评论了一行

% giveninits=true, % <==================================================

摆脱的警告biblatex。请注意您使用的firstinits,已贬值...

使用以下 MWE

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@incollection{winslow2018,
  title = {Theorizing {{Lesson Study}}: {{Two}} Related Frameworks and Two {{Danish}} Case-Studies},
  booktitle = {({{To}} Appear) {{Mathematics Lesson Study Around}} the {{World}}: {{Theoretical}} and Methodological Issues},
  series = {Springer book series of ICME},
  publisher = {{Springer}},
  date = {2018},
  author = {Winsløw, Carl and Bahn, Jacob and Rasmussen, Klaus},
  editor = {Quaresma, Marisa and Winsløw, Carl and Clivaz, Stéphane and da Ponte, João and Ní Shúilleabháin, Aoibhinn and Takahashi, Akihiko},
}
@article{bahn2017c,
  title = {Evolution of Teachers' Anticipation of Didactical Situations in the Course of Three Lesson Studies},
  journaltitle = {(article submitted for) Annales de didactique et de Sciences Cognitives},
  date = {2017},
  author = {Bahn, Jacob},
}
@inproceedings{bahn2017d,
  location = {{Nagoya, Japan}},
  title = {How Infrastructures of Lesson Studies Impact on Teachers' Learning},
  eventtitle = {(Paper Submitted to) {{WALS Conference}} 2017},
  year = {2017/11/24-26},
  author = {Bahn, Jacob},
}
\end{filecontents}


\documentclass{report}
\usepackage[%
  a4paper,
  bindingoffset=0.5cm, left=2.6cm,right=2.6cm,top=2.6cm,bottom=3cm, 
  footskip=.67cm
]{geometry}

\usepackage[%
  backend=biber,
  sortlocale=danish,
% giveninits=true, % <==================================================
  style=authoryear-icomp,
  dashed=false,
  doi=false,
  isbn=false,
  url=true,
]{biblatex}
\DeclareNameAlias{sortname}{family-given}
\renewbibmacro{in:}{%
    \ifboolexpr{%
        test {\ifentrytype{article}}%
        or
        test {\ifentrytype{inproceedings}}%
    }{}{\printtext{\bibstring{in}\intitlepunct}}%
    }
\makeatletter
\newcommand{\tempmaxup}[1]{\def\blx@maxcitenames{99}#1}
\makeatother
\DeclareCiteCommand{\fullcite}[\tempmaxup] %sets name order to last-first 
    {\usebibmacro{prenote}}
    {\usedriver
        {\DeclareNameAlias{sortname}{default}}
        {\thefield{entrytype}}}
    {\multicitedelim}
    {\usebibmacro{postnote}}

\addbibresource{\jobname.bib}


\begin{document}
\chapter{List of all papers and abstracts produced }
\noindent \fullcite{bahn2017c}. 
\bigskip \noindent \fullcite{bahn2017d}.
\bigskip \noindent \fullcite{winslow2018}.
\section{References} % REFERENCES  ---------------------------------
\sloppy
\printbibliography[heading=none]
\end{document}

和通常的编译链xelatex,,,你biber会得到以下结果pdf:xelatexxelatex

resulting pdf

请注意,该包filecontents通常仅用于获取包含 bib 文件和 TeX 代码的 MWE。对于您的工作,只需\addbibresource{mybibliography.bib}使用文件mybibliography.bib即可包含您的 bib 条目...

相关内容