Re: [NTG-context] Crediting copyright on photographs

2022-05-04 Thread Adam Reviczky via ntg-context
Hi Bruce,

The Layers page has some examples (
https://wiki.contextgarden.net/Layers#Place_labels_on_pictures) and the
Collectors page as well (https://wiki.contextgarden.net/Collectors).

Some MWE:

\starttext
\definelayer  [figure][width=\overlaywidth,height=\overlayheight]
\defineoverlay[figure][{\directsetup{figure}\tightlayer[figure]}]
\startsetups figure
\setlayerframed[figure][frame=off,preset=rightbottom]{\copyright\ 2022}
\stopsetups
\externalfigure[cow][background={foreground,figure}]
\stoptext

\starttext
\definecollector[example]
\setcollector [example] {\externalfigure[cow][width=4cm,frame=off]}
\setcollector [example]
[corner={right,bottom},location={left,top}]{\copyright\ 2022}
\composedcollector{example}
\stoptext

Adam

On Wed, May 4, 2022 at 11:01 PM Bruce Horrocks via ntg-context <
ntg-context@ntg.nl> wrote:

> I need to include the copyright acknowledgement / photographer credit on
> an image but I'm not sure what's the best way to do it.
>
> Option 1: I can add the acknowledgement to the end of the \placefigure
> caption text:
>
> e.g.   \placefigure{A picture of a cow. Image of a cow that may or may not
> be under copyright anymore.}{\externalfigure[cow][height=6cm]}
>
> then the copyright bit will appear in the Table of Figures which I don't
> really want to happen. Is there a way to truncate this?
>
>
> Option 2: some magazines print the copyright credit running up the side of
> the image, independently of the caption. I'd quite like to do this and
> wondered if anyone had already written something they could share?
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
> ___
> 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] Crediting copyright on photographs

2022-05-04 Thread Bruce Horrocks via ntg-context
I need to include the copyright acknowledgement / photographer credit on an 
image but I'm not sure what's the best way to do it.

Option 1: I can add the acknowledgement to the end of the \placefigure caption 
text:

e.g.   \placefigure{A picture of a cow. Image of a cow that may or may not be 
under copyright anymore.}{\externalfigure[cow][height=6cm]}

then the copyright bit will appear in the Table of Figures which I don't really 
want to happen. Is there a way to truncate this?


Option 2: some magazines print the copyright credit running up the side of the 
image, independently of the caption. I'd quite like to do this and wondered if 
anyone had already written something they could share?

—
Bruce Horrocks
Hampshire, UK

___
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] XML: calculations on attribute values before output

2022-05-04 Thread Duncan Hothersall via ntg-context
Hi.

I'm processing an XML table and need to set a row span. Because we use a
variant of the CALS table model, spans are defined by an attribute saying
how many *additional* rows should be spanned, as opposed to how many *in
total*. So to translate this into TABLE \bTD[nr=X] syntax I need to add 1.

I'm guessing this is very easily doable (in lua?) but I've tried various
permutations and can't work it out. If anyone could give me a pointer that
would be great.

(In reality I'm going to need to handle lots of other conversions of
attribute values into \bTD[...] commands, so if there's a generalised way
of doing that sort of thing, or even better if someone has already tackled
CALS tables in this way, that would also be great!)

MWE below, but obviously it just passes the morerows="1" value straight
through into \bTD[nr=1] so it doesn't give me a row span at all.

Thanks in advance.

Duncan

--

\startbuffer[demo]

 
  
   
1
2
   
   
3
   
  
 

\stopbuffer

\startxmlsetups xml:demo:base
 \xmlsetsetup{#1}{*}{xml:demo:*}
\stopxmlsetups

\xmlregisterdocumentsetup{demo}{xml:demo:base}

\startxmlsetups xml:demo:informaltable
 \bTABLE
  \xmlflush{#1}
 \eTABLE
\stopxmlsetups

\startxmlsetups xml:demo:tgroup
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:tbody
 \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:demo:row
 \bTR
  \xmlflush{#1}
 \eTR
\stopxmlsetups

\startxmlsetups xml:demo:entry
 \bTD[nr=\xmlattdef{#1}{morerows}{1}]
  \xmlflush{#1}
 \eTD
\stopxmlsetups

\setupbodyfont[modern]
\starttext
\xmlprocessbuffer{demo}{demo}{}
\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 choose a font variant "book" / LMTX

2022-05-04 Thread Heinrich Paeßens via ntg-context
Yes … that is embarrassing simple … and actually I do not need anything else 
(since no other family is involved)

Many thanks Mikael

Best regards,
Heinrich

> On 4. May 2022, at 19:16, Mikael Sundqvist via ntg-context 
>  wrote:
> 
> On Wed, May 4, 2022 at 6:44 PM Heinrich Paeßens via ntg-context
>  wrote:
>> 
>> Hi there
>> I have a quick question:
>> 
>> I was successful to install and use a new font in LMTX (New Computer 
>> Modern). All good except that I’d like to use the »Book« variant instead of 
>> the »Regular« variant (NewCM10-Book.otf vs NewCM10-Regular.otf). Trying many 
>> ways but the right one.
>> 
>> please advise,
>> can I define something similar like \bf for bold — maybe \bk for book?
>> 
>> … all I get is
>> 
>> hp@mbp16 ~ % pdffonts page1.pdf
>> name type  encoding emb 
>> sub uni object ID
>>  -  --- 
>> --- --- -
>> CRBMBE+NewCM10-Regular   CID Type 0C   Identity-H   yes 
>> yes yes  1  0
>> 
>> my definitions are:
>> 
>> \definefontfamily [newCM] [rm] [newcomputermodern10]
>> \definefontfamily [newCM] [ss] [newcomputermodernsans10]
>> \definefontfamily [newCM] [tt] [newcomputermodernmono10] [scale=0.85, 
>> features=none]
>> \definefontfamily [newCM] [mm] [newcomputermodernmath]
>> \setupbodyfont[newCM, rm, 10pt]
>> 
>> Many thanks
>> Heinrich
> 
> Hi!
> 
> \setupbodyfont[newcomputermodern-book,10pt]
> 
> works here.
> 
> /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
> ___

___
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 choose a font variant "book" / LMTX

2022-05-04 Thread Mikael Sundqvist via ntg-context
On Wed, May 4, 2022 at 6:44 PM Heinrich Paeßens via ntg-context
 wrote:
>
> Hi there
> I have a quick question:
>
> I was successful to install and use a new font in LMTX (New Computer Modern). 
> All good except that I’d like to use the »Book« variant instead of the 
> »Regular« variant (NewCM10-Book.otf vs NewCM10-Regular.otf). Trying many ways 
> but the right one.
>
> please advise,
> can I define something similar like \bf for bold — maybe \bk for book?
>
> … all I get is
>
> hp@mbp16 ~ % pdffonts page1.pdf
> name type  encoding emb 
> sub uni object ID
>  -  --- 
> --- --- -
> CRBMBE+NewCM10-Regular   CID Type 0C   Identity-H   yes 
> yes yes  1  0
>
> my definitions are:
>
> \definefontfamily [newCM] [rm] [newcomputermodern10]
> \definefontfamily [newCM] [ss] [newcomputermodernsans10]
> \definefontfamily [newCM] [tt] [newcomputermodernmono10] [scale=0.85, 
> features=none]
> \definefontfamily [newCM] [mm] [newcomputermodernmath]
> \setupbodyfont[newCM, rm, 10pt]
>
> Many thanks
> Heinrich

Hi!

\setupbodyfont[newcomputermodern-book,10pt]

works here.

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


Re: [NTG-context] how to choose a font variant "book" / LMTX

2022-05-04 Thread Heinrich Paeßens via ntg-context
'both' would be the way to go, how can I set this up?

I don’t use typescripts just the definefontfamily and I suppose the book 
variant belongs to the family but is maybe an unloved relative ...

> On 4. May 2022, at 18:51, Henning Hraban Ramm via ntg-context 
>  wrote:
> 
> Do I understand correctly that you want the "Book" variant as regular? Or do 
> you need both?
> 
> Have a look into typescripts, e.g. 
> https://wiki.contextgarden.net/Alegreya_Typescript
> You probably won’t need the features.
> 
> Hraban
> 
> Am 04.05.22 um 18:44 schrieb Heinrich Paeßens via ntg-context:
>> Hi there
>> I have a quick question:
>> I was successful to install and use a new font in LMTX (New Computer 
>> Modern). All good except that I’d like to use the »Book« variant instead of 
>> the »Regular« variant (NewCM10-Book.otf vs NewCM10-Regular.otf). Trying many 
>> ways but the right one.
>> please advise,
>> can I define something similar like \bf for bold — maybe \bk for book?
>> … all I get is
>> hp@mbp16 ~ % pdffonts page1.pdf
>> name type  encoding emb 
>> sub uni object ID
>>  -  --- 
>> --- --- -
>> CRBMBE+NewCM10-Regular   CID Type 0C   Identity-H   yes 
>> yes yes  1  0
>> my definitions are:
>> \definefontfamily [newCM] [rm] [newcomputermodern10]
>> \definefontfamily [newCM] [ss] [newcomputermodernsans10]
>> \definefontfamily [newCM] [tt] [newcomputermodernmono10] [scale=0.85, 
>> features=none]
>> \definefontfamily [newCM] [mm] [newcomputermodernmath]
>> \setupbodyfont[newCM, rm, 10pt]
>> Many thanks
>> Heinrich
> ___
> 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] how to choose a font variant "book" / LMTX

2022-05-04 Thread Henning Hraban Ramm via ntg-context
Do I understand correctly that you want the "Book" variant as regular? 
Or do you need both?


Have a look into typescripts, e.g. 
https://wiki.contextgarden.net/Alegreya_Typescript

You probably won’t need the features.

Hraban

Am 04.05.22 um 18:44 schrieb Heinrich Paeßens via ntg-context:

Hi there
I have a quick question:

I was successful to install and use a new font in LMTX (New Computer 
Modern). All good except that I’d like to use the »Book« variant instead 
of the »Regular« variant (NewCM10-Book.otf vs NewCM10-Regular.otf). 
Trying many ways but the right one.


please advise,
can I define something similar like \bf for bold — maybe \bk for book?

… all I get is

hp@mbp16 ~ % pdffonts page1.pdf
name                                 type              encoding 
emb sub uni object ID
 -  
--- --- --- -
CRBMBE+NewCM10-Regular               CID Type 0C       Identity-H   
yes yes yes      1  0


my definitions are:

\definefontfamily [newCM] [rm] [newcomputermodern10]
\definefontfamily [newCM] [ss] [newcomputermodernsans10]
\definefontfamily [newCM] [tt] [newcomputermodernmono10] [scale=0.85, 
features=none]

\definefontfamily [newCM] [mm] [newcomputermodernmath]
\setupbodyfont[newCM, rm, 10pt]

Many thanks
Heinrich

___
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 choose a font variant "book" / LMTX

2022-05-04 Thread Heinrich Paeßens via ntg-context
Hi there 
I have a quick question: 

I was successful to install and use a new font in LMTX (New Computer Modern). 
All good except that I’d like to use the »Book« variant instead of the 
»Regular« variant (NewCM10-Book.otf vs NewCM10-Regular.otf). Trying many ways 
but the right one. 

please advise, 
can I define something similar like \bf for bold — maybe \bk for book?

… all I get is

hp@mbp16 ~ % pdffonts page1.pdf 
name type  encoding emb sub 
uni object ID
 -  --- --- 
--- -
CRBMBE+NewCM10-Regular   CID Type 0C   Identity-H   yes yes 
yes  1  0

my definitions are:

\definefontfamily [newCM] [rm] [newcomputermodern10]
\definefontfamily [newCM] [ss] [newcomputermodernsans10]
\definefontfamily [newCM] [tt] [newcomputermodernmono10] [scale=0.85, 
features=none]
\definefontfamily [newCM] [mm] [newcomputermodernmath]
\setupbodyfont[newCM, rm, 10pt]

Many thanks
Heinrich___
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] Issue in btx rendering

2022-05-04 Thread śrīrāma via ntg-context
On 5/4/22 6:02 PM śrīrāma wrote:
> 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'

Attaching the output I get which demonstrates the issue with the bad output of 
the first entry.

  Sreeram

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


[NTG-context] Issue in btx rendering

2022-05-04 Thread śrīrāma via ntg-context
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
___