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

Can't run either \printbibliography or \csl:reference. #2202

Open
jodros opened this issue Dec 19, 2024 · 7 comments
Open

Can't run either \printbibliography or \csl:reference. #2202

jodros opened this issue Dec 19, 2024 · 7 comments
Labels
bug Software bug issue

Comments

@jodros
Copy link
Contributor

jodros commented Dec 19, 2024

Both give me this same error:

 Error: runtime error: /usr/local/share/sile/packages/bibtex/csl/engine.lua:106: bad argument #1 to 'gsub' (string expected, got nil)
stack traceback:
        [C]: in ?
        [C]: in function 'gsub'
        /usr/local/share/sile/packages/bibtex/csl/engine.lua:106: in function 'init'
        .../local/share/sile/lua_modules/share/lua/5.1/pl/class.lua:38: in function 'call_ctor'
        .../local/share/sile/lua_modules/share/lua/5.1/pl/class.lua:171: in function 'CslEngine'
        /usr/local/share/sile/packages/bibtex/init.lua:487: in function </usr/local/share/sile/packages/bibtex/init.lua:476>
        /usr/local/share/sile/core/sile.lua:630: in function 'call'
        /usr/local/share/sile/core/sile.lua:421: in function 'process'
        /usr/local/share/sile/core/sile.lua:500: in function 'processString'
        /usr/local/share/sile/core/sile.lua:550: in function </usr/local/share/sile/core/sile.lua:513>

I've been trying with different .bib and .csl files as well...

@Omikhleia
Copy link
Member

Omikhleia commented Dec 19, 2024

Line 106 is the gsub on subsequentAuthorSubstitute (however inherited). (EDIT: fixed my reference after a check to the code)
Which CSL file(s) are you using?

@Omikhleia
Copy link
Member

Omikhleia commented Dec 19, 2024

Actually, MLA and Chicago have subsequent-author-substitute (which are the ones I mostly used, or derivatives of thereof)... but not a bunch of other styles that don't do author substitution. And CSL 1.0.2 implies the field is optional indeed ("If set..." -- I visibly overlooked it ^^)

image

So the code lacks a little condition check there indeed. Should be easy to fix, just an "if" around that block. ^^

@Omikhleia Omikhleia added the bug Software bug issue label Dec 19, 2024
@Omikhleia
Copy link
Member

(Still, let me know which style you primarily target, and I'll do some extra tests upon my return from X-mas vacations)

@jodros
Copy link
Contributor Author

jodros commented Dec 19, 2024

Now, after a new attempt, I've found that with this one it at least generates the PDF, even though the command \printbibliography still doesn't work, while \csl:reference does

Those that don't work are (for now):

@Omikhleia
Copy link
Member

Thanks. I'll test those styles upon my return from vacations (on my 2700+ reference biblio), just to ensure there are no further unnoticed issues that the one mentioned above. If this is urgent, of course, feel free to experiment. I did test various MLA and Chicago derivatives, and a few European journals, but one never knows, a train can hide another :).

@Omikhleia
Copy link
Member

BTW, Ipea ABNT does have a subsequent-author-substitute attribute in the <bibliography> element, so if it fails, it might be another problem. Don't hesitate checking the logs and report it separately if confirmed to be on a different element...

@Omikhleia
Copy link
Member

(UFAL ABNT doesn't have the subsequent-author-substitute attribute, so is clearly failing here due at least to it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue
Projects
None yet
Development

No branches or pull requests

2 participants