Re: [NTG-context] splitting table cells/rows

2016-06-07 Thread Erik Margraf
As far as I experienced, it does split the table, but only at row borders.
Not within a row, as
the word example. Tabulate does this kind of splitting. For my usecase,
this was enough, though
the other table environments have some goodies which the tabulate
environment misses ...
(But maybe these features - e.g. combining cells - are the reason why the
splitting of cells doesn't
work ...)

regards
Erik

On Wed, Jun 8, 2016 at 5:24 AM, Henning Hraban Ramm  wrote:

> Am 2016-06-08 um 02:48 schrieb Wolfgang Schuster <
> schuster.wolfg...@gmail.com>:
>
> >> Will the other table environments get this feature too?
> > No, it’s a tabulate only feature.
>
> Hm, our http://wiki.contextgarden.net/Tables_Overview mentions
> TABLE’s split=yes
> and linetable’s splitting.
>
> I know at least the first works (even if not always like I’d expect).
> I don’t know if linetables are working at all any more.
>
> Greetlings, Hraban
> ---
> http://www.fiee.net
> http://wiki.contextgarden.net
> https://www.cacert.org (I'm an assurer)
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] splitting table cells/rows

2016-06-07 Thread Erik Margraf
Thanks, this works quite good for me!
Will the other table environments get this feature too?

Erik

On Tue, Jun 7, 2016 at 11:23 AM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Erik Margraf <erik.marg...@gmail.com>
> 7. Juni 2016 um 10:34
> Dear list,
>
> does context split table cells like Word (sorry for that ;-)) would do?
> (Please see the attached pdf examples). The table_test was generated
> with
>
> \starttext
>
>
> \bTABLE[split=yes]
>
> \setupTABLE[frame=off]
>
> \setupTABLE[column][1][width=3.5cm]
>
> \setupTABLE[column][2][width=11cm]
>
> \dorecurse{3}{\bTR \bTD xxx \eTD \bTD \input knuth \eTD \eTR}
>
> \eTABLE
>
>
> \stoptext
>
> The tabulate environment can split cells at a page break.
>
> \starttext
>
> \starttabulate[|w(3.5cm)|p|]
> \dorecurse{4}{\NC xxx \NC \input knuth \NC\NR}
> \stoptabulate
>
> \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] splitting table cells/rows

2016-06-07 Thread Erik Margraf
Dear list,

does context split table cells like Word (sorry for that ;-)) would do?
(Please see the attached pdf examples). The table_test was generated
with

\starttext


\bTABLE[split=yes]

\setupTABLE[frame=off]

\setupTABLE[column][1][width=3.5cm]

\setupTABLE[column][2][width=11cm]

\dorecurse{3}{\bTR \bTD xxx \eTD \bTD \input knuth \eTD \eTR}

\eTABLE


\stoptext


kind regards


Erik


Dokument7.pdf
Description: Adobe PDF document


table_test.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] help on def & buffer

2016-03-30 Thread Erik Margraf
Ups, didn't expect that ...  ;-)
Thanks Wolfgang! Actually your version works, Hans' version does not ...
(could try them only now)

Kind regards
Erik

On Wed, Mar 30, 2016 at 2:46 PM, Wolfgang Schuster <
schuster.wolfg...@gmail.com> wrote:

> Hans Hagen 
> 30. März 2016 um 10:11
>
>
> \startbuffer .. \stopbuffer is parsed special
>
> so use:
>
> \def\Buffer#1#2
>   {\setbuffer[#1]{\input #2\relax}}
>
> \def\Buffer#1#2%
>   {\setbuffer[#1]\input{#2}\endbuffer}
>
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] help on def & buffer

2016-03-30 Thread Erik Margraf
Than you Hans!
My plan is simply to use the output of a sagemath run in this way. A run
should produce
several files containing TeX code. I only wanted to shorten the
\startbuffer \input ... \stopbuffer
sequence. Maybe this (including sagemath output) could be done differently,
but this was
the first (and only ;-)) idea I came up with.

kind regards
Erik

On Wed, Mar 30, 2016 at 10:11 AM, Hans Hagen <pra...@wxs.nl> wrote:

> On 3/30/2016 9:27 AM, Erik Margraf wrote:
>
>> Dear List,
>>
>> please help me with my problem here 
>>
>> I - probably naively - tried the following:
>> 
>>
>> \starttext
>>
>>
>> \def\Buffer#1#2
>>
>> {
>>
>> \startbuffer[#1]
>>
>> \input #2
>>
>> \stopbuffer
>>
>> }
>>
>> \Buffer{bla}{knuth}
>>
>>
>> \stoptext
>>
>> -
>>
>>
>> Context gives me the following error on this:
>>
>>
>> tex error > tex error on line 9 in file
>> C:/Users/emargraf/Documents/buffer.tex: ! Undefined control sequence
>>
>>
>>
>> \Buffer ...startbuffer [#1] \input #2 \stopbuffer
>>
>> l.9 \Buffer{bla}{knuth}
>>
>
> \startbuffer .. \stopbuffer is parsed special
>
> so use:
>
> \def\Buffer#1#2
>   {\setbuffer[#1]{\input #2\relax}}
>
> \Buffer{bla}{knuth}
>
> but i'm not sure what you gain here as it will still input tufte each time
>
> Hans
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] help on def & buffer

2016-03-30 Thread Erik Margraf
Dear List,

please help me with my problem here 

I - probably naively - tried the following:


\starttext


\def\Buffer#1#2

{

\startbuffer[#1]

\input #2

\stopbuffer

}

\Buffer{bla}{knuth}


\stoptext

-


Context gives me the following error on this:


tex error > tex error on line 9 in file
C:/Users/emargraf/Documents/buffer.tex: ! Undefined control sequence



\Buffer ...startbuffer [#1] \input #2 \stopbuffer

l.9 \Buffer{bla}{knuth}


---


Kind regards

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Section head without numbers, ToC with numbers

2015-10-04 Thread Erik Margraf
This does the trick! Thank you!

On Mon, Oct 5, 2015 at 2:27 AM, Aditya Mahajan <adit...@umich.edu> wrote:

> On Sun, 4 Oct 2015, Erik Margraf wrote:
>
> On Sat, Oct 3, 2015 at 11:51 PM, Aditya Mahajan <adit...@umich.edu> wrote:
>>
>> On Sat, 3 Oct 2015, Erik Margraf wrote:
>>>
>>> Dear List,
>>>
>>>>
>>>> is it possible to achieve the following:
>>>>
>>>> First section
>>>>  Some Text
>>>>
>>>> Second section
>>>>  Some Text
>>>>
>>>> Table of Contents
>>>> 1 First section
>>>> 2 Second section
>>>>
>>>>
>>>> (Untested):
>>>
>>> \setuphead[section][numbercommand=\gobbleoneargument]
>>>
>>> thanks for your answer! This comes close, but has the problem, that the
>> section head is indented.
>>
>> \starttext
>> \setuphead[section][numbercommand=\gobbleoneargument]
>> \placelist[section]
>> \section{First section}
>> \input knuth
>> \stoptext
>>
>
> Add distance=0pt to the settings.
>
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Section head without numbers, ToC with numbers

2015-10-03 Thread Erik Margraf
Dear List,

is it possible to achieve the following:

First section
 Some Text

Second section
 Some Text

Table of Contents
1 First section
2 Second section

I tried both:

a) \setuphead[section][sectionnumber=no]

b) \setupheads[sectionnumber=no]


I also tried

\setuphead[section][number=no]

This gave me sections without numbers, but als a ToC without numbers


Thanks


Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Does the R-Module work (or how)?

2013-06-18 Thread Erik Margraf
Dear List,

does the R module work? To be more specific m-r.tex. I tried to
run the test named as Johan's test file and got the result below



! Undefined control sequence.

system   tex  error on line 20 in file
/home/erik/tmp/Glockner/t.tex: Undefined control sequence ...

10
11 \starttext
12
13 First a test of whether the workspace is persistent:
14 bla
15
16 \startR
17 a - bla
18 b - blabla
19 ls()
20   \stopR
21
22 One \R run ends, another begins.
23
24 \startR
25 ls()
26 \stopR
27
28 Now follows a hidden \R run which cleans the R workspace
29
30 \startRhidden

\Rfile ^@-\TEXbufferfile
{\Rbufferprefix \nofRfiles }
argument texmfstart --ifchanged=\Rfile
  \space --direct R CMD BATCH -q --save
--restore \
\executesystemcommand #1x-\ctxlua {os.execute([[#1
  ]])}
\stopR #-\doifmode {*\v!first }\runR
 \typefile {\Rfile .out}
l.20 \stopR

--


I'm using:

OS: Debian 7.0 64Bit

context --version: mtx-context | current version: 2013.06.10 22:51

R --version: R version 2.15.1 (2012-06-22) -- Roasted Marshmallows
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

Any hint, even doesn't work at the moment, will be welcome

Thanks

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] typefile with absolute path to file

2012-11-20 Thread Erik Margraf
Dear List,

a question about \typefile{}.
I tried to use \typefile{ /with/an/absolute/path/to/some_file }  and failed
Message in the log: Verbatim some_file not found. Also tried with
no path at all, assuming it will take the file from the current directory.
Same result.

Do I miss something? Should this work? Or, if not, how can I achieve
this effect (typefile
with absolute path to a file. btw. on a Linux system)

I'm aware of a similar message thread to this list from May 25th, this year.
But I didn't feel that it speaks against my comprehension of \typefile ...

Thanks!

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] typefile with absolute path to file

2012-11-20 Thread Erik Margraf
Hi,

Thanks Aditya!

I tried this again with

\starttext
   \typefile{/tmp/xxx.tex}
\stoptext

and could trace what's going on ... (not even /tmp/xxx.tex worked)

The lines below is the trace output belonging to /tmp/xxx

stat(tmp/xxx.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file or directory)
stat(../tmp/xxx.tex, 0x7fff5dc73d90)  = -1 ENOENT (No such file or directory)
stat(../../tmp/xxx.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file or
directory)
stat(tmp/xxx.tex.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file or directory)
stat(../tmp/xxx.tex.tex, 0x7fff5dc73d90) = -1 ENOENT (No such file
or directory)
stat(../../tmp/xxx.tex.tex, 0x7fff5dc73d90) = -1 ENOENT (No such
file or directory)

I could verify that tmp/xxx.tex is actually found!
current version: 2012.11.16 23:51
Anything I can do about that?  (I guess I can work with relative paths
below - tested this ...)

Context Version: current version: 2012.11.16 23:51
System: Debian 3.2.32-1 x86_64 GNU/Linux

regards
Erik

On Tue, Nov 20, 2012 at 4:25 PM, Aditya Mahajan adit...@umich.edu wrote:

 Dear List,

 a question about \typefile{}.
 I tried to use \typefile{ /with/an/absolute/path/to/some_file }  and
 failed
 Message in the log: Verbatim some_file not found. Also tried with
 no path at all, assuming it will take the file from the current directory.
 Same result.

 Do I miss something? Should this work? Or, if not, how can I achieve
 this effect (typefile
 with absolute path to a file. btw. on a Linux system)


 \starttext
 \typefile{\jobname.tex}
 \typefile{/tmp/test.tex}
 \stoptext

 work with ConTeXt MkIV  2012.11.16.

 However, I can confirm that

 \typefile{/usr/bin/pdf2ps} does not work with context minimals on archlinux,
 although the texmfcnf.lua file says:

 [system.outputmode]= restricted,
 [system.inputmode] = any,

 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] typefile with absolute path to file

2012-11-20 Thread Erik Margraf
That's interesting. As I could trace, the leading / is removed on my system.

ldd output on my luatex gives (seems not really spectacular):

linux-vdso.so.1 =  (0x7fffad7ff000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7f221f099000)
libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7f221ee17000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7f221ea8f000)
/lib64/ld-linux-x86-64.so.2 (0x7f221f2c1000)

lua -v gives:  Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio

Though, I have lua5.2 installed in parallel

Any other infos, which might help?

On Tue, Nov 20, 2012 at 11:17 PM, Aditya Mahajan adit...@umich.edu wrote:
 On Tue, 20 Nov 2012, Hans Hagen wrote:

 On 11/20/2012 9:06 PM, Erik Margraf wrote:

 Hi,

 Thanks Aditya!

 I tried this again with

 \starttext
 \typefile{/tmp/xxx.tex}
 \stoptext

 and could trace what's going on ... (not even /tmp/xxx.tex worked)


 I just tried a standalone on a xubuntu virtual machine. I had no problems
 with

 /data/temp/test/test.tex: (also copied one level lower)

 \starttext

 \typefile{/data/temp/test.tex}
 \typefile{/data/test.tex}

 \stoptext

 So, I'm a bit puzzled.


 On my machine, I can read files **with an extension** from anywhere in the
 system, but  \typefile{...} for a file without an extension results in:

 verbatimsfile abc does not exist


 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] typesetting juxtapositions

2012-11-18 Thread Erik Margraf
Dear List,

how would I go on to typeset a document like the attached one?

Thanks in advance

Erik


test.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] typesetting juxtapositions

2012-11-18 Thread Erik Margraf
Hans and Wolfgang, thanks a lot!
Both versions work of course ... I'll see which one I'll use.

Erik

On Sun, Nov 18, 2012 at 12:52 PM, Hans Hagen pra...@wxs.nl wrote:
 On 11/18/2012 12:43 PM, Wolfgang Schuster wrote:


 Am 18.11.2012 um 12:24 schrieb Erik Margraf erik.marg...@gmail.com:

 Dear List,

 how would I go on to typeset a document like the attached one?


 \setupindenting[yes,medium]

 \starttext

 \input tufte

 \offsetbox[x=2cm]\vbox{\begstrut\input tufte\endstrut}

 \input tufte

 \stoptext


 or, depending on how much there is

 \definenarrower[Common][left=3cm,right=3cm]
 \definenarrower[One][Common][default=right]
 \definenarrower[Two][Common][default=left]

 \setuplayout
   [backspace=1cm,
width=middle,
topspace=1cm,
height=middle,
footer=0cm,
header=0cm]

 \setupbodyfont
   [10pt]

 \setupwhitespace
   [big]

 \starttext

 \startOne
 \input ward
 \stopOne

 \startTwo
 \input ward
 \stopTwo

 \stoptext



 -
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
  | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] outlines don't work?

2012-06-16 Thread Erik Margraf
Dear list!

I would like to use the outline feature of context. The following (hopefully
minimal) example gives me Nothing as output

---
\starttext
\setupcolors[state=start]

\definelayer[L]
\setupbackgrounds[page][background={L}]

\startuseMPgraphic{PN}

graphictext
  Bla Bla
  scaled 4 withcolor blue
  withfillcolor .7white withpen pencircle scaled 2pt;
\stopuseMPgraphic

\null\dontcomplain
\setlayer[L]{\useMPgraphic{PN}}

\stoptext


I saw a probably related post on this list on May, 30th. (subject
graphictext fails)
Also, my .mpy file is empty. A .tex file and a .pdf is generated though

My environment is as follows:
OS: Debian AMD64 wheezy / sid
Context: current version: 2012.06.13 23:46   (tried also some older
versions, no difference)
pstoedit: 3.60  (maybe some problems here?)

Anything else of importance?

Thanks in advance for any help or hint.

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Colors: printing vs. on screen

2011-06-21 Thread Erik Margraf
Thanks! I'll go for the calibration and some trials in CMYK colors for
printing.

kind regards
Erik

2011/6/19 Henning Hraban Ramm hra...@fiee.net

 Yes, because your monitor uses RGB and your printer uses CMYK. The
 conversion between thetwo is not too complicated, but actually getting the
 same output from the two is hard. RGB is an additive model, CMYK is
 subtractive (read about the different models, wikipedia will do). The color
 impression you get by looking at the output is generated in completely
 different ways.


 Most office printers cope well with RGB (sRGB) colors, a lot of inkjet
 printers even better than with CMYK colors, because they're optimized for
 home dummy use.

 But (as Christoph pointed out) your printer can be as great as it goes,
 you'll never get a similar color impression if your monitor's set to some
 extreme setting - and most monitors that I saw outside of the graphical
 branch are set to nonsense settings, e.g. max contrast.

 Greetlings from Lake Constance!
 Hraban
 ---
 http://www.fiee.net/texnique/
 http://wiki.contextgarden.net
 https://www.cacert.org (I'm an assurer)


 __**__**
 ___
 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 http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : 
 http://foundry.supelec.fr/**projects/contextrev/http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Colors: printing vs. on screen

2011-06-19 Thread Erik Margraf
Dear List,

I defined the following color for one of my
documents: \definecolor[P][r=0.64,g=0.22,b=0.27]
When I printed this document on a probably typical office laser printer (a
Canon iRC), the
colors didn't match. (not even close and I didn't like the printed
color) This is probably no real
surprise, but can anybody provide some insight or hints to information on
these matters to me:

 -- Are spot colors the thing to use to get a grip on these matters?
 -- Is this generally only a matter of color spaces and transformations
between them?  or ...
 -- Is this also dependent on specific printer models (eg. different office
laser printers)?
-- If yes, is there any source on information on the pecularities of
these printers?

kind regard and thanks

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Second Try for help using Windows 7 Winedt 6.0 MiKTeX 2.9 to process ConTeXt

2010-11-19 Thread Erik Margraf
I used TeXworks, which was included in the MikTeX distribution with
the configuration shown  in the screenshot. Rather minimalistic,
but worked and may be a start.

regards
Erik

2010/11/19 barndog1...@gmail.com

 Perhaps Taco could find time to explore this??

 Recently MikTeX enabled ConTeXt using Luatex .60.

 I love ConteXt and was using it UNTIL MiKTeX stopped support in version
 2.8.

 I try to process a ConteXt file now using:

 Windows 7, Winedt 6.0 and MikTeX 2.9...

 I changed to MKIV within MikTeK and luatex tryies to process a TIK test
 file instead of my master.tex file.

 Could anyone please advise me on how to get this working? I reallly NEED to
 use ConTeXt again to continue to publish my research correctly

 Thanks

 Barney Schwartz

 ___
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___


attachment: config.png___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta

2010-11-14 Thread Erik Margraf
Thanks! Seems, that this was the (same) reason.
I think I have now working minimals  2010.11.12 18:22

Kind regards
Erik

2010/11/14 Aditya Mahajan adit...@umich.edu

 On Sat, 13 Nov 2010, Erik Margraf wrote:

  I get the following error message while running first-setup.sh:
 
 ! I can't find file `catc-ini.mkiv'.
 to be read again
  \relax
 l.42 \loadmarkfile{catc-ini}
 ---

 Strange enough, I find it as
  /tex/texmf-context/tex/context/base/catc-ini.mkiv

 Anything I can do about that?


 I had the same error. I am on linux-64 and the luatex binary in
 linux-64/bin did not have the execute permission set. So the wrong luatex
 was being used.

 But I use mtx-update directly, so do not know if this is the same reason
 for the error in the minimals.

 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Animations (again, but different)

2010-11-14 Thread Erik Margraf
Hi, with context version  2010.11.12 18:22, I get much
better results now. Thanks!
I guess, I now have a first feeling about
these things.

kind regards
Erik

2010/11/11 Erik Margraf erik.marg...@googlemail.com

 Thank's for your example! But I'm sorry to say, I didn't get it.
 When I run context on it, it results in a 2x2 matrix of pictures.
 Two of them show some reaction (change the color somewhat)
 when I click on them. (the cows don't). That's all.

 Maybe it has to with the following lines in the log file:
 ...
 interaction : active
 references  : unknown reference [][VideLayer{1}]
 references  : unknown reference [][VideLayer{2}]
 references  : unknown reference [][VideLayer{3}]
 references  : unknown reference [][VideLayer{4}]
 ...
 I tried the following example from the Wiki:
 ===
 \defineproperty[my-hasitations][layer][state=stop]

 \startproperty[my-hasitations]
 To \ConTeXt\ or not to \ConTeXt?
 \stopproperty

 \button{Show   Decision}[VideLayer{my-hasitations}]
 \button{Hide   Decision}[HideLayer{my-hasitations}]
 \button{Toggle Decision}[ToggleLayer{my-hasitations}]
 
 This produces the analogous messages for these three buttons.

 My Context Version  - MTXrun | current version: 2010.11.03 19:42
 My LuaTeX Version - This is LuaTeX, Version beta-0.63.0-2010090921

 on Debian AMD64.  I looked at the files with Acrobat Reader 9 on Windows XP
 (BTW. I also tried this completely using a MiKTeX 9 Installation on WinXP
 without
 success)

 Am I missing something?

 kind regards
 Erik



 2010/11/4 Wolfgang Schuster schuster.wolfg...@googlemail.com


 Am 03.11.2010 um 17:38 schrieb Erik Margraf:

  Dear Contexters!
  In the last few days I could read a few posts about
  animations in a resulting PDF document. Some
  statements mentioned java script as possible means
  to create an animation.
  Is it possible to do the following (which is rather
  simple using html and javascript)?
 
-- Have a bunch of thumbnail pictures
-- When you click on a thumbnail you see a
   larger version of the same picture
-- With the next mouseclick the picture
   vanishes (you see the gallery of thumbnails again)
 
  if yes, how?
  Any hints are welcome.

 Not perfect (it’s not possible to close the big pictures) but it should
 give you a first impression:

 \setupinteraction[state=start]

 \defineproperty [1] [layer] [state=stop,global=yes]
 \defineproperty [2] [layer] [state=stop,global=yes]
 \defineproperty [3] [layer] [state=stop,global=yes]
 \defineproperty [4] [layer] [state=stop,global=yes]

 \starttexdefinition properties
  \startoverlay
{\startproperty[1]\overlayfigure{cow}\stopproperty}
{\startproperty[2]\overlayfigure{mill}\stopproperty}
{\startproperty[3]\overlayfigure{hacker}\stopproperty}
{\startproperty[4]\overlayfigure{cow}\stopproperty}
  \stopoverlay
 \stoptexdefinition

 \defineoverlay[properties][\properties]

 \startTEXpage[background={foreground,properties}]

 \bTABLE[width=4cm,height=4cm,offset=none]
  \bTR
\bTD \goto{\overlayfigure{cow}}[VideLayer{1}] \eTD
\bTD \goto{\overlayfigure{mill}}[VideLayer{2}] \eTD
  \eTR
  \bTR
\bTD \goto{\overlayfigure{hacker}}[VideLayer{3}] \eTD
\bTD \goto{\overlayfigure{cow}}[VideLayer{4}] \eTD
  \eTR
 \eTABLE

 \stopTEXpage

 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta

2010-11-13 Thread Erik Margraf
I get the following error message while running first-setup.sh:

! I can't find file `catc-ini.mkiv'.
to be read again
   \relax
l.42 \loadmarkfile{catc-ini}
---

Strange enough, I find it as
  /tex/texmf-context/tex/context/base/catc-ini.mkiv

Anything I can do about that?

Regards
Erik

2010/11/12 Hans Hagen pra...@wxs.nl

 Hi,

 I uploaded a new beta (so the minimals will have it in about an hour):

 - some cleanup at the lua end as side effect of documenting lua interfacing
 as part of writing the cld manual

 - a couple of bug fixed in the lua code that crept in during some
 optimizations

 - removal of some old lua code (not needed any more or replaced by better
 code)

 - a couple of patches (or extensions) to macros (due to reports on the
 list); for instance, the HideLayer and VideLayer reference actions were
 never implemented; also, some animation code has been added (for WS)

 - definitions like \definedfont[file:lbr.pfb] are ok now (remapped onto
 afm, a few line harmless extension)

 - a replacement of the existing marking mechanism (as used for running
 headers and footers): less interference with typesetting as mark nodes are
 no longer part of the game; more robust synchronization of chained marks
 (sectioning); more robust handling of marking in columns and columnsets;
 experimental marking in arbitrary constructs (thomas might like that one);
 not all is tested but we have:

 the usual marking: first, last, previous, current; these are strict in the
 sense that they take sectioning into account

 some new, less strict marking: firstpage, lastpage, previouspage; these
 ignore sectioning related resets

 some experimental methods: next, nextpage; these concern parts of
 paragraphs that end up on the next page, so limited lookahead (in there is
 interest we can make that full lookahead i.e. future marks)

 the usual column related marking:

\getmarking[chapter][first]/
\getmarking[chapter][page][first]/
\getmarking[chapter][column:first][first]/
\getmarking[chapter][column:1][first]/
\getmarking[chapter][1][first]

 even more expermental:

  \definemarking[boxmark]

  \setbox0\ruledvbox{
\marking[boxmark]{tufte} \input tufte \par
\marking[boxmark]{ward}  \input ward  \par
  }

  \synchronizemarking[zerobox][0] \box0

  \getmarking[boxmark][zerobox][first]
  \getmarking[boxmark][zerobox][last]

 anyhow, it might be that something is broken, but at least this
 implementation has more potential

 - the properties mechanism is obsolete and replaced by three mechanism that
 used them (originally properties dealt with specific engine/backend
 functionality); the most important ones are

 \defineviewerlayer[name][options]
 \startviewerlayer[name]\stopviewerlayer
 \viewerlayer[name]{...}

 and

 \defineeffect[name][options]
 \starteffect[name]\stopviewerlayer
 \effect[name]{...}

 where we have predefined (as with former properties):

 \defineeffect [inner]   [alternative=inner,rulethickness=.25pt]
 \defineeffect [outer]   [alternative=outer,rulethickness=.25pt]
 \defineeffect [both][alternative=both, rulethickness=.25pt]
 \defineeffect [normal]  [alternative=normal]
 \defineeffect [hidden]  [alternative=hidden]
 \defineeffect [stretch] [alternative=stretch,stretch=1]

 the properties commands are still there but map onto these so older code
 should work ok (but somewhat less efficient)

 Hans

 -
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Animations (again, but different)

2010-11-11 Thread Erik Margraf
Thank's for your example! But I'm sorry to say, I didn't get it.
When I run context on it, it results in a 2x2 matrix of pictures.
Two of them show some reaction (change the color somewhat)
when I click on them. (the cows don't). That's all.

Maybe it has to with the following lines in the log file:
...
interaction : active
references  : unknown reference [][VideLayer{1}]
references  : unknown reference [][VideLayer{2}]
references  : unknown reference [][VideLayer{3}]
references  : unknown reference [][VideLayer{4}]
...
I tried the following example from the Wiki:
===
\defineproperty[my-hasitations][layer][state=stop]

\startproperty[my-hasitations]
To \ConTeXt\ or not to \ConTeXt?
\stopproperty

\button{Show   Decision}[VideLayer{my-hasitations}]
\button{Hide   Decision}[HideLayer{my-hasitations}]
\button{Toggle Decision}[ToggleLayer{my-hasitations}]

This produces the analogous messages for these three buttons.

My Context Version  - MTXrun | current version: 2010.11.03 19:42
My LuaTeX Version - This is LuaTeX, Version beta-0.63.0-2010090921

on Debian AMD64.  I looked at the files with Acrobat Reader 9 on Windows XP
(BTW. I also tried this completely using a MiKTeX 9 Installation on WinXP
without
success)

Am I missing something?

kind regards
Erik



2010/11/4 Wolfgang Schuster schuster.wolfg...@googlemail.com


 Am 03.11.2010 um 17:38 schrieb Erik Margraf:

  Dear Contexters!
  In the last few days I could read a few posts about
  animations in a resulting PDF document. Some
  statements mentioned java script as possible means
  to create an animation.
  Is it possible to do the following (which is rather
  simple using html and javascript)?
 
-- Have a bunch of thumbnail pictures
-- When you click on a thumbnail you see a
   larger version of the same picture
-- With the next mouseclick the picture
   vanishes (you see the gallery of thumbnails again)
 
  if yes, how?
  Any hints are welcome.

 Not perfect (it’s not possible to close the big pictures) but it should
 give you a first impression:

 \setupinteraction[state=start]

 \defineproperty [1] [layer] [state=stop,global=yes]
 \defineproperty [2] [layer] [state=stop,global=yes]
 \defineproperty [3] [layer] [state=stop,global=yes]
 \defineproperty [4] [layer] [state=stop,global=yes]

 \starttexdefinition properties
  \startoverlay
{\startproperty[1]\overlayfigure{cow}\stopproperty}
{\startproperty[2]\overlayfigure{mill}\stopproperty}
{\startproperty[3]\overlayfigure{hacker}\stopproperty}
{\startproperty[4]\overlayfigure{cow}\stopproperty}
  \stopoverlay
 \stoptexdefinition

 \defineoverlay[properties][\properties]

 \startTEXpage[background={foreground,properties}]

 \bTABLE[width=4cm,height=4cm,offset=none]
  \bTR
\bTD \goto{\overlayfigure{cow}}[VideLayer{1}] \eTD
\bTD \goto{\overlayfigure{mill}}[VideLayer{2}] \eTD
  \eTR
  \bTR
\bTD \goto{\overlayfigure{hacker}}[VideLayer{3}] \eTD
\bTD \goto{\overlayfigure{cow}}[VideLayer{4}] \eTD
  \eTR
 \eTABLE

 \stopTEXpage

 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Animations (again, but different)

2010-11-03 Thread Erik Margraf
Dear Contexters!
In the last few days I could read a few posts about
animations in a resulting PDF document. Some
statements mentioned java script as possible means
to create an animation.
Is it possible to do the following (which is rather
simple using html and javascript)?

  -- Have a bunch of thumbnail pictures
  -- When you click on a thumbnail you see a
 larger version of the same picture
  -- With the next mouseclick the picture
 vanishes (you see the gallery of thumbnails again)

if yes, how?
Any hints are welcome.

kind regards
Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] color in MKIV and Metapost

2010-06-14 Thread Erik Margraf
Dear All,
the small example attached behaves in mkii (texexec) as expected.
The string CONTEXT as well as a little square are colored. Using
mkiv (context) only the little square is colored. The CONTEXT
string is black.
Tested on two different linux systems, both 64 Bit.

  -- CentOS 5, Context  2010.05.24 13:05
  -- Debian - Squeeze,  Latest Beta from Yesterday (13.06)

What am I missing?
Thanks!

Erik


cl1.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Clipping of text (or something equivalent)

2010-06-07 Thread Erik Margraf
Thanks!! For the hints to existing examples as well as for the
very instructive advice to clip to the enlarged unitsquare.

2010/6/7 Hongwen Qiu qiuhong...@gmail.com

  于 2010年06月07日 22:47, Erik Margraf 写道:

 Hi all,
 I'd like to achieve in context something like I did in
 the attachment (context.pdf). My idea was (and
 that's the way how I did this in Inkscape):

- Create Text
- Double the text
- Clip one for the upper half, clip the other for the lower half

 Actually, you only have to clip one, either the upper half or the lower
 half, since the latter elements added onto the canvas will mask the former
 elements.

- Connect the two halves.

 My (probably naive) approach to clipping text in context was:

 -
 \starttext
 \startuniqueMPgraphic{context}
   draw btex \bf Context etex xyscaled (4.0, 4.0) withcolor .8white ;
   clip currentpicture to unitsquare;

 take something like:
 clip currentpicture to unitsquare scaled 8cm;
 and you'll know what's the problem.

 \stopuniqueMPgraphic
 \null\dontcomplain
 \uniqueMPgraphic{context}
 -

 (Without the clip - line, the string Context is displayed. With
 clipping, nothing is displayed.)

 Any hint in the right direction towards clipping or maybe a better
 way to achieve this is appreciated.

 Thanks

 Erik


 ___
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] does expandaparameters work

2010-05-13 Thread Erik Margraf
Thanks!! Works perfectly for me. Is this a patch for syst-aux.mkiv?

2010/5/13 Wolfgang Schuster schuster.wolfg...@googlemail.com

 Am 12.05.10 19:29, schrieb Erik Margraf:

  Hello,
 I use \expandparameters in a macro definition.
 --
 \expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
 --
 This works in MkII (texexec), but doesn't work in MkIV (context).

 If I define all layers in a single declaration, the results with MkII and
 MkIV
 are identical.

 Should this work? Or do I have to add something for MkIV?


 \unprotected\def\xdo...@e@parameters#1]%
  {\let\dosetnvalue\setsomevalue
   \let\setsomevalue\dosetevalue
   \let\p!doassign\p!e!doassign
   \let\setsomevalue\dosetevalue
   \xprocesscommaitem#1,],\...@relax@
   \let\p!doassign\p!n!doassign
   \let\setsomevalue\dosetnvalue
   \let\xdogetparameters\xdo...@n@parameters
   \let\currentvalue\empty}

 \starttext

 \getparameters[my][text=Hello]

 \mytext

 \expandparameters \getparameters[my][text=\currentvalue\space World!]

 \mytext

 \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] does expandaparameters work

2010-05-12 Thread Erik Margraf
Hello,
I use \expandparameters in a macro definition.
--
\expandparameters\setupbackgrounds[page][background={\currentvalue,#1}]
--
This works in MkII (texexec), but doesn't work in MkIV (context).

If I define all layers in a single declaration, the results with MkII and
MkIV
are identical.

Should this work? Or do I have to add something for MkIV?

Thanks and kind regards

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Shaped paragraps (and overlays) again

2010-04-10 Thread Erik Margraf
Dear ConTeXters,
sorry for posting this again. Maybe the first time I asked the wrong
way, the wrong question or at the wrong time.
I'd like to use the shapetext facility and have some problems
with it. My example tex file and two results are attached.
The file both.pdf shows the result with two shaped paragraphs.
One.pdf the result with one shape commented out (current state of
source file).

context --version gives MTXrun | current version: 2010.03.30 18:56

Any help would be appreciated. (Even the statement won't work )

Erik


p2.tex
Description: TeX document


both.pdf
Description: Adobe PDF document


one.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Shaped paragraphs

2010-04-04 Thread Erik Margraf
Hi,
I have some problems using shaped paragraphs. I tried to follow
the procedures described in METAFUN in the chapter about
talking to TeX. The output I get from running context
(latest minimals) is wrong (or at least unexpected ;-).
The shape of the text paragraphs doesn't match the
backgrounds.  They are interchanged. If I comment out any
single shape production it works.

My Example (hope, it's near to minimal) is attached

kind regards

Erik


p2.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] code with reserved words

2010-03-23 Thread Erik Margraf
Based on the pretty printer in the wiki, I wrote my own.
If I understood you well, you want a b/w pretty printer
with reserved words bold. The pretty printer is capable
of doing both. An example is attached. Probably missing
is the functionality to control the typesetting of reserved
words in TeX. This is done in the lua code. I didn't mind
up to  now. Any feedback is welcome.

Erik

2010/3/23 R. Bastian rbast...@free.fr

 On Tue, 23 Mar 2010 13:24:09 +0100
 luigi scarso luigi.sca...@gmail.com scribit:

  On Tue, Mar 23, 2010 at 1:17 PM, R. Bastian rbast...@free.fr wrote:
   Hello,
  
   is there a way to get Python code with reserved words highlighted ?
   Not colored as in
   http://wiki.contextgarden.net/Verbatim_with_LuaTeX
   but {\bf ...}
  
   I use context 2010.01.26 Mk IV or texexec
  well, I'm working to a pretty-printer for Python with low priority

 Attendo ;-)

 
  --
  luigi
 
 ___
  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://tex.aanhet.net
  archive  : http://foundry.supelec.fr/projects/contextrev/
  wiki : http://contextgarden.net
 
 ___
 


 --
 René Bastian
 www.pythoneon.org
 www.musiques-rb.org
 http://www.soundsurvey.org.uk/



 ___
 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://tex.aanhet.net
 archive  : http://foundry.supelec.fr/projects/contextrev/
 wiki : http://contextgarden.net

 ___



sample.tex
Description: TeX document
if not modules then modules = { } end modules ['pret-py'] = {
version   = 0.001,
comment   = companion to buff-ver.mkiv,
author= Erik Margraf,
copyright = PRAGMA ADE / ConTeXt Development Team,
license   = see context related readme files
}

local utf = unicode.utf8

local utfcharacters, utfvalues = string.utfcharacters, string.utfvalues
local utfbyte, utffind = utf.byte, utf.find
local byte, sub, find, match = string.byte, string.sub, string.find, string.match
local texsprint, texwrite = tex.sprint, tex.write
local ctxcatcodes = tex.ctxcatcodes

local visualizer = buffers.newvisualizer(py)

visualizer.identifiers = { }

visualizer.identifiers.core = {
and, as, assert, break, class, continue, 
def, del, elif, else, except,exec, finally, for, 
from, global, if, import, in, is, lambda, not, 
or, pass, print, raise, return, try, while,
with, yield
}

visualizer.identifiers.base = {
False, None, True
}

visualizer.identifiers.delimiters = {
@, %, ^, , *, (, ), -, +, 
=, |, \\, /, {, }, [, ], :, ;, \, 
\', , , ,, ., ?,   , # 
}

local known_words = { }

for k,v in pairs(visualizer.identifiers) do
for _,w in pairs(v) do
known_words[w] = k
end
end


visualizer.styles = {
core = \\bf\\ss  ,
base = \\sl ,
}

local styles = visualizer.styles

local declarations = {
[def]=1, [class]=1
}


local colors = {
prettyone,
prettytwo,
prettythree,
prettyfour,
}

local change_state, finish_state = buffers.change_state, buffers.finish_state

local function flush_python_word(state, word)
if word then
local id = known_words[word]
if id then
state = change_state(1,state)
if styles[id] then
texsprint(ctxcatcodes,styles[id])
end
texwrite(word)
state = finish_state(state)
if declarations[word] then 
state = change_state(3,state)
end
else
texwrite(word)
state = finish_state(state) -- ?
end
else
state = finish_state(state)
end
return state
end

local in_py_long_string = false

function visualizer.flush_line(str,nested)

local i, result , word = 1, { }, 
local state = 0
local delimiters=visualizer.identifiers.delimiters
local is_delimiter = false
local in_string = false
local string_end = 
  
buffers.currentcolors = colors

while i = #str do
c=string.sub(str,i,i)
if in_py_long_string then
state = buffers.change_state(2,state)
if c==\' and string.sub(str,i,i+2)==\'\'\' then
texwrite(string.sub(str,i,i+2))
i=i+2
in_py_long_string=false
elseif c==\ and string.sub(str,i,i+2)==\\\ then
texwrite(string.sub(str,i,i+2))
i=i+2
in_py_long_string=false
elseif

[NTG-context] Pretty Printing Python code

2009-12-29 Thread Erik Margraf
Hello all,
I wanted to typeset some Python code and stumbled across the
pretty printing feature of ConTeXt. So far, I think I've learned the
following:

   -- There's no pretty printer for python. Neither in MKII nor in MKIV
   -- The wiki has an example implementation for a python pretty printer
  for MKII, i guess.

I decided to play a little bit with pretty printing (maybe implement a
Python pretty printer on my own) and failed at the start ;-)
I tried the following:
  -- Copied the filename pret-lua.lua to pret-py.lua
  -- Added a print statement to verify that the respective lua
code (pret-lua.lua, pret-py.lua) is actually called.
When I ran context on the file below, I could see that pret-lua.lua
had been called, but pret-py.lua had not.  I guess, I did wrong something
very fundamental.

Thanks in advance for any hint

Erik Margraf


yyy.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Some question regarding Layers

2009-12-17 Thread Erik Margraf
Hi all,
i have two questions regarding the use of layers.

 -- Is there an easy way to position a layer in the middle of the page.
My intent is to position some kind of graphic/picture there.
I usually try to wrap the picture in a hbox to \paperwidth {\hfil
\externalfigure{} \hfil} and then
wrapping the hbox in a vbox
 -- Is there a better way to achieve this?
 -- How to do that with layers?

-- Is it possible to define and position layers in one Macro. I have
something like the following
   in mind (untested):

   \define[1]\MLayer{
  \definelayer[#1]
  \setlayer[#1][state=start]{\externalfigure[#1]}
}
My experience so far is, that it's necessary for a layer to appear that
it is listed in pagebackgrounds
ist this true? With this it seems, that a macro like that above is
impossible, true?

thanks in advance for your help

Erik
___
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Overlays with metapost

2009-08-24 Thread Erik Margraf
Hello,
is it possible to achieve an overlay effect with metapost like
in the attached picture (a photo and a pin in the upper left corner)?

I could load both images but I can't control the position where
the pin is inserted.

Is this possible by other means?

thank you!

Regards

Erik
attachment: picture01.jpg___
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___