使用 usepackage 中的任何选项时 biblatex 会出现问题

使用 usepackage 中的任何选项时 biblatex 会出现问题

我对 LaTeX 还很陌生。我尝试使用 biblatex 包,如下所示:

\usepackage[hyperref=true]{biblatex}
\addbibresource{sources.bib}

当我尝试构建和编译时,我得到:

biblatex.sty error line 15131 Use of \blx@tempa doesn't match its definition.

仅当我尝试在 之后使用 biblatex 选项时才会出现此错误\usepackage。我能够将选项与其他包一起使用。我的默认参考书目工具设置为 Biber,Biber 是最新版本 (2.14-1)。

此外,我在 Ubuntu 20.04.1 上运行 TeXstudio 2.12.22。

如果我可以提供任何其他信息,请随时询问!谢谢。

biblatex 前言:

\documentclass[twoside,a4paper,11pt]{refart}

\usepackage{tabularx} % Allows word wrapping in tables
\usepackage{fontspec}   % THIS REQUIRES US TO COMPILE USING XeLaTeX RATHER THAN pdfLaTeX
\DeclareTextCommand{\nobreakspace}{T1}{\leavevmode\nobreak\ } % Fixes "LaTeX Error: Command \nobreakspace unavailable in encoding T1."

\renewcommand\rmdefault{cmr}  % sets the roman font for XeLaTeX
\renewcommand\sfdefault{cmss} % sets the sans font for XeLaTeX
\renewcommand\ttdefault{cmtt} % sets the monospace font for XeLaTeX

%% Font settings suggested by fbb documentation.
\usepackage{textcomp} % to get the right copyright, etc.
\usepackage[lining,tabular]{fbb} % so math uses tabular lining figures
\usepackage[scaled=.95,type1]{cabin} % sans serif in style of Gill Sans
\usepackage[varqu,varl]{zi4}% inconsolata typewriter

\usepackage[dvipsnames,table]{xcolor}   % For colors in table environment
\definecolor{light-gray}{gray}{0.95}

\usepackage{relsize}    % used for changing text size in math mode
\usepackage{enumitem}   % required to add boldface enumerate
\usepackage{amsmath}    % used for boldface text in math mode
\usepackage{bm}         % also for boldface math
\usepackage{xfrac}      % for angled fractions

\newcommand\Tstrut{\rule{0pt}{2.6ex}}         % = `top' strut
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}}   % = `bottom' strut

\usepackage{makecell, multirow} % required to essentially merge cells in a table

\usepackage[export]{adjustbox}  % required to align the attention image with the text

\usepackage{amssymb}
\usepackage{marvosym}   % this package allows the use of different symbols
% see https://www.rpi.edu/dept/arc/training/latex/LaTeX_symbols.pdf

\usepackage{microtype}

\usepackage{graphicx}
\usepackage{enumitem}
\setlist{leftmargin=*}
\usepackage{listings}
\lstset{basicstyle=\ttfamily,frame=single,xleftmargin=3em,xrightmargin=3em}
\usepackage[os=win]{menukeys}
\renewmenumacro{\keys}[+]{shadowedroundedkeys}
\usepackage{framed}
\usepackage{etoolbox}
\AtBeginEnvironment{leftbar}{\sffamily\small}

\usetikzlibrary{chains,arrows, shapes, positioning}

%This gives Fig references (i.e. labelfont) in Sans Serif and bold using the caption package
\usepackage[labelfont={sf,bf}]{caption}

%This package and the environments (and command) defined below simulate a verbatim environment with gray background (used for command line code)
\usepackage{fancyvrb,newverbs}  % requires xcolor package declared above
\definecolor{cverbbg}{gray}{0.93}

% Inline code
\definecolor{dark-gray}{gray}{0.85}
\definecolor{light-gray}{gray}{.95}
\newcommand{\code}[1]{\colorbox{light-gray}{\texttt{#1}}}

% Use \begin{cverbatim} to implement    
\newenvironment{cverbatim}
{\SaveVerbatim{cverb}}
{\endSaveVerbatim
    \flushleft\fboxrule=0pt\fboxsep=.5em
    \colorbox{cverbbg}{\BUseVerbatim{cverb}}%
    \endflushleft
}

% Use \begin{lcverbatim} to implement
\newenvironment{lcverbatim}
{\SaveVerbatim{cverb}}
{\endSaveVerbatim
    \flushleft\fboxrule=0pt\fboxsep=.5em
    \colorbox{cverbbg}{%
    \makebox[\dimexpr\linewidth-2\fboxsep][l]{\BUseVerbatim{cverb}}%
}
\endflushleft
}

% Use \ctexttt{} to have this environment inline
\newcommand{\ctexttt}[1]{\colorbox{cverbbg}{\texttt{#1}}}
\newverbcommand{\cverb}
{\setbox\verbbox\hbox\bgroup}
{\egroup\colorbox{cverbbg}{\box\verbbox}}

% These packages and the command definded below create keyboard symbols for when keystrokes need to be used within the text.
\usepackage{tikz}
\usetikzlibrary{shadows}

% Use \keystroke{} to implement
\newcommand*\keystroke[1]{%
    \tikz[baseline=(key.base)]
    \node[%
    draw,
    fill=white,
    drop shadow={shadow xshift=0.25ex,shadow yshift=-0.25ex,fill=black,opacity=0.75},
    rectangle,
    rounded corners=2pt,
    inner sep=1pt,
    line width=0.5pt,
    font=\scriptsize\sffamily
    ](key) {#1\strut}
    ;
}

\newcommand{\parbreak}{\par \vspace{0.1cm}}

% A nicely formatted table for explaining inputs on a given page (inputt stands for "input table")
\newcommand{\inputt}
    {\renewcommand{\arraystretch}{1.4}\tabularx{\textwidth}{ r | X }
    \rowcolor{dark-gray}
    \textbf{Input} & \textbf{Meaning}\\
        \hline\Tstrut\Bstrut
    }{\endtabularx}

% A faster way to write includegraphics with a frame, caption, and label for \textwidth images
\newcommand{\sshot}[3]
{
    \begin{figure}[thb!]\centering
    \frame{\includegraphics[width=\textwidth]{screenshots/#1}}
    \caption{#2}\label{#3}
    \end{figure}
}

% A faster way to write icons with caption and label
\newcommand{\icon}[4]
{
    \begin{figure}[hbt!]\centering
    \includegraphics[width=#2]{#1}
    \caption{#3}\label{#4}
    \end{figure}
}

\renewcommand{\indent}{\hspace{14pt}}

\usepackage{titlesec}  % Allows subsubsections
\setcounter{secnumdepth}{4}

\usepackage[hyperref=true]{biblatex}
\addbibresource{sources.bib}

\usepackage{hyperref}

答案1

你给出的线索很少,但我的水晶球显示你​​已经

\documentclass{article}

\usepackage{catoptions}

\usepackage[hyperref=true]{biblatex}

\begin{document}

\end{document}

catoptions如果使用的话会破坏大多数其他软件包。

以上产生

LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-07-17>
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2020/texmf-dist/tex/latex/catoptions/catoptions.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/biblatex.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/infwarerr/infwarerr.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/iftex/iftex.sty)
(/usr/local/texlive/2020/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/kvoptions/kvoptions.sty
(/usr/local/texlive/2020/texmf-dist/tex/generic/kvsetkeys/kvsetkeys.sty))
(/usr/local/texlive/2020/texmf-dist/tex/latex/logreq/logreq.sty
(/usr/local/texlive/2020/texmf-dist/tex/latex/logreq/logreq.def))
(/usr/local/texlive/2020/texmf-dist/tex/latex/base/ifthen.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/url/url.sty)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/blx-dm.def)
(/usr/local/texlive/2020/texmf-dist/tex/latex/biblatex/blx-compat.def)
! Use of \blx@tempa doesn't match its definition.
\CurrentOption ->h
                  yperref
l.15131 
        
? 

相关内容