Re: [NTG-context] metapost: remapping colors of an SVG picture

2020-02-20 Thread Hans Hagen

On 2/20/2020 10:29 AM, Jan U. Hasecke wrote:

Am 18.02.20 um 19:24 schrieb Jan U. Hasecke:

Am 18.02.20 um 19:17 schrieb mf:

Il 18/02/20 19:07, Jan U. Hasecke ha scritto:

Am 18.02.20 um 14:53 schrieb Hans Hagen:


\setupcolors[rgb=no]
\startMPcode
  draw lmt_svg [ filename = "sample.svg" ] ;
\stopMPcode

I get this error.

! Not implemented: (unknown numeric)=(string).

]
<*> ... ; p := lmt_svg [ filename = "sample.svg" ]


That's because it's LMTX only (the "lmt" prefix of "lmt_svg" should
stand for "luametatex").


Yes, with lmtx it works but there is no image in the resulting file.


Sorry for digging deeper.

I am very thrilled by the idea that I could simply adjust a RGB SVG to
well defined CMYK colors with this trick.

Can anybody confirm if this works?
mf and i are playing with an overload mechanism (actually pretty 
trivial) ... more later but in principle the answer is yes, but


- first we have to play around a bit
- then it needs to end up in the core
- then there need to be a new context upload
- and mf has to wikify it

so, some patience is needed

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
___


Re: [NTG-context] Customizing \cite alternatives

2020-02-20 Thread Thomas A. Schmitz

On 20.02.20 14:16, Philipp A. wrote:
Makes sense, seems like no default is defined anymore, so it won’t 
render without using a style.

I use apa, and the attached screenshot shows my problem.


If you use APA, you have to set up the APA cite options. The manual is a 
bit on the short side here, but all the options are mentioned. If you 
want to change the way et al. is displayed (for APA, the default is 
\btxcomma\btxlabeltext{others}), you can do this:


\setupbtx [apa:cite] [otherstext={ et al.}]

The number of authors displayed is defined by the key etaldisplay, so 
you would do this:


\setupbtx [apa:cite] [etaldisplay=4]

Thomas
___
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] Howto metapost textext set or change basepoint (origin) baseline of text

2020-02-20 Thread Christoph Hintermüller
Hi Hans
On Thu, 2020-02-20 at 10:28 +0100, Hans Hagen wrote:
> On 2/20/2020 10:15 AM, Christoph Hintermüller wrote:
> 
> You can append a palcement suffix, like:
> 
>textext.dflt
> 
> you can try:
> 
>lft rt bot top ulft urt llft lrt d dflt drt origin raw
> 


Thanks again.

textext.origin

was the solution i was not able to properly figure


Best
Xristoph


___
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] Howto metapost textext set or change basepoint (origin) baseline of text

2020-02-20 Thread Christoph Hintermüller
Hi Hans
On Thu, 2020-02-20 at 10:28 +0100, Hans Hagen wrote:
> On 2/20/2020 10:15 AM, Christoph Hintermüller wrote:
> > 
> You can append a palcement suffix, like:
> 
>textext.dflt
> 
> you can try:
> 
>lft rt bot top ulft urt llft lrt d dflt drt origin raw
> 


Thank you very much, that was what i missed to properly get when
reading manuals.

> (if instead of an eps export you can use svg that can be an
> alternative 
> route)
> 


Yes i know but i want text inside figure to be typeset by context to be
able to use all the cool stuff including math fonts and others offered
by context and its packages. And again i was not able to deduce any
hint that this magically would happen for SVG directly. What i
understood is it will be converted to pdf via cli interface of inkscape
and simply included as pdf image. 

Best 
Xristoph


___
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] Customizing \cite alternatives

2020-02-20 Thread Philipp A.
Makes sense, seems like no default is defined anymore, so it won’t render
without using a style.
I use apa, and the attached screenshot shows my problem.

\startbuffer[testbib]
@Article{testone,
  author={Testperson, A. B.},
  title={Thing with one author},
  year={2001},
}
@Article{testtwo,
  author={Testperson, A. B. and Friendperson, C.},
  title={Thing with two authors},
  year={2002},
}
@Article{testmany,
  author={Ah and Bee and Cee and Dee and Ee and Eff and Gee},
  title={Thing with two authors},
  year={2002},
}
\stopbuffer

\definebtxdataset[main]
\usebtxdataset[main][testbib.buffer]
\setupbtx[dataset=main] % make cite use this
\setupbtx[default:cite][alternative=authoryear] % cite style
\usebtxdefinitions[apa] % load and activate list rendering
\definebtxrendering[main][apa][dataset=main, pagestate=start]

\starttext
\cite[authoryear][testone] \cite[authoryear][testtwo]
\cite[authoryear][testmany]

\cite[authoryears][testone] \cite[authoryears][testtwo]
\cite[authoryears][testmany]

\subject{bib}

\placebtxrendering[main][method=global]
\stoptext

Am Mi., 19. Feb. 2020 um 16:35 Uhr schrieb Thomas A. Schmitz <
thomas.schm...@uni-bonn.de>:

> It is difficult to answer your question because we don't know which
> specifications you use for your citations. You will have to provide a
> minimal example that allows us to see what you're doing.
>
> Thomas
>
> On 2/17/20 6:26 PM, Philipp A. wrote:
> > Hi List,
> >
> > I want the comma gone from “et al.” citations, and modify the cite
> > alternatives:
> >
> >   * [authoryear]: (Surname, et al., 2018) → (Surname et al., 2018)
> >   * [authoryears]: Surname, et al. (2018) → Surname et al. (2018)
> >
> > Also I’d like to configure how many names are the maximum before all
> > except the first are replaced by “et al.”
> > i.e. \setupcitething[maxauthors=3]: (One, Two, Three, & Four, 2018) →
> > (One et al., 2018)
> >
> > How can I do this? I didn’t find anything in the publications manual:
> > http://pragma-ade.nl/general/manuals/mkiv-publications.pdf
> >
> > Best, Philipp
>
> ___
> 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] metapost: remapping colors of an SVG picture

2020-02-20 Thread Jan U. Hasecke
Am 18.02.20 um 19:24 schrieb Jan U. Hasecke:
> Am 18.02.20 um 19:17 schrieb mf:
>> Il 18/02/20 19:07, Jan U. Hasecke ha scritto:
>>> Am 18.02.20 um 14:53 schrieb Hans Hagen:
>>>
 \setupcolors[rgb=no]
 \startMPcode
  draw lmt_svg [ filename = "sample.svg" ] ;
 \stopMPcode
>>> I get this error.
>>>
>>> ! Not implemented: (unknown numeric)=(string).
>>> 
>>> ]
>>> <*> ... ; p := lmt_svg [ filename = "sample.svg" ]
>>>
>> That's because it's LMTX only (the "lmt" prefix of "lmt_svg" should
>> stand for "luametatex").
> 
> Yes, with lmtx it works but there is no image in the resulting file.

Sorry for digging deeper.

I am very thrilled by the idea that I could simply adjust a RGB SVG to
well defined CMYK colors with this trick.

Can anybody confirm if this works?

juh
___
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] Howto metapost textext set or change basepoint (origin) baseline of text

2020-02-20 Thread Hans Hagen

On 2/20/2020 10:15 AM, Christoph Hintermüller wrote:

Hi
I have the following problem. I convert a eps file using pstoedit into
meta post file. When running this file through mptopdf the resulting
pdf image is as expected. When i include, using the input command,  the
file within a startMPcode endMPcode or startMPpage stopMPpage   after
replacing simple draw ... by draw textext(
You can append a palcement suffix, like:

  textext.dflt

you can try:

  lft rt bot top ulft urt llft lrt d dflt drt origin raw

(if instead of an eps export you can use svg that can be an alternative 
route)


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
___


[NTG-context] Howto metapost textext set or change basepoint (origin) baseline of text

2020-02-20 Thread Christoph Hintermüller
Hi 
I have the following problem. I convert a eps file using pstoedit into
meta post file. When running this file through mptopdf the resulting
pdf image is as expected. When i include, using the input command,  the
file within a startMPcode endMPcode or startMPpage stopMPpage   after
replacing simple draw ... by draw textext(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
___