wshanks / lyz

LyZ is a plugin for Zotero, which is intended to make working with LyX/Zotero more pleasant.
GNU General Public License v3.0
107 stars 13 forks source link

Missing number, treated as zero #46

Closed qirtaiba closed 4 months ago

qirtaiba commented 4 months ago

Hi, I'm trying to use this package to write a book. For now there's only one file in my bibliography. When I try to insert it into my LyX document, I get this error (five times):

<to be read again> 
                   \l@en-AU 
l.185 ...on2012classificationtextemdashcontent}}{}

A number should have been here; I inserted '0'.
(If you can't figure out why I needed to see a number,
look up 'weird error' in the index to The TeXbook.)

I'm using:

Here is my LaTeX preamble:

%% Do not edit unless you really know what you are doing.
\documentclass[9pt,a5paper,english]{memoir}
\usepackage{mathpazo}
\usepackage{avant}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\geometry{verbose,a5paper}
\pagestyle{companion}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{babel}
\usepackage{jurabib}[2004/01/25]
\usepackage{microtype}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% Set up Jurabib
\jurabibsetup{%
titleformat=italic,%
titleformat=commasep,%
commabeforerest,%
ibidem=strict,%
citefull=first,%
lookat,%
oxford,%
pages=format,%
idem%
}

Here's the generated bibliography:


@techreport{australianlawreformcommission2012classificationtextemdashcontent,
        title = {Classification{\textemdash}{Content} {Regulation} and {Convergent} {Media
} ({ALRC} {Report} 118)},
        url = {https://www.alrc.gov.au/publication/classification-content-regulation-and-c
onvergent-media-alrc-report-118/},
        abstract = {The Final Report Classification{\textemdash}Content Regulation and Con
vergent Media (ALRC Report 118) was tabled on 1 March 2012. It contains 57 recommendations
 for reform.~The ALRC has also published a smaller Summary Report.This publication is also
 available for free as an~EPUB~for use in mobile devices.~(What is an Epub?)This publicati
on is~available for purchase~in book format.},
        language = {en-AU},
        urldate = {2024-05-10},
        author = {Australian Law Reform Commission},
        month = feb,
        year = {2012},
        file = {Snapshot:/home/terminus/Zotero/storage/I2BT37QR/classification-content-reg
ulation-and-convergent-media-alrc-report-118.html:text/html},
}

Any suggestions on how to debug this? Thanks!

qirtaiba commented 4 months ago

Solved this in a roundabout way. The line that was causing the problem was language = {en-AU}. To fix it I had to add these lines to my preamble:

\usepackage{polyglossia}
\setdefaultlanguage[variant=australian]{english}

And I also had to install the texlive-xetex package and switch from pdflatex to xetex in LyX's Fonts document settings.