From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: Exclude bibliographic entries from list even when cited with \cite
Date: Thu, 16 Sep 2021 23:17:47 +0200 [thread overview]
Message-ID: <496dbfca-c42b-3a43-4fa5-0c2d4c522490@xs4all.nl> (raw)
In-Reply-To: <CAGxRUG_zzvY8k22N8wNB3qFFTsp19VHmGgDUUaff1vTMxrJzdA@mail.gmail.com>
On 9/16/2021 8:45 PM, Joey McCollum via ntg-context wrote:
> Hi,
>
> It's taken a couple weeks, but I nearly have a working bibliographic
> rendering for SBL style ready. I'm hosting the .lua and .mkvi files I
> have so far, as well as a test .bib and .tex file, on GitHub at
> https://github.com/jjmccollum/context-sbl
> <https://github.com/jjmccollum/context-sbl>. The look of the rendering
> seems to be correct for all of the examples, so the last remaining tasks
> mostly concern some lower-level technical issues.
>
> Because of the way that SBL style renders entries that are contained in
> other works (e.g., a chapter in a book that is part of a multivolume
> collection), it seemed natural to accommodate this by allowing entries
> to have cross-references to other entries. The rendering process can
> then be handled through recursive subcitations with different
> alternatives. In general, I handle these subcitations with the \textcite
> command, so that "higher-level" entries are not added to the list when
> they are only subcited.
>
> An important guideline that I still have to implement works in the
> opposite direction: it says that entries in certain categories should
> not be added to the list, but the books or collections containing them
> should be. I think I could make this work for the subcitation using the
> \listcite or \cite command recursively. But is there a way to
> conditionally handle whether or not to add the entry to the list after I
> invoke the \cite command, or is this built into the \cite command at a
> low level? If I had to, I could define an \autocite command that does
> all of these checks first, but if it's possible to keep the common \cite
> command instead of forcing users to use a different command, that would
> be preferable.
a few quick remarks (i'll look better into it later)
% Various Lua macros for parsing and conversion
\startluacode
sblhelpers = sblhelpers or {}
i think we should havea namespace for these kind of things in order not
to polute the global namespace
something publications.btx and then publications.btx.slb = { }
this is tricky and will clash:
\def\ordinal#1{\ctxlua{sblhelpers.ordinal([==[#1]==])}}%
\def\convertdate#1{\ctxlua{sblhelpers.convertdate([==[#1]==])}}%
\def\serializelocationpublisher#1#2{\ctxlua{sblhelpers.serializelocationpublisher([==[#1]==],[==[#2]==])}}%
\def\serializevolumenumberdatepage#1#2#3#4{\ctxlua{sblhelpers.serializevolumenumberdatepage([==[#1]==],[==[#2]==],[==[#3]==],[==[#4]==])}}%
% Define some helper functions for subcitations
\let\btxparenttag\empty% the tag of the entry subciting the current one
\def\btxprintpubl{yes}% yes/no indicating whether publication
information should be specified for the current citation or subcitation
\let\btxcurrentsubcitetype\empty% the type of subcitation we're invoking
here
\def\btxsblordinal
is better, but as you're using protection, even better is
\def\btx_sbl_ordinal
i also wonder about the
\clf_btxdirect
we need a \btxdirect... (have to think about a name) because one never
knows how a lowlevel command evolves (or at least i shoudl somehow make
a not that it can't evolve (or make a keyword driven variant) ... idem
for \clf_author (btw, no need for these end-of-line % in texdefinitions
I'll add string.wordsplitter so that
local andsplitter = string.wordsplitter("and")
local a = andsplitter("a and b and c")
local a = andsplitter("a and b and c")
local a = andsplitter("a and b and c")
all work as expected
i'll add an extended publ-imp-author.mkvi to the distribution, the other
ones can come later (including the manual).
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
___________________________________________________________________________________
prev parent reply other threads:[~2021-09-16 21:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 18:45 Joey McCollum via ntg-context
2021-09-16 19:08 ` Denis Maier via ntg-context
2021-09-16 21:17 ` Hans Hagen via ntg-context [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=496dbfca-c42b-3a43-4fa5-0c2d4c522490@xs4all.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).