Re: [NTG-context] new (lmtx) beta

2019-10-11 Thread Jeong Dal
Dear Hans,


>> Though it calculates function using “x^2 + y^2”,  it is better to write the 
>> name of it as the output of $x^2 + y^2$.
>> Is it possible to write  it as in mathematical form?
> 
>functionstyle = "math”,
> 
It works nicely.

>> Is there any reason to use two different names “function” and “code” to 
>> define functions?
> we can still decide as it's beta ...
> 
>  function | functions
> 
> or
> 
>  code | codelist
> 
> (it's basically lua code ...)
> 
> i have no preference and as you're the first to bring it up you may decide 
> ... (unless others can convince you otherwise)
> 

I think that it is better to use the same name if there is no special reason to 
distinguish, and I prefer to use “function | functions”.  
However, I am OK whether you keep both or choose one. 

Thank you and your team again.

Best regards,

Dalyoung

___
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] Difference in right justification in LMTX

2019-10-11 Thread Joseph Canedo
Hi Hans,

I still get the issue with right justification with LMTX for some reason. I
see a small whitespace between the last 't' in the line with LMTX which I
don't see with Mkiv. I also notice that position of the 't' box computed
from all previous boxes/characters in the line is different from position I
get from pdf backend function (job.positions.getpos called in a latelua).

I attach the MWE below + pdfs I get from latest Mkiv and LMTX I've
installed from scratch.

\setuppapersize[A5][A5]
\definefontfeature[base][mode=node, protrusion=quality, expansion=quality]
\definefontfamily[mainfont][serif][EBGaramond][features=base]
\setupalign[hanging, lesshyphenation, hz]
\setupbodyfont[mainfont, 9pt]
\showframe
\starttext
les bestes/ & sus toute la terre/ & sus tout reptile qui bouge sur surete
sur la {\righttoleft terre. Dieu} donc crea l'homme a son image.
\stoptext

Thanks again
Joseph

Le ven. 11 oct. 2019 à 22:35, Joseph Canedo  a
écrit :

>
>
> Le ven. 12 avr. 2019 à 09:39, Joseph Canedo  a
> écrit :
>
>> Yes. I’ve deleted my lmtx installation directory and fetched the install
>> .zip from Pragma ADE web site and ran install.bat, to double check.
>>
>>
>>
>> *De : *Hans Hagen 
>> *Envoyé le :*jeudi 11 avril 2019 22:59
>> *À : *Joseph Canedo ; mailing list for ConTeXt
>> users 
>> *Objet :*Re: [NTG-context] Difference in right justification in LMTX
>>
>>
>>
>> On 4/11/2019 8:07 PM, Joseph Canedo wrote:
>>
>> > Thanks Hans. I’ve ran install.bat to update my LMTX local copy (ran
>>
>> > without apparent errors) and reran context command on my MWE, but I am
>>
>> > afraid I see no difference.
>>
>> >
>>
>> > Not sure if I missed any step or not.
>>
>> it works here
>>
>>
>>
>> did the update download files and remake the format?
>>
>>
>>
>> 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
>>
>> -
>>
>>
>>
>


Test2_lmtx.pdf
Description: Adobe PDF document


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


Re: [NTG-context] Difference in right justification in LMTX

2019-10-11 Thread Joseph Canedo
Le ven. 12 avr. 2019 à 09:39, Joseph Canedo  a
écrit :

> Yes. I’ve deleted my lmtx installation directory and fetched the install
> .zip from Pragma ADE web site and ran install.bat, to double check.
>
>
>
> *De : *Hans Hagen 
> *Envoyé le :*jeudi 11 avril 2019 22:59
> *À : *Joseph Canedo ; mailing list for ConTeXt
> users 
> *Objet :*Re: [NTG-context] Difference in right justification in LMTX
>
>
>
> On 4/11/2019 8:07 PM, Joseph Canedo wrote:
>
> > Thanks Hans. I’ve ran install.bat to update my LMTX local copy (ran
>
> > without apparent errors) and reran context command on my MWE, but I am
>
> > afraid I see no difference.
>
> >
>
> > Not sure if I missed any step or not.
>
> it works here
>
>
>
> did the update download files and remake the format?
>
>
>
> 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] List of Symbols/Abbreviations/Glosses with more then two entries

2019-10-11 Thread Thomas Welter
Since there has not been a response (and since I am still unhappy with the 
limitations of \definesynonyms) I came up with my own solution which is 
included in this mail. The code provides a fully automated handling of symbols. 
I think this might be useful for a lot of people in engineering, physics, etc.. 
It should be more generalized and packed into a module though.

Kind regards,

Thomas

% Document Layout
\setupcolors[state=start]
\setuppapersize[A4][A4]

% Typography
\setupwhitespace[medium]
\setupindenting[no]
\setupbodyfont[sans, 11pt]

% PDF Output Adjustments
\setupinteraction[state=start, focus=standard, style=, click=yes, color=, 
contrastcolor=,]

% Units
\defineunit[sunit][separator=small]
\setupunit[space=medium]

\setuphead[section][style={\bfc}, before={\bigskip}, after={}]

% Lua code to set up a database of symbols
\definedescription[SymItem][]
\startluacode
userdata = userdata or {}
userdata.listofsymbols = {} -- hash table with all symbols of the form 
keyword:{symbol, {unit=... , description=...}}

function userdata.addsym(keyword, symbol, option) -- parses the input and adds 
an entry to the hash table
keywords = utilities.parsers.settings_to_array(keyword)
symbols = utilities.parsers.settings_to_array(symbol)
options = utilities.parsers.settings_to_hash(option)
userdata.listofsymbols[keywords[1]] = {symbols[1], options}
end

function userdata.getsym(keyword) -- prints the symbol to a given keyword
context.math(userdata.listofsymbols[keyword][1])
end

function userdata.symattr(keyword, attribute) -- prints whatever attribute of 
the symbol (its unit, description, ...)
context(userdata.listofsymbols[keyword][2][attribute])
end

function userdata.sorttable(t,o) -- sorting algorithm: hash table gets inserted 
to an indexed array which then can be indexed by the iterator
local a = {}
for n in pairs(t) do
table.insert(a, n)
end
if o then
table.sort(a, function(a,b) return o(t, a, b) end)
else
table.sort(a)
end
local i = 0
local iterator = function ()
i = i + 1
return a[i], t[a[i]]
end
return iterator
end

function userdata.placelistofsymbols() -- prints the List of Symbols
greekgroup = {}
latingroup = {}
for keyword, values in next, userdata.listofsymbols do -- devides the symbol 
list into greek and latin letters
if values[2]["group"] == "greek" then
greekgroup[keyword] = values
elseif values[2]["group"] == "latin" then
latingroup[keyword] = values
end
end
context.setuptabulate{distance="1ex"}
context.starttabulate{"|lw(0.18\\textwidth)|lw(0.18\\textwidth)|p(0.6\\textwidth)|"}
context.NC()
context.bf() context("Symbol")
context.NC()
context.bf() context("Unit")
context.NC()
context.bf() context("Description")
context.NC()
context.FR()
context.HL()
function printlistitem(keyword, values)
context.NC()
context.startSymItem({reference="sym:"..keyword, title=values[1]})
context.math(values[1])
context.stopSymItem()
context.NC()
context(values[2]["unit"])
context.NC()
context(values[2]["description"])
context.NC()
context.MR()
end
for keyword, values in userdata.sorttable(greekgroup, function(t,a,b) return 
string.lower(a) < string.lower(b) end) do -- sorting algorithm uses the 
"<"-comparator to compare the keys a and b
printlistitem(keyword, values)
end
context.TB{"2ex"}
for keyword, values in userdata.sorttable(latingroup, function(t,a,b) return 
string.lower(a) < string.lower(b) end) do
printlistitem(keyword, values)
end
context.stoptabulate()
end
\stopluacode

% Create the hook to the lua functions
\def\addsym[#1][#2][#3]{\ctxlua{userdata.addsym([==[#1]==], [==[#2]==], 
[==[#3]==])}}
\def\getsym[#1]{\ctxlua{userdata.getsym([==[#1]==])}}
\def\symattr[#1][#2]{\ctxlua{userdata.symattr([==[#1]==], [==[#2]==])}}

% Print a symbol with \sym[keyword]. Printed as an internal link to the entry 
in the List of Symbols via \goto{symbol}[sym:keyword]
\def\sym[#1]{\goto{\getsym[#1]}[sym:#1]}

% Create a database containing all symbols with 
\addsym[keyword][symbol][options]
\def\loadsymbols{
\addsym[beta][\beta][unit={\sunit{meter per second}}, description={Mass 
transfer coefficient}, group={greek}]
\addsym[alpha][\alpha][unit={\sunit{watt per square meter per kelvin}}, 
description={Heat transfer coefficient}, group={greek}]
\addsym[c][c][unit={\sunit{kilogram per cubic meter}}, 
description={Concentration}, group={latin}]
\addsym[m][m][unit={\sunit{kilogram}}, description={Mass}, group={latin}]
\addsym[A][A][unit={\sunit{square meter}}, description={Phase boundary 
interface}, group={latin}]
\addsym[Q][Q][unit={\sunit{joule}}, description={Heat}, group={latin}]
\addsym[T][T][unit={\sunit{kelvin}}, description={Temperature}, group={latin}]
\addsym[t][t][unit={\sunit{second}}, description={Time}, group={latin}]
}

% Print the List of Symbols with \placelistofsymbols
\def\placelistofsymbols{\loadsymbols\ctxlua{userdata.placelistofsymbols()}}

\starttext

\startfrontmatter

\startsubject[title=Content]
\placecontent
\stopsubject

\startsection[title=List of Tables]
\placelistoftables
\stopsection


Re: [NTG-context] (bug?) no destinations for footnote links in LMTX

2019-10-11 Thread Pablo Rodriguez
On 10/10/19 5:23 PM, Hans Hagen wrote:
> On 10/9/2019 4:22 PM, Pablo Rodriguez wrote:
>> Hi Hans,
>>
>> I have the following sample:
>>
>>  \setupinteraction[state=start, focus=standard]
>>  \starttext
>>  a\footnote{b}
>>  \stoptext
>>
>> I’m afraid that LMTX doesn’t generate a link to go back from footnote.
>> All I can see is that MkIV generates two named destinations: [...]
>> But I’m afraid that LMTX generates only one:
>> [...]
> something in the engine ... pretty old and border case ... will fix it

Many thanks for the 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] new (lmtx) beta

2019-10-11 Thread Hans Hagen

On 10/11/2019 4:09 PM, Jeong Dal wrote:


Dear Hans,

I read the manual of luametafun and do some examples.
Thanks for many new features.
It is  really great.

I’d like to ask two things.

1. On  page 26,27, in the manual,


http://www.pragma-ade.com/general/manuals/luametafun.pdf


a function name of the graphics are appeared as same as in the argument 
‘function = “x^2 + y^2”’.
Though it calculates function using “x^2 + y^2”,  it is better to write 
the name of it as the output of $x^2 + y^2$.

Is it possible to write  it as in mathematical form?


functionstyle = "math",


2. To define a mathematical function, it uses “function = “ in Contour, 
while it uses “code = “ in Surfaces and in Functions.
Is there any reason to use two different names “function” and “code” to 
define functions?

we can still decide as it's beta ...

  function | functions

or

  code | codelist

(it's basically lua code ...)

i have no preference and as you're the first to bring it up you may 
decide ... (unless others can convince you otherwise)


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

2019-10-11 Thread Hans Hagen

Hi,

I uploaded a new beta. Some might have noticed that stepwise some font 
support has been redone. We're talking of lmtx only here. For instance 
low level handling of color fonts as used for emoji but there are also 
other (often incomplete) fonts out there (overlay, png, svg) has become 
(on the average) a bit more efficient. It's somewhat tricky to satisfy 
viewers but at my end things work ok. It should also work in a cmyk only 
mode. As usual it's work in progress (and in this case very likely lmtx 
only).


Also some first (runtime) metafun (2) font creation support has been 
added (was always possible but it's a bit more convenient now). An 
example can be found in: meta-imp-gamesymbols.mkxl (the file can be 
processed with the 'context' command and will produce an example).


As usual imagination determines the limits of what context provides, so 
feel free to suggest more (examples). Again this is lmtx specific.


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] new (lmtx) beta

2019-10-11 Thread Jeong Dal

Dear Hans,

I read the manual of luametafun and do some examples.
Thanks for many new features.
It is  really great.

I’d like to ask two things. 

1. On  page 26,27, in the manual, 
> 
> http://www.pragma-ade.com/general/manuals/luametafun.pdf 
> 

a function name of the graphics are appeared as same as in the argument 
‘function = “x^2 + y^2”’. 
Though it calculates function using “x^2 + y^2”,  it is better to write the 
name of it as the output of $x^2 + y^2$.
Is it possible to write  it as in mathematical form?

2. To define a mathematical function, it uses “function = “ in Contour, while 
it uses “code = “ in Surfaces and in Functions.
Is there any reason to use two different names “function” and “code” to define 
functions?  

Thank you again.

Best regards,

Dalyoung



___
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] Documentation of change / Evolving documents

2019-10-11 Thread Axel Kielhorn
Hello!

I have added my document about evolving documents to the Wiki at:

https://wiki.contextgarden.net/Changes_Evolution

and included it into the list of sample documents.

Share and enjoy

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