Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)

2021-09-21 Thread Denis Maier via ntg-context
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 way that would prevent me from updating a 
variable defined in the scope of the rendering specification? And is there a 
way to 

Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)

2021-09-21 Thread Joey McCollum via ntg-context
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
> 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  : 

Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)

2021-09-21 Thread Denis Maier via ntg-context
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
___


Re: [NTG-context] Ibid. and idem support for bibliographies (and variable scope more generally)

2021-09-21 Thread Joey McCollum via ntg-context
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
> 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
___


Re: [NTG-context] Placing pagenumer with coordinates (layers)

2021-09-21 Thread Wolfgang Schuster via ntg-context

Huseyin Özoguz via ntg-context schrieb am 21.09.2021 um 12:24:

Hello dear context-enthusiasts,

I want to place the pagenumber on a double-sided project with 
coordinates. I tried the layer-mechanism:


\setuppagenumbering[location=]

\definelayer
   [pagenumber]
   [width=\paperwidth,
    height=\paperheight,
    location={left,top},
    x=120mm,y=220mm,
    doublesided=yes]

\startsetups layer
\setlayer[pagenumber][even]{\pagenumber}
\stopsetups

\setupbackgrounds[page][setups=layer,background={pagenumber}]

\starttext
~\page~\page~\page
\stoptext


And it works, but only for the left (even) page. On the right page I 
want to place the pagenumber on different coordinates. I tried to copy 
the layer and then change [even] to [odd] with different coordinates, 
but that did not work (no pagenumber printed). What do you suggest?



Use a doublesided layout.

\setuppagenumbering
  [alternative={singlesided,doublesided},
   location=none]

\definelayer
  [pagenumber]
  [width=\paperwidth,
   height=\paperheight,
   x=12cm,
   y=22cm,
   doublesided=yes]

\startsetups layer
\setlayer[pagenumber][even][preset=lefttop]{\pagenumber}
\setlayer[pagenumber][odd][preset=righttop]{\pagenumber}
\stopsetups

\setupbackgrounds[page][setups=layer,background=pagenumber]

\starttext
\dorecurse{10}{\page[dummy]}
\stoptext

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] changes of color

2021-09-21 Thread fv leung via ntg-context
\starttext

It seems that the problem comes up when the same color as the surrounding
text is used in MPcode.\par
{
  \red
  text red\par
  \startMPcode
drawoptions(withcolor blue);
label("text blue in MPcode", origin);
  \stopMPcode
  \par
  text still red\par
  But\par
  text red\par
  \startMPcode
drawoptions(withcolor red);
label("text red in MPcode", origin);
  \stopMPcode
  \par
  text turns black\par
  Can get over with this:\par
  text red\par
  \startMPcode
drawoptions(withcolor red);
label("text red in MPcode", origin);
label("\null", origin); % add this seems to solve the problem
  \stopMPcode
  \par
  text still red\par
  Don't know why. Just an observation.
}

\stoptext

Thierry Horsin via ntg-context  於 2021年9月21日 週二
下午8:00寫道:

> Hi everybody
>
> After some part of a tex file where there is some startMPcode section the
> color of the text (e.g. blue) changes to black up until the next page in
> the pdf.
>
> Is there something I am missing ?
> Thank you.
> Thierry
>
> ___
> 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] changes of color

2021-09-21 Thread Thierry Horsin via ntg-context
Hi everybody

After some part of a tex file where there is some startMPcode section the color 
of the text (e.g. blue) changes to black up until the next page in the pdf.

Is there something I am missing ?
Thank you.
Thierry
___
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] Placing pagenumer with coordinates (layers)

2021-09-21 Thread Huseyin Özoguz via ntg-context

Hello dear context-enthusiasts,

I want to place the pagenumber on a double-sided project with 
coordinates. I tried the layer-mechanism:


\setuppagenumbering[location=]

\definelayer
  [pagenumber]
  [width=\paperwidth,
   height=\paperheight,
   location={left,top},
   x=120mm,y=220mm,
   doublesided=yes]

\startsetups layer
\setlayer[pagenumber][even]{\pagenumber}
\stopsetups

\setupbackgrounds[page][setups=layer,background={pagenumber}]

\starttext
~\page~\page~\page
\stoptext


And it works, but only for the left (even) page. On the right page I 
want to place the pagenumber on different coordinates. I tried to copy 
the layer and then change [even] to [odd] with different coordinates, 
but that did not work (no pagenumber printed). What do you suggest?


Thank you.
Huseyin

___
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] Full success

2021-09-21 Thread Alain Delmotte via ntg-context

  
  
Hi!
Just to wish full success to the 15th
ConTeXt Meeting.
  
I would have liked to participate, but
it has not been possible.
Have good work, enjoy!
Alain

  
  

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