Re: [NTG-context] \setupmathematics with stylealternative not working

2019-02-22 Thread Mikael P. Sundqvist
On Fri, Feb 22, 2019 at 7:25 PM Hans Hagen  wrote:
>
> On 2/22/2019 9:24 AM, Henri Menke wrote:
> > I can confirm.  My workaround which predates the stylealternative
> > mechanism also stopped working, so there must be an issue on the level
> > of font feature selection.
> >
> > \definefontfeature [math-text] [math-text] [ss04=yes]
> > \definefontfeature [math-script]   [math-script]   [ss04=yes]
> > \definefontfeature [math-scriptscript] [math-scriptscript] [ss04=yes]
> > \setupbodyfont[lucidaot]
> > \starttext
> > \startTEXpage[offset=3bp]
> > $\mathcal A$
> > \stopTEXpage
> > \stoptext
> that is a nasty one ... in font-fil.mkvi : we cannot use an edef as that
> makes features get lost
>
> \def\font_basics_get_font_parameter_nop#key=#value,%
>{\if]#key%
>   \font_basics_get_font_parameter_nop_finish
> \else
>   \expandafter\normaldef\csname p_#key\endcsname{#value}%  % no edef
> as we need to keep \mathsizesuffix
>   \expandafter\font_basics_get_font_parameter_nop
> \fi}
>
> \def\font_basics_get_font_parameter_yes#key=#value,%
>{\if]#key%
>   \font_basics_get_font_parameter_yes_finish
> \else
>   \expandafter\normaldef\csname p_#key\endcsname{#value}%  % no edef
> as we need to keep \mathsizesuffix
>   \expandafter\font_basics_get_font_parameter_yes
> \fi}
>
> but even then, the official way to trigger such features is
>
> \setupmathematics[stylealternative=calligraphic]
>
>

Works! Thanks! It is in the details... :)

/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] cross references to chapters in a book

2019-02-22 Thread Robert Zydenbos
Still nicer would be the following, but I do not know whether this is 
technically possible –

I have the following text:

% start of example: in chapter 4, pp. 38, I have
\subject [wild-stuff]{Wild stuff}
Now comes a lot of weird stuff which I want to refer to later.
…
% end of stuff in one chapter

% in another chapter:
As we already saw in \in{chapter}[wild-stuff], on p.~\at[wild-stuff]
% that was in the other chapter
% end of example

and the result would be: “As we already saw in chapter 4, on p.~38”…

Can such a thing be done?

Robert


> On 22. Feb 2019, at 22:04, Robert Zydenbos  wrote:
> 
> Hmm… although I got your example to work after some tweaking (changing 
> \samplefile to {input and placing knuth.tex and zapf.tex in the same folder 
> as the test file), I could not reproduce this with my book. I want to get 
> "chapter 4" but keep getting "chapter 4.0".
> 
> Is this because I am using MkII with XeTeX?
> 
> Robert
> 
>> On 22. Feb 2019, at 20:47, Wolfgang Schuster 
>>  wrote:
>> 
>> Robert Zydenbos schrieb am 22.02.19 um 17:14:
>>> Dear wizards of ConTeXt,
>>> In the final stage of completing a book project, I was wondering how to 
>>> automatize cross references to chapters. I’ve already figured out how to 
>>> refer to pages (using “\at[REFERENCE]”), but how is this done with 
>>> chapters? I’m apparently too simple-minded to understand the manual (and I 
>>> don’t understand the differences between \reference, \textreference, \in, 
>>> \about).
>> 
>> When you use \chapter:
>> 
>> \starttext
>> 
>> \chapter[sec:knuth]{Knuth}
>> 
>> \samplefile{knuth}
>> 
>> See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].
>> 
>> \chapter[sec:zapf]{Zapf}
>> 
>> \samplefile{zapf}
>> 
>> See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].
>> 
>> \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] cross references to chapters in a book

2019-02-22 Thread Robert Zydenbos
Hmm… although I got your example to work after some tweaking (changing 
\samplefile to {input and placing knuth.tex and zapf.tex in the same folder as 
the test file), I could not reproduce this with my book. I want to get "chapter 
4" but keep getting "chapter 4.0".

Is this because I am using MkII with XeTeX?

Robert

> On 22. Feb 2019, at 20:47, Wolfgang Schuster 
>  wrote:
> 
> Robert Zydenbos schrieb am 22.02.19 um 17:14:
>> Dear wizards of ConTeXt,
>> In the final stage of completing a book project, I was wondering how to 
>> automatize cross references to chapters. I’ve already figured out how to 
>> refer to pages (using “\at[REFERENCE]”), but how is this done with chapters? 
>> I’m apparently too simple-minded to understand the manual (and I don’t 
>> understand the differences between \reference, \textreference, \in, \about).
> 
> When you use \chapter:
> 
> \starttext
> 
> \chapter[sec:knuth]{Knuth}
> 
> \samplefile{knuth}
> 
> See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].
> 
> \chapter[sec:zapf]{Zapf}
> 
> \samplefile{zapf}
> 
> See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].
> 
> \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] cross references to chapters in a book

2019-02-22 Thread Henning Hraban Ramm
Am 2019-02-22 um 20:47 schrieb Wolfgang Schuster 
:

> Robert Zydenbos schrieb am 22.02.19 um 17:14:
>> Dear wizards of ConTeXt,
>> In the final stage of completing a book project, I was wondering how to 
>> automatize cross references to chapters. I’ve already figured out how to 
>> refer to pages (using “\at[REFERENCE]”), but how is this done with chapters? 
>> I’m apparently too simple-minded to understand the manual (and I don’t 
>> understand the differences between \reference, \textreference, \in, \about).
> 
> When you use \startchapter:
> 
> \starttext
> 
> \startchapter[title={Knuth},reference={sec:knuth}]
> 
> \samplefile{knuth}
> 
> See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].
> 
> \stopchapter
> 
> \startchapter[title={Zapf},reference={sec:zapf}]
> 
> \samplefile{zapf}
> 
> See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].
> 
> \stopchapter
> 
> \stoptext
> 

Use \about[sec:knuth], if you need the title.

https://wiki.contextgarden.net/Command/about
https://wiki.contextgarden.net/Command/in
https://wiki.contextgarden.net/Command/at


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
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] Insert "minipage"

2019-02-22 Thread Lizardo M. Reyna Bowen
Thanks,  it works ok.

On 2/22/19 2:55 PM, Wolfgang Schuster wrote:
> Lizardo M. Reyna Bowen schrieb am 22.02.19 um 18:20:
>> Hi all,
>>
>> How to insert a sample code and the result in a "minipage" in a
>> presentation? For example, I need to show the result of a
>> startdarmakeup, as in the following pdf.
>>
>> http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]
>
> \setuppapersize[A4,landscape]
>
> \starttext
>
> \startbuffer[standardmakeup]
> \startstandardmakeup
> Hello
> \stopstandardmakeup
> \stopbuffer
>
> \typesetbuffer[standardmakeup][frame=on,height=\textheight]
>
> \stoptext
>
> Wolfgang
>
-- 
Lizardo Mauricio Reyna Bowen
Docente-Investigador
Facultad de Ingerniería Agrícola
Universidad Técnica de Manabí
+593 982924637 | lre...@utm.edu.ec |reyna@gmail.com
Manabí - Ecuador
PGP Key: 0xa35a15b90ee64e8d

___
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] Insert "minipage"

2019-02-22 Thread Lizardo M. Reyna Bowen
Thanks,  it is exactly what I want.

On 2/22/19 2:55 PM, Wolfgang Schuster wrote:
> Lizardo M. Reyna Bowen schrieb am 22.02.19 um 18:20:
>> Hi all,
>>
>> How to insert a sample code and the result in a "minipage" in a
>> presentation? For example, I need to show the result of a
>> startdarmakeup, as in the following pdf.
>>
>> http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]
>
> \setuppapersize[A4,landscape]
>
> \starttext
>
> \startbuffer[standardmakeup]
> \startstandardmakeup
> Hello
> \stopstandardmakeup
> \stopbuffer
>
> \typesetbuffer[standardmakeup][frame=on,height=\textheight]
>
> \stoptext
>
> Wolfgang
>
-- 
Lizardo Mauricio Reyna Bowen
Docente-Investigador
Facultad de Ingerniería Agrícola
Universidad Técnica de Manabí
+593 982924637 | lre...@utm.edu.ec |reyna@gmail.com
Manabí - Ecuador
PGP Key: 0xa35a15b90ee64e8d

___
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] Insert "minipage"

2019-02-22 Thread Wolfgang Schuster

Lizardo M. Reyna Bowen schrieb am 22.02.19 um 18:20:

Hi all,

How to insert a sample code and the result in a "minipage" in a
presentation? For example, I need to show the result of a
startdarmakeup, as in the following pdf.

http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]


\setuppapersize[A4,landscape]

\starttext

\startbuffer[standardmakeup]
\startstandardmakeup
Hello
\stopstandardmakeup
\stopbuffer

\typesetbuffer[standardmakeup][frame=on,height=\textheight]

\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] getdocumentargument in Metafun

2019-02-22 Thread Fabrice L
Le 22 février 2019 à 11:08:51, Aditya Mahajan (adit...@umich.edu) a écrit:

Untested. Add quotes around FileName:

> string FileName ;
> FileName := "\getdocumentargument{File}" ;


And not tested successfully !

Thanks a lot Aditya !

Fabrice.



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
___
___
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] cross references to chapters in a book

2019-02-22 Thread Wolfgang Schuster

Robert Zydenbos schrieb am 22.02.19 um 17:14:

Dear wizards of ConTeXt,

In the final stage of completing a book project, I was wondering how to 
automatize cross references to chapters. I’ve already figured out how to refer 
to pages (using “\at[REFERENCE]”), but how is this done with chapters? I’m 
apparently too simple-minded to understand the manual (and I don’t understand 
the differences between \reference, \textreference, \in, \about).


When you use \chapter:

\starttext

\chapter[sec:knuth]{Knuth}

\samplefile{knuth}

See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].

\chapter[sec:zapf]{Zapf}

\samplefile{zapf}

See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].

\stoptext


When you use \startchapter:

\starttext

\startchapter[title={Knuth},reference={sec:knuth}]

\samplefile{knuth}

See \in{chapter}[sec:zapf] at \at{page}[sec:zapf].

\stopchapter

\startchapter[title={Zapf},reference={sec:zapf}]

\samplefile{zapf}

See \in{chapter}[sec:knuth] at \at{page}[sec:knuth].

\stopchapter

\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] markdown module vs pandoc

2019-02-22 Thread Pablo Rodriguez
On 2/21/19 9:59 PM, Gour wrote:
> On Thu, 21 Feb 2019 18:50:41 +0100 Pablo Rodriguez wrote:
> 
>> I’m still behind the environment itself, although I realized that
>> these may not be relevant to everybody. I store the new commits in a
>> private repository.
> 
> Aha...I believe I might be interested. :-)

Hi Gour,

the code in my private repository is unnecessarily complex for too
narrow cases.

I think that the most valuable feature of environment itself (the file
'pandoc-xhtml.tex') is the practical introduction to “Dealing with XML
in ConTeXt” (http://pragma-ade.com/general/manuals/xml-mkiv.pdf).

>> I use the XML handling (generating the XHTML with pandoc) in ConTeXt
>> for almost all the documents I compile with ConTeXt. I think this is
>> the way to go.
> 
> I admit it sounds/looks very good. Morever, it could allow me to e.g. use
> org-mode for my original markup which I use anyway with Emacs and then do
> org-mode --> XHTML.

ConTeXt only requires XML source as input to typeset it.

>> My environment is only an example. You may write another one for your
>> own needs, you don’t have to use mine.
> 
> Heh, for that I must learn some things first. :-)

The published code is fine for what you want. The latest version would
be misleading. It is crappy in many aspects (even for myself).

>> There are other options, but LaTeX is a real problem for the
>> development of pandoc, because many times users expect pandoc as a
>> layer that spares them the actual dealing with LaTeX.
> 
> ConTeXt is certainly more appealing..

ConTeXt deals with XML natively.

Cheers,

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] \setupmathematics with stylealternative not working

2019-02-22 Thread Hans Hagen

On 2/22/2019 9:24 AM, Henri Menke wrote:

I can confirm.  My workaround which predates the stylealternative
mechanism also stopped working, so there must be an issue on the level
of font feature selection.

\definefontfeature [math-text] [math-text] [ss04=yes]
\definefontfeature [math-script]   [math-script]   [ss04=yes]
\definefontfeature [math-scriptscript] [math-scriptscript] [ss04=yes]
\setupbodyfont[lucidaot]
\starttext
\startTEXpage[offset=3bp]
$\mathcal A$
\stopTEXpage
\stoptext
that is a nasty one ... in font-fil.mkvi : we cannot use an edef as that 
makes features get lost


\def\font_basics_get_font_parameter_nop#key=#value,%
  {\if]#key%
 \font_basics_get_font_parameter_nop_finish
   \else
 \expandafter\normaldef\csname p_#key\endcsname{#value}%  % no edef 
as we need to keep \mathsizesuffix

 \expandafter\font_basics_get_font_parameter_nop
   \fi}

\def\font_basics_get_font_parameter_yes#key=#value,%
  {\if]#key%
 \font_basics_get_font_parameter_yes_finish
   \else
 \expandafter\normaldef\csname p_#key\endcsname{#value}%  % no edef 
as we need to keep \mathsizesuffix

 \expandafter\font_basics_get_font_parameter_yes
   \fi}

but even then, the official way to trigger such features is

\setupmathematics[stylealternative=calligraphic]


-
  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] Insert "minipage"

2019-02-22 Thread Lizardo M. Reyna Bowen
Hi all,

How to insert a sample code and the result in a "minipage" in a 
presentation? For example, I need to show the result of a
startdarmakeup, as in the following pdf.

http://www.pragma-ade.com/show-art.pdf#[0,{%22name%22:%22Fit%22}]

Regards

-- 
Lizardo


___
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] cross references to chapters in a book

2019-02-22 Thread Robert Zydenbos
Dear wizards of ConTeXt,

In the final stage of completing a book project, I was wondering how to 
automatize cross references to chapters. I’ve already figured out how to refer 
to pages (using “\at[REFERENCE]”), but how is this done with chapters? I’m 
apparently too simple-minded to understand the manual (and I don’t understand 
the differences between \reference, \textreference, \in, \about).

Robert
___
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] getdocumentargument in Metafun

2019-02-22 Thread Aditya Mahajan

On Fri, 22 Feb 2019, Fabrice L wrote:


Dear list,

I wish to do several zoom from a picture made in MetaFun, from a pdf file
which name is given on the commande line, like:

context zoom.tex —File=EntryFile —Page=9 —result=OutFile.pdf


Untested. Add quotes around FileName:


string FileName ;
FileName := "\getdocumentargument{File}" ;


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
___


[NTG-context] getdocumentargument in Metafun

2019-02-22 Thread Fabrice L
Dear list,

I wish to do several zoom from a picture made in MetaFun, from a pdf file
which name is given on the commande line, like:

context zoom.tex —File=EntryFile —Page=9 —result=OutFile.pdf

Minimal example:

\starttext
  \startMPpage
numeric ThePage ;
string FileName ;
FileName := \getdocumentargument{File} ;
ThePage := \getdocumentargument{Page} ;
draw textext("\externalfigure["  & FileName &"][page="  & ThePage &"]")
xysized (48in,48in) ;
  \stopMPpage
\stoptext

I can get in the MPpage the page number in entry (9 in my example), but not
the file name.
Thanks for any help.
Fabrice.
___
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] When newsizing an external figure bei [width=], what will be its height in pt and viceversa?

2019-02-22 Thread Peter Münster
On Fri, Feb 22 2019, Rudolf Bahr wrote:

> The picture sizes in px One gets by invoking for instance graphics Magick's 
> identify
> in a lua program:

Or just img.scan():

\startluacode
  local image = img.scan{filename = "my-image.jpg"}
  logs.report("xsize", image.xsize)
  logs.report("ysize", image.ysize)
\stopluacode

-- 
   Peter
___
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] When newsizing an external figure bei [width=], what will be its height in pt and viceversa?

2019-02-22 Thread Rudolf Bahr
On Tue, Feb 19, 2019 at 10:48:38AM +0100, Bahr Rudolf wrote:
> Hi All,
> 
> from an external figure I normally know its width and height in px. 
> But I don't know its exact sizes in pt. When newsizing the figure 
> in a document (by the same width-to-height-ratio), I'll do that as 
> some part of textwidth or textheight, in pt or mm, but not in px, 
> i.e. by means of [width=]. 
> Sometimes it would be interesting to know its new height in pt, 
> and viceversa. 
> 
> Is there a variable or something else containing its new size in pt?
> 
> Regards,
> Rudolf




Hi All,

up to now Nobody answered to my question, perhaps it might have been
too simple.

Indeed One could normally assume:


picture-width-in-px  preset-picture-width-in-pt
  =  --
picture-height-in-px asked-picture-height-in-pt


And according to Adam Riese One gets:

 preset-picture-width-in-pt  *  picture-height-in-px
asked-picture-height-in-pt = ---
 picture-width-in-px


-
The picture sizes in px One gets by invoking for instance graphics Magick's 
identify
in a lua program:

local file = assert ( io.popen ( 'gm identify ' .. picture_name, 'r' ))
local output = file:read ( '*all' )
file:close ()

local words = {}
for w in string.gmatch ( output, "%g+" ) do
words [ #words + 1 ] = w
end

-- Width and height are found in words[3]: i.e. 5407x3544+0+0
local dims = {}
for d in string.gmatch ( words [ 3 ], "%d+" ) do
dims [ #dims + 1 ] = d
end

local px_width  = dims [ 1 ]
local px_height = dims [ 2 ]
-

It's a solution at least as long as your Lua supports "io.popen". There might be
shorter solutions.

Cheers, Rudolf

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

2019-02-22 Thread Ursula Hermann
High list!

Another example, instead oft he cow, I took another figure:

\setuppapersize
  [A5]

\setupexternalfigures
  [location=default]

\setupindenting
  [yes, small]

\setupwhitespace
  [small]

\defineframedtext
  [prettyblock]
  [width=10cm,
   indenting={yes, small},
   background=color, backgroundcolor=lightgreen,
   foreground=color, foregroundcolor=black,
   offset=2mm,
   align=flushleft]

\starttext

\startprettyblock
\setupindenting[next]
  The Earth, as a habitat for animal life, is in old age and has a fatal
  illness. Several, in fact.

  It would be happening whether humans had ever evolved or not.

  \placefigure
[][fig:church]
{Stephanus Church.}
{\externalfigure[ma-cb-24][width=.4\textwidth]}

\stopprettyblock
\setupindenting[next]
Below, we have two separate columns; but up here, for the nonce, we have but 
the one.

\startcolumns [n=2]
  Text, text, text \dots
  all in the first column
\column
  Words, words, words \dots
  all in the second column.
  And look ye here! Even more words!
\stopcolumns

\stoptext

Works great. 

Many Regards 

Uschi 

-Ursprüngliche Nachricht-
Von: ntg-context  Im Auftrag von Wolfgang Schuster
Gesendet: Donnerstag, 21. Februar 2019 18:24
An: mailing list for ConTeXt users ; Marco Patzer 

Betreff: Re: [NTG-context] Frame

Marco Patzer schrieb am 21.02.19 um 12:19:
> On Thu, 21 Feb 2019 10:50:21 +
> Ursula Hermann  wrote:
>
>> Here is my example:
>>
>> \setuppapersize[A5]
>> \setupcolors[state=start]
> This is the default, no need to start the colours any longer.
>
>> {\framed
>> [width=10cm,
>> background=color,backgroundcolor=darkblue,
>> foreground=color,foregroundcolor=white,
>> align={flushleft}]
>> {The Earth, as a habitat for animal life, is in old age and has a 
>> fatal illness. Several, in fact.\par \setupindenting[yes, small] It 
>> would be happening whether humans had ever evolved or not.
>>
>> \externalfigure[cow.pdf][width=1cm]}
>>
>> \setupwhitespace[small]
>> \starttext
>> Below, we have two separate columns; but up here, for the nonce, we 
>> have but the one.
>>
>> \startcolumns[n=2]  % Two columns, please
>>  Text, text, text \dots
>>  all in the first column
>> \column
>>  Words, words, words \dots
>> all in the second column.
>>  And look ye here! Even more words!
>> \stopcolumns
>> \stoptext
>> Why can‘t I see the cow?
> You're missing
>
>\setupexternalfigures
>  [location=default]
>
> Without setting the location context doesn't check the system 
> directories for the sample images.
>
> Furthermore, you're typesetting before \starttext. That's why your 
> font is monospaced.
>
> And I try to separate content from style. That's why I move all style 
> information before \starttext and after \starttext comes only content 
> and markup (if possible). Nothing wrong with mixing it, but it's 
> easier to read and easier to change the layout after the fact.
> I'd write your example as follows.
>
> \setuppapersize
>[A5]
>
> \setupexternalfigures
>[location=default]
>
> \setupindenting
>[yes, small]
>
> \setupwhitespace
>[small]
>
> \defineframedtext
>[prettyblock]
>[width=10cm,
> indenting={yes, small},
> background=color, backgroundcolor=darkblue,
> foreground=color, foregroundcolor=white,
> offset=2mm,
> align=flushleft]
>
> \starttext
>
> \startprettyblock
>\noindentation

You don’t need \noindentation when you add “next” to the indenting options.

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
___
___
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] \setupmathematics with stylealternative not working

2019-02-22 Thread Henri Menke
I can confirm.  My workaround which predates the stylealternative
mechanism also stopped working, so there must be an issue on the level
of font feature selection.

\definefontfeature [math-text] [math-text] [ss04=yes]
\definefontfeature [math-script]   [math-script]   [ss04=yes]
\definefontfeature [math-scriptscript] [math-scriptscript] [ss04=yes]
\setupbodyfont[lucidaot]
\starttext
\startTEXpage[offset=3bp]
$\mathcal A$
\stopTEXpage
\stoptext


On 2/22/19 8:35 PM, Mikael P. Sundqvist wrote:
> Hi,
> 
> It seems that, with the latest beta, the \setupmathematics with
> stylealternative is not working.
> 
> I tried
> 
> \setupbodyfont[lucidaot]
> \setupmathematics[stylealternative={calligraphic}]
> \starttext
> \startTEXpage[offset=3bp]
> $\mathcal A$
> \stopTEXpage
> \stoptext
> 
> and got the attached output lcm.png. This is not the curly A I would
> expect. The one I expect is the one that can be seen on top of page 9
> in https://tug.org/store/lucida/lucida-amsmath.pdf.
> 
> I also noticed that the example file that I have seen earlier on this
> list, pasted below, does not seem to change anything.
> 
> Has anything changed?
> 
> /Mikael
> 
> % second example
> \setupbodyfont[lucidaot]
> 
> \starttext
> 
> $x
> ^{i \leftarrow 0 = ∅}
> _{\setmathfontalternate{arrow}
>   \setmathfontalternate{dotless}
>   \setmathfontalternate{zero}
>   i \leftarrow 0 = ∅}
> $
> 
> $x
> ^{i \leftarrow 0 = ∅}
> _{\setmathfontalternate{arrow,dotless,zero}
>   i \leftarrow 0 = ∅}
> $
> 
> \setupmathematics[stylealternative={arrow,dotless,zero}]
> 
> $x
> ^{i \leftarrow 0 = ∅}
> _{i \leftarrow 0 = ∅}
> $
> 
> \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
> ___
> 

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