Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White space in argument #1105

Closed
ncihnegn opened this issue Oct 14, 2023 · 7 comments · Fixed by #1127
Closed

White space in argument #1105

ncihnegn opened this issue Oct 14, 2023 · 7 comments · Fixed by #1127

Comments

@ncihnegn
Copy link

ncihnegn commented Oct 14, 2023

Running tectonic 0.14.1 on https://github.com/sneakers-the-rat/dissertation gives

error: something bad happened inside BibTeX; its output follows:

===============================================================================
White space in argument---line 2393 of file jls_dissertation_institutional.aux
 : \citation{goodmanEndingSupportLegacy2022
 :                                          }
I'm skipping whatever remains of this command
field_info index is out of range---this can't happen
*Please notify the Tectonic maintainer*
Aborted at line 39 of file bibliographies/dissertation_combined.bib
(That was a fatal error)
@CraftSpider
Copy link
Contributor

Almost definitely a result of my port, I'll look into it.

@Neved4
Copy link

Neved4 commented Oct 23, 2023

It's a syntax error in line 5196, the \citep command expects a single ending } but it's given two braces instead.

See: infrastructure_dissertation.tex#L5196 and infrastructure_dissertation.tex#L5196.

@vlasakm
Copy link
Contributor

vlasakm commented Oct 23, 2023

It's a syntax error in line 5196, the \citep command expects a single ending } but it's given two braces instead.

See: infrastructure_dissertation.tex#L5196 and infrastructure_dissertation.tex#L5196.

I don't think that's the issue -- the second } pairs to the preceding \sidenote{.

@Neved4
Copy link

Neved4 commented Oct 24, 2023

@vlasakm You're right, after more careful inspection that's not what the cause is.

@CraftSpider
Copy link
Contributor

Sorry for the delay - I'm busy currently, but I'll be trying to get to this soon. I suspect the issue is with my bibtex port (converting the legacy C code to Rust), and in that case it's likely due to an off-by-one error or a missed call in my changes that the tectonic-on-arxiv tests (which run tectonic, including the bundled bibtex, against a lot of arxiv documents) didn't cover. If that's the case, I'll make sure to add a regression test so it doesn't happen in the future.

@Neved4
Copy link

Neved4 commented Oct 24, 2023

Regarding the .bib files and your port, they compile using tectonic as well as LuaLaTeX / XeTeX, both producing 1080 references:

MWE test.tex

\documentclass{article}
  \usepackage{amsmath, amsfonts}
  \usepackage[style=numeric,citestyle=numeric,
    backref=true,sorting=none]{biblatex}
    \addbibresource{autopilot.bib}
    \addbibresource{infrastructure.bib}
    \addbibresource{speech_modeling.bib}
    \addbibresource{speech.bib}
  \usepackage{totcount}
    \newtotcounter{citenum}
    \AtEveryBibitem{\stepcounter{citenum}}

\begin{document}
  \nocite{*}
  \printbibliography[title=\bibname{} (\the\totvalue{citenum})]
\end{document}

Compile with

biblatex=$(kpsewhich biblatex.sty) biblatex_dir=${biblatex%/*}

tectonic -p test.tex -Z search-path="$biblatex_dir"

@CraftSpider
Copy link
Contributor

I think I found the root cause and will be opening a PR shortly - the actual issue was small, despite taking me several hours to track down. A test will be included to prevent regressions.

CraftSpider added a commit to CraftSpider/tectonic that referenced this issue Dec 2, 2023
…ing fields once when they may need to be grown multiple times.
@pkgw pkgw closed this as completed in #1127 Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants