Re: [NTG-context] Formatting spaces for \placelistof ?

2019-12-12 Thread Jon Wong
Sorry for the noise. \setupsynonyms[term][width=X].

But I can’t get textstyle to work. Tried bold too.

How do I insert a blank line between entries?

> On Dec 13, 2019, at 3:23 PM, Jon Wong  wrote:
> 
> Space between the term (left column) and the definition (right column) is too 
> small.
> 
> \definesynonyms[term][terms][\deffull]
> \setupsynonyms[term][textstyle=cap]
> \placelistofterms

___
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] Formatting spaces for \placelistof ?

2019-12-12 Thread Jon Wong
Space between the term (left column) and the definition (right column) is too 
small.

\definesynonyms[term][terms][\deffull]
\setupsynonyms[term][textstyle=cap]
\placelistofterms
___
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] lmtx

2019-12-12 Thread Jeong Dal
Dear Hans,

I downloaded the new beta today.
It installs files and makes format file well.
I compiled a test file without any problem.  
Of course, there is a security issue of OSX, but allowing the execution in the 
preference>security once, it doesn't ask about again.
I also run a test file containing a new graphic feature of LMTX and I got a 
nice output.

Thanks!!!

Best regards,

Dalyoung

P.S. Here is a beginning part of log file. I installed new beta in the folder 
/Users/graph/ConTeXtC/

%%%
resolvers   | formats | executing runner 'run luametatex format': 
/Users/graph/ConTeXtC/tex/texmf-osx-64/bin/luametatex --jobname="test" 
--fmt=/Users/graph/ConTeXtC/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
 
--lua=/Users/graph/ConTeXtC/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 cont-yes.mkiv --c:autopdf --c:currentrun=1 
--c:fulljobname="/Users/graph/ConTeXtC/test.tex" 
--c:input="/Users/graph/ConTeXtC/test.tex" --c:kindofrun=1 --c:maxnofruns=9 
--c:purgeall --c:texmfbinpath="/Users/graph/ConTeXtC/tex/texmf-osx-64/bin"
This is LuaMetaTeX, Version 2.03.3 
open source > level 1, order 1, name 'cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.12.06 21:40 MKIV beta  fmt: 2019.12.12  
int: english/english
system  > 

___
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] changing alignment inside a paragraph

2019-12-12 Thread Wolfgang Schuster

mf schrieb am 12.12.2019 um 15:56:

I wrote a better version. I still have a couple of questions.
In the lines:

\iffirstargument
  \getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,#1]
\else
  \getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,]
\fi

i would avoid writing the default values twice; i tried something like:

\getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,\iffirstargument#1\fi] 



but it doesn't work.

Skip the argument check and use just this:

\getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,#1]

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] lmtx

2019-12-12 Thread Pablo Rodriguez
On 12/12/19 5:59 PM, Pablo Rodriguez wrote:
> On 12/12/19 1:37 AM, Hans Hagen wrote:
>> [...]
>> Anyway, hopefully nothing got broken. Peter Rolf and I are updating some
>> of the pdf validation related stuff (additional formats), so that can be
>> in flux.
>
> Hans,
>
> I’m afraid that attachments in MkXL aren’t attached to the PDF document
> (using latest beta from 2019.12.12 13:15).

Hans,

many thanks for your ultra-fast fix in beta from 2019.12.12 19:35.

> BTW, if I try to compile this with MkIV beta from 2019.12.12 13:04, I
> get a crash with the following error:

Many thanks also for this fix.

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] lmtx

2019-12-12 Thread Pablo Rodriguez
On 12/12/19 1:37 AM, Hans Hagen wrote:
> [...]
> Anyway, hopefully nothing got broken. Peter Rolf and I are updating some
> of the pdf validation related stuff (additional formats), so that can be
> in flux.

Hans,

I’m afraid that attachments in MkXL aren’t attached to the PDF document
(using latest beta from 2019.12.12 13:15).

\setuppapersize[A5]
\showframe
\setupinteraction[state=start]
\setupinteractionscreen[option=attachment]
\starttext
a\attachment[file=xml-mkiv.pdf]
\stoptext

BTW, if I try to compile this with MkIV beta from 2019.12.12 13:04, I
get a crash with the following error:

..56f32e/formats/luatex/lpdf-ini-macro.lua:965: pdf.obj(): no "string"
or "file" given

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] changing alignment inside a paragraph

2019-12-12 Thread mf

Il 11/12/19 21:25, Wolfgang Schuster ha scritto:

\starttext

\startbuffer
This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line\par
\startalignment[flushright]
\ifdim\dimexpr\hsize-\lastlinewidth\relax>2\emwidth
     \blank[overlay]
%   simple solution but doesn't indent the numbers on the following lines
%   \hskip\dimexpr\lastlinewidth+\emwidth\relax
     \parshape 2
     \dimexpr\lastlinewidth+\emwidth\relax 
\dimexpr\hsize-\lastlinewidth-\emwidth\relax

     \emwidth \dimexpr\hsize-\emwidth\relax
\else
     \parshape 1 \emwidth \dimexpr\hsize-\emwidth\relax
\fi
34, 57, 101-104, 276, 345, 401, 403, 512.
\stopalignment
\stopbuffer

\dorecurse
   {10}
   {\hsize\dimexpr.75\textwidth-#1\emwidth\relax
    \getbuffer
    \page}

\stoptext



Thanks Wolfgang.

I wrote a better version. I still have a couple of questions.
In the lines:

\iffirstargument
  \getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,#1]
\else
  \getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,]
\fi

i would avoid writing the default values twice; i tried something like:

\getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,\iffirstargument#1\fi]

but it doesn't work.

For the second question, see the first item of page 3: i think the 
\lastlinewidth fails because there's a page break. From supp-box.lua:


implement {
name= "lastlinewidth",
actions = function()
local head = tex.lists.page_head
-- list dimensions returns 3 value but we take the first
context(head and 
getdimensions(getlist(find_tail(tonut(tex.lists.page_head or 0)

end
}

I think that's because page_head is reset in the page break.
Is there a way to prevent that?

Massi

--
\unprotect
\def\PlaceIndexTerm{\dosingleempty\doPlaceIndexTerm}
\def\doPlaceIndexTerm[#1]#2#3{%
\iffirstargument
  \getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,#1]
\else
  \getparameters[PIT!][test=off,margin=1em,distance=1em,minwidth=1em,]
\fi
#2\par
\startalignment[flushright,stretch]
\ifdim\dimexpr\hsize-\lastlinewidth\relax > 
\dimexpr\PIT!distance+\PIT!minwidth\relax

  \blank[overlay]
  \parshape 2
  \dimexpr\lastlinewidth+\PIT!distance\relax 
\dimexpr\hsize-\lastlinewidth-\PIT!distance\relax

  \PIT!margin \dimexpr\hsize-\PIT!margin\relax \doif{\PIT!test}{on}{\red}
\else
  \page[no]
  \parshape 1 \PIT!margin \dimexpr\hsize-\PIT!margin\relax 
\doif{\PIT!test}{on}{\darkgreen}

\fi
#3\par
\stopalignment}
\protect

\setupalign[stretch]

\starttext

\def\Text{This is the text of an index term, that is normally justified,
but I'd like the page numbers to be flushed to the right from
their second line}

\def\Pages{34, 57, 101-104, 276, 345, 401, 403, 512.}

\type{\PlaceIndexTerm[margin=1em,distance=1em,minwidth=1em]{text}{pages}}
\startitemize
\item margin:
  the left margin of the lines made only of page numbers
\item distance:
  the distance of the first page number from the last word of the text
\item minwidth:
  the shortest acceptable space at the end of the text to try to 
start page numbers there

\stopitemize

\page

\dorecurse
  {23}
  {\hsize=\dimexpr5cm+#1\emwidth\relax
   #1: \the\hsize\par
   \PlaceIndexTerm[test=on]{\Text}{\Pages}}

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


[NTG-context] Using lmtx and new metafun

2019-12-12 Thread Otared Kavian
Hi Aditya,

Following your explanations in
https://adityam.github.io/context-blog/post/new-metafun-interface/
I wrote an environment in order to display the graph of a function on a grid 
which can be adapted to each case.

Assuming that I have an MPinstance named GridAxis (for example) which can 
dispaly a grid and axes, how can I call it and write a line such as
draw function (1,"x","x*x/4 - 2.5",xmin,xmax,.001) scaled sx  ;
without changing the part whichh is included in \startMPdefinitions, in oder to 
draw the above function on that grid ? 

Thanks for your help: Otared
PS: Here is my definition of GridAxis (I guess many parts of it could be better 
written…)

\defineMPinstance[GridAxis]  
[
format=metafun,
extensions=yes,
initializations=yes,
method=double,
]

\startMPdefinitions{GridAxis}

def GridAxisPlot = applyparameters "GridAxisPlot" "do_GridAxisPlot" enddef ;

presetparameters "GridAxisPlot" [
xmin = -2.5,  xmax = 2.5,
ymin = -2.5,  ymax = 2.5,

dx   = 1, dy   = 1,
sx   = 5mm,   sy   = 5mm,
scale = 0.5,

grid = true,
xaxisnumbers = true,
yaxisnumbers = true,
showmyorigin = true,

style = "\switchtobodyfont[8pt]",
];

vardef do_GridAxisPlot =
image (
pushparameters "GridAxisPlot";

newnumeric xmin, xmax, ymin, ymax;
xmin := getparameter "xmin";
xmax := getparameter "xmax";
ymin := getparameter "ymin";
ymax := getparameter "ymax";

newnumeric sx, sy;
sx := getparameter "sx";
sy := getparameter "sy";

newnumeric dx, dy;
dx := getparameter "dx";
dy := getparameter "dy";

newpath xaxis, yaxis;

xaxis := (xmin*sx, 0) -- (xmax*sx, 0)  ;
yaxis := (0, ymin*sy) --  (0, ymax*sy) ;

newpath xtick, ytick;
xtick := (-0.1sx, 0) -- (0.1sx, 0);
ytick := (0, -0.1sy) -- (0, 0.1sy);

newstring style;
style := getparameter "style";

pickup pencircle scaled .1mm ;
newboolean grid;
grid  := getparameter "grid";

newboolean xaxisnumbers ;
xaxisnumbers := getparameter "xaxisnumbers" ;

newboolean yaxisnumbers ;
yaxisnumbers := getparameter "yaxisnumbers" ;

for x = dx step dx until xmax :
if grid :
draw yaxis shifted (x*sx, 0) withcolor 0.75white ;
fi
draw ytick shifted (x*sx, 0);
if xaxisnumbers :
label.bot(style & decimal x, (x*sx, 0));
fi
endfor

newboolean showmyorigin ;
showmyorigin := getparameter "showmyorigin" ;

if showmyorigin :
label.lrt(style & "0", origin) ;
fi

for x = -dx step -dx until xmin :
if grid :
draw yaxis shifted (x*sx, 0) withcolor 0.75white;
fi
draw ytick shifted (x*sx, 0);
if xaxisnumbers :
label.bot(style & decimal x, (x*sx, 0));
fi
endfor

for y = dy step dy until ymax :
if grid :
draw xaxis shifted (0, y*sy) withcolor 0.75white;
fi
draw xtick shifted (0, y*sy);
if yaxisnumbers :
label.lft(style & decimal y, (0, y*sy));
fi
endfor

for y = -dy step -dy until ymin :
if grid :
draw xaxis shifted (0, y*sy) withcolor 0.75white;
fi
draw xtick shifted (0, y*sy);
if yaxisnumbers :
label.lft(style & decimal y, (0, y*sy));
fi
endfor


drawarrow xaxis;
drawarrow yaxis;

label.rt( style & "$x$",  (xmax*sx, 0));
label.top(style & "$y$", (0, ymax*sy));

newpair p ;

newnumeric scale;
scale := getparameter "scale" ;

popparameters;

)
enddef;
\stopMPdefinitions
___
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] lmtx

2019-12-12 Thread Hans Hagen

On 12/12/2019 6:28 AM, Otared Kavian wrote:


However I would like to ask you to put back into lmtx the nice error messages 
handling we had in early November: now when there is an error it is impossible 
to locate it and the file filename-status.html contains nothing (though the 
colored « error » pdf produced is nice looking…).
In early November the error messages were very precise and the file 
filename-status.html was very helpful.


i fixed the html file but it's one or the other: either on the console, 
or in that file

 -
  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] Problems with new beta

2019-12-12 Thread Ursula Hermann
After new beta today Hans, it works fine.
Uschi

Von: Ursula Hermann
Gesendet: Montag, 09. Dezember 2019 15:34
An: 'mailing list for ConTeXt users' 
Betreff: Problems with new beta

Dear List!

If I want to do the test from the new beta on WinEdt (I have Windows 10) , 
normaly the test works fine. But today as I wanted to make the test, it did not 
work.
\starttext

\startmode[mkiv]

\startluacode
tex.sprint("hello")
\stopluacode

\startMPcode
draw textext("hello") rotated 45 ;
\stopMPcode

\framed{hello}

\stopmode

\startnotmode[mkiv]

\startMPcode
draw textext("hello") rotated -45 ;
\stopMPcode

\framed{hello}

\stopnotmode

\stoptext
After Compiling with ConTeXt it does not work. I have the following mistake?
Command Line:   context.exe --synctex=-1 "context-test.tex"
Startup Folder: 
C:\Users\Hermann\AppData\Local\Temp\Temp1_cont-tmf.zip\tex\context\test\mkiv

mtxrun  | forcing cache reload
resolvers   | resolving | configuration files already identified
resolvers   | resolving | skipping configuration file 
'selfautoparent:/texmf/web2c/texmfcnf.lua' (no valid format)
resolvers   | resolving | no texmf paths are defined (using TEXMF)
resolvers   | resolving |
mtxrun  | the resolver databases are not present or outdated
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-context.lua' using hash 
'lua::mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-contexts.lua' using hash 
'lua::mtx-contexts.lua'
resolvers   | resolving | remembered file 'mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-t-mtx-context.lua' using 
hash 'lua::mtx-t-mtx-context.lua'
resolvers   | resolving | using suffix based filetype 'lua'
resolvers   | resolving | remembering file 'mtx-t-mtx-contexts.lua' using 
hash 'lua::mtx-t-mtx-contexts.lua'
resolvers   | resolving | remembered file 'mtx-t-mtx-context.lua'
resolvers   | resolving | remembered file 'mtx-context.lua'
mtxrun  | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua'
There are no warnings, no errors, but it does not work. Why?


_

ConTeXt Compilation Report (Pages: 0)

Errors: 0   Warnings: 0   Bad Boxes: 0


Many thanks
Uschi

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