TransWikia.com

Problem with biblatex when using any options with usepackage

TeX - LaTeX Asked on September 30, 2021

I’m really new to LaTeX. I’m trying to use the biblatex package like so:

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

When I try to build and compile, I get:

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

This error only occurs when I try to use options for biblatex after usepackage. I am able to use options with other packages. I have my default bibliography tool set to Biber, and Biber is the latest version (2.14-1).

Additionally, I’m running TeXstudio 2.12.22 on Ubuntu 20.04.1.

If I can provide any additional information, don’t hesitate to ask! Thanks.

Preamble up to 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}{leavevmodenobreak } % Fixes "LaTeX Error: Command nobreakspace unavailable in encoding T1."

renewcommandrmdefault{cmr}  % sets the roman font for XeLaTeX
renewcommandsfdefault{cmss} % sets the sans font for XeLaTeX
renewcommandttdefault{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

newcommandTstrut{rule{0pt}{2.6ex}}         % = `top' strut
newcommandBstrut{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}{sffamilysmall}

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
    flushleftfboxrule=0ptfboxsep=.5em
    colorbox{cverbbg}{BUseVerbatim{cverb}}%
    endflushleft
}

% Use begin{lcverbatim} to implement
newenvironment{lcverbatim}
{SaveVerbatim{cverb}}
{endSaveVerbatim
    flushleftfboxrule=0ptfboxsep=.5em
    colorbox{cverbbg}{%
    makebox[dimexprlinewidth-2fboxsep][l]{BUseVerbatim{cverb}}%
}
endflushleft
}

% Use ctexttt{} to have this environment inline
newcommand{ctexttt}[1]{colorbox{cverbbg}{texttt{#1}}}
newverbcommand{cverb}
{setboxverbboxhboxbgroup}
{egroupcolorbox{cverbbg}{boxverbbox}}

% 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=scriptsizesffamily
    ](key) {#1strut}
    ;
}

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}
        hlineTstrutBstrut
    }{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}

One Answer

You give very little clues but my crystal ball suggests that you have

documentclass{article}

usepackage{catoptions}

usepackage[hyperref=true]{biblatex}

begin{document}

end{document}

catoptions breaks most other packages if used.

The above produces

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 
        
? 

Correct answer by David Carlisle on September 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP