[NTG-context] How to place text, but make it completely hidden from viewers?
I have found a few situations is confusing/breaking ConTeXt: - Footnotes inside tables, figures, frames, margins (won't render the cited item). - Custom index items inside those items (displays "entry not flushed"). My workaround has been to define a size 0 font \tfz, then put it in a block like this: {\tfz% \starteffect[hidden]% \cite[author1912] \stopeffect% }% The problem this seems to create, is sometimes if placed between two passages, it interprets a need to create two paragraph breaks: \input knuth {\tfz% \starteffect[hidden]% \cite[author1912] \stopeffect% }% \input knuth It creates a paragraph break after the first knuth, then another after the hidden text, thereby creating a "double spaced" break between two paragraphs. Note the above code is used in many macros, so I don't have full control always where it appears, but its making the double-spaced break everywhere. Is there either (1) something can enter before this code that essentially has the effect of "backup to the previous paragraph" or (2) some other method of hiding text that makes it present on the page, but just not visible to the reader, that won't create a double spaced break, or take up any space what-so-ever? --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
I solved it, although it's kinda hacky. I'm pretty sure that publications.citevariants.short is not meant to be called directly. Do you know why `context.getdetail(dataset, tag, "author")` does not work in render_cite? It always returns nil. ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] \setupbtxlist[aps][ alternative=b, distance=.5em, ] \definebtx[aps:cite:special][aps:cite] \startluacode function render_cite(dataset, tag, righttext) local luadata = publications.datasets[dataset].luadata local entry = luadata[tag] local extrasign = "" if entry.author:lower():find("knuth") then extrasign = ">" end context("[" .. extrasign) print(righttext) publications.citevariants.short({dataset = dataset, reference = tag, variant = "short", righttext = righttext}) context("]") end \stopluacode \startsetups btx:aps:cite:special \btxcitereference \ctxlua{render_cite([==[\currentbtxdataset]==], [==[\currentbtxtag]==], [==[\currentbtxrighttext]==])} \stopsetups \setupbtx[aps:cite][alternative=special] \starttext \def\comma{,} Knuth developed \TeX~\cite[knuth1] Several persons said something~\cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` Gerion Am Dienstag, 23. April 2024, 16:03:50 MESZ schrieb Gerion Entrup: > Here is a solution for the first part of my question. This is based on > https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html > and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi: > > It display now the citation _and_ numbering labels in the short form: > ``` > \setupinteraction[state=start] > > \startbuffer[testdata] > @Book{knuth1, > author = {Donald E. Knuth}, > title = {TEX and METAFONT. New directions in typesetting}, > year = {1979}, > publisher = {Addison-Wesley}, > } > @Article{someother, > author = {Some Person and Some Otherperson}, > title = {Another title}, > year = {1900}, > } > \stopbuffer > > % enable tracing > \enabletrackers[publications, publications.crossref, publications.details, > publications.cite, publications.strings] > > \usebtxdataset[main][testdata.buffer] > \usebtxdefinitions[aps] > \setupbtx[dataset=main] > \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] > \setupbtxlist[aps][ > alternative=b, > distance=.5em, > ] > \setupbtx[aps:cite][alternative=short] > > \starttext > > Knuth developed \TeX \cite[knuth1] > Several persons said something \cite[someother]. > > \placelistofpublications[bibrendering] > > \stoptext > ``` > > The remaining part now is to mark publications of Knuth in a different way. > I have tried this and failed. Here is my code so far: > ``` > \startluacode > function render_cite(short, author) > print(author) > if author:lower():find("knuth") then > context("[>" .. short .. "]") > else > context("[" .. short .. "]") > end > end > \stopluacode > \definebtx[aps:cite:special][aps:cite] > \startsetups btx:aps:cite:special > \btxcitereference > \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])} > \stopsetups > % use it with \cite[special][knuth1] > ``` > This has several problems: > - \btxflush{short} does not work as I expected that. How can I get the short > form? > - \btxflush to pass arguments to lua does not work as intended. On the lua > side the >variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. > Knuth". >How can I pass the data? > > I use Lua only because I find it more convenient as a programming language. > If a > plain tex solution is simpler, I'm happy to use that. > > > Another question that came up while studying the source code: > What effect have \c!, \s!, and \v!? These commands exist a lot in the above > cited files. > > Gerion > > > Am Mittwoch, 17. Ap
[NTG-context] Re: Why don't footnotes appear in floats or figures?
Okay, I've been trying many things with this \startpostponing code--if I understand what's happening, its moving the figures to a later page. I'm not sure that's quite ideal, its not fully working with my actual documents, and leaves lots of empty white space, when I'm already in a situation where I need to reduce page count. So I thought an alternative route: (1) have a code that checks "what is current footnote number?" that sets that as a variable \def\currentfoodnote{\somevariableincontextthatgetsfoodnotenumber} (2) adjust my placefigure macro such that the footnote is outside the placefigure, but color it white so its invisible: \define\showafigure{ \cite[author2019]<--somehow hide this invisible \placefigure{Caption\superscript{\currentfootnote}}}{\externalfigure[cow][width=\textwidth]} <--this places a superscript number inside the caption, but it isn't the true marker(3) in the caption, place a superscript number with value to \currentfootnoteIts basically a fake footnote, just a superscript number of the same value as the real footnote. Shouldn't this result work? Any idea how I can get current footnote value? --Joel On Monday, April 22, 2024 at 07:22:24 AM MDT, vm via ntg-context wrote: On 22/04/2024 14:38, Joel via ntg-context wrote: > Is this the correct way to be using the \startpostponing code (see > example below)? > > \starttext > \input knuth > \startpostponing > \placefigure{Caption\footnote{message > A}}{\externalfigure[cow][width=\textwidth]} > \stoppostponing > \stoppostponing double stop ? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
Here is a solution for the first part of my question. This is based on https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi: It display now the citation _and_ numbering labels in the short form: ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] \setupbtxlist[aps][ alternative=b, distance=.5em, ] \setupbtx[aps:cite][alternative=short] \starttext Knuth developed \TeX \cite[knuth1] Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` The remaining part now is to mark publications of Knuth in a different way. I have tried this and failed. Here is my code so far: ``` \startluacode function render_cite(short, author) print(author) if author:lower():find("knuth") then context("[>" .. short .. "]") else context("[" .. short .. "]") end end \stopluacode \definebtx[aps:cite:special][aps:cite] \startsetups btx:aps:cite:special \btxcitereference \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])} \stopsetups % use it with \cite[special][knuth1] ``` This has several problems: - \btxflush{short} does not work as I expected that. How can I get the short form? - \btxflush to pass arguments to lua does not work as intended. On the lua side the variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. Knuth". How can I pass the data? I use Lua only because I find it more convenient as a programming language. If a plain tex solution is simpler, I'm happy to use that. Another question that came up while studying the source code: What effect have \c!, \s!, and \v!? These commands exist a lot in the above cited files. Gerion Am Mittwoch, 17. April 2024, 15:44:12 MESZ schrieb Gerion Entrup: > Hi, > > > The APS style is an example of a number-based citation system. As you > > are looking for a tag-based citation, it might be better to start with > > something like the APA style. > > I'm kind of satisfied with the publication-list layout of the APS style so I > chose > this as a base. If it is simpler to start with the APA style, I can do that. > > My hope is that it is possible to just change the "label" that is used for > referencing and keep everything else as is. > > > Is there some specification for your short tag-based citation style? > > biblatex implements this with the "alphabetic" style. I'm not aware of > a specification, though. Does the "short" form in ConTeXt exist for a > specific reason? :) > > Gerion > > > On Tue, 16 Apr 2024 06:04:35 +0200 > > Gerion Entrup wrote: > > > > > Hi, > > > > > > I'm trying to customize a cite format in a bibliography. Currently, > > > I'm using the aps style which fits so far, except of the plain number > > > as reference. In concrete, I want to change the following: > > > - Use the first letter of the last name and the year as reference > > > (this should be exactly the short form). It is more less also > > > described here [1]. > > > - Highlight publications of a certain author with an extra char (e.g. > > > '>') > > > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > > should be highlighted): ``` > > > \setupinteraction[state=start] > > > > > > \startbuffer[testdata] > > > @Book{knuth1, > > > author = {Donald E. Knuth}, > > > title = {TEX and METAFONT. New directions in typesetting}, > > > year = {1979}, > > > publisher = {Addison-Wesley}, > > > } > > > @Article{someother, > > > author = {Some Person and Some Otherperson}, > > > title = {Another title}, > > > year = {1900}, > > > } > > > \stopbuffer > > > > > > % enable tracing > > > \enabletrackers[publications, publications.crossref, > > > publications.details, publications.cite, publications.strings]
[NTG-context] Re: Why are ConTeXt-SBL endnotes empty?
Changing location=none to location=text still left me with the bullet points appearing in a big list at the end of my chapter, but without any messages in them. On Monday, April 22, 2024 at 07:54:39 AM MDT, Joel via ntg-context wrote: A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to compile. I'm forced to try again (due to some other issue with footnotes), and instead of compiling to error, it compiles, but the footnote's message ends up being empty. Why is it appearing empty? Is there a fix? Here is a minimum working example: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why are ConTeXt-SBL endnotes empty?
See here : https://wiki.contextgarden.net/Footnotes Jean-Pierre > Le 22 avr. 2024 à 16:47, Pablo Rodriguez via ntg-context > a écrit : > > On 4/22/24 15:51, Joel via ntg-context wrote: >> A few years back, I tried using endnotes with ConTeXt-SBL, and it failed >> to compile. I'm forced to try again (due to some other issue with >> footnotes), and instead of compiling to error, it compiles, but the >> footnote's message ends up being empty. >> >> Why is it appearing empty? Is there a fix? > > Hi Joel, > > the bibliography part doesn’t work for me at all. > > But notes may be placed as their location is text (and you add a real > footnote). > > This works fine: > > \setupnote[footnote][location=text] > > \starttext > \input knuth > \footnote{Footnote} > \cite[clark1989] > > \placenotes[footnote] > > \startchapter[title=Bibliography] > \placelistofpublications > \stopchapter > \stoptext > > I never used a bibliography in ConTeXt, so that part is left to you. > > I hope it helps, > > Pablo > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why are ConTeXt-SBL endnotes empty?
On 4/22/24 15:51, Joel via ntg-context wrote: > A few years back, I tried using endnotes with ConTeXt-SBL, and it failed > to compile. I'm forced to try again (due to some other issue with > footnotes), and instead of compiling to error, it compiles, but the > footnote's message ends up being empty. > > Why is it appearing empty? Is there a fix? Hi Joel, the bibliography part doesn’t work for me at all. But notes may be placed as their location is text (and you add a real footnote). This works fine: \setupnote[footnote][location=text] \starttext \input knuth \footnote{Footnote} \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext I never used a bibliography in ConTeXt, so that part is left to you. I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Why are ConTeXt-SBL endnotes empty?
A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to compile. I'm forced to try again (due to some other issue with footnotes), and instead of compiling to error, it compiles, but the footnote's message ends up being empty. Why is it appearing empty? Is there a fix? Here is a minimum working example: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Customize citation format of a bibliography (use the short form as reference format)
Hi, > The APS style is an example of a number-based citation system. As you > are looking for a tag-based citation, it might be better to start with > something like the APA style. I'm kind of satisfied with the publication-list layout of the APS style so I chose this as a base. If it is simpler to start with the APA style, I can do that. My hope is that it is possible to just change the "label" that is used for referencing and keep everything else as is. > Is there some specification for your short tag-based citation style? biblatex implements this with the "alphabetic" style. I'm not aware of a specification, though. Does the "short" form in ConTeXt exist for a specific reason? :) Gerion > On Tue, 16 Apr 2024 06:04:35 +0200 > Gerion Entrup wrote: > > > Hi, > > > > I'm trying to customize a cite format in a bibliography. Currently, > > I'm using the aps style which fits so far, except of the plain number > > as reference. In concrete, I want to change the following: > > - Use the first letter of the last name and the year as reference > > (this should be exactly the short form). It is more less also > > described here [1]. > > - Highlight publications of a certain author with an extra char (e.g. > > '>') > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > should be highlighted): ``` > > \setupinteraction[state=start] > > > > \startbuffer[testdata] > > @Book{knuth1, > > author = {Donald E. Knuth}, > > title = {TEX and METAFONT. New directions in typesetting}, > > year = {1979}, > > publisher = {Addison-Wesley}, > > } > > @Article{someother, > > author = {Some Person and Some Otherperson}, > > title = {Another title}, > > year = {1900}, > > } > > \stopbuffer > > > > % enable tracing > > \enabletrackers[publications, publications.crossref, > > publications.details, publications.cite, publications.strings] > > > > \usebtxdataset[main][testdata.buffer] > > \usebtxdefinitions[aps] > > \setupbtx[dataset=main] > > \definebtxrendering[bibrendering][aps][dataset=main] > > > > % this seems to have no effect? > > \setupbtx[alternative=short] > > > > \starttext > > > > Knuth developed \TeX \cite[knuth1]. > > Several persons said something \cite[someother]. > > > > \placelistofpublications[bibrendering] > > > > \stoptext > > ``` > > > > It should be rendered as: > > ``` > > Knuth developed TeX [>Knu79]. > > Several persons said something [PO00]. > > > > [Knu79] D.E. Knuth, TEX and METAFONT. New directions in > > typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. > > Otherperson, Another title, (1900). ``` > > > > How can I achieve that \cite[something] always renders in the short > > form by default? How can I customize that references to Knuth contain > > this extra '>'? How can I customize the APS style to also use the > > short form in the list of publications instead of numbers? > > > > Best > > Gerion > > > > [1] > > https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Customize citation format of a bibliography (use the short form as reference format)
Hello, The APS style is an example of a number-based citation system. As you are looking for a tag-based citation, it might be better to start with something like the APA style. Is there some specification for your short tag-based citation style? Alan On Tue, 16 Apr 2024 06:04:35 +0200 Gerion Entrup wrote: > Hi, > > I'm trying to customize a cite format in a bibliography. Currently, > I'm using the aps style which fits so far, except of the plain number > as reference. In concrete, I want to change the following: > - Use the first letter of the last name and the year as reference > (this should be exactly the short form). It is more less also > described here [1]. > - Highlight publications of a certain author with an extra char (e.g. > '>') > > Here is a minimal example (lets assume, every occurrence of Knuth > should be highlighted): ``` > \setupinteraction[state=start] > > \startbuffer[testdata] > @Book{knuth1, > author = {Donald E. Knuth}, > title = {TEX and METAFONT. New directions in typesetting}, > year = {1979}, > publisher = {Addison-Wesley}, > } > @Article{someother, > author = {Some Person and Some Otherperson}, > title = {Another title}, > year = {1900}, > } > \stopbuffer > > % enable tracing > \enabletrackers[publications, publications.crossref, > publications.details, publications.cite, publications.strings] > > \usebtxdataset[main][testdata.buffer] > \usebtxdefinitions[aps] > \setupbtx[dataset=main] > \definebtxrendering[bibrendering][aps][dataset=main] > > % this seems to have no effect? > \setupbtx[alternative=short] > > \starttext > > Knuth developed \TeX \cite[knuth1]. > Several persons said something \cite[someother]. > > \placelistofpublications[bibrendering] > > \stoptext > ``` > > It should be rendered as: > ``` > Knuth developed TeX [>Knu79]. > Several persons said something [PO00]. > > [Knu79] D.E. Knuth, TEX and METAFONT. New directions in > typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. > Otherperson, Another title, (1900). ``` > > How can I achieve that \cite[something] always renders in the short > form by default? How can I customize that references to Knuth contain > this extra '>'? How can I customize the APS style to also use the > short form in the list of publications instead of numbers? > > Best > Gerion > > [1] > https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname -- Alan Braslau 816 West Mountain Avenue Fort Collins, CO 80521 USA mobile: (970) 237-0957 Conserve energy! ;-) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Customize citation format of a bibliography (use the short form as reference format)
Hi, I'm trying to customize a cite format in a bibliography. Currently, I'm using the aps style which fits so far, except of the plain number as reference. In concrete, I want to change the following: - Use the first letter of the last name and the year as reference (this should be exactly the short form). It is more less also described here [1]. - Highlight publications of a certain author with an extra char (e.g. '>') Here is a minimal example (lets assume, every occurrence of Knuth should be highlighted): ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main] % this seems to have no effect? \setupbtx[alternative=short] \starttext Knuth developed \TeX \cite[knuth1]. Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` It should be rendered as: ``` Knuth developed TeX [>Knu79]. Several persons said something [PO00]. [Knu79] D.E. Knuth, TEX and METAFONT. New directions in typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. Otherperson, Another title, (1900). ``` How can I achieve that \cite[something] always renders in the short form by default? How can I customize that references to Knuth contain this extra '>'? How can I customize the APS style to also use the short form in the list of publications instead of numbers? Best Gerion [1] https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] BUG: colour spilling in btxrendering
Dear list, It seems with one of the latest lmtx this old reported issue (https://www.mail-archive.com/ntg-context@ntg.nl/msg84988.html) is back. MWE: \setupinteraction[state=start,color=red,style=] \setupbtx[aps:cite][alternative=entry] \usebtxdefinitions[aps] \startbuffer [bib] @ARTICLE{67533, author={De Doncker, R.W.A.A. and Divan, D.M. and Kheraluwala, M.H.}, journal={IEEE Transactions on Industry Applications}, title={A three-phase soft-switched high-power-density DC/DC converter for high-power applications}, year={1991}, volume={27}, number={1}, pages={63-73}, keywords={DC-DC power converters;Resonance;Switching frequency;Inverters;Filters;Snubbers;Circuit topology;Thyristors;Switching converters;Industry Applications Society}, doi={10.1109/28.67533}} } \stopbuffer \usebtxdataset [bib.buffer] \starttext \cite[alternative=entry][67533] \startnointerference \placelistofpublications \stopnointerference \stoptext A. Christe ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: bibliography questions
Sorry, pandoc, not procmail.On Oct 5, 2023 09:05, Rik Kabel wrote:On Oct 3, 2023 16:32, Henning Hraban Ramm wrote:Am 03.10.23 um 02:02 schrieb Alan Braslau: > On Mon, 2 Oct 2023 13:13:52 +0200 > Henning Hraban Ramm wrote: > >> Consider: >> @Book {rattenhka, >> author = "Bettina von Arnim and Gisela von Arnim", >> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns", >> … >> } >> >> The authors are usually given as “Bettina and Gisela von Arnim” >> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers >> or “Bettina and Achim von Arnim” as a couple) – is there a good >> solution for related authors? > > Multiple authors should be treated as multiple authors. That they are > related is not and should not be a consideration in citing works. At > least this is the practice that I know of for academic texts. > > You can cheat and try to define one author with a combined first name, > like > author={Eames, Ray & Earl}, > but I don't know how that parses as I have never tried it; "and" is a > reserved token used to define multiple authors. I wouldn't do it as I > can think of many examples (Bjaer & Bjaer) where we give both credit, > individually. Thank you. It seems like database solutions like BibTeX & Cie are generally not suitable for quoting books as they were published – and that’s important in the contexts of “my” authors (literary studies, history). For my ConTeXt book, I thought it would make sense, and I would jump through some hoops just to use the system, but – most sources that I want to list are never quoted (method=dataset) – I would need to define my own rendering, e.g. don’t like the handling of names – I need additional fields (custom rendering again) – if I refer to sources, I want a URL or file path in a footnote (custom cite wrapper macro) This all works fine without the btx subsysten (I just need to find solutions for some edge cases, or avoid them), so I probably had wrong ideas about bibliographies (at least in TeX). OTOH, for my novel I can use the bib database approach for an extended person register; the required rendering is much less involved. Hraban ___I got around this issue by generating ConTeXt source with procmail, my bib file, and a slightly customized CSL file. This gives me a bibliography that I modify with a Vim script to handle special cases as you describe, all controlled by a makefile. I insert the result into my document instead of using placebiographyI can provide more details if there is interest once I return home from travels.-- Rik___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: bibliography questions
On Oct 3, 2023 16:32, Henning Hraban Ramm wrote:Am 03.10.23 um 02:02 schrieb Alan Braslau: > On Mon, 2 Oct 2023 13:13:52 +0200 > Henning Hraban Ramm wrote: > >> Consider: >> @Book {rattenhka, >> author = "Bettina von Arnim and Gisela von Arnim", >> title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns", >> … >> } >> >> The authors are usually given as “Bettina and Gisela von Arnim” >> (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers >> or “Bettina and Achim von Arnim” as a couple) – is there a good >> solution for related authors? > > Multiple authors should be treated as multiple authors. That they are > related is not and should not be a consideration in citing works. At > least this is the practice that I know of for academic texts. > > You can cheat and try to define one author with a combined first name, > like > author={Eames, Ray & Earl}, > but I don't know how that parses as I have never tried it; "and" is a > reserved token used to define multiple authors. I wouldn't do it as I > can think of many examples (Bjaer & Bjaer) where we give both credit, > individually. Thank you. It seems like database solutions like BibTeX & Cie are generally not suitable for quoting books as they were published – and that’s important in the contexts of “my” authors (literary studies, history). For my ConTeXt book, I thought it would make sense, and I would jump through some hoops just to use the system, but – most sources that I want to list are never quoted (method=dataset) – I would need to define my own rendering, e.g. don’t like the handling of names – I need additional fields (custom rendering again) – if I refer to sources, I want a URL or file path in a footnote (custom cite wrapper macro) This all works fine without the btx subsysten (I just need to find solutions for some edge cases, or avoid them), so I probably had wrong ideas about bibliographies (at least in TeX). OTOH, for my novel I can use the bib database approach for an extended person register; the required rendering is much less involved. Hraban ___I got around this issue by generating ConTeXt source with procmail, my bib file, and a slightly customized CSL file. This gives me a bibliography that I modify with a Vim script to handle special cases as you describe, all controlled by a makefile. I insert the result into my document instead of using placebiographyI can provide more details if there is interest once I return home from travels.-- Rik___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: bibliography questions
Am 03.10.23 um 23:08 schrieb Aditya Mahajan: On Tue, 3 Oct 2023, Henning Hraban Ramm wrote: For my ConTeXt book, I thought it would make sense, and I would jump through some hoops just to use the system, but – most sources that I want to list are never quoted (method=dataset) – I would need to define my own rendering, e.g. don’t like the handling of names – I need additional fields (custom rendering again) – if I refer to sources, I want a URL or file path in a footnote (custom cite wrapper macro) When I have to write your own rendering, I find it more convenient to use XML/JSON (or even a lua table) as a starting format. I don’t understand how a custom rendering relates to the input database? My bib database is already complete, and I find the format much more comfortable to write than XML. 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 ___
[NTG-context] Re: bibliography questions
On Tue, 3 Oct 2023, Henning Hraban Ramm wrote: > For my ConTeXt book, I thought it would make sense, and I would jump through > some hoops just to use the system, but > – most sources that I want to list are never quoted (method=dataset) > – I would need to define my own rendering, e.g. don’t like the handling of > names > – I need additional fields (custom rendering again) > – if I refer to sources, I want a URL or file path in a footnote (custom cite > wrapper macro) When I have to write your own rendering, I find it more convenient to use XML/JSON (or even a lua table) as a starting format. Aditya___ 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 ___
[NTG-context] Re: bibliography questions
Am 03.10.23 um 02:02 schrieb Alan Braslau: On Mon, 2 Oct 2023 13:13:52 +0200 Henning Hraban Ramm wrote: Consider: @Book {rattenhka, author = "Bettina von Arnim and Gisela von Arnim", title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns", … } The authors are usually given as “Bettina and Gisela von Arnim” (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers or “Bettina and Achim von Arnim” as a couple) – is there a good solution for related authors? Multiple authors should be treated as multiple authors. That they are related is not and should not be a consideration in citing works. At least this is the practice that I know of for academic texts. You can cheat and try to define one author with a combined first name, like author={Eames, Ray & Earl}, but I don't know how that parses as I have never tried it; "and" is a reserved token used to define multiple authors. I wouldn't do it as I can think of many examples (Bjaer & Bjaer) where we give both credit, individually. Thank you. It seems like database solutions like BibTeX & Cie are generally not suitable for quoting books as they were published – and that’s important in the contexts of “my” authors (literary studies, history). For my ConTeXt book, I thought it would make sense, and I would jump through some hoops just to use the system, but – most sources that I want to list are never quoted (method=dataset) – I would need to define my own rendering, e.g. don’t like the handling of names – I need additional fields (custom rendering again) – if I refer to sources, I want a URL or file path in a footnote (custom cite wrapper macro) This all works fine without the btx subsysten (I just need to find solutions for some edge cases, or avoid them), so I probably had wrong ideas about bibliographies (at least in TeX). OTOH, for my novel I can use the bib database approach for an extended person register; the required rendering is much less involved. 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 ___
[NTG-context] bibliography questions
My example is setup as advised in the manual: """ %\mainlanguage[de] \usebtxdataset[beispiel][bib_example.bib] \setupbtx[dataset=beispiel] %\usebtxdefinitions[apa] \definebtxrendering[beispiel][apa][dataset=beispiel,group=beispiele] \starttext \placelistofpublications[beispiel] \cite[authoryear] [WiFo2010] \cite[authoryear] [rattenhka] \stoptext """ But I get the error message: """ system > error: invalid parent apa for beispiel, apa defined too (best check it) system > error: invalid parent btx:apa for btx:beispiel, btx:apa defined too (best check it) """ Are these messages wrong? And why do they come from "system" and not from "publications"? My minimal example works anyway, still investigating why it doesn’t in my book. Another question: Consider: @Book {rattenhka, author = "Bettina von Arnim and Gisela von Arnim", title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns", … } The authors are usually given as “Bettina and Gisela von Arnim” (mother and daughter; similar “Jacob and Wilhelm Grimm” as brothers or “Bettina and Achim von Arnim” as a couple) – is there a good solution for related authors? Hraban @Book {WiFo2010, title = "Lesetypografie", author = "Willberg, Hans Peter and Forssman, Friedrich", publisher = "Hermann Schmidt", address = "Mainz", year = "2010", language = "german", keywords = "typography", } @Book {kgdz, author = "Stephen Hawking and Leonard Mlodinow", title = "Die kürzeste Geschichte der Zeit", title:en = "A Briefer History of Time", publisher = "Rowohlt", address = "Reinbek", year = "2005", language = "german", keywords = "physics;astromy;time", } @Book {rattenhka, author = "Bettina von Arnim and Gisela von Arnim", title = "Das Leben der Hochgräfin Gritta von Rattenzuhausbeiuns", editor = "Otto Mallon", publisher = "S. Martin Fraenkel", address = "Berlin", year = "1926", language = "german", keywords = "novel;historical", } ___ 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 ___
[NTG-context] Re: Better option for a macro with lots of arguments
On 8/23/2023 4:12 AM, Andres Conrado Montoya wrote: I have been using the following macro to add a bunch of sections to the start of chapters in a book, it works but I think is kind of weak: %%% \define[7]\metadatos{ \startsection[title={Resumen}] #1 \stopsection \startsection[title={Palabras clave}] #2 \stopsection \start \language[en] \startsection[title={Abstract}] #3 \stopsection \startsection[title={Keywords}] #4 \stopsection \stop \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}] \startsubsection[title={Apa}] #5 \stopsubsection \startsubsection[title={Chicago}] #6 \stopsubsection \startsubsection[title={MLA}] #7 \stopsubsection \stopsection } \starttext % Then I call the macro like this: \metadatos{spanish abstract \input knuth}{some, comma, separated, keywords, in, spanish}{english abstract \input knuth}{same, comma, separated, keywords, in, english}{Apa citation style for this article}{Chicago citation style for this article}{MLA citation style for this article} \stoptext %%% I've been exploring different ways to do it better, but with not much luck, I was thinking something based in key=value assignments? setups? datasets? Not really sure, but If you know a better solution or point me in the direction of something I can use to replace that macro, it would be greatly appreciated. \startsetups [document:start] \doifdocumentvariable {englishabstract} { \startsection[title={Resumen}] \documentvariable{englishabstract} \stopsection } \doifdocumentvariable {spanisabstract} { \startsection[title={Palabras clave}] \documentvariable{spanishabstract} \stopsection } ... \stopsetups \startbuffer english ... \stopbuffer \startbuffer spanish ... \stopbuffer \startsetups [document:stop] ... \stopsetups \startdocument [spanisabstract={\getbuffer[spanish]}, ] ... \stopdocument untested, just keyed in - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
[NTG-context] Better option for a macro with lots of arguments
I have been using the following macro to add a bunch of sections to the start of chapters in a book, it works but I think is kind of weak: %%% \define[7]\metadatos{ \startsection[title={Resumen}] #1 \stopsection \startsection[title={Palabras clave}] #2 \stopsection \start \language[en] \startsection[title={Abstract}] #3 \stopsection \startsection[title={Keywords}] #4 \stopsection \stop \startsection[title={¿Cómo citar este capítulo? / How to cite this book?}] \startsubsection[title={Apa}] #5 \stopsubsection \startsubsection[title={Chicago}] #6 \stopsubsection \startsubsection[title={MLA}] #7 \stopsubsection \stopsection } \starttext % Then I call the macro like this: \metadatos{spanish abstract \input knuth}{some, comma, separated, keywords, in, spanish}{english abstract \input knuth}{same, comma, separated, keywords, in, english}{Apa citation style for this article}{Chicago citation style for this article}{MLA citation style for this article} \stoptext %%% I've been exploring different ways to do it better, but with not much luck, I was thinking something based in key=value assignments? setups? datasets? Not really sure, but If you know a better solution or point me in the direction of something I can use to replace that macro, it would be greatly appreciated. -- Andrés Conrado Montoya Andi Kú andresconr...@gmail.com http://sesentaycuatro.com http://messier87.com http://chiquitico.org Los fines no justifican los medios, porque la medida verdadera de nuestro carácter está dada por los medios que estamos dispuestos a utilizar, no por los fines que proclamamos. “You develop an instant global consciousness, a people orientation, an intense dissatisfaction with the state of the world, and a compulsion to do something about it. From out there on the moon, international politics look so petty. You want to grab a politician by the scruff of the neck and drag him a quarter of a million miles out and say, ‘Look at that, you son of a bitch.’” — Apollo 14 astronaut Edgar Mitchell ___ 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 ___
[NTG-context] Enable interaction on custom apa cite variant
Hi, I would like a variant of cite per the APA specification that removes the bracket when quoted in mathematical definitions, theorems, etc. I could of course do it manually for reach using right= and left= but I didn't want to do it every time. I have come up with this MWE: \startbuffer[ref] @book{burago2022course, title={A course in metric geometry}, author={Burago, Dmitri and Burago, Yuri and Ivanov, Sergei}, volume={33}, year={2022}, publisher={American Mathematical Society} } \stopbuffer \setupinteraction[state=start, color=blue] \setupcolors[state=start] \usebtxdataset[ref.buffer] \usebtxdefinitions[apa] \definebtx [apa:cite:theorem] [apa:cite] \startsetups btx:apa:cite:theorem \btxflushauthorname{author} \btxcomma \btxflush{year} \fastsetup{btx:cite:righttext} \stopsetups \setupenumeration[ before={\blank[medium]}, after={\blank[medium]}, alternative=serried, right=, headcommand=\groupedcommand{}{.}, distance=0.5em, width=fit, headstyle=bold, titlestyle=bold, way=bytext, conversion=numbers, prefix=chapter, list=all, title=yes, indentnext=no, ] \defineenumeration[definition][ text=Defintion, style=normal, number=no, ] \starttext \startdefinition{\cite[righttext={{ p.\nbsp 1}}, alternative=theorem][burago2022course]} This is something \stopdefinition \startsubject[title={References}] \placelistofpublications \startsubject \stoptext The problem with this is that the citation is not interactive like it would be if I used apa:cite:authoryear and just removed the parentheses in the options. How do I get it to highlight blue and be interactive like the default behaviour when you turn on interaction? Also this is probably overkill so if there is a better way to achieve this... Jethro ___ 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 ___
[NTG-context] unsubscribe
tever is lowered, it brings that nonfrenchspacing right back on. >>> And if width increments occur, then it follows that any control sequence >>> kerning >>> also gets thrown off as a result. >> >> Of course the width influences the spacing. That is how the paragraph >> builder works (and really, why it often looks good). >> >>> >>> It seems so far, that with lmtx, any standalone file, document, minimal >>> working example that does not load cmr at the outset does not produce >>> an acceptable outcome either. By saying acceptable I meant to say it >>> namely from a typographical point of view. Nothing else. >> >> I have no clue of what you talk about here. >> >>> >>> from the TeXbook 380-381 >>> >>> «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired >>> changes to >>> \par before invoking \obeylines. (2) The \uncatcodespecials operation >>> changes a >>> space to category 12; but the \tt font has the character ‘␣’ in the ⟨space⟩ >>> position, so we >>> don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely >>> changes the >>> ⟨space⟩ character to category 13; active character ␣13 has been defined to >>> be the same >>> as \space, a macro that expands to ␣10 . This is usually what is desired; >>> for example, >>> it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t >>> cause any >>> trouble. But in our application it has an undesirable effect, because it >>> produces spaces >>> that are affected by the space factor. To defeat this feature, it’s >>> necessary either to >>> say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter >>> alternative is >>> better, because the former will discard spaces at the beginning of each >>> line.» >>> >>> «In theory, this seems like it ought to work; but in practice, it fails in >>> two ways. One >>> rather obvious failure—at least, it becomes obvious when the macro is >>> tested—is that >>> all the empty lines of the file are omitted. The reason is that the \par >>> command at the >>> end of an empty line doesn’t start up a new paragraph, because it occurs in >>> vertical >>> mode. The other failure is not as obvious, because it occurs much less >>> often: The \tt >>> fonts contain ligatures for Spanish punctuation, so the sequences ?‘ and !‘ >>> will be >>> printed as ¿ and ¡ respectively. Both of these defects can be cured by >>> inserting >>> >>> and >>> >>> >>> «When INITEX creates a brand new TEX, all characters have a space factor >>> code >>> of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. >>> (This >>> slight difference is what makes punctuation act differently after an >>> uppercase letter; do >>> you see why?) Plain TEX redefines a few of these codes using the \sfcode >>> primitive, >>> which is similar to \catcode (see Appendix B); for example, the instructions >>> \sfcode‘)=0 >>> \sfcode‘.=3000 >>> make right parentheses “transparent” to the space factor, while tripling >>> the stretcha- >>> bility after periods. The \frenchspacing operation resets \sfcode‘. to >>> 1000.» >> >> Everything you cite above is very likely true for plain TeX, but maybe >> not for ConTeXt... >> >> /Mikael >> >> PS I do not think that your emails come out well. In order to get >> help, I would suggest a strategy that not so much only sounds as >> nagging and complaints. One thing that has been lacking is a clear >> explanation of what you really try to achieve. >> ___ >> 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 >> ___ > > -- > You have a tendency to feel you are superior to most computers. > > ___ > 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 > ___ ___ 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 ___
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
; > > > «In theory, this seems like it ought to work; but in practice, it fails > > > in two ways. One > > > rather obvious failure—at least, it becomes obvious when the macro is > > > tested—is that > > > all the empty lines of the file are omitted. The reason is that the \par > > > command at the > > > end of an empty line doesn’t start up a new paragraph, because it occurs > > > in vertical > > > mode. The other failure is not as obvious, because it occurs much less > > > often: The \tt > > > fonts contain ligatures for Spanish punctuation, so the sequences ?‘ and > > > !‘ will be > > > printed as ¿ and ¡ respectively. Both of these defects can be cured by > > > inserting > > > > > > and > > > > > > > > > «When INITEX creates a brand new TEX, all characters have a space factor > > > code > > > of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. > > > (This > > > slight difference is what makes punctuation act differently after an > > > uppercase letter; do > > > you see why?) Plain TEX redefines a few of these codes using the \sfcode > > > primitive, > > > which is similar to \catcode (see Appendix B); for example, the > > > instructions > > > \sfcode‘)=0 > > > \sfcode‘.=3000 > > > make right parentheses “transparent” to the space factor, while tripling > > > the stretcha- > > > bility after periods. The \frenchspacing operation resets \sfcode‘. to > > > 1000.» > > > > Everything you cite above is very likely true for plain TeX, but maybe > > not for ConTeXt... > > > > /Mikael > > > > PS I do not think that your emails come out well. In order to get > > help, I would suggest a strategy that not so much only sounds as > > nagging and complaints. One thing that has been lacking is a clear > > explanation of what you really try to achieve. > > Mikael, I'll surely heed your advice with that strategy. It's almost > impossible to have a decent looking pdf with lmtx > > kerning of a simple word sequence is off, along with spurious spaces > interjected between sentences. What gives? > > And with luatex frozen for better or for worse, I better stick to plain > tex > > -- > Thus spake the master programmer: > "After three days without programming, life becomes meaningless." > -- Geoffrey James, "The Tao of Programming" > > ___ > 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 > ___ -- They are relatively good but absolutely terrible. -- Alan Kay, commenting on Apollos ___ 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 ___
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
o the sequences ?‘ and !‘ > > will be > > printed as ¿ and ¡ respectively. Both of these defects can be cured by > > inserting > > > > and > > > > > > «When INITEX creates a brand new TEX, all characters have a space factor > > code > > of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. > > (This > > slight difference is what makes punctuation act differently after an > > uppercase letter; do > > you see why?) Plain TEX redefines a few of these codes using the \sfcode > > primitive, > > which is similar to \catcode (see Appendix B); for example, the instructions > > \sfcode‘)=0 > > \sfcode‘.=3000 > > make right parentheses “transparent” to the space factor, while tripling > > the stretcha- > > bility after periods. The \frenchspacing operation resets \sfcode‘. to > > 1000.» > > Everything you cite above is very likely true for plain TeX, but maybe > not for ConTeXt... > > /Mikael > > PS I do not think that your emails come out well. In order to get > help, I would suggest a strategy that not so much only sounds as > nagging and complaints. One thing that has been lacking is a clear > explanation of what you really try to achieve. Mikael, I'll surely heed your advice with that strategy. It's almost impossible to have a decent looking pdf with lmtx kerning of a simple word sequence is off, along with spurious spaces interjected between sentences. What gives? And with luatex frozen for better or for worse, I better stick to plain tex -- Thus spake the master programmer: "After three days without programming, life becomes meaningless." -- Geoffrey James, "The Tao of Programming" ___ 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 ___
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
namely from a typographical point of view. Nothing else. > > I have no clue of what you talk about here. > > > > > from the TeXbook 380-381 > > > > «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired > > changes to > > \par before invoking \obeylines. (2) The \uncatcodespecials operation > > changes a > > space to category 12; but the \tt font has the character ‘␣’ in the ⟨space⟩ > > position, so we > > don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely > > changes the > > ⟨space⟩ character to category 13; active character ␣13 has been defined to > > be the same > > as \space, a macro that expands to ␣10 . This is usually what is desired; > > for example, > > it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t > > cause any > > trouble. But in our application it has an undesirable effect, because it > > produces spaces > > that are affected by the space factor. To defeat this feature, it’s > > necessary either to > > say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter > > alternative is > > better, because the former will discard spaces at the beginning of each > > line.» > > > > «In theory, this seems like it ought to work; but in practice, it fails in > > two ways. One > > rather obvious failure—at least, it becomes obvious when the macro is > > tested—is that > > all the empty lines of the file are omitted. The reason is that the \par > > command at the > > end of an empty line doesn’t start up a new paragraph, because it occurs in > > vertical > > mode. The other failure is not as obvious, because it occurs much less > > often: The \tt > > fonts contain ligatures for Spanish punctuation, so the sequences ?‘ and !‘ > > will be > > printed as ¿ and ¡ respectively. Both of these defects can be cured by > > inserting > > > > and > > > > > > «When INITEX creates a brand new TEX, all characters have a space factor > > code > > of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. > > (This > > slight difference is what makes punctuation act differently after an > > uppercase letter; do > > you see why?) Plain TEX redefines a few of these codes using the \sfcode > > primitive, > > which is similar to \catcode (see Appendix B); for example, the instructions > > \sfcode‘)=0 > > \sfcode‘.=3000 > > make right parentheses “transparent” to the space factor, while tripling > > the stretcha- > > bility after periods. The \frenchspacing operation resets \sfcode‘. to > > 1000.» > > Everything you cite above is very likely true for plain TeX, but maybe > not for ConTeXt... > > /Mikael > > PS I do not think that your emails come out well. In order to get > help, I would suggest a strategy that not so much only sounds as > nagging and complaints. One thing that has been lacking is a clear > explanation of what you really try to achieve. > ___ > 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 > ___ -- You have a tendency to feel you are superior to most computers. ___ 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 ___
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
Hi, It is extremely difficult to follow what you write. On Fri, Aug 18, 2023 at 11:43 AM Carlos wrote: > > If I have the following, with these linebreaks as in: > > {\par But a system cannot be successful if it is too strongly > influenced by a single person. {\obeylines Once the initial design is > complete and fairly robust, the real test begins as people > with many different viewpoints undertake their own > experiments.}} Is that the complete document? What do you have in mind with obeying lines in the middle of a paragraph? > > and opted to load another font, other than cmr that is, a \frenchspacing > approach wouldn't be further required cmr? Not used in ConTeXt for a long time. (And what does the changing of font have to do with this?) > > Bear with me here, in the current state, for example, and as long as say > > «…person.␣{\obeylines Once the initial is > complete…» though feasible enough, leaves any prior \␣ at the mercy of > whatever fontsize and/or set width happens to be. And this is just plain > wrong. What? > > Likewise, if a word sequence such as \TeX\ occurs as in {\ss The separation > of any of these four components would have hurt \TeX\ significantly. } Likewise what? > > The next sentence: «If I had not participated…» does not get any > \nofrenchspacing which is equally and doubly problematic. It shows lack of > consistency. And this ought not to be an ‹either› ‹or› scenario. But > rather, an and conjunctional construct. It fails both ways. Consistency of what? Spacing? Where? Can you make a complete example? (You can show space amount with \showmakup[space]) > > Furthermore, with the same token, if width is specified with a > > \setuplayout[width=15cm] OK, here the game changes... > > Anything less than 12.895pt, especifically for that use case, wwould > throw anything, particularly control sequences such as \TeX\ out > of whack, and conversely, once a value of that very pt or pica or > whatever is lowered, it brings that nonfrenchspacing right back on. > And if width increments occur, then it follows that any control sequence > kerning > also gets thrown off as a result. Of course the width influences the spacing. That is how the paragraph builder works (and really, why it often looks good). > > It seems so far, that with lmtx, any standalone file, document, minimal > working example that does not load cmr at the outset does not produce > an acceptable outcome either. By saying acceptable I meant to say it > namely from a typographical point of view. Nothing else. I have no clue of what you talk about here. > > from the TeXbook 380-381 > > «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired changes > to > \par before invoking \obeylines. (2) The \uncatcodespecials operation changes > a > space to category 12; but the \tt font has the character ‘␣’ in the ⟨space⟩ > position, so we > don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely > changes the > ⟨space⟩ character to category 13; active character ␣13 has been defined to be > the same > as \space, a macro that expands to ␣10 . This is usually what is desired; for > example, > it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t cause > any > trouble. But in our application it has an undesirable effect, because it > produces spaces > that are affected by the space factor. To defeat this feature, it’s necessary > either to > say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter > alternative is > better, because the former will discard spaces at the beginning of each > line.» > > «In theory, this seems like it ought to work; but in practice, it fails in > two ways. One > rather obvious failure—at least, it becomes obvious when the macro is > tested—is that > all the empty lines of the file are omitted. The reason is that the \par > command at the > end of an empty line doesn’t start up a new paragraph, because it occurs in > vertical > mode. The other failure is not as obvious, because it occurs much less often: > The \tt > fonts contain ligatures for Spanish punctuation, so the sequences ?‘ and !‘ > will be > printed as ¿ and ¡ respectively. Both of these defects can be cured by > inserting > > and > > > «When INITEX creates a brand new TEX, all characters have a space factor code > of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. > (This > slight difference is what makes punctuation act differently after an > uppercase letter; do > you see why?) Plain TEX redefines a few of these codes using the \sfcode > primitive, > which is similar to \catcode (see Appendix B); for example, the instructions > \sfcode‘)=0 > \
[NTG-context] Re: split align in formulas
Hi, On Mon, Aug 14, 2023 at 5:13 PM Xavier B. wrote: > > I have this text and the end of the paragraph: > > Definitivament és el mètode més senzill. L'atribució més antiga que conec > d'aquest mètode és de James Tanton \cite{canvi-variable-equacio-segon-grau, > james-tanton-web}. > \placeformula[eq:james-tanton-canvi-de-variables] > \startformula > \startalign > \NC ax^2 + bx + c = 0 \NC \NR > \NC ax^2 + bx = -c \NC \quad \text{transposem } c\NR > \NC x^2 + \frac{b}{a} x = - \frac{c}{a} \NC \quad \text{dividim per }a\NR > \NC x \left( x + \frac{b}{a} \right) = - \frac{c}{a} \NC \quad > \text{factoritzam} \NR > \NC (k-D)(k+D) = - \frac{c}{a} \NC \quad \text{canvi de variable} \NR > \NC k^2 - D^2 = - \frac{c}{a} \NC \quad \text{suma per diferència} \NR > \NC k = \pm\sqrt{ D^2 - \frac{c}{a}} \NC \quad \text{resolem l'equació} \NR > \NC x = k - D = \NC \pm \sqrt{ D^2 - \frac{c}{a}} - D\quad \text{desfeim el > canvi} \NR > \stopalign > \stopformula > on $D = (\frac{b}{2a})$ i $x = k-D$. > > > and then the formula goes to next page. Is there any way to split align > environment? In wiki I could not find nothing. No, align does not split over pages. But ordinary formulas do. You can play with \alignhere and \breakhere, and add text with \texthere[right]{some text} or \texthere[left]{some other text}. /Mikael (I think I would write sentences and a few formulas instead of stacking them all like this) ___ 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 ___
[NTG-context] split align in formulas
I have this text and the end of the paragraph: Definitivament és el mètode més senzill. L'atribució més antiga que conec d'aquest mètode és de James Tanton \cite{canvi-variable-equacio-segon-grau, james-tanton-web}. \placeformula[eq:james-tanton-canvi-de-variables] \startformula \startalign \NC ax^2 + bx + c = 0 \NC \NR \NC ax^2 + bx = -c \NC \quad \text{transposem } c\NR \NC x^2 + \frac{b}{a} x = - \frac{c}{a} \NC \quad \text{dividim per }a\NR \NC x \left( x + \frac{b}{a} \right) = - \frac{c}{a} \NC \quad \text{factoritzam} \NR \NC (k-D)(k+D) = - \frac{c}{a} \NC \quad \text{canvi de variable} \NR \NC k^2 - D^2 = - \frac{c}{a} \NC \quad \text{suma per diferència} \NR \NC k = \pm\sqrt{ D^2 - \frac{c}{a}} \NC \quad \text{resolem l'equació} \NR \NC x = k - D = \NC \pm \sqrt{ D^2 - \frac{c}{a}} - D\quad \text{desfeim el canvi} \NR \stopalign \stopformula on $D = (\frac{b}{2a})$ i $x = k-D$. and then the formula goes to next page. Is there any way to split align environment? In wiki I could not find nothing. Thanks in advance, ___ 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 ___
[NTG-context] Re: Bibliography cite
Dear Alan, Thanks for your response. What I need in fact is this Knuth (1984:12). I am sorry for the confusion. I will try your suggestions! Robert > Op 4 aug. 2023, om 13:57 heeft Alan Braslau het > volgende geschreven: > > Indeed, one does not need the comma, it is programmed in the style. > You can see this in the manual, on p. 43 documenting citations. > > The style is setup to put the righttext inside the parenthesis for > alternative=authoryear and outside of the year parenthesis for > alternative=authoryears. > > I looked carefully in the APA Style Guide and did not find any suggestion > that one should use Knuth (1984, p. 3). The variant (Knuth, 1984, p. 3) is > documented. > > You can make the following changes (untested) > \setupbtx [apa:cite:author:years] [right=] > \setupbtx [apa:cite:authoryears] [right={)}] > to get the other behavior. > > -- > Alan > > > On 01/08/23 01/08/23, 23:26, Robert via ntg-context wrote: >> Thank you, Alan for the suggestion. >> I tried as you said: \cite[alternative=authoryears,righttext={{, p. >> 3}}][Knuth1984]. >> Yet the result is this: Knuth (1984), , p. 3 >> If I leave out the first comma, the result is: Knuth (1984), p. 3 >> Righttext probably refers to the text outside the parentheses. >> Thank you in advance, >> Robert. >>> Op 1 aug. 2023, om 22:42 heeft Alan Braslau het >>> volgende geschreven: >>> >>> Using the APA specification: >>> >>> \usebtxdefinitions >>>[apa] >>> >>> >>> you can then >>> >>> \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] >>> mentions …. >>> >>> >>> The tricky part concerning righttext= is the double {{ }}, needed because >>> the text contains a comma. The reason for this is simple, as righttext is a >>> comma-separated list, where each entry corresponds to a cited reference, as >>> in \cite[righttext={a,b}] [ref1,ref2] >>> so a is associated with ref1 and b is associated with ref2. >>> >>> Alan >>> >>> >>> >>> On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: >>>> Dear List members, >>>> For my academic work with context I need the following cite according to >>>> Apa standards: >>>> Knuth (1984, p. 12) mentions …. >>>> The matrix is this: >>>> AUTHOR (, p.~n). >>>> I reckon this can somehow be accomplished with the \setupbtx command. >>>> (Standard these and other variants are possible: AUTHOR () and AUTHOR >>>> , p. n.) >>>> I tried different setups: \setupbtx[apa:cite:authoryear], and >>>> \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and >>>> other options, but none of them give the desired result. >>>> Thank you for any suggestions. >>>> Regards, >>>> Robert >>>> @article{Knuth1984, >>>> author={Knuth, Donald E.}, >>>> title={Literate Programming}, >>>> journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, >>>> Pages={97--111}, >>>> } >> ___ 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 ___
[NTG-context] Re: Bibliography cite
Indeed, one does not need the comma, it is programmed in the style. You can see this in the manual, on p. 43 documenting citations. The style is setup to put the righttext inside the parenthesis for alternative=authoryear and outside of the year parenthesis for alternative=authoryears. I looked carefully in the APA Style Guide and did not find any suggestion that one should use Knuth (1984, p. 3). The variant (Knuth, 1984, p. 3) is documented. You can make the following changes (untested) \setupbtx [apa:cite:author:years] [right=] \setupbtx [apa:cite:authoryears] [right={)}] to get the other behavior. -- Alan On 01/08/23 01/08/23, 23:26, Robert via ntg-context wrote: Thank you, Alan for the suggestion. I tried as you said: \cite[alternative=authoryears,righttext={{, p. 3}}][Knuth1984]. Yet the result is this: Knuth (1984), , p. 3 If I leave out the first comma, the result is: Knuth (1984), p. 3 Righttext probably refers to the text outside the parentheses. Thank you in advance, Robert. Op 1 aug. 2023, om 22:42 heeft Alan Braslau het volgende geschreven: Using the APA specification: \usebtxdefinitions [apa] you can then \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] mentions …. The tricky part concerning righttext= is the double {{ }}, needed because the text contains a comma. The reason for this is simple, as righttext is a comma-separated list, where each entry corresponds to a cited reference, as in \cite[righttext={a,b}] [ref1,ref2] so a is associated with ref1 and b is associated with ref2. Alan On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: Dear List members, For my academic work with context I need the following cite according to Apa standards: Knuth (1984, p. 12) mentions …. The matrix is this: AUTHOR (, p.~n). I reckon this can somehow be accomplished with the \setupbtx command. (Standard these and other variants are possible: AUTHOR () and AUTHOR , p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result. Thank you for any suggestions. Regards, Robert @article{Knuth1984, author={Knuth, Donald E.}, title={Literate Programming}, journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, Pages={97--111}, } ___ 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 ___
[NTG-context] Re: Bibliography cite
Thank you, Alan for the suggestion. I tried as you said: \cite[alternative=authoryears,righttext={{, p. 3}}][Knuth1984]. Yet the result is this: Knuth (1984), , p. 3 If I leave out the first comma, the result is: Knuth (1984), p. 3 Righttext probably refers to the text outside the parentheses. Thank you in advance, Robert. > Op 1 aug. 2023, om 22:42 heeft Alan Braslau het > volgende geschreven: > > Using the APA specification: > > \usebtxdefinitions >[apa] > > > you can then > > \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] > mentions …. > > > The tricky part concerning righttext= is the double {{ }}, needed because the > text contains a comma. The reason for this is simple, as righttext is a > comma-separated list, where each entry corresponds to a cited reference, as > in \cite[righttext={a,b}] [ref1,ref2] > so a is associated with ref1 and b is associated with ref2. > > Alan > > > > On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: >> Dear List members, >> For my academic work with context I need the following cite according to Apa >> standards: >> Knuth (1984, p. 12) mentions …. >> The matrix is this: >> AUTHOR (, p.~n). >> I reckon this can somehow be accomplished with the \setupbtx command. >> (Standard these and other variants are possible: AUTHOR () and AUTHOR >> , p. n.) >> I tried different setups: \setupbtx[apa:cite:authoryear], and >> \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and >> other options, but none of them give the desired result. >> Thank you for any suggestions. >> Regards, >> Robert >> @article{Knuth1984, >> author={Knuth, Donald E.}, >> title={Literate Programming}, >> journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, >> Pages={97--111}, >> } ___ 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 ___
[NTG-context] Re: Bibliography cite
Using the APA specification: \usebtxdefinitions [apa] you can then \cite[alternative=authoryears,righttext={{, p.\nbsp 12}}] [Knuth1984] mentions …. The tricky part concerning righttext= is the double {{ }}, needed because the text contains a comma. The reason for this is simple, as righttext is a comma-separated list, where each entry corresponds to a cited reference, as in \cite[righttext={a,b}] [ref1,ref2] so a is associated with ref1 and b is associated with ref2. Alan On 01/08/23 01/08/23, 15:37, Robert via ntg-context wrote: Dear List members, For my academic work with context I need the following cite according to Apa standards: Knuth (1984, p. 12) mentions …. The matrix is this: AUTHOR (, p.~n). I reckon this can somehow be accomplished with the \setupbtx command. (Standard these and other variants are possible: AUTHOR () and AUTHOR , p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result. Thank you for any suggestions. Regards, Robert @article{Knuth1984, author={Knuth, Donald E.}, title={Literate Programming}, journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, Pages={97--111}, } ___ 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 ___
[NTG-context] Bibliography cite
Dear List members, For my academic work with context I need the following cite according to Apa standards: Knuth (1984, p. 12) mentions …. The matrix is this: AUTHOR (, p.~n). I reckon this can somehow be accomplished with the \setupbtx command. (Standard these and other variants are possible: AUTHOR () and AUTHOR , p. n.) I tried different setups: \setupbtx[apa:cite:authoryear], and \setupbtx[apa:cite:authoryears], I played with the lefttext, righttext and other options, but none of them give the desired result. Thank you for any suggestions. Regards, Robert @article{Knuth1984, author={Knuth, Donald E.}, title={Literate Programming}, journal={The Computer Journal}, Volume={27}, Number={2}, year={1984}, Pages={97--111}, } ___ 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 ___
[NTG-context] Problem with bibliography in apa
Dear List, I am using ConTeXt with TeXlive 2023. This problem did not exist in TeXlive 2022. Also, I tried to use ConTeXt by installing it from the ConTeXt page and had the same problem. When I use the apa format in the bibliography, the text "internal(number)" appears at the beginning of each citation: For example: --- A Chapter A text (Anonymous, 2023). And (Unknown, 2022). Bibliography internal(1)Anonymous, A. (2023).Any book.Publisher Unknown. internal(2)Unknown, A. (2022).An untitled book.Publisher Non-existent. -- The source code is: \usebtxdataset[biblio.bib] \usebtxdefinitions[apa] \starttext \startchapter[title={A Chapter}] A text \cite[book1]. And \cite[book2] \stopchapter \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --- The bibliographic database is: @book{book1, author={Author Anonymous}, title={An untitled book}, year=2023, publisher={Publisher Unknown}, } @book{book2, author={Author Unknown}, title={An untitled book}, year=2022, publisher={Publisher Non-existent},} Best regards, Marcelo Chaparro___ 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 ___
Re: [NTG-context] Off topic: Does a 'free for commercial use' flared-sans font exist in the world?
On 6/18/2023 8:37 PM, Carlos via ntg-context wrote: On Sat, Jun 17, 2023 at 06:53:06PM +0200, Hans Hagen via ntg-context wrote: On 6/17/2023 2:06 AM, linguafalsa--- via ntg-context wrote: On Fri, Jun 16, 2023 at 06:35:49PM +0200, Gerben Wierda via ntg-context wrote: I know this is off topic, but I suspect this community is actually one of the best places to find an answer. It is the best community. And I tell you what. What happened is that all TeX engines have neglected fonts from the beginning. Really? When tex showed up digital font technology was pretty much in flux. And, with metafont being part of the tex ecosystem, one can argue that tex was quite innovative too. Ecosystem. I would be very careful by including an ecosystem there. Yes. Yes. The TeX ecosystem is obviously part of TeX but is not part of the ecosystem of fonts either. And what is done on ecosystems can either benefit or affect ecosystems greatly. And it's a known trait that humans have been known for having more of a flock group mentality for no apparent rationally-based reasons than just being themselves making these decisions/following instincts or whatever and not because of a particular ecosystem, or for the benefit of the latter. With ecosystemn I mean: tex, metafont, cmr fonts, all kind of tools ... evolving into more engines, more fonts, macro packages, distributions, user groups and use group journals, meetings etc And the above does not imply, bear with me here, that metafont was not innovative, but it can be argued that without TeX there is no metafont, so no room is left for errors either. So, yes, it must be innovative. It has to be. There had to be metafont because there was not much else that could provide what tex needed (at that time). Potscript and its fonts came aroudn at the same time and were rather closed technologies. But as soon possible backend drivers (also part of the tex ecosystem) kicked in. Then we got virtual fonts which enhanced tex's capabilities. I really like Optima, and what I really like about it is the 'flared style'. But I would like to move to a flared-sans font that gives me more licensing freedom. I haven't been able to find one after extensive searching. The only one who were reasonably priced (not free) were the URW Classico ones in Adobe Creative Cloud, but those can only be used in Adobe programs like InDesign (and not TeX). Licensing freedom is an oxymoron. There's no freedom in licensing. Only greed. The only extension engine that at one point had a plan in mind, or most of the bases covered in this regard was Omega. One needs morr than plans. Afaik omega was more about input processing and th efont part was mostly going beyond 8 bit fonts but i might have missed something (omega was never productin ready). Notwithstanding the intricacies/details of what may have actually happened with its short lifespan I think it's more than clear the lack of support behind it. I'm not going to delve into what exactly caused its demise or if it was simply the after effect of other projects that contributed to it. It's irrelevant. Hm, its time span was not that short ... I first heard of omega at the eurotex meeting in arnhem where also etex was discussed (and you dont'want me to cite things said there) .. in successive years there have been announcemnts etc. However, for an engine to be used it must work reliable and guiseppes 'aleph' was basically a variant of omega that also had etex on board. In fact, that was supported in context mkii (and some used it because of the input processor which i think was the more innovative thing in omega but i never dived into it, other users did) It makes no sense to discuss into all this as all teams involved in engines have published in user group journals or presented plans at meetings. Also keep in mind that we're talking frontend here; omega is dvi based so like regular tex and etex whatever it does with fonts is not really related to the engine bu tup to the backend: the engine only needs metrics (omega extended tfm into ofm for that). pdftex brought a pdf backend, xetex pipes into a dvi backend, luatex has a pdf backend built in; (nts being related to etec never took of also because it was not that useable and in the meantime pdftex had taken over); there are afaik some very useable japanese tex engines; the fact that dvi survived was due to dvipdfmx development But stand by for a second. I look forward to your quick witted answers. But hear me out Suppose that on my prior message I was referring indeed to 'mkii' and not to 'omega' And also suppose for a second that the term 'omega' is to be replaced with 'mkii' on your reply accordingly After careful observation the resemblance is quite possibly identical, isn't it? and it could also inarguably apply to the circumstances as well. Don't you think? no it isn't, its building upon hat is there: mkii -> mkiv -> mkxl (p
Re: [NTG-context] How to show bibliography only for the chapter?
On Sat, 6 May 2023 12:09:10 + (UTC) Joel via ntg-context wrote: > I am trying to place a bibliography at the end of the chapter, not > the end of the whole document. I tried various code such as > `criteria=bychapter` etc., but it will only show the entire > bibliography for the whole document. How can I limit the list to the > material falling within that chapter? > > \starttext > \startchapter[title={Robots}] > \input knuth \cite[source1] > \placelistofpublications[criteria=bychapter] > \placelistofpublications[way=bychapter] > \placelistofpublications[criteria=chapter] \stopchapter > \stoptext > > --Joel \placelistofpublications [criterium=chapter] Alan ___ 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 ___
[NTG-context] How to show bibliography only for the chapter?
I am trying to place a bibliography at the end of the chapter, not the end of the whole document. I tried various code such as `criteria=bychapter` etc., but it will only show the entire bibliography for the whole document. How can I limit the list to the material falling within that chapter? \starttext \startchapter[title={Robots}] \input knuth \cite[source1] \placelistofpublications[criteria=bychapter] \placelistofpublications[way=bychapter] \placelistofpublications[criteria=chapter] \stopchapter \stoptext --Joel ___ 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 ___
[NTG-context] Is the Society of Biblical Literature (SBL) style files for ConTeXt incompatible with \setupinteraction[state=start]?
When I am using the SBL ConTeXt files for citations, if I add a line `\setupinteraction[state=start` my code starts complaining: Undefined control sequence \currentbtxloctext \16>: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 \normalexpanded \Word {\fastsetup {btx:sbl:cite:inline} }\doif {\btxparameter {righttext}}{\empty } {\btxperiod } \strc_constructions_register_yes ... Is this package incompatible with interaction? --Joel ___ 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 ___
Re: [NTG-context] Achieving different \cite styles
Hi Jethro, > I am interested in being able to cite in different ways. By analogy, I > refer to the \texcite{}, \parencite{} and other options available with > biblatex in LaTeX. How do I achieve something like \textcite{} in > ConTeXt? Page 34 of the publications manual lists the various styles: https://www.pragma-ade.nl/general/manuals/mkiv-publications.pdf#page=35 \parencite is like \cite[authoryear][article] and \textcite is like \cite[authoryears][article]. The names are admittedly a little confusing, but you can define your own wrappers with something like \define\parencite[1]{\cite[authoryear][#1]} \define\textcite[1]{\cite[authoryears][#1]} -- Max ___ 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 ___
Re: [NTG-context] Achieving different \cite styles
Am 09.12.22 um 04:42 schrieb Jethro Djan via ntg-context: Hello everyone I am interested in being able to cite in different ways. By analogy, I refer to the \texcite{}, \parencite{} and other options available with biblatex in LaTeX. How do I achieve something like \textcite{} in ConTeXt? Please assume that most ConTeXt users (and even more, developers) aren’t very familiar with LaTeX and its many packages. Please explain what you’d like to achieve. 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 ___
[NTG-context] Achieving different \cite styles
Hello everyone I am interested in being able to cite in different ways. By analogy, I refer to the \texcite{}, \parencite{} and other options available with biblatex in LaTeX. How do I achieve something like \textcite{} in ConTeXt? Here is my MWE: \startbuffer[ref] @Article{wn:2017, author = {Who, Nobody and What, Everyone}, journal = {Good Journal}, title = {The Art of Being}, year= {2017}, } \stopbuffer \definebtxdataset[ref] \usebtxdataset[ref][ref.buffer] \setupbtx[ dataset=ref, ] \definebtxrendering [ref] [apa] [ dataset=ref, ] \usebtxdefinitions[apa] \starttext In \cite[wn:2017], they illustrated that it is impossible to not be them. \cite[wn:2017] said it was worth the discovery. \startsection[title={References}, number=no, incrementnumber=no] \placelistofpublications[ref][method=dataset] \stopsection \stoptext The first sentence is okay. In the second, I would like the parenthesis around the citation to come off because of the way I am citing it. Jethro ___ 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 ___
[NTG-context] Command for specifying et al limit
Dear list, I am trying to specify that 'et al’ should be appended after the first author if paper has multiple authors. It seems from the mkiv-publications.pdf manual that it should work like this but it doesn’t. Here is my MWE: \startbuffer[ref] @Article{bb:2017, author = {Bronstein, Michael M. and Bruna, Joan and Cohen, Taco and Veličković, Petar}, journal = {arXiv preprint arXiv:2104.13478}, title = {Geometric Deep Learning: Grids, Groups, Graphs, Geodesics, and Gauges}, year= {2021}, } \stopbuffer \definebtxdataset[ref] \setupbtx[dataset=ref] \definebtxrendering [ref] [apa] [ dataset=ref, ] \usebtxdefinitions[apa] \usebtxdataset[ref][ref.buffer] \setupbtx[ dataset=ref, etaldisplay = 1, etallimit = 1, ] \starttext \cite[author][bb:2017] says in their paper \cite[bb:2017] \startsection[title={References}, number=no, incrementnumber=no] \placelistofpublications[ref][method=dataset] \stopsection \stoptext Thanks in advance. Jethro ___ 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 ___
Re: [NTG-context] error with sbl bibliography on latest LMTX
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]. \placelistofpublica
[NTG-context] error with sbl bibliography on latest LMTX
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 \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 \normalexpanded \Word {\fastsetup {btx:sbl:cite:inline} }\doif {\btxparameter {righttext}}{\empty } {\btxperiod } \strc_constructions_register_yes ...constructionparameter \c!referencetext }\iflocation \ifempty \currentconstructionbookmark \begingroup \simplifycommands \xdef \currentconstructionbookmark {\detokenize \expandafter {\normalexpanded {\constructionparameter \c!title }}}\endgroup ... \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 \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 ... ... 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 references.bib Description: application/bibtex ___ 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 ___
Re: [NTG-context] Detailed citation of reference
Works, thanks! On Fri, 2022-06-24 at 12:44 +0200, Wolfgang Schuster via ntg-context wrote: > Johann Birnick via ntg-context schrieb am 24.06.2022 um 11:59: > > Thanks! However, if I type \cite[righttext={, section 2.1}] is doesn't work > > anymore. Any ideas? > > What happens with > > \cite[righttext={{, section 2.1}}] > > or > > \cite[righttext={\textcomma\ section 2.1}] > > Wolfgang > > __ > _ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > __ > _ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Detailed citation of reference
Johann Birnick via ntg-context schrieb am 24.06.2022 um 11:59: Thanks! However, if I type \cite[righttext={, section 2.1}] is doesn't work anymore. Any ideas? What happens with \cite[righttext={{, section 2.1}}] or \cite[righttext={\textcomma\ section 2.1}] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Detailed citation of reference
Thanks! However, if I type \cite[righttext={, section 2.1}] is doesn't work anymore. Any ideas? Johann On Fri, 2022-06-24 at 09:24 +0200, Henning Hraban Ramm via ntg-context wrote: > Am 24.06.22 um 02:09 schrieb Johann Birnick via ntg-context: > > Hi there, > > > > using \cite[myreference] I will get a result like "[1]", or I could also > > change > > the "1" into some more detailed information such as a tag. > > > > However, I want to obtain something like "[1, section 2.1]". > > > > How can I achieve this? > > \cite[righttext={section 2.1}][myreference] > > Hraban > __ > _ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > __ > _ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Detailed citation of reference
Am 24.06.22 um 02:09 schrieb Johann Birnick via ntg-context: Hi there, using \cite[myreference] I will get a result like "[1]", or I could also change the "1" into some more detailed information such as a tag. However, I want to obtain something like "[1, section 2.1]". How can I achieve this? \cite[righttext={section 2.1}][myreference] Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Detailed citation of reference
Hi there, using \cite[myreference] I will get a result like "[1]", or I could also change the "1" into some more detailed information such as a tag. However, I want to obtain something like "[1, section 2.1]". How can I achieve this? Thank you very much, Johann ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] upload
On 5/9/22 10:06 PM Mikael Sundqvist via ntg-context wrote: > On Mon, May 9, 2022 at 6:16 PM Alexandre Christe via ntg-context > > wrote: > > Sadly I have to report the bibliography is still broken. Could someone > > else confirm? It's an unfortunate timing since I need to hand in some > > report really soon. > I can confirm that there is a problem. But in the example below it > goes away if I uncomment the \usebtxdefinitions[aps]. > > /Mikael > > \startbuffer[bib] > @ELECTRONIC{hh2010, > author = {Hans Hagen}, > year = {2010}, > title = {Metafun. \CONTEXT\ mkiv}, > url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf}, > } > \stopbuffer > > \usebtxdataset[bib.buffer] > > % \usebtxdefinitions[aps] > > \starttext > \cite[hh2010] > \placelistofpublications > \stoptext Hi Mikael (and others), [I have not upgraded yet; version: 2022.05.02 16:19, so I don't know if anything has changed in the new upload, but:] In your example if you change the tag 'hh2010' to 'HansHagen2010' or anything with uppercase ASCII chars, the bibliography entries will not be correctly rendered even if you un-comment '\usebtxdefinitions[aps]' line. [Please see attached output example] This issue seems to have originated in the version after 2022.04.15 when 'tag' and 'field' values in publ-ini.lua were string.lower()'ed. Removing those statements from the file seems to be a workaround. On the other hand, if the tag entries are all lower-case (as they were in your example), then there seems to be no issue. I had reported this earlier, please see: https://mailman.ntg.nl/pipermail/ntg-context/2022/105585.html Thanks, Sreeram btx-issue.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] upload
On Mon, May 9, 2022 at 6:16 PM Alexandre Christe via ntg-context wrote: > > Sadly I have to report the bibliography is still broken. Could someone else > confirm? It's an unfortunate timing since I need to hand in some report > really soon. > I can confirm that there is a problem. But in the example below it goes away if I uncomment the \usebtxdefinitions[aps]. /Mikael \startbuffer[bib] @ELECTRONIC{hh2010, author = {Hans Hagen}, year = {2010}, title = {Metafun. \CONTEXT\ mkiv}, url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf}, } \stopbuffer \usebtxdataset[bib.buffer] % \usebtxdefinitions[aps] \starttext \cite[hh2010] \placelistofpublications \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
> -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Samstag, 7. Mai 2022 01:15 > An: Maier, Denis Christian (UB) ; ntg-context@ntg.nl > Betreff: Re: AW: [NTG-context] Citeproc-lua > > On 5/7/2022 12:33 AM, denis.ma...@unibe.ch wrote: > >> -Ursprüngliche Nachricht- > >> Von: ntg-context Im Auftrag von Hans > >> Hagen via ntg-context > >> Gesendet: Freitag, 6. Mai 2022 23:45 > >> An: Denis Maier via ntg-context > >> Cc: Hans Hagen > >> Betreff: Re: [NTG-context] Citeproc-lua > >> > >> [...] > >> > >> For the record: i don't think you should write something to the tuc > >> file that doesn't come from context itself because you can mess it up > >> (also performaance wise). > > > > Really? But what about that stuff? Anyway, even better if the data coming > from context itself can be used. > > A bibliography is just about (cross) referencing data. If that data comes from > elsewhere it can best kept indepdendent. One can of course store some > reference but why the data if it is not used in some special way. I think we're on the same page here. I was just talking about the info about which items have been cited, which pages, prefixes, suffixes, etc. All that stuff that is basically already there... > > > Of course you could have another file (just like a bib file > >> is independent). One problem could be that you need to make some > >> extra installation to make it work as we're not going to add all kind > >> of code to the distribution (we tend to go smaller) and someone needs > >> to maintain that moduie then because users depend in it working. > >> > >> Did you look into what pandoc provides? It might be easier to take > >> that output and include it. Some kind of html? That's easy to render. > > > > Pandoc can output context as well, so we can just take that. > > Sure, but some parseble format might be better if one wants control over > rendering. Basically we're talking about some pseudo formatted bibliography > entry with some unique tag as reference. I see... > > > Using the whole bibliography might give problems with regards to > disambiguation. > > In what sense? Aren't the 'tags' or id's unique? Tags/Ids are unique, for sure. But, if you render a bibliography based on everything in the bib-file, you might end up with Doe 2005a Doe 2005b etc. but in the end you'll remove Doe 2005b, so the whole a/b stuff isn't necessary anymore. Anyway, one can > > - let \cite write some refe to soem file > - that file gets pandoc'd to a bibliography list > - that then gets included Yes, looks reasonable. > > if that list is in some parsable format (like html width classes) we can > easily pick > up info (if needed) and do nmore > > > So, that would work a bit like Aditya's filter module: > > https://github.com/adityam/filter Right? > > sort of > > > Another option would be to just use pandoc's citeproc directly, as > > described here: > > https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md > > > > We'd have to pass a list of citations as a JSON object to that citeproc and > > use > the results. > > The results will include citations as well as the bibliography (all as JSON, > content can be HTML formatted). > we can handle json indeed, so hwo does such a json look like? can you make an > example? There are some examples on this page https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md Does that help or do you need to know more? Anyway, this adds the citeproc executable as a dependency. Maybe they can make that functionality from pandoc proper. Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
On 5/7/2022 12:33 AM, denis.ma...@unibe.ch wrote: -Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von Hans Hagen via ntg-context Gesendet: Freitag, 6. Mai 2022 23:45 An: Denis Maier via ntg-context Cc: Hans Hagen Betreff: Re: [NTG-context] Citeproc-lua [...] For the record: i don't think you should write something to the tuc file that doesn't come from context itself because you can mess it up (also performaance wise). Really? But what about that stuff? Anyway, even better if the data coming from context itself can be used. A bibliography is just about (cross) referencing data. If that data comes from elsewhere it can best kept indepdendent. One can of course store some reference but why the data if it is not used in some special way. Of course you could have another file (just like a bib file is independent). One problem could be that you need to make some extra installation to make it work as we're not going to add all kind of code to the distribution (we tend to go smaller) and someone needs to maintain that moduie then because users depend in it working. Did you look into what pandoc provides? It might be easier to take that output and include it. Some kind of html? That's easy to render. Pandoc can output context as well, so we can just take that. Sure, but some parseble format might be better if one wants control over rendering. Basically we're talking about some pseudo formatted bibliography entry with some unique tag as reference. Using the whole bibliography might give problems with regards to disambiguation. In what sense? Aren't the 'tags' or id's unique? Anyway, one can - let \cite write some refe to soem file - that file gets pandoc'd to a bibliography list - that then gets included if that list is in some parsable format (like html width classes) we can easily pick up info (if needed) and do nmore So, that would work a bit like Aditya's filter module: https://github.com/adityam/filter Right? sort of Another option would be to just use pandoc's citeproc directly, as described here: https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md We'd have to pass a list of citations as a JSON object to that citeproc and use the results. The results will include citations as well as the bibliography (all as JSON, content can be HTML formatted). we can handle json indeed, so hwo does such a json look like? can you make an example? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
On 2022-05-06 17:44, Hans Hagen via ntg-context wrote: [...] A bit like this: - Convert the whole bibliography database to html using pandoc in the preferred cs rendering. That should be fast. - Use the normal context commands for referencing a citation (the cite part is normally easy as there is not much variation in that; if needed one can cheat and also pregenerate that). That's then just some relatively small plugin mode. - When placing the bibliography, filter the right entries from that html file (easy) using info that got stored in the tuc. It is also fast. The only depdency then is pandoc but that is widely available (irr). But I would need to see an example of that kind of out first. We basically treat the (formatted) bibliography as an external resource but in some format that we can easily parse (and if needed tweak). Hans This is similar to my strategy today. I create a pandoc markdown file from my ConTeXt source using a simple script and generate ConTeXt output containing just the bibliography using pandoc. This output needs some minor tweaks, again scripted, to do things like replace the space in /Vol. 999/ with a non-breaking space to keep the following number on the same line and to convert /\em/ and such to taggable macros that I define in my environment. The result is ConText source that can be further edited (if necessary) and inserted where needed/./ I have not extended it to multiple bibliographies in a single document, although that should not be difficult. Another possibility would be for ConTeXt, under control of a flag or setting, to generate an editable bibliography file that could be included under control of a second flag or setting. -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Hans Hagen > via ntg-context > Gesendet: Freitag, 6. Mai 2022 23:45 > An: Denis Maier via ntg-context > Cc: Hans Hagen > Betreff: Re: [NTG-context] Citeproc-lua > > [...] > > For the record: i don't think you should write something to the tuc file that > doesn't come from context itself because you can mess it up (also > performaance wise). Really? But what about that stuff? Anyway, even better if the data coming from context itself can be used. Of course you could have another file (just like a bib file > is independent). One problem could be that you need to make some extra > installation to make it work as we're not going to add all kind of code to the > distribution (we tend to go smaller) and someone needs to maintain that > moduie then because users depend in it working. > > Did you look into what pandoc provides? It might be easier to take that > output and include it. Some kind of html? That's easy to render. Pandoc can output context as well, so we can just take that. > > A bit like this: > > - Convert the whole bibliography database to html using pandoc in the > preferred cs rendering. That should be fast. Using the whole bibliography might give problems with regards to disambiguation. > > - Use the normal context commands for referencing a citation (the cite part > is normally easy as there is not much variation in that; if needed one can > cheat and also pregenerate that). That's then just some relatively small > plugin mode. > > - When placing the bibliography, filter the right entries from that html file > (easy) using info that got stored in the tuc. As said above, that might create problems with regards to disambiguation. Better just use the right entries. > > It is also fast. The only depdency then is pandoc but that is widely available > (irr). But I would need to see an example of that kind of out first. We > basically treat the (formatted) bibliography as an external resource but in > some format that we can easily parse (and if needed tweak). So, that would work a bit like Aditya's filter module: https://github.com/adityam/filter Right? Another option would be to just use pandoc's citeproc directly, as described here: https://github.com/jgm/citeproc/blob/master/man/citeproc.1.md We'd have to pass a list of citations as a JSON object to that citeproc and use the results. The results will include citations as well as the bibliography (all as JSON, content can be HTML formatted). Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
Yes, Aditya. Citeproc-lua uses csl styles. Test suite coverage is not complete yet, though. Denis Von: ntg-context im Auftrag von Hans Hagen via ntg-context Gesendet: Freitag, 6. Mai 2022 23:44:38 An: Denis Maier via ntg-context Cc: Hans Hagen Betreff: Re: [NTG-context] Citeproc-lua On 5/6/2022 11:02 PM, Denis Maier via ntg-context wrote: > I also have the impression that extending citeproc-formats.lua should be the > easiest part. As an aside, I think the HTML is in there because that is > needed for the test suite, but for ConTeXt we should be able to copy the > LaTeX mapping and tweak a few things here and there. > The LaTeX package is hard to understand, at least if you're not used to the > "new" latex3 programming syntax and style. I also can only guess what that > stuff does. But as you say this is rather isolated from the citeproc > processing, so I guess the main task would be to come up with an equivalent > ConTeXt module that writes the citations to the tuc file, calls the citeproc > engine, and uses the results for the output. Right? (I.e., AFAICS, everything > that lives under https://github.com/zepinglee/citeproc-lua/tree/main/citeproc > should pretty much just work, while > https://github.com/zepinglee/citeproc-lua/tree/main/latex must be adapted.) For the record: i don't think you should write something to the tuc file that doesn't come from context itself because you can mess it up (also performaance wise). Of course you could have another file (just like a bib file is independent). One problem could be that you need to make some extra installation to make it work as we're not going to add all kind of code to the distribution (we tend to go smaller) and someone needs to maintain that moduie then because users depend in it working. Did you look into what pandoc provides? It might be easier to take that output and include it. Some kind of html? That's easy to render. A bit like this: - Convert the whole bibliography database to html using pandoc in the preferred cs rendering. That should be fast. - Use the normal context commands for referencing a citation (the cite part is normally easy as there is not much variation in that; if needed one can cheat and also pregenerate that). That's then just some relatively small plugin mode. - When placing the bibliography, filter the right entries from that html file (easy) using info that got stored in the tuc. It is also fast. The only depdency then is pandoc but that is widely available (irr). But I would need to see an example of that kind of out first. We basically treat the (formatted) bibliography as an external resource but in some format that we can easily parse (and if needed tweak). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
On 5/6/2022 11:02 PM, Denis Maier via ntg-context wrote: I also have the impression that extending citeproc-formats.lua should be the easiest part. As an aside, I think the HTML is in there because that is needed for the test suite, but for ConTeXt we should be able to copy the LaTeX mapping and tweak a few things here and there. The LaTeX package is hard to understand, at least if you're not used to the "new" latex3 programming syntax and style. I also can only guess what that stuff does. But as you say this is rather isolated from the citeproc processing, so I guess the main task would be to come up with an equivalent ConTeXt module that writes the citations to the tuc file, calls the citeproc engine, and uses the results for the output. Right? (I.e., AFAICS, everything that lives under https://github.com/zepinglee/citeproc-lua/tree/main/citeproc should pretty much just work, while https://github.com/zepinglee/citeproc-lua/tree/main/latex must be adapted.) For the record: i don't think you should write something to the tuc file that doesn't come from context itself because you can mess it up (also performaance wise). Of course you could have another file (just like a bib file is independent). One problem could be that you need to make some extra installation to make it work as we're not going to add all kind of code to the distribution (we tend to go smaller) and someone needs to maintain that moduie then because users depend in it working. Did you look into what pandoc provides? It might be easier to take that output and include it. Some kind of html? That's easy to render. A bit like this: - Convert the whole bibliography database to html using pandoc in the preferred cs rendering. That should be fast. - Use the normal context commands for referencing a citation (the cite part is normally easy as there is not much variation in that; if needed one can cheat and also pregenerate that). That's then just some relatively small plugin mode. - When placing the bibliography, filter the right entries from that html file (easy) using info that got stored in the tuc. It is also fast. The only depdency then is pandoc but that is widely available (irr). But I would need to see an example of that kind of out first. We basically treat the (formatted) bibliography as an external resource but in some format that we can easily parse (and if needed tweak). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Citeproc-lua
Hi, thanks for your assessment. Indeed, that looks very promising. I've now had a chance to look at this a bit more too. Not that I understand that stuff in detail, but anyway... I also have the impression that extending citeproc-formats.lua should be the easiest part. As an aside, I think the HTML is in there because that is needed for the test suite, but for ConTeXt we should be able to copy the LaTeX mapping and tweak a few things here and there. The LaTeX package is hard to understand, at least if you're not used to the "new" latex3 programming syntax and style. I also can only guess what that stuff does. But as you say this is rather isolated from the citeproc processing, so I guess the main task would be to come up with an equivalent ConTeXt module that writes the citations to the tuc file, calls the citeproc engine, and uses the results for the output. Right? (I.e., AFAICS, everything that lives under https://github.com/zepinglee/citeproc-lua/tree/main/citeproc should pretty much just work, while https://github.com/zepinglee/citeproc-lua/tree/main/latex must be adapted.) For the record: the relevant stuff in the aux file looks like this: \bibstyle {apa} \bibdata {examples.bib} \csloptions {} \citation {{texbook@1}{{id={texbook},label={page},locator={12}}}{1}} \citation {{latex2e@1}{{id={latex2e},prefix={see }}}{1}} \citation {{texbook@2}{{id={texbook},prefix={see },label={page},locator={12}}}{1}} \citation {{texbook@3}{{id={texbook},prefix={see },suffix={, everywhere}}}{1}} \citation {{texbook@4}{{id={texbook},prefix={see },label={page},locator={12, and passim}}}{1}} But I guess that's the way these things work in latex, and adding that stuff to a lua table will probably save us much trouble anyway. (E.g., no need for https://github.com/zepinglee/citeproc-lua/blob/main/latex/citeproc#L81, or https://github.com/zepinglee/citeproc-lua/blob/main/latex/csl-core.lua#L168) Regarding the citation commands, I've noticed that while biblatex's syntax model (\cite[prenote][postnote]{key}, e.g. \cite[see][34]{doe}) is supported, the preferred method is actually \cite[prefix={See }, page={34}]{doe}. But that's of course not so important since the important question is how that stuff is passed to the citeproc. Best, Denis > -Ursprüngliche Nachricht- > Von: Taco Hoekwater > Gesendet: Freitag, 6. Mai 2022 14:57 > An: mailing list for ConTeXt users > Cc: Maier, Denis Christian (UB) > Betreff: Re: [NTG-context] Citeproc-lua > > Hi, > > I had a quick look at this and it seems very extensible if-not-quite ConTeXt- > ready right away. > > On the input side, it reads a LaTeX .aux file to parse things like options, > databases, and requested citations. > For this, it uses a dedicated “citeproc” lua script that should be easy to > modify/copy for someone who knows what is actually in the ConTeXt .tuc > file. > > On the output side, it uses a lookup table to generate the desired markup (in > citeproc-formats.lua). Right now, there are definitions provided for HTML > and LaTeX, but that is very simple to extend. > > There is a LaTeX package for the integration (making sure the right > commands appear in the aux file, option processing, et cetera), and that file > I > do not understand *at all*. It seems to be completely isolated from the core > citeproc processing, though. > > Very promising stuff, I think. > > But: I personally do not understand how to do the integration with ConTeXt’s > new biblio system. I only understand half of what ConTeXt does these days, > and much less of what the LaTeX package is trying to achieve i.r.t. options. > > Best wishes, > Taco > > > On 3 May 2022, at 22:00, Denis Maier via ntg-context cont...@ntg.nl> wrote: > > > > Hi, > > > > I just came across this: https://github.com/zepinglee/citeproc-lua > > Thats’s an lua implemenation of the CSL language targeting LaTeX. > > I don’t know if the processor itself contains any LaTeX specific code, > > but it looks like the integration basically happens here > > :https://github.com/zepinglee/citeproc-lua/blob/main/latex/citation-st > > yle-language.sty So, at least in theory, shouldn’t it be possible to > > make this workable also with context? > > > > Best, > > Denis > > > __ > > > _ If your question is of interest to others as well, > > please add an entry to the Wiki! > > > > maillist : ntg-context@ntg.nl / > > http://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : http://contextgarden.net > > > _
[NTG-context] Issue in btx rendering
Hi, [my current version: 2022.05.02 16:19] With the past two-or-so uploads, btx output seems to be broken in some cases. Compiling the below example \usebtxdataset[refs.bib] \usebtxdefinitions[aps] \starttext This reference has a tag which is in camel-case: \cite[Nielsen2011_ChernoffInformationExponentialFamilies] On the other hand this reference has a tag which is lower-case: \cite[vaart1998_asymptoticstatistics] \placelistofpublications \stoptext along with the bibtex file (refs.bib attached here), only the second citation entry has a properly rendered bibliography entry while the first one does not. Notably, any bibtex entries whose tags are not all lowercase (ASCII) are not rendered correctly. Instead, in the log I get publications > unknown tag 'nielsen2011_chernoffinformationexponentialfamilies' in dataset 'default' Almost all my entries in bib files are in camel-case since I find that to be easier to read and it gives me a better clue of what the item is. With some recent uploads I noticed that in publ-ini.lua 'tag' and 'field' entries were string.lowered(). Upon removing those statements, I am able to get the proper output. I also have certain bib files where the entries are not at all in ASCII (so I am not sure what the code might do there, I did not check in detail). I hope I can continue to use camel case for the tags (if its not too much to ask): is there some additional setting that I should change to allow this so that the output is rendered correctly? Thanks, Sreeram@article{Nielsen2013_InformationGeometricCharacterizationChernoff, author= {Nielsen, Frank}, doi = {10.1109/LSP.2013.2243726}, issn = {1070-9908}, journal = {IEEE Signal Processing Letters}, localfile = {Nielsen2013_InformationGeometricCharacterizationChernoff.pdf}, month = {March}, number= {3}, pages = {269--272}, title = {An Information-Geometric Characterization of Chernoff Information}, volume= {20}, year = {2013}, } @article{Nielsen2011_ChernoffInformationExponentialFamilies, author= {Nielsen, Frank}, journal = {CoRR}, localfile = {Nielsen2011_ChernoffInformationExponentialFamilies.pdf}, title = {Chernoff information of exponential families}, url = {http://arxiv.org/abs/1102.2684; https://dblp.org/rec/bib/journals/corr/abs-1102-2684}, volume= {abs/1102.2684}, year = {2011}, } @book{vaart1998_asymptoticstatistics, author = {Vaart, A. W. van der}, collection = {Cambridge Series in Statistical and Probabilistic Mathematics}, doi= {10.1017/CBO9780511802256}, localfile = {Vaart1998_AsymptoticStatistics.pdf}, place = {Cambridge}, publisher = {Cambridge University Press}, series = {Cambridge Series in Statistical and Probabilistic Mathematics}, title = {Asymptotic Statistics}, year = {1998}, } @article{Muller1997_IntegralProbabilityMetricsGeneratingClass, author = {M{\"u}ller, Alfred}, doi = {10.2307/1428011}, issn= {0001-8678, 1475-6064}, journal = {Advances in Applied Probability}, month = {Jun}, number = {2}, pages = {429--443}, title = {Integral Probability Metrics and Their Generating Classes of Functions}, url = {https://www.cambridge.org/core/product/identifier/S000186780002807X/type/journal_article}, volume = {29}, year= {1997}, } ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] documentation for \cite and \setupcite commands
Amine, The thing is, that in the MKIV-publications.pdf (see in the doc subtree of texmf-context) \setupcite does not exist. This command is used by the implementation by Taco Hoekwater. This system is still in the distro. In order to get your bibliography working you will have to study the MKIV-publicaations document. — I say this, because I started to use it recently for one of my projects. And yes it is rather a complex system… Willi > On 27 Mar 2022, at 20:36, A A via ntg-context wrote: > > Another question, Bibliographies, the ConTeXt way by Hans Hagen and Alan > Braslau introduces a parameter not shown in the \cite doc in ConTeXt garden, > namely "righttext". > > Moreover, this answer introduces an "extras" parameter, also not included in > ConTeXt garden. Am I missing something here? > > -- Forwarded message - > From: A A > Date: Sun, 27 Mar 2022 at 20:16 > Subject: Fwd: documentation for \cite and \setupcite commands > To: > > > Nevermind, for \cite there is detailed documentation here > > Can I safely assume that \setupcite uses the same arguments? Can I generalize > this assumption to all \command and \setupcommand in ConTeXt? > > -- Forwarded message - > From: A A > Date: Sun, 27 Mar 2022 at 20:09 > Subject: documentation for \cite and \setupcite commands > To: > > > Dear All, > > Does anyone know where I can find more or less detailed information about the > \cite and \setupcite commands? I checked ConTeXt garden and the book > "ConTeXt: An excursion". I also checked the mailing list search engine and > did a couple of generic google searches but found nothing to the level of > detail I'm looking for. > > Thanks in advance for your help. > > Regards, > > Amine > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Trying to get a simple bibliography
Hi Amine, There are several ways to achieve a bibliography. The first one is your way, with a buffer, which you have to name it (see below : the buffer is named 'biblio') : you put your references to books and articles between the 2 commands \startbuffer and \stopbuffer as the model shows hereafter (with the APA style). If you want to print a general and simple bibliography, you need a double command :\usebtxdataset[/any title you choose/][biblio.buffer] and \definebtxrendering[/any title/][apa][dataset=/any title/] after \stopbuffer. At the end of the text, you need to define the place where you want to print the bibliography. For that purpose : \starttext \startbackmatter \startchapter[title={Bibliography}] \placelistofpublications[/any title/] [method=local] \stopchapter \stopbackmatter \stoptext /But, as far as I know, this method is boring/, because you need to write all you bibliographical sources in the buffer. The better is to build a separate bibtex file with such a software as JabRef (which is a kind of bibtex tool). This bibtex file is in your ConTeXt repository and you need only to call the name of your bibtex item. For instance, the book /Natural Right and History/ of Leo Strauss becomes 'Strauss,1952' (with JabRef) and if you cite this book in your text (like this : \cite[alternative=entry][/any title/::Strauss1952]}, you can find the item at the 'S' letter. Indeed, there is some work to do (feed your bitex file with items...), but when it is done once, it is forever (I guess ...). I give you a MWE as an attached file ... Hope it helps ! JP [/here is the beginning of a buffer sample /] \startbuffer[biblio] @book{Cicéron1, author = {Cicéron}, title = {Tusculanes, V, 8}, } @INCOLLECTION{Leibniz1885, author = {Leibniz, G. W.}, title = {Principes de la nature et de la grâce fondés en raison, 1714}, title:en = {Principles of Nature and Grace Founded in Reason}, booktitle = {\de Die Philosophischen Schriften von Gottfried Wilhelm Leibniz}, booktitle:en = {The Philosophical Writings of Gottfried Wilhelm Leibniz}, editor = {Gerhardt, C. G.}, publisher = {Weidmann}, year = {1885}, volume = {6}, chapter = {8}, pages = {598–606}, address = {Berlin}, language = {french}, } @book{Rousseau1755, author ={Rousseau, Jean-Jacques} title = {Discours sur l’Origine et les Fondements de l’Inégalité parmi les Hommes.}, year = {1755}, } @book{Rousseau1750, author ={Rousseau, Jean-Jacques} title = {Discours sur les Sciences et les Arts}, year = {1750}, } @book{Rousseau1762, author = {Rousseau, Jean-Jacques}, title = {Émile}, year = {1762}, } \stopbuffer Le 26/03/2022 à 13:25, A A via ntg-context a écrit : Hi All, I'm trying to get a simple bibliography to work with ConTeXt. Here's what I have so far: *test.tex* * * \usebtxdataset[bibliography.bib] \starttext \startbodymatter See \cite[proofwiki] \stopbodymatter \startbackmatter \startsection[title=Bibliography] \stopsection \stopbackmatter \stoptext * * *bibliography.bib* * * @misc{ proofwiki, title={{Definition:Collation - ProofWiki}}, author={{ProofWiki}}, howpublished={ \href{https://proofwiki.org/wiki/Definition:Collation}{link <https://proofwiki.org/wiki/Definition:Collation}{link>} }, journal={{ProofWiki}}, year={2021} } When I compile test.tex it generates a pdf, but the citation is not included in the body matter. Also the actual reference is not present in Bibliography. What am I doing wrong? Regards, Amine * * ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl /http://www.ntg.nl/mailman/listinfo/ntg-context webpage :http://www.pragma-ade.nl /http://context.aanhet.net archive :https://bitbucket.org/phg/context-mirror/commits/ wiki :http://contextgarden.net ___ -- Jean-Pierre Delange Ancients Professeur Agrégé de Philosophie (HC) \startbuffer[biblio] @book{Cicéron1, author = {Cicéron}, title = {Tusculanes, V, 8}, } @INCOLLECTION{Leibniz1885, author = {Leibniz, G. W.}, title = {Principes de la nature et de la grâce fondés en raison, 1714}, title:en = {Principles of Nature and Grace Founded in Reason}, booktitle = {\de Die Philosophischen Schriften von Gottfried Wilhelm Leibniz}, booktitle:en = {The Philosophical Writings of Gottfried Wilhelm Leibniz}, editor = {Gerhardt, C. G.}, publisher = {Weidmann}, year = {1885}, volume = {6}, chapter = {8}, pages = {598–606}, address = {Berlin}, language = {french}, } @book{Rousseau1755, author ={Rousseau, Jean-Jacques} title = {Discours sur l’Origine et les Fondements de l’Inégalité parmi les Hommes.}, year = {1755}, } @book{Rousseau1750, author ={Rousseau, Jean-Jacques} title = {Discours sur les Sciences et les Arts}, year = {1750}, }
[NTG-context] Fwd: documentation for \cite and \setupcite commands
Another question, *Bibliographies, the ConTeXt way *by Hans Hagen and Alan Braslau introduces a parameter not shown in the \cite doc in ConTeXt garden, namely "righttext". Moreover, this answer <https://tex.stackexchange.com/questions/73131/how-to-add-page-numbers-to-apa-citations-in-context> introduces an "extras" parameter, also not included in ConTeXt garden. Am I missing something here? -- Forwarded message - From: A A Date: Sun, 27 Mar 2022 at 20:16 Subject: Fwd: documentation for \cite and \setupcite commands To: Nevermind, for \cite there is detailed documentation here <https://wiki.contextgarden.net/Command/cite> Can I safely assume that \setupcite uses the same arguments? Can I generalize this assumption to all \command and \setupcommand in ConTeXt? -- Forwarded message - From: A A Date: Sun, 27 Mar 2022 at 20:09 Subject: documentation for \cite and \setupcite commands To: Dear All, Does anyone know where I can find more or less detailed information about the \cite and \setupcite commands? I checked ConTeXt garden and the book "ConTeXt: An excursion". I also checked the mailing list search engine and did a couple of generic google searches but found nothing to the level of detail I'm looking for. Thanks in advance for your help. Regards, Amine ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Please could you send me the whole example
Dear Helmut, Here is a full working example: *test.tex* \usebtxdefinitions[aps] \usebtxdataset[bibliography.bib] \setupinteraction[state=start] \starttext \startbodymatter See \cite[proofwiki] \stopbodymatter \startbackmatter \startsection[title=Bibliography] \placelistofpublications \stopsection \stopbackmatter \stoptext *bibliography.bib* @misc{ proofwiki, title={{Definition:Collation - ProofWiki}}, author={{ProofWiki}}, journal={{ProofWiki}}, year={2021}, howpublished={ \goto {link} [ url( " https://proofwiki.org/wiki/Definition:Language_of_Propositional_Logic; ) ] } } Hope it helps. Thanks. Regards, Amine On Sun, 27 Mar 2022 at 12:33, Helmut Schwertner wrote: > Hello Amiene, > > I read your "question" in the NTG-Context-Groupe, I try it, but it > doesn't work for me. > > Please could you send me the complete working example? > > Thank you, > > Greetings, > > Helmut > > -- > * > Helmut Schwertner > Kirchweg 154 > 28201 Bremen > 0421 528 58 22 > helmut.schwertner[a]gmail.com > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Trying to get a simple bibliography
I found the problem. I was not including the following in my preamble: \usebtxdefinitions[aps] The next question I guess is whether ConTeXt support other specs like MLA or Chicago style. I tried MLA but without sucess. Is MLA possible in ConTeXt? On Sat, 26 Mar 2022 at 13:48, A A wrote: > In my previous email I forgot to include the \placelistofpublications > command. I tried that and now I'm getting a citation, but the bibliography > entry is not correctly typeset... > > On Sat, 26 Mar 2022 at 13:25, A A wrote: > >> Hi All, >> >> I'm trying to get a simple bibliography to work with ConTeXt. Here's what >> I have so far: >> >> *test.tex* >> >> \usebtxdataset[bibliography.bib] >> >> \starttext >> >> \startbodymatter >> See \cite[proofwiki] >> \stopbodymatter >> >> \startbackmatter >> \startsection[title=Bibliography] >> \stopsection >> \stopbackmatter >> \stoptext >> >> *bibliography.bib* >> >> @misc{ >> proofwiki, >> title={{Definition:Collation - ProofWiki}}, >> author={{ProofWiki}}, >> howpublished={ >> \href{https://proofwiki.org/wiki/Definition:Collation}{link} >> }, >> journal={{ProofWiki}}, >> year={2021} >> } >> >> When I compile test.tex it generates a pdf, but the citation is not >> included in the body matter. Also the actual reference is not present in >> Bibliography. >> >> What am I doing wrong? >> >> Regards, >> >> Amine >> >> ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Trying to get a simple bibliography
In my previous email I forgot to include the \placelistofpublications command. I tried that and now I'm getting a citation, but the bibliography entry is not correctly typeset... On Sat, 26 Mar 2022 at 13:25, A A wrote: > Hi All, > > I'm trying to get a simple bibliography to work with ConTeXt. Here's what > I have so far: > > *test.tex* > > \usebtxdataset[bibliography.bib] > > \starttext > > \startbodymatter > See \cite[proofwiki] > \stopbodymatter > > \startbackmatter > \startsection[title=Bibliography] > \stopsection > \stopbackmatter > \stoptext > > *bibliography.bib* > > @misc{ > proofwiki, > title={{Definition:Collation - ProofWiki}}, > author={{ProofWiki}}, > howpublished={ > \href{https://proofwiki.org/wiki/Definition:Collation}{link} > }, > journal={{ProofWiki}}, > year={2021} > } > > When I compile test.tex it generates a pdf, but the citation is not > included in the body matter. Also the actual reference is not present in > Bibliography. > > What am I doing wrong? > > Regards, > > Amine > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Trying to get a simple bibliography
Hi All, I'm trying to get a simple bibliography to work with ConTeXt. Here's what I have so far: *test.tex* \usebtxdataset[bibliography.bib] \starttext \startbodymatter See \cite[proofwiki] \stopbodymatter \startbackmatter \startsection[title=Bibliography] \stopsection \stopbackmatter \stoptext *bibliography.bib* @misc{ proofwiki, title={{Definition:Collation - ProofWiki}}, author={{ProofWiki}}, howpublished={ \href{https://proofwiki.org/wiki/Definition:Collation}{link} }, journal={{ProofWiki}}, year={2021} } When I compile test.tex it generates a pdf, but the citation is not included in the body matter. Also the actual reference is not present in Bibliography. What am I doing wrong? Regards, Amine ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] APS bib: literals and small error in "pages" field
Hi, Two things here: 1. There is an extra . on the end of lines 732 and 734 of publ-imp-aps.mkvi which causes references to be rendered like "p.. 417" and "pp.. 417--418". 2. Suppose I have a literal such as @literal{company, text = {Company Name (n.d.) {\it Webpage name}. Retrieved 22 February, 2022, from https://www.example.com} } how can I cite this without the (company) appearing in the bibliography list? For reference I'm using \usebtxdefinitions[aps] Jack ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Bibliography
Hi all,I have a rather old project which involves a bibbliography of about 60 entries. — Now I tried to use the publications environment after reading the manual. — I must say environment this is impressive!However I struggle with getting it working.1. When using my dataset, which is encoded as a ‘bbl’ type file I get a list of publications but the entries are uncomplete. enclosed files: publist-test.tex, test-literaturliste.bbl, publist-test.pdf2. When I use a buffer for testing, I do not get \cite reference nor a publication list: publist-buffer-test,texCan someone advise?Kind regardsWilli test-literaturliste.bbl Description: Binary data publist-buffer-test.tex Description: Binary data publist-buffer-test.pdf Description: Adobe PDF document publist-test.tex Description: Binary data publist-test.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] control cite - bibliographical references
Am 30.01.22 um 10:25 schrieb Robert via ntg-context: Dear list, I am struggling with the color of bibliographical references. I found (Ulrike’s) hack to render the items in the bibliography the regular color (black): \appendtoks \iflocation \letinteractionparameter{color}\empty \fi \to \everybtxlistrendering. There the problem seems to relate to the use of \setupinteraction. Now, in my citations (\cite[Douma1979a]) the authornames are still colored. Douma, 1979a, 86 I examined the contextgarden site, read and tried the answers to previous questions, but could not find out how to do this. Is there a way to control the author names? I don’t know if there is something special to bibliography, but usually you can set \setupinteraction[color=,contrastcolor=,] to get all links in black. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] control cite - bibliographical references
Dear list, I am struggling with the color of bibliographical references. I found (Ulrike’s) hack to render the items in the bibliography the regular color (black): \appendtoks \iflocation \letinteractionparameter{color}\empty \fi \to \everybtxlistrendering. There the problem seems to relate to the use of \setupinteraction. Now, in my citations (\cite[Douma1979a]) the authornames are still colored. Douma, 1979a, 86 I examined the contextgarden site, read and tried the answers to previous questions, but could not find out how to do this. Is there a way to control the author names? Thank you in advance, Kind regards, Robert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] How to get \placenotes to place footnote-style citations at the end of my content?
I'm spinning this question off another post, as my previous question was very specific, but it was possibly discovered a more general bug exists? I'm creating some lecture slides that have footnote citations throughout. The problem is, the slides themselves already don't have much screen space, and adding all of the footnotes on the same slide steals limited screen space. It ends up showing one bullet point per slide and filling the page with the citation information. I still need to provide citations though. The solution is perhaps to place `\placenotes[footnote]` after several slides. Then, at the very end of the document list the full bibliography with ` \placelistofpublications`. In this way, I still present the citations, but they don't bury the content of the slides. But something seems wrong with ConTeXt, not allowing this to function. Try to compile this code which Joey sent me and it won't populate `\placenotes[footnote]` with any content: \startbuffer [bib] @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \setupnote[footnote][location=none] % commenting out this line will produce footnotes that expand the citation correctly \starttext \input knuth \cite[alternative=footnote][clark1989] \page \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to setupbtx to get short citations?
On Sun, Jan 9, 2022 at 11:56 PM Mikael Sundqvist wrote: > > Hi, > > In the example below I can do \cite[short][hh2010] to get the citation > in the short format. But I thought that would also be the standard > with \setupbtx[aps][alternative=short] (so that I can write > \cite[hh2010] instead). What do I miss? (Except for the fact that I > should probably define my own btx style as a copy of aps instead of > setting the aps up...) > > /Mikael > > \startbuffer[bib] > @ELECTRONIC{hh2010, > author = {Hans Hagen}, > year = {2010}, > title = {Metafun. \CONTEXT\ mkiv}, > url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf}, > } > \stopbuffer > > \usebtxdataset[bib.buffer] > > \usebtxdefinitions[aps] > > \setupbtxrendering[aps][ > sorttype=short, > numbering=short, > ] > > \setupbtxlist[aps][ > width=fit, > distance=0.5em, > interaction=start, > ] > > \setupbtx[aps][ > alternative=short, > ] > > > \starttext > > \cite[hh2010] > > \placelistofpublications > > \stoptext It should be \setupbtx[aps:cite][ alternative=short, ] Sorry for the noise. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] How to setupbtx to get short citations?
Hi, In the example below I can do \cite[short][hh2010] to get the citation in the short format. But I thought that would also be the standard with \setupbtx[aps][alternative=short] (so that I can write \cite[hh2010] instead). What do I miss? (Except for the fact that I should probably define my own btx style as a copy of aps instead of setting the aps up...) /Mikael \startbuffer[bib] @ELECTRONIC{hh2010, author = {Hans Hagen}, year = {2010}, title = {Metafun. \CONTEXT\ mkiv}, url = {http://www.pragma-ade.nl/general/manuals/metafun-s.pdf}, } \stopbuffer \usebtxdataset[bib.buffer] \usebtxdefinitions[aps] \setupbtxrendering[aps][ sorttype=short, numbering=short, ] \setupbtxlist[aps][ width=fit, distance=0.5em, interaction=start, ] \setupbtx[aps][ alternative=short, ] \starttext \cite[hh2010] \placelistofpublications \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Why are endnotes not working with ConTeXt-SBL?
This actually seems to be rooted in a more general problem with the publications support module. Why does invoking the fastsetup for citations work within the default footnote setup, but not within endnotes flushed via \placenotes[footnote]? If I modify the original MWE to use ConTeXt's default btx rendering, I get the same error: ``` \startbuffer [bib] @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \setupnote[footnote][location=none] % commenting out this line will produce footnotes that expand the citation correctly \starttext \input knuth \cite[alternative=footnote][clark1989] \page \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext ``` If it helps, the relevant code in publications support is the following block in publ-imp-cite.mkvi: ``` \startsetups \s!btx:\s!cite:footnote \startfootnote \fastsetup{btx:cite:entry} \stopfootnote \stopsetups ``` The \fastsetup{btx:cite:entry} doesn't expand to anything if the footnote is flushed as an endnote via \placenotes[footnote]. Does anyone have any idea why this happens and how to fix it? Joey On Sat, Dec 25, 2021 at 3:34 PM Joey McCollum wrote: > A reasonable solution for the time being would be to check if the > righttext argument is empty, and add a final period in the footnote only if > it is not (with the assumption being that the user would provide > punctuation in any righttext for footnote/endnote citations). I've pushed > the following change to the GitHub repo, if you'd like to pull and use it: > > ``` > % 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 > \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 > ``` > > This should allow your script to compile, but unfortunately, it doesn't > seem to make endnotes work, at least not when I try it. For some reason, > the macro \Word{\fastsetup{btx:sbl:cite:inline}} is expanding to nothing > inside the \startfootnote ... \stopfootnote environment. I have no idea why > this is happening, so any ideas are appreciated. > > Joey > > On Sat, Dec 25, 2021 at 1:11 PM Joey McCollum > wrote: > >> Joel, >> >> You may not have done anything wrong; this may be an issue with >> ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in >> publ-imp-sbl.mkvi, I added a comment to this effect: >> >> ``` >> \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... >> \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, unless the righttext ends with punctuation >> \doifendswithpunctelse{\btxparameter{righttext}} { >> \removeunwantedspaces >> } { >> \removeunwantedspaces >> \btxperiod >> } >> \stopfootnote >> \endgroup >> >> \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} >> \stopsetups >> ``` >> >> I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. >> Initially, when I tried to invoke this macro within the \startfootnote ... >> \stopfootnote environment (to conditionally add a period at the end of a >> footnote citation if it does not have a righttext ending with p
Re: [NTG-context] Why are endnotes not working with ConTeXt-SBL?
A reasonable solution for the time being would be to check if the righttext argument is empty, and add a final period in the footnote only if it is not (with the assumption being that the user would provide punctuation in any righttext for footnote/endnote citations). I've pushed the following change to the GitHub repo, if you'd like to pull and use it: ``` % 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 \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 ``` This should allow your script to compile, but unfortunately, it doesn't seem to make endnotes work, at least not when I try it. For some reason, the macro \Word{\fastsetup{btx:sbl:cite:inline}} is expanding to nothing inside the \startfootnote ... \stopfootnote environment. I have no idea why this is happening, so any ideas are appreciated. Joey On Sat, Dec 25, 2021 at 1:11 PM Joey McCollum wrote: > Joel, > > You may not have done anything wrong; this may be an issue with > ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in > publ-imp-sbl.mkvi, I added a comment to this effect: > > ``` > \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... > \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, unless the righttext ends with punctuation > \doifendswithpunctelse{\btxparameter{righttext}} { > \removeunwantedspaces > } { > \removeunwantedspaces > \btxperiod > } > \stopfootnote > \endgroup > > \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} > \stopsetups > ``` > > I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. > Initially, when I tried to invoke this macro within the \startfootnote ... > \stopfootnote environment (to conditionally add a period at the end of a > footnote citation if it does not have a righttext ending with punctuation), > I got the same error you got, but for \btx_sbl_doifendswithpunctelse. I > wasn't sure why this was happening, so I tried defining a new > \doifendswithpunctelse macro. Unfortunately, based on your e-mail, it looks > like this doesn't actually fix the problem. > > Any help from other developers would be appreciated here! Unfortunately, I > don't have a MWE replicating the problem on hand at the moment. > > Joey > > On Sat, Dec 25, 2021 at 1:04 PM Joel via ntg-context > wrote: > >> I am using the ConTeXt-SBL package for citations. I need to move my >> footnotes to the end of each article. >> >> According to the manual, I can suppress the placement of footnotes using >> two lines of code. I've added these to my minimal working code, placing >> \setupnote[footnote][location=none] >> in the header and \placenotes[footnote] where I want the endnotes to >> appear. It complains this error: >> >> "Undefined control sequence \doifendswithpunctelse" >> >> What did I do wrong? >> >> --Joel >> >> Code follows: >> >> \usemodule[publ-imp-sbl] >> \startbuffer [bib] >> >> @Article{na2006, >> title={Volcanoes \word{of} New Mexico}, >> year={2006}, >> journal={New Mexico Earth Matters}, >> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral >> Resources}, >> volume={6}, >> number={1}, >> location={Socorro, New Mexico} >> } >> >> @Book{clark1989, >> author = {Clark, William}, >> title = {Railroads \word{and} railroad towns \word{in} New Mexico}, >> publisher = {New Mexico Magazine}, >> year = {1989}, >> address = {
Re: [NTG-context] Why are endnotes not working with ConTeXt-SBL?
Joel, You may not have done anything wrong; this may be an issue with ConTeXt-SBL. In my code for the btx:sbl:cite:footnote setup in publ-imp-sbl.mkvi, I added a comment to this effect: ``` \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... \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, unless the righttext ends with punctuation \doifendswithpunctelse{\btxparameter{righttext}} { \removeunwantedspaces } { \removeunwantedspaces \btxperiod } \stopfootnote \endgroup \doifnotinstring{\btxparameter{punct}}{\btxparameter{autopunctuation}}{\btxparameter{punct}} \stopsetups ``` I define the \btx_sbl_doifendswithpunctelse macro earlier in the module. Initially, when I tried to invoke this macro within the \startfootnote ... \stopfootnote environment (to conditionally add a period at the end of a footnote citation if it does not have a righttext ending with punctuation), I got the same error you got, but for \btx_sbl_doifendswithpunctelse. I wasn't sure why this was happening, so I tried defining a new \doifendswithpunctelse macro. Unfortunately, based on your e-mail, it looks like this doesn't actually fix the problem. Any help from other developers would be appreciated here! Unfortunately, I don't have a MWE replicating the problem on hand at the moment. Joey On Sat, Dec 25, 2021 at 1:04 PM Joel via ntg-context wrote: > I am using the ConTeXt-SBL package for citations. I need to move my > footnotes to the end of each article. > > According to the manual, I can suppress the placement of footnotes using > two lines of code. I've added these to my minimal working code, placing > \setupnote[footnote][location=none] > in the header and \placenotes[footnote] where I want the endnotes to > appear. It complains this error: > > "Undefined control sequence \doifendswithpunctelse" > > What did I do wrong? > > --Joel > > Code follows: > > \usemodule[publ-imp-sbl] > \startbuffer [bib] > > @Article{na2006, > title={Volcanoes \word{of} New Mexico}, > year={2006}, > journal={New Mexico Earth Matters}, > publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral > Resources}, > volume={6}, > number={1}, > location={Socorro, New Mexico} > } > > @Book{clark1989, > author = {Clark, William}, > title = {Railroads \word{and} railroad towns \word{in} New Mexico}, > publisher = {New Mexico Magazine}, > year = {1989}, > address = {Albuquerque, New Mexico}, > isbn = {9780937206126} > } > > \stopbuffer > > \usebtxdataset[bib.buffer] > > \setupbtx[dataset=default] > \usebtxdefinitions[sbl] > \setupbtx[sbl] > > \setupnote[footnote][location=none] > > \starttext > >\input knuth > \cite[clark1989] > > \placenotes[footnote] > > > \startchapter[title=Bibliography] > \placelistofpublications > \stopchapter > > \stoptext > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Why are endnotes not working with ConTeXt-SBL?
I am using the ConTeXt-SBL package for citations. I need to move my footnotes to the end of each article. According to the manual, I can suppress the placement of footnotes using two lines of code. I've added these to my minimal working code, placing \setupnote[footnote][location=none] in the header and \placenotes[footnote] where I want the endnotes to appear. It complains this error: "Undefined control sequence \doifendswithpunctelse" What did I do wrong? --Joel Code follows: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?
That may work with something like ``` \cite[loctext={{2},{2}}][{na2006,clark1989}] ``` or ``` \autocite[{{\loc[2]},{\loc[2]}}]{{na2006,clark1989}} ``` (I know that the ConTeXt \cite command supports multicites with comma-separated entries, but I forget exactly what the expected syntax looks like.) Joey On Fri, Dec 24, 2021 at 10:14 AM Denis Maier via ntg-context < ntg-context@ntg.nl> wrote: > biblatex has special multicite commands=> e.g. autocites. could that be > used in that case? > > Denis > > Joey McCollum via ntg-context hat am 24.12.2021 > 15:43 geschrieben: > > > Joel, > > Thanks for mentioning this! I think I've run into the same issue before, > but I wasn't sure how I should go about fixing it, so this might be a good > place to get suggestions from others. > > The \autocite, \inlinecite, \parencite, and \footcite helper commands are > intended to handle trailing punctuation intelligently (in order to do > things like move punctuation after a footnote citation before the footnote > marker), so they treat the next character after the command as a "hidden" > parameter. This works as expected if the next character is a punctuation > character or something like a \blank command, but if it's something like a > \section command (or another \autocite command, as you've discovered), then > this causes problems. > > That said, I think you should be able to get your ConTeXt to compile if > you follow your \autocite command with punctuation or some form of > whitespace (which is why a double newline works, as you've discovered, > while a single newline does not). > > I'd like to keep the intelligent trailing punctuation adjustment feature > if possible, but this problem definitely needs to be fixed. If anyone has > any suggestions, I welcome them! My hope is that this can be resolved with > a simple check. > > Joey > > On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context > wrote: > > I am using the ConTeXt-SBL module to handle the citations in my article. > Using the plain \cite[na2006] command has worked fine. > > But there are some situations where I want the footnote to include page > number details. I tried using \cite[extra=2][na2006], but that doesn't seem > compatible with ConTeXt-SBL. I checked the documentation, and if I > understand correctly, I should use the autocite command to add page numbers > to my citation? Like this: > > \autocite[{\loc[2]}][]{na2006} > > This solution works in 95% of cases, but when I need to cite another book > immediately after that, it throws up errors: > > > This won't compile: > > \autocite[{\loc[2]}][]{na2006} > \autocite[{\loc[2]}][]{clark1989} > > This won't compile: > > \autocite[{\loc[2]}][]{na2006}% > % >\autocite[{\loc[2]}][]{clark1989} > > This also won't compile: > > \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989} > > After much trial and error, I found this will compile: > > \autocite[{\loc[2]}][]{na2006} > > \autocite[{\loc[2]}][]{clark1989} > > The problem with this last example, is if my citations appear within the > paragraph, then I end up with a paragraph break in the wrong place! > > Here is my minimum working example, which won't compile unless I add a > blank line between the two citations. > > \usemodule[publ-imp-sbl] > \startbuffer [bib] > > @Article{na2006, > title={Volcanoes \word{of} New Mexico}, > year={2006}, > journal={New Mexico Earth Matters}, > publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral > Resources}, > volume={6}, > number={1}, > location={Socorro, New Mexico} > } > > @Book{clark1989, > author = {Clark, William}, > title = {Railroads \word{and} railroad towns \word{in} New Mexico}, > publisher = {New Mexico Magazine}, > year = {1989}, > address = {Albuquerque, New Mexico}, > isbn = {9780937206126} > } > > \stopbuffer > > \usebtxdataset[bib.buffer] > > \setupbtx[dataset=default] > \usebtxdefinitions[sbl] > \setupbtx[sbl] > > \starttext > > \autocite[{\loc[2]}][]{na2006} > \autocite[{\loc[3]}][]{clark1989} > > > \startchapter[title=Bibliography] > \placelistofpublications > \stopchapter > > \stoptext > > Is the autocite command the wrong tool for what I need? How can I place > citations right next to each other, but also include page number > information with ConTeXt-SBL? > > --Joel > > ___ > > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.nt
Re: [NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?
biblatex has special multicite commands=> e.g. autocites. could that be used in that case? Denis Joey McCollum via ntg-context hat am 24.12.2021 15:43 geschrieben: Joel, Thanks for mentioning this! I think I've run into the same issue before, but I wasn't sure how I should go about fixing it, so this might be a good place to get suggestions from others. The \autocite, \inlinecite, \parencite, and \footcite helper commands are intended to handle trailing punctuation intelligently (in order to do things like move punctuation after a footnote citation before the footnote marker), so they treat the next character after the command as a "hidden" parameter. This works as expected if the next character is a punctuation character or something like a \blank command, but if it's something like a \section command (or another \autocite command, as you've discovered), then this causes problems. That said, I think you should be able to get your ConTeXt to compile if you follow your \autocite command with punctuation or some form of whitespace (which is why a double newline works, as you've discovered, while a single newline does not). I'd like to keep the intelligent trailing punctuation adjustment feature if possible, but this problem definitely needs to be fixed. If anyone has any suggestions, I welcome them! My hope is that this can be resolved with a simple check. Joey On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context <ntg-context@ntg.nl> wrote: I am using the ConTeXt-SBL module to handle the citations in my article. Using the plain \cite[na2006] command has worked fine. But there are some situations where I want the footnote to include page number details. I tried using \cite[extra=2][na2006], but that doesn't seem compatible with ConTeXt-SBL. I checked the documentation, and if I understand correctly, I should use the autocite command to add page numbers to my citation? Like this: \autocite[{\loc[2]}][]{na2006} This solution works in 95% of cases, but when I need to cite another book immediately after that, it throws up errors: This won't compile: \autocite[{\loc[2]}][]{na2006} \autocite[{\loc[2]}][]{clark1989} This won't compile: \autocite[{\loc[2]}][]{na2006}% % \autocite[{\loc[2]}][]{clark1989} This also won't compile: \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989} After much trial and error, I found this will compile: \autocite[{\loc[2]}][]{na2006} \autocite[{\loc[2]}][]{clark1989} The problem with this last example, is if my citations appear within the paragraph, then I end up with a paragraph break in the wrong place! Here is my minimum working example, which won't compile unless I add a blank line between the two citations. \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} }
Re: [NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?
Additionally, if you want to cite page numbers, the key to use in ConTeXt-SBL is "loctext". (I was not aware of an "extra" key when I was developing the module.) So, you should be able to make the ConTeXt-style \cite command work as follows: ``` \cite[loctext=2][na2006] ``` I hope this helps, too! Joey On Fri, Dec 24, 2021 at 9:43 AM Joey McCollum wrote: > Joel, > > Thanks for mentioning this! I think I've run into the same issue before, > but I wasn't sure how I should go about fixing it, so this might be a good > place to get suggestions from others. > > The \autocite, \inlinecite, \parencite, and \footcite helper commands are > intended to handle trailing punctuation intelligently (in order to do > things like move punctuation after a footnote citation before the footnote > marker), so they treat the next character after the command as a "hidden" > parameter. This works as expected if the next character is a punctuation > character or something like a \blank command, but if it's something like a > \section command (or another \autocite command, as you've discovered), then > this causes problems. > > That said, I think you should be able to get your ConTeXt to compile if > you follow your \autocite command with punctuation or some form of > whitespace (which is why a double newline works, as you've discovered, > while a single newline does not). > > I'd like to keep the intelligent trailing punctuation adjustment feature > if possible, but this problem definitely needs to be fixed. If anyone has > any suggestions, I welcome them! My hope is that this can be resolved with > a simple check. > > Joey > > On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context > wrote: > >> I am using the ConTeXt-SBL module to handle the citations in my article. >> Using the plain \cite[na2006] command has worked fine. >> >> But there are some situations where I want the footnote to include page >> number details. I tried using \cite[extra=2][na2006], but that doesn't seem >> compatible with ConTeXt-SBL. I checked the documentation, and if I >> understand correctly, I should use the autocite command to add page numbers >> to my citation? Like this: >> >> \autocite[{\loc[2]}][]{na2006} >> >> This solution works in 95% of cases, but when I need to cite another book >> immediately after that, it throws up errors: >> >> >> This won't compile: >> >> \autocite[{\loc[2]}][]{na2006} >> \autocite[{\loc[2]}][]{clark1989} >> >> This won't compile: >> >> \autocite[{\loc[2]}][]{na2006}% >> % >>\autocite[{\loc[2]}][]{clark1989} >> >> This also won't compile: >> >> \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989} >> >> After much trial and error, I found this will compile: >> >> \autocite[{\loc[2]}][]{na2006} >> >> \autocite[{\loc[2]}][]{clark1989} >> >> The problem with this last example, is if my citations appear within the >> paragraph, then I end up with a paragraph break in the wrong place! >> >> Here is my minimum working example, which won't compile unless I add a >> blank line between the two citations. >> >> \usemodule[publ-imp-sbl] >> \startbuffer [bib] >> >> @Article{na2006, >> title={Volcanoes \word{of} New Mexico}, >> year={2006}, >> journal={New Mexico Earth Matters}, >> publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral >> Resources}, >> volume={6}, >> number={1}, >> location={Socorro, New Mexico} >> } >> >> @Book{clark1989, >> author = {Clark, William}, >> title = {Railroads \word{and} railroad towns \word{in} New Mexico}, >> publisher = {New Mexico Magazine}, >> year = {1989}, >> address = {Albuquerque, New Mexico}, >> isbn = {9780937206126} >> } >> >> \stopbuffer >> >> \usebtxdataset[bib.buffer] >> >> \setupbtx[dataset=default] >> \usebtxdefinitions[sbl] >> \setupbtx[sbl] >> >> \starttext >> >> \autocite[{\loc[2]}][]{na2006} >> \autocite[{\loc[3]}][]{clark1989} >> >> >> \startchapter[title=Bibliography] >> \placelistofpublications >> \stopchapter >> >> \stoptext >> >> Is the autocite command the wrong tool for what I need? How can I place >> citations right next to each other, but also include page number >> information with ConTeXt-SBL? >> >> --Joel >> >> >> ___ >> If your ques
Re: [NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?
Joel, Thanks for mentioning this! I think I've run into the same issue before, but I wasn't sure how I should go about fixing it, so this might be a good place to get suggestions from others. The \autocite, \inlinecite, \parencite, and \footcite helper commands are intended to handle trailing punctuation intelligently (in order to do things like move punctuation after a footnote citation before the footnote marker), so they treat the next character after the command as a "hidden" parameter. This works as expected if the next character is a punctuation character or something like a \blank command, but if it's something like a \section command (or another \autocite command, as you've discovered), then this causes problems. That said, I think you should be able to get your ConTeXt to compile if you follow your \autocite command with punctuation or some form of whitespace (which is why a double newline works, as you've discovered, while a single newline does not). I'd like to keep the intelligent trailing punctuation adjustment feature if possible, but this problem definitely needs to be fixed. If anyone has any suggestions, I welcome them! My hope is that this can be resolved with a simple check. Joey On Fri, Dec 24, 2021 at 9:37 AM Joel via ntg-context wrote: > I am using the ConTeXt-SBL module to handle the citations in my article. > Using the plain \cite[na2006] command has worked fine. > > But there are some situations where I want the footnote to include page > number details. I tried using \cite[extra=2][na2006], but that doesn't seem > compatible with ConTeXt-SBL. I checked the documentation, and if I > understand correctly, I should use the autocite command to add page numbers > to my citation? Like this: > > \autocite[{\loc[2]}][]{na2006} > > This solution works in 95% of cases, but when I need to cite another book > immediately after that, it throws up errors: > > > This won't compile: > > \autocite[{\loc[2]}][]{na2006} > \autocite[{\loc[2]}][]{clark1989} > > This won't compile: > > \autocite[{\loc[2]}][]{na2006}% > % >\autocite[{\loc[2]}][]{clark1989} > > This also won't compile: > > \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989} > > After much trial and error, I found this will compile: > > \autocite[{\loc[2]}][]{na2006} > > \autocite[{\loc[2]}][]{clark1989} > > The problem with this last example, is if my citations appear within the > paragraph, then I end up with a paragraph break in the wrong place! > > Here is my minimum working example, which won't compile unless I add a > blank line between the two citations. > > \usemodule[publ-imp-sbl] > \startbuffer [bib] > > @Article{na2006, > title={Volcanoes \word{of} New Mexico}, > year={2006}, > journal={New Mexico Earth Matters}, > publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral > Resources}, > volume={6}, > number={1}, > location={Socorro, New Mexico} > } > > @Book{clark1989, > author = {Clark, William}, > title = {Railroads \word{and} railroad towns \word{in} New Mexico}, > publisher = {New Mexico Magazine}, > year = {1989}, > address = {Albuquerque, New Mexico}, > isbn = {9780937206126} > } > > \stopbuffer > > \usebtxdataset[bib.buffer] > > \setupbtx[dataset=default] > \usebtxdefinitions[sbl] > \setupbtx[sbl] > > \starttext > > \autocite[{\loc[2]}][]{na2006} > \autocite[{\loc[3]}][]{clark1989} > > > \startchapter[title=Bibliography] > \placelistofpublications > \stopchapter > > \stoptext > > Is the autocite command the wrong tool for what I need? How can I place > citations right next to each other, but also include page number > information with ConTeXt-SBL? > > --Joel > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Why are back-to-back \autocite commands not working in ConTeXt-SBL?
I am using the ConTeXt-SBL module to handle the citations in my article. Using the plain \cite[na2006] command has worked fine. But there are some situations where I want the footnote to include page number details. I tried using \cite[extra=2][na2006], but that doesn't seem compatible with ConTeXt-SBL. I checked the documentation, and if I understand correctly, I should use the autocite command to add page numbers to my citation? Like this: \autocite[{\loc[2]}][]{na2006} This solution works in 95% of cases, but when I need to cite another book immediately after that, it throws up errors: This won't compile: \autocite[{\loc[2]}][]{na2006} \autocite[{\loc[2]}][]{clark1989} This won't compile: \autocite[{\loc[2]}][]{na2006}%% \autocite[{\loc[2]}][]{clark1989} This also won't compile: \autocite[{\loc[2]}][]{na2006}\autocite[{\loc[2]}][]{clark1989} After much trial and error, I found this will compile: \autocite[{\loc[2]}][]{na2006} \autocite[{\loc[2]}][]{clark1989} The problem with this last example, is if my citations appear within the paragraph, then I end up with a paragraph break in the wrong place! Here is my minimum working example, which won't compile unless I add a blank line between the two citations. \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \starttext \autocite[{\loc[2]}][]{na2006} \autocite[{\loc[3]}][]{clark1989} \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext Is the autocite command the wrong tool for what I need? How can I place citations right next to each other, but also include page number information with ConTeXt-SBL? --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Displaying names in Chicago-Turabian "note" style
Joel, I've attempted to incorporate most of these features for the SBL citation style (which derives most of the same rules from Chicago) for ConTeXt. You can use my code in https://github.com/jjmccollum/context-sbl as a template for now, if you'd like; we're still waiting for the code to be incorporated into a future ConTeXt update. Regarding the specific features you described: (1) The rules for first name-last name authorconversions and et al. limits for inline citations (i.e., ones in the text/footnotes, but not in the bibliographic list) can be implemented using the general \definebtx[chicagonum:\s!cite] command. In publ-imp-sbl.mkvi, I do this as follows: \definebtx [sbl:\s!cite] [sbl] [\c!alternative=footnote, % by default, SBL uses footnote citation format (defined below) \c!otherstext={\btxspace\btxlabeltext{others}}, % use et al. for truncated author / editor list \c!etallimit=3, % don't use et al. for 3 or fewer authors \c!etaldisplay=1, % but if there are > 3, then only list the first explicitly \c!etaloption=last, \c!authorconversion=\v!normal, % by default, use normal name order for in-text citations ... ] (2) SBL also uses short-form citations for inline citations after the first one. To make these work, it ended up being easiest to create distinct \fastsetups for an "inlineshort" style. Here is how I handled the citation of the author in such instances in publ-imp-sbl.mkvi : \starttexdefinition btx:sbl:inlineshort:author \btxdoif{author} { % If the useidem option is set and this author matches the previously cited author, then just print "idem"; % otherwise, print the author/editor's last name \doifelse{\btxparameter{useidem}} {\v!yes} { \texdefinition{btx:sbl:doifsamefoundnameauthorelse}{\currentbtxtag}{\getvariable{btx:sbl}{previousinlinetag}} { \btxlabeltext{sbl:idem} } { \currentbtxciteauthorbyfield } } { \currentbtxciteauthorbyfield } \btxcomma } \stoptexdefinition (3) I haven't implemented support for ibid. tracking (it's on a wishlist that I sent to Hans and Alan, as it would best be handled by changes to the core publication support module), so I'm afraid I can't help you on that at the moment. There is some placeholder code in publ-imp-sbl.mkvi for handling this when ibid. tracking is eventually implemented, so you might be able to use that as a template. (4) To get the "inverted first author" authorconversion working, I had to create new authorconversions for this. You can find this in the updated publ-imp-author.mkvi file in my GitHub repo: \startsetups \s!btx:\s!list:\s!author:invertedfirst \ifnum\currentbtxauthorindex>\plusone \fastsetup{\s!btx:\s!list:\s!author:normal} \else \fastsetup{\s!btx:\s!list:\s!author:inverted} \fi \stopsetups \startsetups \s!btx:\s!cite:\s!author:invertedfirst \ifnum\currentbtxauthorindex>\plusone \fastsetup{\s!btx:\s!cite:\s!author:normal} \else \fastsetup{\s!btx:\s!cite:\s!author:inverted} \fi \stopsetups Then, in publ-imp-sbl.mkvi, I invoke this setup in the \btxsetup for citations in the bibliographic list as follows: \definebtx [sbl:\s!list:author] [sbl:\s!list] [\c!authorconversion=invertedfirst, \c!separator:names:4={\btxcomma\btxlabeltext{and}\space}] % between only 2 names I hope this helps! Joey On Tue, Dec 21, 2021 at 12:51 PM Joel via ntg-context wrote: > I could not find any existing solution for using Chicago-Turabian "note" > style in ConTeXt, so I have started my own attempt. > > Chicago-Turabian uses footnotes to display the author's details on the > same page, but also uses a bibliography to display an alphabetical list of > the sources again at the end. The footnotes display somewhat differently > each time a source is shown. The first time a source is cited, the footnote > contains a long, detailed reference. Subsequent reappearances of the same > citation are abbreviated somewhat. And "ibid" is used when the source is > cited twice in a row. The bibliography entry contains really detailed > information, similar to what was shown in the first footnote, with minor > differences. > > This code uses three macros: \turabian, used only the first time a source > is reference, \shortturabian, used for subsequent references of the same > source, and `\ibid, for when a source is referenced twice in a row. Each of > these macros simply creates a footnote, showing the author's details, and > also uses \nocite to make sure an entry is added to > \placelistofpublications. Page details are optionally added in #2, and this > information only appears in the footnotes. > > I am having trouble getting the code to display the author's names > correctly. Every attempt ends with strange results, like "FirstLast" with > no space or just
[NTG-context] Displaying names in Chicago-Turabian "note" style
imit=] \setupbtx[chicagonum:list:author] [authorconversion={normal}, etallimit=] \setupbtx[chicagonum:cite:author] [authorconversion={normal}, etallimit=3, etaldisplay=1] \usebtxdefinitions[chicagonum] \define[2]\turabian{% \footnote{% \ifisempty{\cite[author][#1]}{}{\cite[author][#1]}% \ifisempty{\cite[title][#1]}{}{,\ {\it\Words \cite[title][#1].}}% \ifisempty{\cite[address][#1]\cite[publisher][#1]\cite[year][#1]}{}{\ (}% \cite[address][#1]: ~% \ifisempty{\cite[journal][#1]}{\ifisempty{\cite[publisher][#1]}{}{\cite[publisher][#1]:\ }}{\cite[journal][#1]:\ }% \ifisempty{\cite[year][#1]}{}{,\ \cite[year][#1]}% \ifisempty{\cite[address][#1]\cite[publisher][#1]\cite[year][#1]}{}{)}% \ifisempty{#2}{.}{,\ #2.}% }% \nocite[#1]% }% \define[2]\shortturabian{% \footnote{% \ifisempty{\cite[author][#1]}{}{\cite[author][#1]}% \ifisempty{#2}{.}{,\ #2.}% }% \nocite[#1]% }% \define[2]\ibid{ \footnote{% Ibid\ifisempty{#2}{.}{,\ #2.}% }% \nocite[#1]% } \starttext \input knuth \turabian{ball1996}{1\endash 23} \input knuth \turabian{minear2009}{32\endash 23} \ibid{minear2009}{32\endash 23} \ibid{minear2009}{} \input knuth \turabian{ball1996}{} \input knuth \shortturabian{minear2009}{121\endash 99} \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Initial release of SBL bibliographic rendering and biblio wishlist
Hello Joey, Just a quick note to thank you for your work on this. I use Chicago which is close enough to SBL that I can use it. I'll test it for a while and report any issues I encounter. Jelle On Thu, Dec 9, 2021 at 12:47 AM Joey McCollum via ntg-context wrote: > > A while ago, I mentioned in a thread on the mailing list that I was working > on a new bibliographic rendering for the SBL citation style. After additional > testing and implementation of various features (e.g., an authorconversion > that inverts the first author and prints all subsequent authors in normal > order, an author-title sort order for bibliographic entries, support for > shorthands/abbreviations, support for Citation Style Language locators, and > support for biblatex-style citation macros that intelligently move > punctuation that follows them). While optimizations for performance, > simplifications of the code, and new feature additions are still desirable, > the module is in working condition and can now be incorporated in a future > ConTeXt update. The new .lua and .mkvi files for the SBL rendering, updated > publ-aut.lua and publ-imp-author.mkvi files, and some new code intended to be > incorporated into publ-ini.lua and publ-ini.mkiv can all be found in project > GitHub repo at the https://github.com/jjmccollum/context-sbl. > > While I worked on this module, Denis Maier (who provided valuable feedback > and suggestions throughout) and I put together a wish list of new features we > would like to see implemented in the publications support core modules. We > put together the list with Hans and Alan in mind, but any help is > appreciated! The list follows: > > Probably the most urgent need is for field inheritance mappings through > crossrefs to be fixed. These should be customizable in bibliographic > specification .lua files (e.g., publ-imp-sbl.lua), or at the very least, they > should follow the pattern of biblatex. As it is currently implemented, field > inheritance seems to map any field from the cross-referenced entry to a field > of the same name in the current entry if it doesn't have a field of this name > already. But this causes serious problems when one needs to check if an entry > has a given field (such as "shorthand") at all; specifically, the \btxdoif > macro will execute its argument if the current entry or any entry it > cross-references contains a field with that name. What we want is a more > disambiguated mapping of inherited fields: for many common entry types (such > as @book, @collection, @reference, @proceedings, and @inbook, @incollection, > @inreference, and @inproceedings), biblatex maps the title field of the > cross-referenced entry to a different-named field in the lower-level entry > (e.g., maintitle -> booktitle -> title, maineditor -> bookeditor -> editor, > etc.). > A mechanism for setting default field values (e.g., "pagination", "options") > by category in the .lua file for a given specification. (In the SBL spec, for > instance, an entry of category @ancienttext or @classictext should have > options={skipbib=true} by default.) If the user actually specifies this field > in an entry, then the default value would be overwritten. > If it hasn't been done already, the \btxdoifelsecitedone macro defined in the > cont-new.mkiv file in https://github.com/jjmccollum/context-sbl should be > implemented in publ-ini.lua and publ-ini.mkiv. > Related to the previous entry, the ability to remove existing entry tags from > the "collected" or "tobesaved" lists defined in publ-ini.lua. This would > allow us to override the usual list registry rules of \cite based on the > values of, say, an entry's category, "type" field or "options" field. > General support for the useauthor, useeditor, usetranslator, skipbib, and > skipbiblist entry options from biblatex. These could be implemented as > citation-level btx options (currently, useauthor already is implemented for > the SBL style). > Support for disambiguation in "author" citations made with the "name" > authorconversion. Publications support already allows us to map different > versions of the same name (e.g., "John Doe" and "J. Doe" to a single value. > But ideally, the publications support module should also check if surnames > are shared by distinct authors, and if so, it should then check for distinct > first and middle initials, and then distinct full names, until it finds a > difference. The shortest distinct renderings should then be used for the > "name" authorconversion. Different bibliographic renderings have different > rules for this, so implementations of these differen
[NTG-context] Initial release of SBL bibliographic rendering and biblio wishlist
A while ago, I mentioned in a thread on the mailing list that I was working on a new bibliographic rendering for the SBL citation style. After additional testing and implementation of various features (e.g., an authorconversion that inverts the first author and prints all subsequent authors in normal order, an author-title sort order for bibliographic entries, support for shorthands/abbreviations, support for Citation Style Language locators, and support for biblatex-style citation macros that intelligently move punctuation that follows them). While optimizations for performance, simplifications of the code, and new feature additions are still desirable, the module is in working condition and can now be incorporated in a future ConTeXt update. The new .lua and .mkvi files for the SBL rendering, updated publ-aut.lua and publ-imp-author.mkvi files, and some new code intended to be incorporated into publ-ini.lua and publ-ini.mkiv can all be found in project GitHub repo at the https://github.com/jjmccollum/context-sbl. While I worked on this module, Denis Maier (who provided valuable feedback and suggestions throughout) and I put together a wish list of new features we would like to see implemented in the publications support core modules. We put together the list with Hans and Alan in mind, but any help is appreciated! The list follows: - Probably the most urgent need is for field inheritance mappings through crossrefs to be fixed. These should be customizable in bibliographic specification .lua files (e.g., publ-imp-sbl.lua), or at the very least, they should follow the pattern of biblatex. As it is currently implemented, field inheritance seems to map any field from the cross-referenced entry to a field *of the same name* in the current entry if it doesn't have a field of this name already. But this causes serious problems when one needs to check if an entry has a given field (such as "shorthand") at all; specifically, the \btxdoif macro will execute its argument if the current entry *or any entry it cross-references* contains a field with that name. What we want is a more disambiguated mapping of inherited fields: for many common entry types (such as @book, @collection, @reference, @proceedings, and @inbook, @incollection, @inreference, and @inproceedings), biblatex maps the title field of the cross-referenced entry to a different-named field in the lower-level entry (e.g., maintitle -> booktitle -> title, maineditor -> bookeditor -> editor, etc.). - A mechanism for setting default field values (e.g., "pagination", "options") by category in the .lua file for a given specification. (In the SBL spec, for instance, an entry of category @ancienttext or @classictext should have options={skipbib=true} by default.) If the user actually specifies this field in an entry, then the default value would be overwritten. - If it hasn't been done already, the \btxdoifelsecitedone macro defined in the cont-new.mkiv file in https://github.com/jjmccollum/context-sbl should be implemented in publ-ini.lua and publ-ini.mkiv. - Related to the previous entry, the ability to remove existing entry tags from the "collected" or "tobesaved" lists defined in publ-ini.lua. This would allow us to override the usual list registry rules of \cite based on the values of, say, an entry's category, "type" field or "options" field. - General support for the useauthor, useeditor, usetranslator, skipbib, and skipbiblist entry options from biblatex. These could be implemented as citation-level btx options (currently, useauthor already is implemented for the SBL style). - Support for disambiguation in "author" citations made with the "name" authorconversion. Publications support already allows us to map different versions of the same name (e.g., "John Doe" and "J. Doe" to a single value. But ideally, the publications support module should also check if surnames are shared by distinct authors, and if so, it should then check for distinct first and middle initials, and then distinct full names, until it finds a difference. The shortest distinct renderings should then be used for the "name" authorconversion. Different bibliographic renderings have different rules for this, so implementations of these different rules (detailed at https://docs.citationstyles.org/en/stable/specification.html#disambiguation) would be ideal. - General support for *ibidem* (same entry), *idem* (same author), and *op. cit.* (same title) tracking in the publ-ini module. These could be implemented with default settings that could be overridden as needed in individual specifications. Following biblatex, the user should be able to specify yes/no "ibidtracker", "
Re: [NTG-context] Checking for a Unicode prefix of a Unicode string
I was afraid that might be the problem. I've described some of the intended purpose of this code near the end of the "Checking for a macro in a string without expanding it" thread on the mailing list, but I will get into more detail here. I'm working on a ConTeXt implementation of citation style language (CSL) locators, particularly for the SBL citation rendering (although the code could easily be adapted for use in general or with other bibliographic renderings). This would allow for a consistent, language-sensitive syntax that could be used within citations or in any part of a text and could accommodate changes in bibliographic style without requiring the user to reformat all their page number citations. In SBL style, for instance, volume, part, and page numbers are not prefixed by abbreviations like "vol.", "pt." and "p.", but in other styles, they might be. The locator syntax ``` \loc[vol=33,pt=1,p=86] ``` would be defined in the SBL rendering file to output ``` 33.1:86 ``` while in some other style, it might be defined to output ``` vol. 33, pt. 1, p. 86 ``` To accommodate the use of these macros within citations, I've added "loctext" (locator text) and "altloctext" (alternate locator text) arguments to the set of parameters used by the \cite macro, because in some bibliographic categories, different locators can be specified for different parts of a citation (e.g., one for a passage in an ancient text and another for the book reproducing it), and therefore cannot just be specified in the "righttext" parameter. So now we can do something like ``` \cite[lefttext={See},altloctext={1.3},loctext={8:223},righttext={for further details}][clementinehomilies] ``` to get See *The Clementine Homilies* 1.3 (*ANF *8:223) for further details. or ``` \cite[lefttext={See},loctext={\loc[p=8]},righttext={; but there are also contradictory statements, e.g. \loc[p=12].}][Doe:Title] ``` to get See Doe, *Title*, 8; but there are also contradictory statements, e.g. 12. The main problem is determining when to include a comma before printing the "loctext" and when not to include one. In the first example above, we don't want a comma between *ANF* and 8:223 (SBL style does not add a comma between a multivolume set abbreviation and a volume number), but in the second example, we do want one between *Title *and 8. Similarly, we want to remove the comma if the first locator in the loctext is a section marker (§) or paragraph marker (¶). This is why I want to check the beginning of the \currentloctext macro for the presence of a volume number (a number followed by a colon), a section mark, or a paragraph mark. While storing the locator parameters as btx parameters would allow for another solution to this problem, it would complicate defining the \loc macro in a way that would be suitable outside of citations or for multiple uses in the same citation (notice how a second \loc invocation occurs in the righttext of the second example above). Parsing the output of \loc seemed like the simplest solution, but as you've pointed out, it has its own difficulties. I'm inclined to try one of the TeX-based solutions you describe above to avoid complicating other things, but if my description of the intended use gives you any better ideas, please suggest them! Thanks again! Joey On Sat, Nov 27, 2021 at 1:44 PM Hans Hagen wrote: > On 11/27/2021 6:13 PM, Joey McCollum wrote: > > All right, I think I've solved the expansion problem I described before: > > to ensure that the first input is expanded when it is passed to Lua, I > > have to pass it as [==[#1]==], not "#1". But the updated MWE below still > > does not seem to work, as the \DoIfPrefixElse macro is printing "NOP" > > instead of "YES": > > > > ``` > > > > \starttexdefinition loc [#1] > > > > \doifassignmentelse{#1} { > > > > % if an assignment, then parse and format accordingly > > > > \getparameters[loc][#1] > > > > % Was a section number specified? > > > > \doifdefined{locsec} { > > > > § \locsec > > > > } > > > > } { > > > > % otherwise, just print the input as-is > > > > #1 > > > > } > > > > \stoptexdefinition > > > > > > > \def\DoIfPrefixElse#1#2{\ctxlua{commands.doifelse(string.find([==[#2]==],"^"..[==[#1]==]))}} > > > > > > \def\currentbtxloctext{\loc[sec=31]} > > > > > > \starttext > > > > \currentbtxloctext\blank > > > > \DoIfPrefixElse{§}{\currentbtxloctext}{YES}{NOP} > > > > \stoptext > > > > ``` > > > > Indeed, if I add a simple \doifelse equality check, it looks like the > > value I expect is not th
Re: [NTG-context] Creating bibliographies with ox-context
Just if anyone is interested: ox is the export framework for orgmode. ox-context is the new exporter to context: https://github.com/Jason-S-Ross/ox-context Concerning citations: I've not tested this, but if you're already on org 9.5, maybe you will want to have a look into the new citation export options. You should be able to export citations via citeproc-el. Should be pretty similar to what you can do with pandoc. The citation system in orgmode is much more powerful than pandoc's though as the syntax is extensible. Theoretically, it should be possible to use context's native bibliography command as well if you're willing to write an org-cite module for that. (Similar to oc-biblatex or oc-natbib.) Best, Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von juh via ntg- > context > Gesendet: Mittwoch, 24. November 2021 07:58 > An: mailing list for ConTeXt users > Cc: juh > Betreff: Re: [NTG-context] Creating bibliographies with ox-context > > I have to apologise, > > I posted this to the wrong mailinglist. Sorry. > > But thank you anyway. I'll have a look at these resources, too. > > juh > > Am Tue, Nov 23, 2021 at 06:58:49PM +0100 schrieb Henning Hraban Ramm via > ntg-context: > > Am 23.11.21 um 18:51 schrieb Henning Hraban Ramm via ntg-context: > > > Am 23.11.21 um 18:02 schrieb juh via ntg-context: > > > > Hi all, > > > > > > > > I am kind of lost with references and ox-context and ox-epub. > > > > > > What do you mean with "ox"? > > > > > > > Is there a tutorial how to integrate a bibliography in ConTeXt and > > > > epub-Export? > > > > > > Did you read the bibliography manual (mkiv-publications.pdf)? > > > > I forgot: > > If you don’t need / work from a bibliographical database but you just > > have the sources list for one publication, the “simple & manual” > > approach might suit you: > > https://wiki.contextgarden.net/Bibliography#Simple_manual_bibliography > > (I never needed more, since I mostly typseset other people’s > > manuscripts.) > > -- > Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays: > . http://www.sudelbuch.de Privater Blog: > http://www.hasecke.eu > Netzliteratur-Projekt: http://www.generationenprojekt.de > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Checking for a macro in a string without expanding it
On 11/16/2021 11:15 PM, Joey McCollum via ntg-context wrote: I'm not sure if my mind is twisted enough! I can follow how Jairo's answer works, and that does what I need it to, but it's not as clear to me what the last two TeX-only approaches are doing at a low level. Perhaps more importantly, I should clarify that for my purposes, the \MyOuter macro is the \currentbtxrighttext macro, which is defined in a separate module that I'd prefer not to modify. I want to be able to detect and parse the parameters of a \loc macro that a user can specify in a citation as follows: ``` \cite[lefttext={See}, righttext={\loc[vol=8,p=223] for further details}][clementinehomilies] ``` Because the locator parameters may need to be parenthesized or formatted differently depending on the category of the bibliography entry, they should be typeset separately from the plain part of the righttext. This is why I'd like to be able to parse the parameters and then expand the \loc macro itself as empty when the righttext is typeset. in that case: just redefine \loc on the fly depending on where it's used and/or use keys \cite[lefttext={See},volume=8,page=223] or so .. imo parsing content is not really a good solution and probably also not reliable Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Checking for a macro in a string without expanding it
I'm not sure if my mind is twisted enough! I can follow how Jairo's answer works, and that does what I need it to, but it's not as clear to me what the last two TeX-only approaches are doing at a low level. Perhaps more importantly, I should clarify that for my purposes, the \MyOuter macro is the \currentbtxrighttext macro, which is defined in a separate module that I'd prefer not to modify. I want to be able to detect and parse the parameters of a \loc macro that a user can specify in a citation as follows: ``` \cite[lefttext={See}, righttext={\loc[vol=8,p=223] for further details}][clementinehomilies] ``` Because the locator parameters may need to be parenthesized or formatted differently depending on the category of the bibliography entry, they should be typeset separately from the plain part of the righttext. This is why I'd like to be able to parse the parameters and then expand the \loc macro itself as empty when the righttext is typeset. Joey On Tue, Nov 16, 2021 at 4:19 PM Hans Hagen via ntg-context < ntg-context@ntg.nl> wrote: > On 11/16/2021 9:09 PM, Jairo A. del Rio via ntg-context wrote: > > If I understand it correctly, you may need something like this...? > > > > % Protection is key > > \protected\def\inner[#1]{\empty} > > % \outer is (or was) already defined in \CONTEXT > > % Please use another name > > \def\Outer{\inner[123] and \inner[some text] etc.} > > \startluacode > > local implement = interfaces.implement > > local argument = tokens.scanners.argument > > local function parseinner() > >local r = {} > >local str = argument() > >str = str:gsub("\\inner%s*(%b[])",function(s)r[#r+1] = > s:sub(2,#s-1)end) > >context(table.concat(r," ")) -- Change " " by another spacer if needed > > end > > implement{name = "parseinner", public = true, actions = parseinner} > > \stopluacode > > \starttext > > \parseinner{\Outer} > > \stoptext > > > > However, this will only work with very simple cases (no nesting, etc.). > > Hope this helps. > well, if we start talking weird code ... > > \starttext > > \tolerant\def\MyInnerOuter#1\MyInner[#2]#3\MyDone\ignorearguments{#2} > > \def\MyOuter#1{\MyInnerOuter#1\MyDone\ignorearguments} > > whatever: \MyOuter{\MyInner[oeps]}\par > whatever: \MyOuter{\InnerMy[oeps]}\par > > \edef\ItWorksA{\MyOuter{\MyInner[oeps]}} > \edef\ItWorksB{\MyOuter{\InnerMy[oeps]}} > > whatever: \meaningless\ItWorksA\par > whatever: \meaningless\ItWorksB\par > > \stoptext > > (1) we're tolerant so no problem when no match > (2) the ignore hack quits scanning because tex will keep looking > > it's pretty fast and needs no lua magic, only a twisted mind > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Line breaks, \wordright and hyphenation
On Sunday, October 24, 2021 5:31:32 PM IST Hans Hagen wrote: > On 10/24/2021 1:08 PM, Benjamin Buchmuller via ntg-context wrote: > > Maybe > > > > \hfill author > > It's anyway nicer to use > > % \definenarrower > % [amnata] > % [left=\measure{amnatamargin}, > %right=\measure{amnatamargin}, > %default={left,right}] > > \definenarrower >[amnata] >[middle=\measure{amnatamargin}] > > but then them, the fact that we get something hyphenated interferes .. > tricky Dear Benjamin and Hans, Thanks for your responses. I did not mention this in my initial question but I am not exactly doing 'author' in the last line. Instead I usually do \cite[alternative=authoryears,righttext={Ch. 12}][author1992]. That is, almost always, I need to refer to a specific chapter/page number in the work. The issue with this and \hfill is that the 'righttext' part gets nudged into the next line. Sreeram ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Short forms and abbreviations in bibliography
If it helps with troubleshooting, I've also tried to do this with \fastsetup instead of \texdefinition: ``` \expanded{\abbreviation[\currentbtxtag]{\fastsetup{btx:sbl:cite:shorthand}}{ \fastsetup{btx:sbl:cite:listsubcite}}} ``` This also doesn't work, but I at least get a "Missing control sequence inserted" error. The following MWE should reproduce the error (it modifies the existing Chicago rendering, but since I couldn't figure out how to add a shorthand field to the @book category in the chicago spec from within the MWE, I just used the note field as a placeholder for it): ``` % Setup a minimal bibliography \startbuffer [bib] @book{Author1:2016, author={Author1}, title={Work1}, note={W1}, publisher={Publisher1}, year=2016, } @book{Author2:2015, author={Author2}, title={Work2}, publisher={Publisher2}, year=2015, } \stopbuffer \usebtxdataset [bib.buffer] % Setup a new cite alternative to test the desired functionality \startbtxrenderingdefinitions[chicago] \definesynonyms[abbreviation][abbreviations][\infull][\inshort] % we need the \inshort command to access abbreviations by their entry tag \startsetups btx:chicago:cite:shorthand \fastsetup{btx:cite:concat} \fastsetup{btx:cite:lefttext} \begingroup \def\currentbtxcitealternative{short} \def\currentbtxcategory{\btxfield{category}} \btxstartstyleandcolor[sbl:\s!list:title:\currentbtxcategory] \btxusecommand[sbl:\s!list:title:\currentbtxcategory]{ \btxflush{note}% set the shorthand according to the current category } \btxstopstyleandcolor \endgroup \fastsetup{btx:cite:righttext} \stopsetups \startsetups btx:chicago:cite:test \fastsetup{btx:cite:concat} \fastsetup{btx:cite:lefttext} \btxdoifelse{note} { %\expanded{\definesynonym[yes][abbreviation][\currentbtxtag]{\fastsetup{btx:chicago:cite:shorthand}}{\fastsetup{btx:cite:entry}}}% this throws a Missing control sequence inserted error \expanded{\definesynonym[yes][abbreviation][\currentbtxtag]{\cite[alternative=shorthand][\currentbtxtag]}{\cite[alternative=entry][\currentbtxtag]}}% this works, but recursively cites the same tag \inshort{\currentbtxtag} } { \fastsetup{btx:cite:entry} } \fastsetup{btx:cite:righttext} \stopsetups \stopbtxrenderingdefinitions % Use this cite alternative by default \usebtxdefinitions[chicago] \setupbtx[chicago:cite][alternative=test] \starttext \cite[Author1:2016]\blank \cite[Author2:2015]\blank \page \startsubject[title=Abbreviations] \placelistofabbreviations \stopsubject \page \startsubject[title=Bibliography] \placelistofpublications \stopsubject \stoptext ``` Joey On Fri, Oct 8, 2021 at 7:38 AM Hans Hagen wrote: > On 10/7/2021 6:38 AM, Joey McCollum via ntg-context wrote: > > A concise solution that I found would work was to define a "shorthand" > > citation alternative and just print the shorthand with that: > > > > ``` > > % Shorthand citation setup > > \startsetups btx:sbl:cite:shorthand > >\begingroup > >\def\currentbtxcategory{\btxfield{category}} > >\texdefinition{btx:sbl:inline:shorthand} > >\endgroup > >\removeunwantedspaces > >\removepunctuation > > \stopsetups > > > > ... > > > > > \expanded{\abbreviation[\currentbtxtag]{\textcite[alternative=shorthand,lefttext=,righttext=][\currentbtxtag]}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} > > ``` > > > > Again, this works, although I'm still not sure why > > invoking \texdefinition{btx:sbl:inline:shorthand} directly doesn't. > I leave it to Alan to comment on this as he's the bib guru > > Hans > > - >Hans Hagen | PRAGMA ADE >Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Short forms and abbreviations in bibliography
A concise solution that I found would work was to define a "shorthand" citation alternative and just print the shorthand with that: ``` % Shorthand citation setup \startsetups btx:sbl:cite:shorthand \begingroup \def\currentbtxcategory{\btxfield{category}} \texdefinition{btx:sbl:inline:shorthand} \endgroup \removeunwantedspaces \removepunctuation \stopsetups ... \expanded{\abbreviation[\currentbtxtag]{\textcite[alternative=shorthand,lefttext=,righttext=][\currentbtxtag]}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} ``` Again, this works, although I'm still not sure why invoking \texdefinition{btx:sbl:inline:shorthand} directly doesn't. Joey On Wed, Oct 6, 2021 at 5:58 PM Joey McCollum wrote: > Interestingly, if I remove the contents of the btx:sbl:inline:shorthand > command and paste them inline as the third argument of \abbreviation, then > it works as expected: > > ``` > \expanded{\abbreviation[\currentbtxtag]{\btxdoif{shorthand}{\doifinsetelse{\btxflush{type}}{plainttitle, > plainshorthand}{\btxflush{shorthand}}{\btxstartstyleandcolor[sbl:\s!list:title:\currentbtxcategory]\btxusecommand[sbl:\s!list:title:\currentbtxcategory]{\btxflush{shorthand}}\btxstopstyleandcolor}}}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} > ``` > > But obviously, this is much less readable. So if there is a more concise > solution that applies expansion control to > \texdefinition{btx:sbl:inline:shorthand}, I'd love to know it! > > Thanks! > > Joey > > On Wed, Oct 6, 2021 at 3:05 PM Joey McCollum > wrote: > >> Okay, I had a follow-up question sooner than I thought! Enclosing the >> \abbreviation command doesn't quite work when I want to typeset the >> abbreviated form with a \texdefinition, as follows: >> >> ``` >> \texdefinition{btx:sbl:doifownfield} {shorthand} { >> >> \expanded{\abbreviation[\currentbtxtag]{\texdefinition{btx:sbl:inline:shorthand}}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} >> } >> ``` >> >> Thankfully, everything else gets rendered as expected. But why is the >> \texdefinition not expanding? If it helps, I've included it below: >> >> ``` >> \starttexdefinition btx:sbl:inline:shorthand >> \btxdoif {shorthand} { >> % If the entry is of type plaintitle or plainshorthand, then do not >> apply formatting to its shorthand >> \doifinsetelse{\btxflush{type}}{plainttitle, plainshorthand} { >> \btxflush{shorthand} >> } { >> \btxstartstyleandcolor[sbl:\s!list:title:\currentbtxcategory] >> \btxusecommand[sbl:\s!list:title:\currentbtxcategory]{ >> \btxflush{shorthand}% set the shorthand according to the >> current category >> } >> \btxstopstyleandcolor >> } >> \btxcomma >> } >> \stoptexdefinition >> ``` >> >> Do I have to apply expansion control somewhere else or in some other way? >> >> Joey >> >> On Wed, Oct 6, 2021 at 2:35 PM Joey McCollum >> wrote: >> >>> All right, I think I see what I did wrong; I just needed to enclose the >>> whole \abbreviation command in an \expanded command as follows: >>> >>> ``` >>> \startsetups btx:sbl:cite:short >>> ... >>> \btxdoif {shorthand} { >>> >>> \expanded{\abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}}} >>> } >>> ... >>> \stopsetups >>> ``` >>> >>> It looks like passing the macro \currentbtxtag as the tag for the >>> abbreviation works fine. And if I redefine the abbreviations synonyms list >>> as follows, I can use \inshort[\currentbtxtag]: >>> >>> ``` >>> \definesynonyms[abbreviation][abbreviations][\infull][\inshort] >>> ``` >>> >>> I'll add more to the thread if I run into any problems making this more >>> complex! >>> >>> Joey >>> >>> On Wed, Oct 6, 2021 at 12:35 PM Joey McCollum < >>> jmccollum20140...@gmail.com> wrote: >>> >>>> (Quick note for anyone following this thread: I've figured out how to >>>> implement different typesetting rules for list, inline, and short-form >>>> citations; you can see how I've done this in the publ-imp-sbl.mkvi file in >>>> the https://github.com/jjmccollum/context-sbl repository.) >>>> >>>> I have another question related to abbreviations/synonyms in connection >>>> with bibliographies. When a bibliographic entry has a "shorthand" field and >>>> I
Re: [NTG-context] Short forms and abbreviations in bibliography
Interestingly, if I remove the contents of the btx:sbl:inline:shorthand command and paste them inline as the third argument of \abbreviation, then it works as expected: ``` \expanded{\abbreviation[\currentbtxtag]{\btxdoif{shorthand}{\doifinsetelse{\btxflush{type}}{plainttitle, plainshorthand}{\btxflush{shorthand}}{\btxstartstyleandcolor[sbl:\s!list:title:\currentbtxcategory]\btxusecommand[sbl:\s!list:title:\currentbtxcategory]{\btxflush{shorthand}}\btxstopstyleandcolor}}}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} ``` But obviously, this is much less readable. So if there is a more concise solution that applies expansion control to \texdefinition{btx:sbl:inline:shorthand}, I'd love to know it! Thanks! Joey On Wed, Oct 6, 2021 at 3:05 PM Joey McCollum wrote: > Okay, I had a follow-up question sooner than I thought! Enclosing the > \abbreviation command doesn't quite work when I want to typeset the > abbreviated form with a \texdefinition, as follows: > > ``` > \texdefinition{btx:sbl:doifownfield} {shorthand} { > > \expanded{\abbreviation[\currentbtxtag]{\texdefinition{btx:sbl:inline:shorthand}}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} > } > ``` > > Thankfully, everything else gets rendered as expected. But why is the > \texdefinition not expanding? If it helps, I've included it below: > > ``` > \starttexdefinition btx:sbl:inline:shorthand > \btxdoif {shorthand} { > % If the entry is of type plaintitle or plainshorthand, then do not > apply formatting to its shorthand > \doifinsetelse{\btxflush{type}}{plainttitle, plainshorthand} { > \btxflush{shorthand} > } { > \btxstartstyleandcolor[sbl:\s!list:title:\currentbtxcategory] > \btxusecommand[sbl:\s!list:title:\currentbtxcategory]{ > \btxflush{shorthand}% set the shorthand according to the current > category > } > \btxstopstyleandcolor > } > \btxcomma > } > \stoptexdefinition > ``` > > Do I have to apply expansion control somewhere else or in some other way? > > Joey > > On Wed, Oct 6, 2021 at 2:35 PM Joey McCollum > wrote: > >> All right, I think I see what I did wrong; I just needed to enclose the >> whole \abbreviation command in an \expanded command as follows: >> >> ``` >> \startsetups btx:sbl:cite:short >> ... >> \btxdoif {shorthand} { >> >> \expanded{\abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}}} >> } >> ... >> \stopsetups >> ``` >> >> It looks like passing the macro \currentbtxtag as the tag for the >> abbreviation works fine. And if I redefine the abbreviations synonyms list >> as follows, I can use \inshort[\currentbtxtag]: >> >> ``` >> \definesynonyms[abbreviation][abbreviations][\infull][\inshort] >> ``` >> >> I'll add more to the thread if I run into any problems making this more >> complex! >> >> Joey >> >> On Wed, Oct 6, 2021 at 12:35 PM Joey McCollum < >> jmccollum20140...@gmail.com> wrote: >> >>> (Quick note for anyone following this thread: I've figured out how to >>> implement different typesetting rules for list, inline, and short-form >>> citations; you can see how I've done this in the publ-imp-sbl.mkvi file in >>> the https://github.com/jjmccollum/context-sbl repository.) >>> >>> I have another question related to abbreviations/synonyms in connection >>> with bibliographies. When a bibliographic entry has a "shorthand" field and >>> I cite it using \cite[alternative=short], I would like to add its shorthand >>> to the abbreviations list, with a longer citation as its "in-full" form. My >>> first thought was that I could accomplish this with something like the >>> following: >>> >>> ``` >>> \startsetups btx:sbl:cite:short >>> ... >>> \btxdoif {shorthand} { >>> \abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}} >>> } >>> ... >>> \stopsetups >>> ``` >>> >>> But even if I invoke \placelistofabbreviations with the "criterium=all" >>> option, nothing appears in the list. >>> >>> In some ways, this issue is related to the now-resolved issue "Which way >>> to type greek letters in synonym list?" from 2010. The problem is that in >>> this case, I have to use a macro even in the first input to \abbreviation >>> (in brackets), because I don't know what it is in advance. In addition, if >>> the second and third inputs to \abbreviation (in
Re: [NTG-context] Short forms and abbreviations in bibliography
Okay, I had a follow-up question sooner than I thought! Enclosing the \abbreviation command doesn't quite work when I want to typeset the abbreviated form with a \texdefinition, as follows: ``` \texdefinition{btx:sbl:doifownfield} {shorthand} { \expanded{\abbreviation[\currentbtxtag]{\texdefinition{btx:sbl:inline:shorthand}}{\textcite[alternative=listsubcite,lefttext=,righttext=][\currentbtxtag]}} } ``` Thankfully, everything else gets rendered as expected. But why is the \texdefinition not expanding? If it helps, I've included it below: ``` \starttexdefinition btx:sbl:inline:shorthand \btxdoif {shorthand} { % If the entry is of type plaintitle or plainshorthand, then do not apply formatting to its shorthand \doifinsetelse{\btxflush{type}}{plainttitle, plainshorthand} { \btxflush{shorthand} } { \btxstartstyleandcolor[sbl:\s!list:title:\currentbtxcategory] \btxusecommand[sbl:\s!list:title:\currentbtxcategory]{ \btxflush{shorthand}% set the shorthand according to the current category } \btxstopstyleandcolor } \btxcomma } \stoptexdefinition ``` Do I have to apply expansion control somewhere else or in some other way? Joey On Wed, Oct 6, 2021 at 2:35 PM Joey McCollum wrote: > All right, I think I see what I did wrong; I just needed to enclose the > whole \abbreviation command in an \expanded command as follows: > > ``` > \startsetups btx:sbl:cite:short > ... > \btxdoif {shorthand} { > > \expanded{\abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}}} > } > ... > \stopsetups > ``` > > It looks like passing the macro \currentbtxtag as the tag for the > abbreviation works fine. And if I redefine the abbreviations synonyms list > as follows, I can use \inshort[\currentbtxtag]: > > ``` > \definesynonyms[abbreviation][abbreviations][\infull][\inshort] > ``` > > I'll add more to the thread if I run into any problems making this more > complex! > > Joey > > On Wed, Oct 6, 2021 at 12:35 PM Joey McCollum > wrote: > >> (Quick note for anyone following this thread: I've figured out how to >> implement different typesetting rules for list, inline, and short-form >> citations; you can see how I've done this in the publ-imp-sbl.mkvi file in >> the https://github.com/jjmccollum/context-sbl repository.) >> >> I have another question related to abbreviations/synonyms in connection >> with bibliographies. When a bibliographic entry has a "shorthand" field and >> I cite it using \cite[alternative=short], I would like to add its shorthand >> to the abbreviations list, with a longer citation as its "in-full" form. My >> first thought was that I could accomplish this with something like the >> following: >> >> ``` >> \startsetups btx:sbl:cite:short >> ... >> \btxdoif {shorthand} { >> \abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}} >> } >> ... >> \stopsetups >> ``` >> >> But even if I invoke \placelistofabbreviations with the "criterium=all" >> option, nothing appears in the list. >> >> In some ways, this issue is related to the now-resolved issue "Which way >> to type greek letters in synonym list?" from 2010. The problem is that in >> this case, I have to use a macro even in the first input to \abbreviation >> (in brackets), because I don't know what it is in advance. In addition, if >> the second and third inputs to \abbreviation (in curly braces) are not >> expanded until the list is printed, then they will be empty/undefined at >> the time when they are needed. >> >> I'm not as familiar with how to deal with expansion problems, so I could >> use someone's expertise here. Is there a simple way to define an >> abbreviation using the expanded values of macros as above? And is there a >> way to invoke an abbreviation/synonym at this level of abstraction? >> (Something like \inshort[\currentbtxtag]?) >> >> Thanks! >> >> Joey >> >> On Sun, Aug 22, 2021 at 6:11 PM Joey McCollum < >> jmccollum20140...@gmail.com> wrote: >> >>> Just continuing to talk my way through the inner workings of the ConTeXt >>> Publication modules. It looks like three "long" citation forms are defined >>> in publ-imp-cite.mkvi: >>> >>> \startsetups btx:cite:listelement >>> \fastsetup{\s!btx:\s!cite:concat} >>> \fastsetup{\s!btx:\s!cite:lefttext} >>> \ifx\currentbtxfirst\empty >>> \fastsetup{\s!btx:\s!cite:\s!empty} >>> \else >>>\texdefinition {\s!btx:\s!cite:inject} { >>>
Re: [NTG-context] Short forms and abbreviations in bibliography
All right, I think I see what I did wrong; I just needed to enclose the whole \abbreviation command in an \expanded command as follows: ``` \startsetups btx:sbl:cite:short ... \btxdoif {shorthand} { \expanded{\abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}}} } ... \stopsetups ``` It looks like passing the macro \currentbtxtag as the tag for the abbreviation works fine. And if I redefine the abbreviations synonyms list as follows, I can use \inshort[\currentbtxtag]: ``` \definesynonyms[abbreviation][abbreviations][\infull][\inshort] ``` I'll add more to the thread if I run into any problems making this more complex! Joey On Wed, Oct 6, 2021 at 12:35 PM Joey McCollum wrote: > (Quick note for anyone following this thread: I've figured out how to > implement different typesetting rules for list, inline, and short-form > citations; you can see how I've done this in the publ-imp-sbl.mkvi file in > the https://github.com/jjmccollum/context-sbl repository.) > > I have another question related to abbreviations/synonyms in connection > with bibliographies. When a bibliographic entry has a "shorthand" field and > I cite it using \cite[alternative=short], I would like to add its shorthand > to the abbreviations list, with a longer citation as its "in-full" form. My > first thought was that I could accomplish this with something like the > following: > > ``` > \startsetups btx:sbl:cite:short > ... > \btxdoif {shorthand} { > \abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}} > } > ... > \stopsetups > ``` > > But even if I invoke \placelistofabbreviations with the "criterium=all" > option, nothing appears in the list. > > In some ways, this issue is related to the now-resolved issue "Which way > to type greek letters in synonym list?" from 2010. The problem is that in > this case, I have to use a macro even in the first input to \abbreviation > (in brackets), because I don't know what it is in advance. In addition, if > the second and third inputs to \abbreviation (in curly braces) are not > expanded until the list is printed, then they will be empty/undefined at > the time when they are needed. > > I'm not as familiar with how to deal with expansion problems, so I could > use someone's expertise here. Is there a simple way to define an > abbreviation using the expanded values of macros as above? And is there a > way to invoke an abbreviation/synonym at this level of abstraction? > (Something like \inshort[\currentbtxtag]?) > > Thanks! > > Joey > > On Sun, Aug 22, 2021 at 6:11 PM Joey McCollum > wrote: > >> Just continuing to talk my way through the inner workings of the ConTeXt >> Publication modules. It looks like three "long" citation forms are defined >> in publ-imp-cite.mkvi: >> >> \startsetups btx:cite:listelement >> \fastsetup{\s!btx:\s!cite:concat} >> \fastsetup{\s!btx:\s!cite:lefttext} >> \ifx\currentbtxfirst\empty >> \fastsetup{\s!btx:\s!cite:\s!empty} >> \else >>\texdefinition {\s!btx:\s!cite:inject} { >>\btxcitereference >>\currentbtxfirst >>} >> \fi >> \fastsetup{\s!btx:\s!cite:righttext} >> \stopsetups >> >> \startsetups \s!btx:\s!cite:entry >> \fastsetup{\s!btx:\s!cite:concat} >> \fastsetup{\s!btx:\s!cite:lefttext} >> \btxhandleciteentry >> \fastsetup{\s!btx:\s!cite:righttext} >> \stopsetups >> >> \startsetups \s!btx:\s!cite:footnote >> \startfootnote >> \fastsetup{btx:cite:entry} >> \stopfootnote >> \stopsetups >> >> Intuitively, I would expect btx:cite:listelement [why not >> \s!btx:\s!cite:listelement?] to handle rendering a bibliographic entry for >> the bibliography proper (i.e., the list typically placed at the end of a >> document), while \s!btx:\s!cite:entry would handle in-text citations. The >> third setup, \s!btx:\s!cite:footnote, simply renders the "entry"-style >> citation in a footnote. >> >> But as far as I can tell, the "listelement" setup is never used outside >> of publ-imp-cite.mkvi. Only the "entry" setup appears to be used. >> Meanwhile, the \btxcitereference and \btxhandleciteentry macros (invoked >> in these setups) appear to be defined in publ-ini.mkiv: >> >> \unexpanded\def\btx_cite_reference_inject >> {\ifconditional\c_btx_cite_reference_injected >>\else >> \dontleavehmode >> \iftrialtypesetting \else >> \ifx\currentbtxbacklink\empty >> % can be made empt
Re: [NTG-context] Short forms and abbreviations in bibliography
(Quick note for anyone following this thread: I've figured out how to implement different typesetting rules for list, inline, and short-form citations; you can see how I've done this in the publ-imp-sbl.mkvi file in the https://github.com/jjmccollum/context-sbl repository.) I have another question related to abbreviations/synonyms in connection with bibliographies. When a bibliographic entry has a "shorthand" field and I cite it using \cite[alternative=short], I would like to add its shorthand to the abbreviations list, with a longer citation as its "in-full" form. My first thought was that I could accomplish this with something like the following: ``` \startsetups btx:sbl:cite:short ... \btxdoif {shorthand} { \abbreviation[\currentbtxtag]{\btxflush{shorthand}}{\btxflush{title}} } ... \stopsetups ``` But even if I invoke \placelistofabbreviations with the "criterium=all" option, nothing appears in the list. In some ways, this issue is related to the now-resolved issue "Which way to type greek letters in synonym list?" from 2010. The problem is that in this case, I have to use a macro even in the first input to \abbreviation (in brackets), because I don't know what it is in advance. In addition, if the second and third inputs to \abbreviation (in curly braces) are not expanded until the list is printed, then they will be empty/undefined at the time when they are needed. I'm not as familiar with how to deal with expansion problems, so I could use someone's expertise here. Is there a simple way to define an abbreviation using the expanded values of macros as above? And is there a way to invoke an abbreviation/synonym at this level of abstraction? (Something like \inshort[\currentbtxtag]?) Thanks! Joey On Sun, Aug 22, 2021 at 6:11 PM Joey McCollum wrote: > Just continuing to talk my way through the inner workings of the ConTeXt > Publication modules. It looks like three "long" citation forms are defined > in publ-imp-cite.mkvi: > > \startsetups btx:cite:listelement > \fastsetup{\s!btx:\s!cite:concat} > \fastsetup{\s!btx:\s!cite:lefttext} > \ifx\currentbtxfirst\empty > \fastsetup{\s!btx:\s!cite:\s!empty} > \else >\texdefinition {\s!btx:\s!cite:inject} { >\btxcitereference >\currentbtxfirst >} > \fi > \fastsetup{\s!btx:\s!cite:righttext} > \stopsetups > > \startsetups \s!btx:\s!cite:entry > \fastsetup{\s!btx:\s!cite:concat} > \fastsetup{\s!btx:\s!cite:lefttext} > \btxhandleciteentry > \fastsetup{\s!btx:\s!cite:righttext} > \stopsetups > > \startsetups \s!btx:\s!cite:footnote > \startfootnote > \fastsetup{btx:cite:entry} > \stopfootnote > \stopsetups > > Intuitively, I would expect btx:cite:listelement [why not > \s!btx:\s!cite:listelement?] to handle rendering a bibliographic entry for > the bibliography proper (i.e., the list typically placed at the end of a > document), while \s!btx:\s!cite:entry would handle in-text citations. The > third setup, \s!btx:\s!cite:footnote, simply renders the "entry"-style > citation in a footnote. > > But as far as I can tell, the "listelement" setup is never used outside of > publ-imp-cite.mkvi. Only the "entry" setup appears to be used. Meanwhile, > the \btxcitereference and \btxhandleciteentry macros (invoked in these > setups) appear to be defined in publ-ini.mkiv: > > \unexpanded\def\btx_cite_reference_inject > {\ifconditional\c_btx_cite_reference_injected >\else > \dontleavehmode > \iftrialtypesetting \else >\ifx\currentbtxbacklink\empty > % can be made empty when combining author / year >\else\ifnum\currentbtxbacklink>\zerocount > \btx_cite_reference_inject_indeed > \settrue\c_btx_cite_reference_injected > \fi\fi > \fi > \fi} > > ... > > \let\btxcitereference\btx_cite_reference_inject > > ... > > \unexpanded\def\btxhandleciteentry > {\dontleavehmode >\begingroup >\def\currentbtxcitealternative{entry}% >\setbtxparameterset\s!cite\currentbtxcitealternative % needs checking >\btxcitereference >\btx_entry_inject >\endgroup} > > My next step will be to figure out what these are doing, but I'm still not > sure if the module accommodates rendering in-text "entry" citations > differently than citations in the list. > > Joey > > On Mon, Aug 9, 2021 at 8:55 AM Joey McCollum > wrote: > >> Henning's suggestion for abbreviations should work fine for that issue. I >> could simply use the shorthand in the "series" and "journal" fields and set >> up the appropriate \abbreviation calls in the docu
Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)
I think \doifmodeelse{*footnote} is what we need here. Von: Joey McCollum Gesendet: Dienstag, 21. September 2021 18:45:53 An: Maier, Denis Christian (UB) Cc: mailing list for ConTeXt users Betreff: Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally) Ah, I see. My implementation will mess up in that case. We may need methods that keep track of whether a citation is made in a footnote or not. I'm not sure how to implement that. Certainly, if we knew that all footnote citations were being made with the alternative=footnote option, then that probably make things easier, but in the case of a verbose footnote that only features a citation at the end, it would likely be more convenient for a user to use the inline alternative in the footnote, as you do in your example. Thanks for catching that! Joey On Tue, Sep 21, 2021 at 11:55 AM mailto:denis.ma...@unibe.ch>> wrote: To be clear, I wasn’t talking about list vs notes. Consider just this : \cite[alternative=inline][doe] \footnote{\cite[alternative=inline][foo]} \cite[alternative=inline][doe] The citation in the footnote should not interupt the ibid-tracking in this case. The second doe-citation should trigger the ibid-mechanism. But: \cite[alternative=inline][doe] \footnote{\cite[alternative=inline][foo]} \cite[alternative=inline][foo] In this case, you wouldn’t want an ibid. for the foo-citation outside of the footnote. Denis Von: Joey McCollum mailto:jmccollum20140...@gmail.com>> Gesendet: Dienstag, 21. September 2021 17:16 An: Maier, Denis Christian (UB) mailto:denis.ma...@unibe.ch>> Cc: mailing list for ConTeXt users mailto:ntg-context@ntg.nl>> Betreff: Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally) Yes, I haven't added any code to check for the useibid or useidem options in list citations; they are only used for in-text citations in the SBL specification definition. The distinction between \setupbtx[sbl:\s!list] and \setupbtx[sbl:\s!cite] should allow us to specify their options separately. For list citations, we probably should add a "sameauthor" option, with "rule" (draw a horizontal rule for repeated authors), "empty" (leave a blank space the size of the "margin" option), and "ditto" (e.g., a dumb quote sign, or "Idem") as potential values, since all three of these options are currently supported in publ-imp-chicago.mkvi and publ-imp-sbl.mkvi, but as far as I know, they always default to the "rule" setup. Joey On Tue, Sep 21, 2021 at 12:52 AM mailto:denis.ma...@unibe.ch>> wrote: Cool. I don't know about your particular solution, but will probably want to make sure to have different variables for citations in the main text and in the notes. Denis Von: ntg-context mailto:ntg-context-boun...@ntg.nl>> im Auftrag von Joey McCollum via ntg-context mailto:ntg-context@ntg.nl>> Gesendet: Dienstag, 21. September 2021 02:22:49 An: mailing list for ConTeXt users Cc: Joey McCollum Betreff: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally) Hi, I've found a way to implement ibid. and idem support in the SBL specification under development at https://github.com/jjmccollum/context-sbl (this e-mail essentially repeats my comments in https://github.com/jjmccollum/context-sbl/issues/5), but I'm not sure if my solution is a recommended way to solve the problem, and I'm curious about why the more straightforward approach doesn't work. I've added useibid and useidem options for the \definebtx command (making them language-dependent by adding them to mult-def.lua, which seems to be how the other options have been implemented). Ideally, I'd like to follow the pattern of the chicago:list:sameauthor setup and use a macro similar to \btxdoifsameaspreviouselse. But since \btxdoifsameaspreviouselse relies on the indexed structure of the bibliographic list to determine what the "previous" entry is, it won't work for my purposes; I need to retrieve the tag of the last entry passed to the \cite command. I ended up making this work by initializing a global variable via ``` \setxvariables[btx:sbl][previousinlinetag=\empty] ``` in the publ-imp-sbl.mkvi file, resetting it at the end of each citation via ``` \setxvariables[btx:sbl][previousinlinetag=\currentbtxtag] ``` and checking it in the appropriate places via ``` getvariable{btx:sbl}{previousinlinetag} ``` I initially tried to do this with a simple macro \btx_sbl_previousinlinetag defined in publ-imp-sbl.mkvi (in the same scope as the rest of the specification), but attempting to reset it in the cite setups with \let or \def didn't work. Why doesn't this work? Is the setup for a cite alternative executed in its own scope in a wa
Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)
Ah, I see. My implementation will mess up in that case. We may need methods that keep track of whether a citation is made in a footnote or not. I'm not sure how to implement that. Certainly, if we knew that all footnote citations were being made with the alternative=footnote option, then that probably make things easier, but in the case of a verbose footnote that only features a citation at the end, it would likely be more convenient for a user to use the inline alternative in the footnote, as you do in your example. Thanks for catching that! Joey On Tue, Sep 21, 2021 at 11:55 AM wrote: > To be clear, I wasn’t talking about list vs notes. Consider just this : > > > > \cite[alternative=inline][doe] > > \footnote{\cite[alternative=inline][foo]} > > \cite[alternative=inline][doe] > > > > The citation in the footnote should not interupt the ibid-tracking in this > case. The second doe-citation should trigger the ibid-mechanism. But: > > > > \cite[alternative=inline][doe] > > \footnote{\cite[alternative=inline][foo]} > > \cite[alternative=inline][foo] > > > > In this case, you wouldn’t want an ibid. for the foo-citation outside of > the footnote. > > > > Denis > > > > > > *Von:* Joey McCollum > *Gesendet:* Dienstag, 21. September 2021 17:16 > *An:* Maier, Denis Christian (UB) > *Cc:* mailing list for ConTeXt users > *Betreff:* Re: [NTG-context] Ibid. and idem support for bibliographies > (and variable scope more generally) > > > > Yes, I haven't added any code to check for the useibid or useidem options > in list citations; they are only used for in-text citations in the SBL > specification definition. The distinction between \setupbtx[sbl:\s!list] > and \setupbtx[sbl:\s!cite] should allow us to specify their options > separately. For list citations, we probably should add a "sameauthor" > option, with "rule" (draw a horizontal rule for repeated authors), "empty" > (leave a blank space the size of the "margin" option), and "ditto" (e.g., a > dumb quote sign, or "Idem") as potential values, since all three of these > options are currently supported in publ-imp-chicago.mkvi and > publ-imp-sbl.mkvi, but as far as I know, they always default to the "rule" > setup. > > > > Joey > > > > On Tue, Sep 21, 2021 at 12:52 AM wrote: > > Cool. > > I don't know about your particular solution, but will probably want to > make sure to have different variables for citations in the main text and in > the notes. > > Denis > > > > > Von: ntg-context im Auftrag von Joey > McCollum via ntg-context > Gesendet: Dienstag, 21. September 2021 02:22:49 > An: mailing list for ConTeXt users > Cc: Joey McCollum > Betreff: [NTG-context] Ibid. and idem support for bibliographies (and > variable scope more generally) > > Hi, > > I've found a way to implement ibid. and idem support in the SBL > specification under development at > https://github.com/jjmccollum/context-sbl (this e-mail essentially > repeats my comments in https://github.com/jjmccollum/context-sbl/issues/5), > but I'm not sure if my solution is a recommended way to solve the problem, > and I'm curious about why the more straightforward approach doesn't work. > > I've added useibid and useidem options for the \definebtx command (making > them language-dependent by adding them to mult-def.lua, which seems to be > how the other options have been implemented). Ideally, I'd like to follow > the pattern of the chicago:list:sameauthor setup and use a macro similar to > \btxdoifsameaspreviouselse. But since \btxdoifsameaspreviouselse relies on > the indexed structure of the bibliographic list to determine what the > "previous" entry is, it won't work for my purposes; I need to retrieve the > tag of the last entry passed to the \cite command. > > I ended up making this work by initializing a global variable via > > ``` > \setxvariables[btx:sbl][previousinlinetag=\empty] > ``` > > in the publ-imp-sbl.mkvi file, resetting it at the end of each citation via > > ``` > \setxvariables[btx:sbl][previousinlinetag=\currentbtxtag] > ``` > > and checking it in the appropriate places via > > ``` > getvariable{btx:sbl}{previousinlinetag} > ``` > > I initially tried to do this with a simple macro > \btx_sbl_previousinlinetag defined in publ-imp-sbl.mkvi (in the same scope > as the rest of the specification), but attempting to reset it in the cite > setups with \let or \def didn't work. Why doesn't this work? Is the setup > for a cite alternative executed in its own scope in a way that would >
Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)
To be clear, I wasn’t talking about list vs notes. Consider just this : \cite[alternative=inline][doe] \footnote{\cite[alternative=inline][foo]} \cite[alternative=inline][doe] The citation in the footnote should not interupt the ibid-tracking in this case. The second doe-citation should trigger the ibid-mechanism. But: \cite[alternative=inline][doe] \footnote{\cite[alternative=inline][foo]} \cite[alternative=inline][foo] In this case, you wouldn’t want an ibid. for the foo-citation outside of the footnote. Denis Von: Joey McCollum Gesendet: Dienstag, 21. September 2021 17:16 An: Maier, Denis Christian (UB) Cc: mailing list for ConTeXt users Betreff: Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally) Yes, I haven't added any code to check for the useibid or useidem options in list citations; they are only used for in-text citations in the SBL specification definition. The distinction between \setupbtx[sbl:\s!list] and \setupbtx[sbl:\s!cite] should allow us to specify their options separately. For list citations, we probably should add a "sameauthor" option, with "rule" (draw a horizontal rule for repeated authors), "empty" (leave a blank space the size of the "margin" option), and "ditto" (e.g., a dumb quote sign, or "Idem") as potential values, since all three of these options are currently supported in publ-imp-chicago.mkvi and publ-imp-sbl.mkvi, but as far as I know, they always default to the "rule" setup. Joey On Tue, Sep 21, 2021 at 12:52 AM mailto:denis.ma...@unibe.ch>> wrote: Cool. I don't know about your particular solution, but will probably want to make sure to have different variables for citations in the main text and in the notes. Denis Von: ntg-context mailto:ntg-context-boun...@ntg.nl>> im Auftrag von Joey McCollum via ntg-context mailto:ntg-context@ntg.nl>> Gesendet: Dienstag, 21. September 2021 02:22:49 An: mailing list for ConTeXt users Cc: Joey McCollum Betreff: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally) Hi, I've found a way to implement ibid. and idem support in the SBL specification under development at https://github.com/jjmccollum/context-sbl (this e-mail essentially repeats my comments in https://github.com/jjmccollum/context-sbl/issues/5), but I'm not sure if my solution is a recommended way to solve the problem, and I'm curious about why the more straightforward approach doesn't work. I've added useibid and useidem options for the \definebtx command (making them language-dependent by adding them to mult-def.lua, which seems to be how the other options have been implemented). Ideally, I'd like to follow the pattern of the chicago:list:sameauthor setup and use a macro similar to \btxdoifsameaspreviouselse. But since \btxdoifsameaspreviouselse relies on the indexed structure of the bibliographic list to determine what the "previous" entry is, it won't work for my purposes; I need to retrieve the tag of the last entry passed to the \cite command. I ended up making this work by initializing a global variable via ``` \setxvariables[btx:sbl][previousinlinetag=\empty] ``` in the publ-imp-sbl.mkvi file, resetting it at the end of each citation via ``` \setxvariables[btx:sbl][previousinlinetag=\currentbtxtag] ``` and checking it in the appropriate places via ``` getvariable{btx:sbl}{previousinlinetag} ``` I initially tried to do this with a simple macro \btx_sbl_previousinlinetag defined in publ-imp-sbl.mkvi (in the same scope as the rest of the specification), but attempting to reset it in the cite setups with \let or \def didn't work. Why doesn't this work? Is the setup for a cite alternative executed in its own scope in a way that would prevent me from updating a variable defined in the scope of the rendering specification? And is there a way to do this that is preferable to using global variables? Thanks! Joey ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___