From: Jethro Djan <jthryeboah@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Enable interaction on custom apa cite variant
Date: Sat, 19 Aug 2023 13:44:34 +0000 [thread overview]
Message-ID: <CAHgnkf9FfUXR14MM34+NZV90Y3=nKEhZVK8DTUE=qMX7caUdLA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1802 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 2160 bytes --]
[-- Attachment #2: Type: text/plain, Size: 495 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
reply other threads:[~2023-08-19 13:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='CAHgnkf9FfUXR14MM34+NZV90Y3=nKEhZVK8DTUE=qMX7caUdLA@mail.gmail.com' \
--to=jthryeboah@gmail.com \
--cc=ntg-context@ntg.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).