[NTG-context] How to add a font folder with local fonts?

2017-10-09 Thread Ulrike Fischer
How can I add a simple folder (not a texmf tree) with opentype or
truetype fonts to the search path of context? 

I have tried with a local texmfcnf.lua and 

return {
   content = {
 variables = {
   OPENTYPEFONTS   =
".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR",
 },
   },
 }

but while `mtxrun --expand-var` reports the new value the folder is
ignored when I run `mtxrun --script fonts --reload`.


(Side remark: I found some small problems in mtxrun while testing:
mtxrun and also the wiki give as an example

mtxrun --script font --list somename

but correct would imho be 

mtxrun --script fonts --list somename

Also I would have expected that "mtxrun --script base --expand-var
VAR" works, but actually I needed "mtxrun --expand-var VAR".) 



-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] Sorting of abbreviations in index

2017-10-09 Thread Henning Hraban Ramm
Am 2017-10-09 um 12:42 schrieb Jano Kula :

> Hello Hraban,
> 
> have a look into the TUC file to find out, what's going on. I'm sure, Hans 
> would come with a more efficient approach, but this works here. Especially 
> the abbreviation table is probably stored on the fly somewhere, not only in 
> the TUC file and the table could be stored once.

Jano, you’re my saviour! Thank you so much!
(I hope I didn’t overlook any serious flaws of the approach - efficiency is not 
so important.)

If you like, I’ll gladly send you a voucher copy of the book*, once it’s 
printed.
*) https://www.dreiviertelhaus.de/editionka/gewerkschaftspolitik/

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] Setting style for \mfunction

2017-10-09 Thread Aditya Mahajan

On Mon, 9 Oct 2017, Hans Hagen wrote:


On 10/8/2017 3:27 PM, Aditya Mahajan wrote:

Hi,

In the past, it was possible to use the text font for math functions 

using

\setupmathematics[style=normal]
https://mailman.ntg.nl/pipermail/ntg-context/2015/082212.html

However, that does not work now.
How do I get textrm for math functions?

in math-ini.mkiv replace

\??alternativestyles

by

\??alternativestyle

(so singular)


Thanks. That fixes the issue.

Regards,
Aditya
___
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] Sorting of abbreviations in index

2017-10-09 Thread Floris van Manen
> On 9 October 2017 at 17:35, Henning Hraban Ramm  wrote:
> 
> If you like, I’ll gladly send you a voucher copy of the book*, once it’s 
> printed.
> *) https://www.dreiviertelhaus.de/editionka/gewerkschaftspolitik/

(1947 — 1975) why does the book ends a year before i travelled there ?
;-)

.F




signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] Sorting of abbreviations in index

2017-10-09 Thread Jano Kula
On 9 October 2017 at 17:35, Henning Hraban Ramm  wrote:
>
>
> If you like, I’ll gladly send you a voucher copy of the book*, once it’s
> printed.
> *) https://www.dreiviertelhaus.de/editionka/gewerkschaftspolitik/


Sure, I'll check the page numbers in the register are right, especially at
the page borders.
Could be improved, if the printer wouldn't be knocking on the door.

Jano
___
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] Lua problem with tagging or setups

2017-10-09 Thread Rik Kabel

Consider the following almost-minimal example:

   \setuptagging    [state=start]
   \setuppapersize  [A6]
   \setupexternalfigures[location=default]
   \definemakeup    [cover4][page=left,doublesided=no]
   \definelayer [isbn][width=\pagewidth,height=\pageheight]
   \define  \Title {A Primer on Omphaloskepsis}
   \startsetups [placeisbn]
  \setlayer [isbn][preset=rightbottom,hoffset=5mm,voffset=5mm]
  {\externalfigure[cow.pdf][width=3cm]}
   \stopsetups
   \starttext
  \setupbackgrounds  [page][setups=placeisbn,background=isbn]
  \startmakeup   [cover4]
  \scale [width=\textwidth] {\red \Title}
  \stopmakeup
   \stoptext

For me  (Win64, current standalone beta), compilation halts with:

   lua error   > lua error on line 4 in file
   C://Users/rik/Desktop/xxx.tex:

   ...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823:
   attempt to index local 'spec' (a nil value)
   stack traceback:
   ...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823: in
   function <...ext/tex/texmf-context/tex/conte
   xt/base/mkiv/back-exp.lua:818>

(It always points to line 4 of the file, no matter the file.) When the 
halt is answered with a CR, the processing runs to completion with no 
apparent errors.


When the first line is removed, or the state set to stop, compilation 
completes normally.


When the content of the setup (the two-line \setlayer) is moved out of 
the setup, compilation completes normally (without regard to tagging).


(I use a setup here because, in the real work on which this is based, 
there are other items in the layer that cannot be properly handled until 
after \starttext processing.


--
Rik

___
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] Lua problem with tagging or setups

2017-10-09 Thread Floris van Manen
if i omit the line with the \externalfigure it does work
is that cow.pdf missing?


> On 9 Oct 2017, at 18:11, Rik Kabel  wrote:
> 
> Consider the following almost-minimal example:
> 
> \setuptagging[state=start]
> \setuppapersize  [A6]
> \setupexternalfigures[location=default]
> \definemakeup[cover4][page=left,doublesided=no]
> \definelayer [isbn][width=\pagewidth,height=\pageheight]
> \define  \Title {A Primer on Omphaloskepsis}
> \startsetups [placeisbn]
>   \setlayer   [isbn][preset=rightbottom,hoffset=5mm,voffset=5mm]
>   {\externalfigure[cow.pdf][width=3cm]}
> \stopsetups
> \starttext
>   \setupbackgrounds  [page][setups=placeisbn,background=isbn]
>   \startmakeup   [cover4]
>   \scale [width=\textwidth] {\red \Title}
>   \stopmakeup
> \stoptext
> For me  (Win64, current standalone beta), compilation halts with:
> 
> lua error   > lua error on line 4 in file C://Users/rik/Desktop/xxx.tex:
> 
> ...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823: attempt to 
> index local 'spec' (a nil value)
> stack traceback:
> ...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823: in 
> function <...ext/tex/texmf-context/tex/conte
> xt/base/mkiv/back-exp.lua:818>
> (It always points to line 4 of the file, no matter the file.) When the halt 
> is answered with a CR, the processing runs to completion with no apparent 
> errors.
> When the first line is removed, or the state set to stop, compilation 
> completes normally.
> 
> When the content of the setup (the two-line \setlayer) is moved out of the 
> setup, compilation completes normally (without regard to tagging).
> 
> (I use a setup here because, in the real work on which this is based, there 
> are other items in the layer that cannot be properly handled until after 
> \starttext processing.
> 
> --
> Rik
> ___
> 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
> ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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] Lua problem with tagging or setups

2017-10-09 Thread Hans Hagen

On 10/9/2017 6:11 PM, Rik Kabel wrote:

Consider the following almost-minimal example:

\setuptagging    [state=start]
\setuppapersize  [A6]
\setupexternalfigures[location=default]
\definemakeup    [cover4][page=left,doublesided=no]
\definelayer [isbn][width=\pagewidth,height=\pageheight]
\define  \Title {A Primer on Omphaloskepsis}
\startsetups [placeisbn]
   \setlayer [isbn][preset=rightbottom,hoffset=5mm,voffset=5mm]
   {\externalfigure[cow.pdf][width=3cm]}
\stopsetups
\starttext
   \setupbackgrounds  [page][setups=placeisbn,background=isbn]
   \startmakeup   [cover4]
   \scale [width=\textwidth] {\red \Title}
   \stopmakeup
\stoptext

For me  (Win64, current standalone beta), compilation halts with:

lua error   > lua error on line 4 in file
C://Users/rik/Desktop/xxx.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823:
attempt to index local 'spec' (a nil value)
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823: in
function <...ext/tex/texmf-context/tex/conte
xt/base/mkiv/back-exp.lua:818>

(It always points to line 4 of the file, no matter the file.) When the 
halt is answered with a CR, the processing runs to completion with no 
apparent errors.


When the first line is removed, or the state set to stop, compilation 
completes normally.


When the content of the setup (the two-line \setlayer) is moved out of 
the setup, compilation completes normally (without regard to tagging).


(I use a setup here because, in the real work on which this is based, 
there are other items in the layer that cannot be properly handled until 
after \starttext processing.

fixed in next beta (no tagging of backgrounds)


-
  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] Question about enumerations/before/after

2017-10-09 Thread Weber, Matthias
Thanks Pablo,

that does it.

Matthias

> On Oct 9, 2017, at 2:12 PM, Pablo Rodriguez  wrote:
> 
> On 10/09/2017 01:07 PM, Weber, Matthias wrote:
>> Dear all,
>> 
>> I have something like
>> 
>> \defineenumeration[test] 
>>  [before={\startcolor[red]},
>>  after={\stopcolor}] 
>> 
>> When I comment out the before/after, I get paragraph breaks before
>> and after the enumeration. How can I have them with the before/after?
> Matthias,
> 
> adding \blank to before and after the color block does the trick:
> 
>[before={\blank\startcolor[red]},
>after={\stopcolor\blank}]
> 
> It my the first idea that came to mind.
> 
> I hope it helps,
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___
> 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] Question about enumerations/before/after

2017-10-09 Thread Hans Hagen

On 10/9/2017 8:12 PM, Pablo Rodriguez wrote:

On 10/09/2017 01:07 PM, Weber, Matthias wrote:

Dear all,

I have something like

\defineenumeration[test]
[before={\startcolor[red]},
after={\stopcolor}] 

When I comment out the before/after, I get paragraph breaks before
and after the enumeration. How can I have them with the before/after?

Matthias,

adding \blank to before and after the color block does the trick:

 [before={\blank\startcolor[red]},
 after={\stopcolor\blank}]

It my the first idea that came to mind.

just use the color key:

\defineenumeration
  [test]
  [text={Test:},
   headstyle=bold,
   number=no,
   color=red,
   style=normal,
   title=no]

-
  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] Question about enumerations/before/after

2017-10-09 Thread Pablo Rodriguez
On 10/09/2017 01:07 PM, Weber, Matthias wrote:
> Dear all,
> 
> I have something like
> 
> \defineenumeration[test] 
>   [before={\startcolor[red]},
>   after={\stopcolor}] 
> 
> When I comment out the before/after, I get paragraph breaks before
> and after the enumeration. How can I have them with the before/after?
Matthias,

adding \blank to before and after the color block does the trick:

[before={\blank\startcolor[red]},
after={\stopcolor\blank}]

It my the first idea that came to mind.

I hope it helps,

Pablo
-- 
http://www.ousia.tk
___
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 add a font folder with local fonts?

2017-10-09 Thread Henning Hraban Ramm
Am 2017-10-09 um 16:09 schrieb Ulrike Fischer :

> How can I add a simple folder (not a texmf tree) with opentype or
> truetype fonts to the search path of context? 

The official way is to set OSFONTDIR like any other PATH.
ConTeXt also recognizes fontconfig fonts.conf files 
(https://en.wikipedia.org/wiki/Fontconfig).

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] ICC profiles for \externalfigure

2017-10-09 Thread Hans Hagen

On 10/8/2017 11:09 AM, Pablo Rodriguez wrote:

Dear Luigi and Hans,

I have the following sample:

 \setupbackend
   [format=PDF/A-3a,
intent=sRGB IEC61966-2.1,
profile={sRGB.icc,default_gray.icc},
level=0]

 \setuptagging[state=start]

 \setupcolors[cmyk=no, pagecolormodel=auto]

 \setupexternalfigure[location=default]

 \startTEXpage[offset=1em, align=center]
 \dontleavehmode
 \externalfigure[cow-black]

 \dontleavehmode
 \externalfigure[cow-brown]

 \dontleavehmode
 \externalfigure[basic-figures.pdf][scale=200]
 \stopTEXpage
 \stoptext

The third external figure is found at
http://pdf.ousia.tk/basic-figures.pdf. I included it, since it adds a
transparency group (and I guess this might be relevant).

PDF/A-3a validation (http://verapdf.org) warns about XObjects not having
any ICC profile.

Would it be possible to add the "profile" key to \externalfigure, so
that each figure may have its own profile (or the reference to the
profile) added?


i looked into it and it's not going to happen

(1) we don't interpret the included images

(2) and even if we could mess with the either or not present resource 
getting the resource from someplace (main document, upstream object) is 
dubious and fragile too


so .. fix the included images ... (bitmap images can be autoconverted 
into profiled ones runtime but i didn't figure out a call to whatever 
program for pdf yet)


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] How to add a font folder with local fonts?

2017-10-09 Thread Hans Hagen

On 10/9/2017 4:09 PM, Ulrike Fischer wrote:

How can I add a simple folder (not a texmf tree) with opentype or
truetype fonts to the search path of context?

I have tried with a local texmfcnf.lua and

return {
content = {
  variables = {
OPENTYPEFONTS   =
".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR",
  },
},
  }


context doesn't look at those variables, it looks for fonts in:

(1) the tree i.e. the file database (in the order: otf, ttf, ttc, afm)
(2) in OSFONTDIR
(3) i the fonts.conf xml file (never used that one myself)

and I'll add

(4) EXTRAFONTS

for you to play with (although you can also add the path to OSFONTDIR 
for testing).


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] Lua problem with tagging or setups

2017-10-09 Thread Rik Kabel
No, cow.pdf is in the default location and is found with no problem when 
tagging is off or the setlayer is moved out of the setup. The Lua error 
does not occur with most commands, but does occur with external figures.


--
Rik

On 2017-10-09 12:32, Floris van Manen wrote:

if i omit the line with the \externalfigure it does work
is that cow.pdf missing?



On 9 Oct 2017, at 18:11, Rik Kabel  wrote:

Consider the following almost-minimal example:

\setuptagging[state=start]
\setuppapersize  [A6]
\setupexternalfigures[location=default]
\definemakeup[cover4][page=left,doublesided=no]
\definelayer [isbn][width=\pagewidth,height=\pageheight]
\define  \Title {A Primer on Omphaloskepsis}
\startsetups [placeisbn]
   \setlayer   [isbn][preset=rightbottom,hoffset=5mm,voffset=5mm]
   {\externalfigure[cow.pdf][width=3cm]}
\stopsetups
\starttext
   \setupbackgrounds  [page][setups=placeisbn,background=isbn]
   \startmakeup   [cover4]
   \scale [width=\textwidth] {\red \Title}
   \stopmakeup
\stoptext
For me  (Win64, current standalone beta), compilation halts with:

lua error   > lua error on line 4 in file C://Users/rik/Desktop/xxx.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823: attempt to 
index local 'spec' (a nil value)
stack traceback:
 ...ext/tex/texmf-context/tex/context/base/mkiv/back-exp.lua:823: in 
function <...ext/tex/texmf-context/tex/conte
xt/base/mkiv/back-exp.lua:818>
(It always points to line 4 of the file, no matter the file.) When the halt is 
answered with a CR, the processing runs to completion with no apparent errors.
When the first line is removed, or the state set to stop, compilation completes 
normally.

When the content of the setup (the two-line \setlayer) is moved out of the 
setup, compilation completes normally (without regard to tagging).

(I use a setup here because, in the real work on which this is based, there are 
other items in the layer that cannot be properly handled until after \starttext 
processing.




___
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] ICC profiles for \externalfigure

2017-10-09 Thread Pablo Rodriguez
On 10/09/2017 08:16 PM, Hans Hagen wrote:
> On 10/8/2017 11:09 AM, Pablo Rodriguez wrote:
>> [...]
>> PDF/A-3a validation (http://verapdf.org) warns about XObjects not having
>> any ICC profile.
>>
>> Would it be possible to add the "profile" key to \externalfigure, so
>> that each figure may have its own profile (or the reference to the
>> profile) added?
> 
> i looked into it and it's not going to happen
> 
> (1) we don't interpret the included images
> 
> (2) and even if we could mess with the either or not present resource 
> getting the resource from someplace (main document, upstream object) is 
> dubious and fragile too

Many thanks for your reply and for analyzing the issue, Hans.

I know this is a compromise solution. Of course, I cannot expect from
ConTeXt to assign the right profile to the image.

The user is the one that might mess the final PDF document by selecting
the wrong color profile for \externalfigure. But this possibility is
already there with the profile key in \setupbackend.

Choosing the right profiles is up to the user. Wrong attribution causes
unvalid documents, but attribution is a user task. Explaining this
information in the wiki is essential to clarify that “feature”. (I can
do that myself.)

Having this in mind, could you reconsider the implementation of the
profile key implemented for \externalfigure?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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 add a font folder with local fonts?

2017-10-09 Thread Ulrike Fischer
Am Mon, 9 Oct 2017 21:48:39 +0200 schrieb Hans Hagen:

> On 10/9/2017 4:09 PM, Ulrike Fischer wrote:
>> How can I add a simple folder (not a texmf tree) with opentype or
>> truetype fonts to the search path of context?
>> 
>> I have tried with a local texmfcnf.lua and
>> 
>> return {
>> content = {
>>   variables = {
>> OPENTYPEFONTS   =
>> ".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR",
>>   },
>> },
>>   }
> 
> context doesn't look at those variables, it looks for fonts in:
> 
> (1) the tree i.e. the file database (in the order: otf, ttf, ttc, afm)
> (2) in OSFONTDIR

I don't want something "systemwide". I have too many texsystems and
don't want side-effects (actually I want context to see the texlive
fonts, to make test easier). 

I can set OSFONTDIR only for context, but it would be a bit tricky.

> (3) i the fonts.conf xml file (never used that one myself)

Is there a context specific fontconfig (I'm on windows, so don't
have a system fontconfig)

> 
> and I'll add
> 
> (4) EXTRAFONTS
> 
> for you to play with (although you can also add the path to OSFONTDIR 
> for testing).

Thanks. That would be the easiest (and cleanest).  I will wait for
the next update. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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 add a font folder with local fonts?

2017-10-09 Thread Hans Hagen

On 10/9/2017 10:37 PM, Ulrike Fischer wrote:

Am Mon, 9 Oct 2017 21:48:39 +0200 schrieb Hans Hagen:


On 10/9/2017 4:09 PM, Ulrike Fischer wrote:

How can I add a simple folder (not a texmf tree) with opentype or
truetype fonts to the search path of context?

I have tried with a local texmfcnf.lua and

return {
 content = {
   variables = {
 OPENTYPEFONTS   =
".;D:/myfonts//;$TEXMF/fonts/{data,opentype}//;$OSFONTDIR",
   },
 },
   }


context doesn't look at those variables, it looks for fonts in:

(1) the tree i.e. the file database (in the order: otf, ttf, ttc, afm)
(2) in OSFONTDIR


I don't want something "systemwide". I have too many texsystems and
don't want side-effects (actually I want context to see the texlive
fonts, to make test easier).

I can set OSFONTDIR only for context, but it would be a bit tricky.


(3) i the fonts.conf xml file (never used that one myself)


Is there a context specific fontconfig (I'm on windows, so don't
have a system fontconfig)


no, and apart from testing it years ago i never used it myself (i'm on 
windows too and even on the linux boxes i put all fonts in 
texmf-fonts/fonts/data)




and I'll add

(4) EXTRAFONTS

for you to play with (although you can also add the path to OSFONTDIR
for testing).


Thanks. That would be the easiest (and cleanest).  I will wait for
the next update.





--

-
  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] ICC profiles for \externalfigure

2017-10-09 Thread Hans Hagen

On 10/9/2017 9:55 PM, Pablo Rodriguez wrote:



Having this in mind, could you reconsider the implementation of the
profile key implemented for \externalfigure?
as said, it will not be an engine supported features as it's technically 
impossible without messing up the backend (and we don't want to mess up 
stable code with fragile hacks)


if there is a command (gs, graphicmagic, ...) that can convert the image 
then we can add a converter directive (as we have for jpg and png)


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] Question about enumerations/before/after

2017-10-09 Thread Weber, Matthias
Dear all,

I have something like

\defineenumeration  [test] 
[text={Test:},
headstyle=bold,
number=no,
before={\startcolor[red]},
after={\stopcolor},
style=normal,
title=no
]   

\starttext

\input{knuth}

\starttest
\input{tufte}
\stoptest
\input{knuth}
\stoptext

When I comment out the before/after, I get paragraph breaks before and after 
the enumeration. How can I have them with the before/after?


Thanks,

Matthias
___
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] Sorting of abbreviations in index

2017-10-09 Thread Jano Kula
Hello Hraban,

have a look into the TUC file to find out, what's going on. I'm sure, Hans
would come with a more efficient approach, but this works here. Especially
the abbreviation table is probably stored on the fly somewhere, not only in
the TUC file and the table could be stored once.

Change definition to:

\def\Abk#1{\ctxlua{WriteToIndex("#1")}{\sc\lowercase{#1}}}

Add lua code to preamble:

\startluacode
function WriteToIndex (abbr)
-- test, if table exits already
if structures.synonyms.collected["abbreviation"] then
local abbreviation_entries_table =
structures.synonyms.collected["abbreviation"]["entries"]
local abbreviation = abbr
local meaning = ""
for i=1,#abbreviation_entries_table do
   local def = abbreviation_entries_table[i]["definition"]
   if def["synonym"] == abbreviation then
   meaning = def["meaning"]
   end
end
context.Sach(meaning .. " (" .. abbreviation .. ")")
end
end
\stopluacode

Abbreviation isn't used then (no \infull), so you need criterium=all to
display the list:
\setupsynonyms [abbreviation] [textstyle=normal,criterium=all]

Complete example attached.

Regards,
Jano


On 24 September 2017 at 00:45, Henning Hraban Ramm  wrote:

> So, in extension of my previous question:
> I’m combining abbreviations and registers (index).
> My author wants organizations listed with full name and abbreviation, and
> I try to avoid many verbose entries in the text.
>
> If I use \infull within \index, entries get sorted at i – probably a
> problem of expansion. How can I solve this?
>
> \Sach[\infull{ADN}]{\infull{ADN} (ADN)} doesn’t help.
>
> -
>
> \mainlanguage[de]
> \setupsynonyms [abbreviation] [textstyle=normal]
>
> \abbreviation{Abt.}{Abteilung}
> \abbreviation{ADN}{Allgemeiner Deutscher Nachrichtendienst}
> \abbreviation{AFL}{American Federation of Labor}
> \abbreviation{ANC}{African National Congress}
> \abbreviation{AV}{Auslandsvertretung}
> \abbreviation{BArch}{Bundesarchiv}
>
> \defineregister[Sach][
>   pagestyle=normal,
>   compress=yes,
>   indicator=no,
> ]
> \setupregister[Sach][style=normal]
>
> \def\Abk#1{\Sach{\infull{#1} (#1)}{\sc\lowercase{#1}}}
> %\def\qAbk#1{\Sach{\infull{#1} (#1)}}
>
>
> \starttext
> \section{Intro}
> \Sach{Abenteuer}\Sach{Abba}\Sach{Alliteration}
> \Sach{Berta}\Sach{Cäsar}\Sach[Context]{\CONTEXT}\Sach{COBOL}\Sach{Cäsium}
> \Sach{Igel}\Sach{Jagertee}\Sach{Humboldt}\Sach{infulk}\Sach{infulm}
>
> \Abk{ADN}, \Abk{ANC}, \Abk{AV}
>
> \section{Abkürzungen}
> \placelistofabbreviations %[criterium=all]
>
> \section{Sachregister}
> \placeregister[Sach]
>
> %\infull{AV}
> %\infull{AFL}
>
> \stoptext
>
> -
>
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> GPG Key ID 1C9B22FD
>
> 
> ___
> 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
> 
> ___


index-hraban.tex
Description: TeX 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
___

Re: [NTG-context] Setting style for \mfunction

2017-10-09 Thread Hans Hagen

On 10/8/2017 3:27 PM, Aditya Mahajan wrote:

Hi,

In the past, it was possible to use the text font for math functions using
\setupmathematics[style=normal]
https://mailman.ntg.nl/pipermail/ntg-context/2015/082212.html

However, that does not work now. Here is a minimal example:

\usetypescriptfile[euler]
\definetypeface[mainfont][rm][serif][pagella][default]
\definetypeface[mainfont][mm][math] [pagellaovereuler][default]
\definetypeface[mainfont][tt][mono] [dejavu][default] [rscale=0.8, 
features=none]


\setupbodyfont[mainfont]

\setupmathematics[lcgreek=normal, ucgreek=normal, default=normal]
\setupmathematics[functionstyle=normal]

\starttext
$sin$ vs $\sin$
\stoptext

Notice that $\sin$ prints $normalsin$.

If I change to `function=\tf`, even then $\sin$ uses mathrm font rather 
than textrm font.


How do I get textrm for math functions?

in math-ini.mkiv replace

\??alternativestyles

by

\??alternativestyle

(so singular)

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
___