Re: [NTG-context] complete cover example

2020-05-12 Thread jbf

Hi Marcus,

That is very good of you, and a good example of 'cultivando o bem'! 
Parabéns!


I have downloaded the code. My OS is also Linux. I shall take a good 
look at it.


Thank you,

Julian

On 13/5/20 4:38 am, Marcus Vinicius Mesquita wrote:

Hi, Julian

I uploaded to github a cover I designed and created with ConTeXt some 
time ago for a book I typesetted called “Cultivando o bem” for a 
buddhist organization.

It is quite a complete example and illustrates the power of ConTeXt.
The comments in the code are sparse and not exactly detailed as you 
wish, but I hope it will be useful to you.

My OS is linux and I use a Makefile to generate all the necessary files.

You can access the code at:

https://github.com/marcusviniciusmesquita/cob-cover

Greetings

Marcus Vinicius

On Fri, Apr 24, 2020 at 3:32 AM jbf > wrote:

>
> Am wondering if anybody has a complete example (explained below) of 
a book cover: front, spine and back. It doesn't matter how simple or 
complicated the example. Am one of those people who, once he sees an 
example, can generally work out the necessary adaptations.

>
> By a complete example I mean the kind of thing found here Creating a 
style file in ConTeXt | Random Determinism where the writer explains 
things bit by bit but importantly, offers a summary of the code at the 
end. I probably don't need the lengthy explanation but the summary of 
code is most helpful - except that it is not about a book cover:-)

>
> As a relative newcomer to ConTeXt, I have found complete examples of 
something I want/need to do very useful. Of course, many such are on 
the wiki, but from time to time I need something else, and right at 
the moment I need a bit of guidance for a book cover, and an example 
might help.

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




--
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o 
corpo nem seus membros, por ser descanso da alma, primavera do 
coração, distração do aflito, entretenimento do solitário, e viático 
do viajante.


Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)

___
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] complete cover example

2020-05-12 Thread Marcus Vinicius Mesquita
Hi, Julian

I uploaded to github a cover I designed and created with ConTeXt some time
ago for a book I typesetted called “Cultivando o bem” for a buddhist
organization.
It is quite a complete example and illustrates the power of ConTeXt.
The comments in the code are sparse and not exactly detailed as you wish,
but I hope it will be useful to you.
My OS is linux and I use a Makefile to generate all the necessary files.

You can access the code at:

https://github.com/marcusviniciusmesquita/cob-cover

Greetings

Marcus Vinicius

On Fri, Apr 24, 2020 at 3:32 AM jbf  wrote:
>
> Am wondering if anybody has a complete example (explained below) of a
book cover: front, spine and back. It doesn't matter how simple or
complicated the example. Am one of those people who, once he sees an
example, can generally work out the necessary adaptations.
>
> By a complete example I mean the kind of thing found here Creating a
style file in ConTeXt | Random Determinism where the writer explains things
bit by bit but importantly, offers a summary of the code at the end. I
probably don't need the lengthy explanation but the summary of code is most
helpful - except that it is not about a book cover:-)
>
> As a relative newcomer to ConTeXt, I have found complete examples of
something I want/need to do very useful. Of course, many such are on the
wiki, but from time to time I need something else, and right at the moment
I need a bit of guidance for a book cover, and an example might help.
>
> Julian
>
>
___
> 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
>
___



--
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
___
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 lmtx upload

2020-05-12 Thread Hans Hagen

Hi,

The tex engine has at most 65K dimen and count registers and these can 
be local and global (although mixing these two models for the same 
variable can be inefficient).


Anyway, in the current upload there is a mechanism for using way more 
variables, global ones, that are managed by lua:


\luadimen test 100pt

\scratchdimen = .25 \luadimen test

\the\scratchdimen

\the\luadimen test

So, they act as normal dimensions and counters wrt assignment and 
serialization and such. There are also floats and booleans (in addition 
to integers and cardinals).


Then, as another experiment, there are one/two dimensional arrays of 
variables. Think of:


\newarray name whatever type integer nx 100 ny 500

\arrayvalue whatever 20 30 1024

\the\arrayvalue whatever 10 30

\the\arrayvalue whatever 20 30

\the\arrayvalue whatever 30 30

Some more info can be found in the last chapoter of the evenmore.pdf 
document. The question is: do we need this, and if so, do we need more 
of that. It's a bit chicken-egg case: we can have lua and can pipe back 
to tex, and we can stay at the tex end.


This is a lmtx only feature. Just for the record: these are macros, not 
primitives, but they are rather efficient and have hardly any overhead.


The floats can be in 1.23 format, 1.23e45 format and also in 0x12p34 
format, while integers can be in 123 format and 0x123 format; the hex 
float format is lua's way of being roundtrip.


Hopefully there are no side effects.

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] Retrieving original value of enviroment variable HOME

2020-05-12 Thread context

Hello,

On 2020-05-12 10:53, Hans Hagen wrote:

On 5/11/2020 5:57 PM, cont...@vivaldi.net wrote:


d:\Lukas\ConTeXt\Test\EnvHome>


- I'm still getting:

1   C:/Users/u×ivatel
2   C:/Users/u×ivatel
3   C:/Users/u×ivatel
4   C:/Users/u×ivatel

whilst HOME environment has been set to "DummyHome"  (see "echo 
%HOME%").


What's wrong?


I can try.

I found 'oldhome' text in these files:

d:\Ctx-Beta\tex\texmf-context\scripts\context\lua\mtxrun.lua
d:\Ctx-Beta\tex\texmf-context\scripts\context\stubs\mswin\mtxrun.lua
d:\Ctx-Beta\tex\texmf-context\scripts\context\stubs\unix\mtxrun
d:\Ctx-Beta\tex\texmf-context\scripts\context\stubs\win64\mtxrun.lua
d:\Ctx-Beta\tex\texmf-context\tex\context\base\mkiv\data-ini.lua
d:\Ctx-Beta\tex\texmf-mswin\bin\mtxrun.lua

Which files do you recommend to try to insert debug prints into?

And - once I "inject" an extra debug info - do I have to call 
"context.exe --make --generate" (or similar)?


Lukas



I don't know ... maybe it pick up HOME from someplace else (the outer
process space or so)

you can insert prints (say os.getenv('HOME')) and see what happens

Hans

___
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] ConTeXt doesn't recognize source on network drive?

2020-05-12 Thread context

Hello Hans,

On 2020-05-12 10:58, Hans Hagen wrote:

On 5/11/2020 5:26 PM, cont...@vivaldi.net wrote:

Hello,

after I've updated ConTeXt to the latest version, a new problem 
appeared - see the steps:


(Note that "X:" is a network drive mapped as "\\192.168.112.xxx\px" - 
if it was of importance.)

i have no problem here running from a mapped drive (nothing changed in
that areas either) and i would have noticed it as i have several
network drives


here I'm running om Win7 64b.

I fixed the problem somehow:

- As normally I'm not running ConTeXt directly by "context.exe" but via 
.bat file (some more actions to do), I added a code into .bat which 
changes source file name from "x:\...\..." to "x:/...\...". (It's 
performed by Lua's 'fname:gsub(":\\", ":/")' actually.) And it works 
now.


(But my previously reported problem appeared on running 'context.exe', 
i.e. without any auxiliary .bat.)


Lukas


(i'm talking windows 10)

Hans

___
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] Retrieving original value of enviroment variable HOME

2020-05-12 Thread Hans Hagen

On 5/12/2020 11:36 AM, cont...@vivaldi.net wrote:

And - once I "inject" an extra debug info - do I have to call 
"context.exe --make --generate" (or similar)?
You need to remake the fomat (and make sure you have the right 
mtxrun/context scripts).


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] ConTeXt doesn't recognize source on network drive?

2020-05-12 Thread Hans Hagen

On 5/11/2020 5:26 PM, cont...@vivaldi.net wrote:

Hello,

after I've updated ConTeXt to the latest version, a new problem appeared 
- see the steps:


(Note that "X:" is a network drive mapped as "\\192.168.112.xxx\px" - if 
it was of importance.)
i have no problem here running from a mapped drive (nothing changed in 
that areas either) and i would have noticed it as i have several network 
drives


(i'm talking windows 10)

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] Retrieving original value of enviroment variable HOME

2020-05-12 Thread Hans Hagen

On 5/11/2020 5:57 PM, cont...@vivaldi.net wrote:


d:\Lukas\ConTeXt\Test\EnvHome>


- I'm still getting:

1   C:/Users/u×ivatel
2   C:/Users/u×ivatel
3   C:/Users/u×ivatel
4   C:/Users/u×ivatel

whilst HOME environment has been set to "DummyHome"  (see "echo %HOME%").

What's wrong?
I don't know ... maybe it pick up HOME from someplace else (the outer 
process space or so)


you can insert prints (say os.getenv('HOME')) and see what happens

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
___