ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mike O'Connor <ipso.vocat@gmail.com>
To: ntg-context@ntg.nl
Subject: Setup left, right, between entries in custom cite of multiple references
Date: Sun, 7 Jun 2020 13:57:18 +0800	[thread overview]
Message-ID: <0BF33B72-15B5-4DCA-8EE4-2AE3CED7215C@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]

I'm trying to customise \cite and unable to get inbetween= to appear between entries in a multi-ref citation.

My own customisations via a copy of publ-imp-apa.mkvi and .lua have this problem, so in case it was due to my customisation I went back to solid ground — the Chemistry example, pp. 70-74 in the Publications manual (http://pragma-ade.nl/general/manuals/mkiv-publications.pdf).

The cite examples on p.74 work as shown, but when I add each of the following:

\cite [name][108-95-2,566-33-5]\par
\cite [formula][108-95-2,566-33-5]\par
\cite [chemical][108-95-2,566-33-5]\par
\cite [molarvolume][108-95-2,566-33-5,24599-57-3]\par

I simply get the citation details, no separator between, and no left or right.

Either of the following works for left= and right=. However inbetween= does not activate, and similarly for separator:2, separator:3, separator:4.

\definebtx [chemistry:cite:formula]
[left={\color[blue]{(}}, % the colour to differentiate from \setupbtx below
 right={\color[red]{)}},
 inbetween={\btxcomma\btxspace},  % no effect
]

\setupbtx [chemistry:cite:formula]
[left={(},
 right={)},
 inbetween={\btxcomma\btxspace},
]

Grateful for any guidance as to how I can remedy this issue.

Regards, and thanks,

Mike


[-- Attachment #2: testChem-btx.tex --]
[-- Type: application/octet-stream, Size: 2004 bytes --]

\definebtxdataset
[chemistry]

\usebtxdataset
[chemistry] [C6H6O.bib]

\setupbtx
  [specification=chemistry,
   dataset=chemistry]
   
\definebtxrendering
  [chemistry]
  [specification=chemistry,
   group=chemistry,
   dataset=chemistry]
   
\startsetups btx:chemistry:list:chemical
    \startframed [frame=off,location=middle]
        \bTABLE [frame=off]
        	\bTR
        	\bTD [width=.2\textwidth,ny=2]
        	\goto
        		{\startchemical [scale=small]
        			\chemical [\btxflush{chemical}] \stopchemical} [program(\btxflush{rendered})]
        		\eTD
        		\bTD [width=.2\textwidth] \chemical{\btxflush{formula}} \eTD \bTD [width=.4\textwidth] \btxflush{iupac} \eTD
        		\eTR \bTR
        		\bTD \btxflush{mw}~g/mole \eTD
        		\bTD \btxflush{cas} \eTD \eTR
        \eTABLE
    \stopframed
\stopsetups

% the following setupbtx gets ignored

\definebtx[chemistry:cite:formula]
[
	left={\color[blue]{(}},
	right={\color[red]{)}},
	inbetween={\btxcomma\btxspace},  % no effect
]

%\setupbtx
%	[chemistry:cite:formula]
%	[
%	left={(},
%	right={)},
%	separator:2={\btxcomma\btxspace},
%		separator:3={\btxcomma\btxspace},
%			separator:4={\btxcomma\btxspace},
%	]

\startsetups btx:chemistry:cite:formula
	\chemical {\currentbtxfirst}
\stopsetups

\startsetups btx:chemistry:cite:chemical 
	\startchemical [scale=600]
		\chemical [\currentbtxfirst] 
	\stopchemical
\stopsetups

\starttext
% works as per manual
\placebtxrendering [method=dataset]

% works as per manual
\cite [name][108-95-2]|<|or|>|
\cite [formula][108-95-2]|<|or|>|
\cite [chemical][108-95-2]|<|or|>|
\cite [molarvolume] [108-95-2]

% works as per manual
\cite [name][566-33-5]|<|or|>|
\cite [formula][566-33-5]|<|or|>|
\cite [chemical][566-33-5]|<|or|>|
\cite [molarvolume] [566-33-5]

% added multiple references ; no inbetween= appears
\cite [name][108-95-2,566-33-5]\par
\cite [formula][108-95-2,566-33-5]\par
\cite [chemical][108-95-2,566-33-5]\par
\cite [molarvolume][108-95-2,566-33-5]\par

\stoptext

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

                 reply	other threads:[~2020-06-07  5:57 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=0BF33B72-15B5-4DCA-8EE4-2AE3CED7215C@gmail.com \
    --to=ipso.vocat@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).