* error with sbl bibliography on latest LMTX
@ 2022-07-08 15:17 Henning Hraban Ramm via ntg-context
2022-07-09 12:19 ` Joey McCollum via ntg-context
0 siblings, 1 reply; 2+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-07-08 15:17 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Henning Hraban Ramm
[-- Attachment #1: Type: text/plain, Size: 3442 bytes --]
Hi Joel (et al.),
I tried the SBL bibliography setup with the latest LMTX; the example and
bib database are from Dennis’ article on ligatures in the upcoming CG
journal:
"""
\usebtxdataset[default][references.bib]
\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupinteraction[state=start]
\starttext
superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty].
Therefore, the {\TEX}book mentions that the word
\quotation{shel\noligature{ff}ul} should indeed be rendered without the
ff-ligature \cite[righttext={p.~19}][knuth:texbook].
\placelistofpublications%[numbering=yes]
\stoptext
"""
Unfortunately, I get some errors, while it works with APS and APA:
-- invalid parent sbl:list:title:unpublished for sbl:list:title:thesis,
sbl:list:title:unpublished defined too (best check it)
-- Undefined control sequence \currentbtxloctext
I installed your files in TEXMFHOME, and apparently, ConTeXt can find
them. Here’s the shortened log:
system > ConTeXt ver: 2022.05.11 11:36 LMTX fmt: 2022.7.4
int: english/english
...
open source > level 1, order 2, name './bibtest.tex'
publications > adding bib data to set 'default' from source
'references.bib'
open source > level 2, order 3, name
'/Users/hraban/texmf/context/context-sbl/tex/publ-imp-sbl.mkvi'
system > error: invalid parent sbl:list:title:unpublished for
sbl:list:title:thesis, sbl:list:title:unpublished defined too (best
check it)
close source > level 2, order 3, name
'/Users/hraban/texmf/context/context-sbl/tex/publ-imp-sbl.mkvi'
...
publications > analyzing previous publication run for 'default'
tex error > tex error on line 34 in file ./bibtest.tex: Undefined
control sequence \currentbtxloctext
<macro> \22>:btx:sbl:cite:inline
#1->\fastsetup {\s!btx :\s!cite :concat}\fastsetup
{btx:sbl:cite:lefttext}\begingroup \letbtxparameter {punct}\empty \def
\currentbtxcitealternative {inline}\def \currentbtxcategory {\btxfield
{category}}\def \currentbtxloctext
{\btxparameter {loctex
<macro> \normalexpanded
\Word {\fastsetup {btx:sbl:cite:inline}
}\doif {\btxparameter {righttext}}{\empty } {\btxperiod }
<macro> \strc_constructions_register_yes
...constructionparameter \c!referencetext }\iflocation \ifempty
\currentconstructionbookmark \begingroup \simplifycommands \xdef
\currentconstructionbookmark {\detokenize \expandafter {\normalexpanded
{\constructionparameter \c!title
}}}\endgroup ...
<macro> \strc_notations_start_reference_indeed
[#1]#*#2->\strc_constructions_register [][\c!label
={\descriptionparameter \c!text },\c!reference ={#1},\c!title
={#2},\c!bookmark =,\c!list =,\c!referencetext =]
\strc_notations_wrapup
<macro> \22>:btx:sbl:cite:footnote
...ct}}\begingroup \letbtxparameter {punct}\empty \let
\doifendswithpunctelse \btx_sbl_doifendswithpunctelse \startfootnote
\Word {\fastsetup {btx:sbl:cite:inline}}\doif {\btxparameter
{righttext}}{\empty } {\btxperiod }\stopfootnote
\endgroup \do ...
<lua output>
...
<line 3.9>
superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty]
.
The control sequence at the end of the top line of your error message
was never
\def'ed. You can just continue as I'll forget about whatever was undefined.
mtx-context | fatal error: return code: 1
Did I do something wrong, is the database not suitable for SBL, or is it
a bug?
Hraban
[-- Attachment #2: references.bib --]
[-- Type: application/x-bibtex, Size: 3701 bytes --]
@book{detailtypografie,
title = {Detailtypografie},
subtitle = {Nachschlagewerk zu allen Fragen zu Schrift und Satz},
author = {Forssman, Friedrich and de Jong, Ralf},
edition = 4,
year = 2008,
address = {Mainz},
publisher ={Verlag Hermann Schmidt Mainz},
}
@book{duden,
title = {Duden -- Die deutsche Rechtschreibung},
edition =23,
year=2004,
volume=1,
publisher={Dudenverlag},
address={Mannheim},
editor={Dudenredaktion},
}
@book{bringhurst:style,
author = {Bringhurst, Robert},
title = {The elements of typographic style},
year = 2019,
publisher= {Hartley \textampersand Marks, Publishers},
address = {Seattle},
edition = {Fourth edition (version 4.3)},
}
@book{rafaeli:book-typography,
author = {Rafaeli, Ari},
title = {Book Typography},
publisher = {Oak Knoll Press},
address = {New Castle, Delaware},
year = 2005,
}
@misc{butterick:practical-typography-ligatures,
author = {Butterick, Matthew},
title = {Practical typography. Chapter: Ligatures},
edition = 2,
url = {https://practicaltypography.com/ligatures.html},
}
@electronic{taraborelli:beauty,
author = {Taraborelli, Dario},
year = {2015},
url = {https://nitens.org/w/latex/},
title = {The Beauty of LaTeX},
}
@book{knuth:texbook,
author = {Knuth, Donald E.},
title = {The TeXbook},
year = 1996,
publisher = {Addison-Wesley},
address = {Reading, Massachusetts}
}
@misc{rmligs,
author = {Jacke, Björn},
url = {https://www.ctan.org/pkg/rmligs},
year = {2012},
title = {rmligs},
howpublished = {Version 0.87},
}
@misc{maier:check-ligatures,
url = {https://gist.github.com/denismaier/eb2d6301ef273c80c98c228e1d64323c},
title = {Check ligatures},
author = {Maier, Denis},
}
@misc{hagen:new-upload,
author = {Hagen, Hans},
title = {new upload},
year = {2021},
url = {https://www.mail-archive.com/ntg-context@ntg.nl/msg98035.html},
howpublished = {Message on the \CONTEXT\ mailing list, 2021/03/21},
}
@misc{selnolig:manual,
author = {Loretan, Mico},
title = {The selnolig package: Selective suppression of typographic ligatures},
year = {2015}, %
howpublished = {Manual of the selnolig package for Lua\LaTeX. Version from 2015/10/26},
url ={http://mirrors.ctan.org/macros/luatex/latex/selnolig/selnolig.pdf},
}
@misc{loretan:stackexchange:ligs,
author = {Loretan, Mico},
title = {Answer to: When should I not use a ligature in English typesetting?},
url = {https://english.stackexchange.com/a/50957/22099},
howpublished = {Forum post, last edited 2012/04/24},
year = {2012},
}
@misc{selnolig:package,
author = {Loretan, Mico},
title = {selnolig},
year = {2015},
howpublished = {Lua\LaTeX package, version 0.302, 2015/10/26},
url ={https://www.ctan.org/pkg/selnolig},
}
@misc{babel:ngerman,
title = {Babel support for the German language (post-1996 orthography)},
author = {Braams, Johannes and Raichle, Bernd and Schmidt, Walter and Spitzmüller, Jürgen},
year = {2021},
version = {v2.13 (2021/02/27)},
url = {http://mirrors.ctan.org/macros/latex/contrib/babel-contrib/german/ngermanb.pdf},
}
@inproceedings{goldhahn-etal-2012-building,
title = "Building Large Monolingual Dictionaries at the {L}eipzig Corpora Collection: From 100 to 200 Languages",
author = "Goldhahn, Dirk and
Eckart, Thomas and
Quasthoff, Uwe",
booktitle = "Proceedings of the Eighth International Conference on Language Resources and Evaluation ({LREC}'12)",
month = may,
year = "2012",
address = "Istanbul, Turkey",
publisher = "European Language Resources Association (ELRA)",
url = "http://www.lrec-conf.org/proceedings/lrec2012/pdf/327_Paper.pdf",
pages = "759--765",
}
[-- Attachment #3: Type: text/plain, Size: 496 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: error with sbl bibliography on latest LMTX
2022-07-08 15:17 error with sbl bibliography on latest LMTX Henning Hraban Ramm via ntg-context
@ 2022-07-09 12:19 ` Joey McCollum via ntg-context
0 siblings, 0 replies; 2+ messages in thread
From: Joey McCollum via ntg-context @ 2022-07-09 12:19 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Joey McCollum
[-- Attachment #1.1: Type: text/plain, Size: 10717 bytes --]
Sorry, these are definitely errors on my part. The first one ("invalid
parent sbl:list:title:unpublished for sbl:list:title:thesis,
sbl:list:title:unpublished defined too") was thankfully an easy fix; I just
had to move \definebtx[sbl:\s!list:title:unpublished] before
\definebtx[sbl:\s!list:title:thesis]. I've now pushed this change to the
repo at https://github.com/jjmccollum/context-sbl.
The second error ("Undefined control sequence \currentbtxloctext") is
unfortunately more puzzling. In an effort to preserve backward
compatibility with biblatex usage, I focused on implementing citations in
the SBL style using \autocite, \inlinecite, \parencite, and \footcite
commands, and I neglected to see if the ConTeXt \cite command would work as
expected.
The \currentbtxloctext macro is used for handling more complicated
situations regarding volume, part, page number, etc. citations; for the
purposes of your MWE (and for most citations) a righttext with the page
number citation should also work just fine, so the lack of a loctext
parameter in the \cite command shouldn't be a problem. The
\currentbtxloctext macro is defined in most of the btx:sbl:cite setups in
publ-imp-sbl.mkvi, always via the command
```
\def\currentbtxloctext{\btxparameter{loctext}}
```
The default value of this parameter and similar ones should be \empty, per
the \definebtx[sbl] command in publ-imp-sbl.mkvi:
```
\definebtx
[sbl]
[
...
lefttext=\empty, % empty by default
altloctext=\empty, %empty by default
loctext=\empty, %empty by default
righttext=\empty, % empty by default
punct=\empty, % trailing punctuation (empty by default)
...
]
```
If I've coded this correctly, then the loctext parameter should default to
\empty when you do not specify it for your \cite command. This seems to be
the case when you first invoke the \cite command (i.e., in the
btx:sbl:cite:footnote setup).
Here is the problem: if you invoke the btx:sbl:cite:inline setup from
inside the btx:sbl:cite:footnote setup, it seems that the loctext parameter
is no longer accessible, and thus, it does not get defined. If I patch the
btx:sbl:cite:footnote setup as follows, then I no longer get the "Undefined
control sequence \currentbtxloctext" error:
```
% Inline footnote citation setup (with intelligent trailing punctuation
replacement)
\startsetups btx:sbl:cite:footnote
\removeunwantedspaces
\doifinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}}
\begingroup
\letbtxparameter{punct}\empty % don't pass the trailing punctuation down
to the inline setup
\let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this
necessary? For some reason, \btx_sbl_doifendswithpunctelse is not
recognized within the footnote environment...
\def\currentbtxcitealternative{footnote}
\def\currentbtxcategory{\btxfield{category}}
\def\currentbtxloctext{\btxparameter{loctext}}
\def\currentbtxaltloctext{\btxparameter{altloctext}}
\startfootnote
\Word{\fastsetup{btx:sbl:cite:inline}}% capitalize the first word in
the footnote (needed to render "Ibid." and "Idem" correctly)
% Add a closing period if there is no righttext
\doif{\btxparameter{righttext}}{\empty} {
\btxperiod
}
\stopfootnote
\endgroup
\doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}}
\stopsetups
```
But I still get errors involving other macros that now appear to be
undefined—specifically, the \btxsblshorthandbeforeloctext macro (and,
likely, the \btxsblvolumebeforeloctext macro, as well). These are initially
defined as "no" in the SBL style module outside of the various citation
alternative setups, but they are conditionally redefined as "yes" in these
setups based on specific information in the bibliographic entry.
This pattern suggests a bigger problem. Do these variables and the \cite
parameters fall out of scope when we enter a footnote environment inside a
setup? In my code, I noticed that a macro defined outside of the
btx:sbl:cite:footnote setup was unrecognized within the footnote
environment unless I freshly redefined it:
```
\let\doifendswithpunctelse\btx_sbl_doifendswithpunctelse % why is this
necessary? For some reason, \btx_sbl_doifendswithpunctelse is not
recognized within the footnote environment...
```
Meanwhile, if I change the default citation alternative to "inline" or
"paren", then everything works:
```
\usebtxdataset[default][references.bib]
\setupbtx[dataset=default]
\usebtxdefinitions[sbl]
\setupbtx[sbl:cite][alternative=paren] % or alternative=inline
\setupinteraction[state=start]
\starttext
superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty].
Therefore, the {\TEX}book mentions that the word
\quotation{shel\noligature{ff}ul} should indeed be rendered without the
ff-ligature \cite[righttext={p.~19}][knuth:texbook].
\placelistofpublications%[numbering=yes]
\stoptext
```
I realize that the above "fix" does not truly solve the problem, but to
make the default footnote style citation of SBL style work, I need to
understand what is going on between the footnote environment and the setup
containing it. I asked a similar question last year in the "Why are
endnotes not working with ConTeXt-SBL?" thread (
https://www.mail-archive.com/ntg-context@ntg.nl/msg100920.html), but no one
ever got back to me on it. The issues may be related.
One final note: ideally, I would just define footnote citations to follow
the inline style, similar to how publ-imp-chicago.mkvi defines footnote
citations to follow the entry style. The definition to do this is already
in place in publ-imp-sbl.mkvi:
```
\definebtx
[sbl:\s!cite:footnote]
[sbl:\s!cite:inline]
```
Unfortunately, this definition does nothing, since the btx:cite:footnote
setup in publ-imp-cite.mkvi is hardcoded to use the "entry" setup:
```
\startsetups \s!btx:\s!cite:footnote
\startfootnote
\fastsetup{btx:cite:entry}
\stopfootnote
\stopsetups
```
This is why I needed to override the footnote citation style in
publ-imp-sbl.mkvi. Unfortunately, as we've already seen, work still needs
to be done to make this work more robustly, and I need help figuring it out.
Joey
On Sat, Jul 9, 2022 at 1:17 AM Henning Hraban Ramm via ntg-context <
ntg-context@ntg.nl> wrote:
> Hi Joel (et al.),
>
> I tried the SBL bibliography setup with the latest LMTX; the example and
> bib database are from Dennis’ article on ligatures in the upcoming CG
> journal:
>
> """
> \usebtxdataset[default][references.bib]
> \setupbtx[dataset=default]
> \usebtxdefinitions[sbl]
> \setupinteraction[state=start]
>
> \starttext
>
> superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty].
>
> Therefore, the {\TEX}book mentions that the word
> \quotation{shel\noligature{ff}ul} should indeed be rendered without the
> ff-ligature \cite[righttext={p.~19}][knuth:texbook].
>
> \placelistofpublications%[numbering=yes]
>
> \stoptext
> """
>
> Unfortunately, I get some errors, while it works with APS and APA:
>
> -- invalid parent sbl:list:title:unpublished for sbl:list:title:thesis,
> sbl:list:title:unpublished defined too (best check it)
> -- Undefined control sequence \currentbtxloctext
>
> I installed your files in TEXMFHOME, and apparently, ConTeXt can find
> them. Here’s the shortened log:
>
> system > ConTeXt ver: 2022.05.11 11:36 LMTX fmt: 2022.7.4
> int: english/english
> ...
> open source > level 1, order 2, name './bibtest.tex'
> publications > adding bib data to set 'default' from source
> 'references.bib'
> open source > level 2, order 3, name
> '/Users/hraban/texmf/context/context-sbl/tex/publ-imp-sbl.mkvi'
> system > error: invalid parent sbl:list:title:unpublished for
> sbl:list:title:thesis, sbl:list:title:unpublished defined too (best
> check it)
> close source > level 2, order 3, name
> '/Users/hraban/texmf/context/context-sbl/tex/publ-imp-sbl.mkvi'
> ...
> publications > analyzing previous publication run for 'default'
> tex error > tex error on line 34 in file ./bibtest.tex: Undefined
> control sequence \currentbtxloctext
>
> <macro> \22>:btx:sbl:cite:inline
> #1->\fastsetup {\s!btx :\s!cite :concat}\fastsetup
> {btx:sbl:cite:lefttext}\begingroup \letbtxparameter {punct}\empty \def
> \currentbtxcitealternative {inline}\def \currentbtxcategory {\btxfield
> {category}}\def \currentbtxloctext
> {\btxparameter {loctex
> <macro> \normalexpanded
> \Word {\fastsetup {btx:sbl:cite:inline}
> }\doif {\btxparameter {righttext}}{\empty } {\btxperiod }
> <macro> \strc_constructions_register_yes
> ...constructionparameter \c!referencetext }\iflocation \ifempty
> \currentconstructionbookmark \begingroup \simplifycommands \xdef
> \currentconstructionbookmark {\detokenize \expandafter {\normalexpanded
> {\constructionparameter \c!title
> }}}\endgroup ...
> <macro> \strc_notations_start_reference_indeed
> [#1]#*#2->\strc_constructions_register [][\c!label
> ={\descriptionparameter \c!text },\c!reference ={#1},\c!title
> ={#2},\c!bookmark =,\c!list =,\c!referencetext =]
> \strc_notations_wrapup
> <macro> \22>:btx:sbl:cite:footnote
> ...ct}}\begingroup \letbtxparameter {punct}\empty \let
> \doifendswithpunctelse \btx_sbl_doifendswithpunctelse \startfootnote
> \Word {\fastsetup {btx:sbl:cite:inline}}\doif {\btxparameter
> {righttext}}{\empty } {\btxperiod }\stopfootnote
> \endgroup \do ...
> <lua output>
> ...
>
> <line 3.9>
> superior typographic output \cite[lefttext={e.g.}][taraborelli:beauty]
> .
>
> The control sequence at the end of the top line of your error message
> was never
> \def'ed. You can just continue as I'll forget about whatever was undefined.
> mtx-context | fatal error: return code: 1
>
>
> Did I do something wrong, is the database not suitable for SBL, or is it
> a bug?
>
>
> Hraban
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 13575 bytes --]
[-- Attachment #2: Type: text/plain, Size: 496 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-09 12:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 15:17 error with sbl bibliography on latest LMTX Henning Hraban Ramm via ntg-context
2022-07-09 12:19 ` Joey McCollum via ntg-context
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).