Hello,
I am trying to make Zettlr export my file with XeLateX, but it is throwing this error:
h.bibliography.push is not a function
I'm running the .rpm on Fedora 42, connected to Zotero with BetterBibTeX exporting to CSL-JSON. I can export the document with simple-pdf and it exports and the citations show up fine. This issue has come after I have fixed issues with a missing parskip package. Anyone has seen this error before? Here is my defaults file:
# ZETTLR DEFAULTS FILE
# ====================
# Conversion: Markdown --> PDF (requires TeX suite to be installed)
# More info: https://pandoc.org/MANUAL.html
reader: markdown
writer: pdf
self-contained: true
variables:
# Sets the size of the document's pages.
papersize: a4 # Possible values: a0-a6, b0-b6, c0-c6,b0j, letter, executive, legal
# Further variables are documented here: https://pandoc.org/MANUAL.html#variables-for-latex
metadata-files: []
include-before-body: []
include-after-body: []
include-in-header: []
bibliography: "/home/lukas/Zotero/thesis.json"
filters:
- type: citeproc
pdf-engine: xelatex # Change this if you want to use a different engine, e.g. pdflatex
dpi: 72
toc: false # Include a table of contents?
toc-depth: 2 # 2 means to only include headings level 1 and 2 in the ToC
number-sections: false
section-divs: true
identifier-prefix: ''
title-prefix: ''
eol: lf
strip-comments: false
indented-code-classes: []
ascii: false
default-image-extension: .jpg
highlight-style: pygments
tab-stop: 4
preserve-tabs: false
fail-if-warnings: false
and here is my Latex template:
\documentclass[a4paper]{report}
\usepackage{graphicx} % Required for inserting images
\usepackage{parskip}
\usepackage{biblatex}
$if(csl-refs)$
% definitions for citeproc citations
\NewDocumentCommand\citeproctext{}{}
\NewDocumentCommand\citeproc{mm}{%
\begingroup\def\citeproctext{#2}\cite{#1}\endgroup}
\makeatletter
% allow citations to break across lines
\let\@cite@ofmt\@firstofone
% avoid brackets around text for \cite:
\def\@biblabel#1{}
\def\@cite#1#2{{#1\if@tempswa , #2\fi}}
\makeatother
\newlength{\cslhangindent}
\setlength{\cslhangindent}{1.5em}
\newlength{\csllabelwidth}
\setlength{\csllabelwidth}{3em}
\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing
{\begin{list}{}{%
\setlength{\itemindent}{0pt}
\setlength{\leftmargin}{0pt}
\setlength{\parsep}{0pt}
% turn on hanging indent if param 1 is 1
\ifodd #1
\setlength{\leftmargin}{\cslhangindent}
\setlength{\itemindent}{-1\cslhangindent}
\fi
% set entry spacing
\setlength{\itemsep}{#2\baselineskip}}}
{\end{list}}
\usepackage{calc}
\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}}
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
$if(title)$
\title{$title$}
$endif$
\author{Lukas Kluge}
$if(date)$
\date{$date$}
$endif$
\begin{document}
$if(title)$
\maketitle
$endif$
$body$
\end{document}