[NTG-context] error when using externalfigure

2012-11-26 Thread Pavel Dohnal
Hello,
I have a big context source file which contains pictures from different
sources. The problem is, that there are some pictures the context cannot
process. It displays an error message and ends. I run the context from
another script in batchmode. After finishing, the context creates a PDF
file, which contains this problematic picture but the pdf is broken. It
does not have numbers in the table of contents and it is not arranged by
setup.
Here is a minimal example:
\starttext
\externalfigure[
http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm
]
\stoptext

When I run the context, it prints:
! Dimension too large.

system   tex  error on line 1 in file a.tex: Dimension too large
...

1   \starttext
2 \externalfigure[
http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm
]
3 \stoptext
4


\relocateexternalfigure ...d \foundexternalfigure
  \bgroup \box
\foundexterna...
l.1 \relocateexternalfigure

\calculateexternalfigure ...ua {figures.include()}
  \ctxlua
{figures.scale()}\...
\dodoplaceexternalfigure ...[][#1][#2][#3][#4][#5]
  \dotagfigure \naturalvbox
...
argument ...1295-5ZTynx-s.jpg][][width=26.5mm][]
  \fi
\firstofoneargument #1-#1

Because I have several thousands pictures, it is impossible for me to
correct them all. Is it somehow possible to run the context so that it
ignores the problematic pictures?
Thank you
Pavel Dohnal
___
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] error when using externalfigure

2012-11-26 Thread Hans Hagen

On 11/26/2012 10:20 AM, Pavel Dohnal wrote:

Hello,
I have a big context source file which contains pictures from different
sources.. The problem is, that there are some pictures the context
cannot process. It displays an error message and ends. I run the context
from another script in batchmode. After finishing, the context creates a
PDF file, which contains this problematic picture but the pdf is broken.
It does not have numbers in the table of contents and it is not arranged
by setup.
Here is a minimal example:
\starttext
\externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm
http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg%5D%5Bwidth=26.5mm]
\stoptext

When I run the context, it prints:
! Dimension too large.


it all depends on the original ... how small is it? one pixel? one 
option is then to scale in  two steps:


\scale[width=26.5cm]{\externalfigure[...][width=1mm]}

or so

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


Re: [NTG-context] error when using externalfigure

2012-11-26 Thread luigi scarso
On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz wrote:
 Hello,
 I have a big context source file which contains pictures from different
 sources. The problem is, that there are some pictures the context cannot
 process. It displays an error message and ends. I run the context from
 another script in batchmode. After finishing, the context creates a PDF
 file, which contains this problematic picture but the pdf is broken. It does
 not have numbers in the table of contents and it is not arranged by setup.
 Here is a minimal example:
 \starttext
 \externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
 \stoptext


when I save the jpg  as eps from gimp
I see
width = 6096,00
height=4064,00

The first value is off for TeX.




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


Re: [NTG-context] error when using externalfigure

2012-11-26 Thread Hans Hagen

On 11/26/2012 10:36 AM, luigi scarso wrote:

On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz wrote:

Hello,
I have a big context source file which contains pictures from different
sources. The problem is, that there are some pictures the context cannot
process. It displays an error message and ends. I run the context from
another script in batchmode. After finishing, the context creates a PDF
file, which contains this problematic picture but the pdf is broken. It does
not have numbers in the table of contents and it is not arranged by setup.
Here is a minimal example:
\starttext
\externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
\stoptext



when I save the jpg  as eps from gimp
I see
width = 6096,00
height=4064,00

The first value is off for TeX.


if i print the values from the img object i get

17344.8pt
11563.2pt

so the problem is deep down in the jpg reader ... the image is crippled 
in the sense that it has no valid resolution information


something for hartmut to check in the img lib

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
___


Re: [NTG-context] error when using externalfigure

2012-11-26 Thread Pavel Dohnal
2012/11/26 Hans Hagen pra...@wxs.nl

 On 11/26/2012 10:20 AM, Pavel Dohnal wrote:

 Hello,
 I have a big context source file which contains pictures from different
 sources.. The problem is, that there are some pictures the context

 cannot process. It displays an error message and ends. I run the context
 from another script in batchmode. After finishing, the context creates a
 PDF file, which contains this problematic picture but the pdf is broken.
 It does not have numbers in the table of contents and it is not arranged
 by setup.
 Here is a minimal example:
 \starttext
 \externalfigure[http://cdn-**locations-images.tripomatic.**
 com/img-poi1295-5ZTynx-s.jpg][**width=26.5mmhttp://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg%5D%5Bwidth=26.5mm
 ]

 \stoptext

 When I run the context, it prints:
 ! Dimension too large.


 it all depends on the original ... how small is it? one pixel? one option
 is then to scale in  two steps:

 \scale[width=26.5cm]{\**externalfigure[...][width=1mm]**}

 or so

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



Original file has width 240px and height 160px but no mather what I try:
\scale[width=26.5cm]{\**externalfigure[...][width=1mm]**}
\scale[width=26.5cm]{\**externalfigure[...][width=240mm]**}
\scale[width=26.5cm]{\**externalfigure[...][width=240px]**}
I got allways the same result with Dimension too large error message

Pavel Dohnal
___
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] error when using externalfigure

2012-11-26 Thread luigi scarso
On Mon, Nov 26, 2012 at 10:50 AM, Hans Hagen pra...@wxs.nl wrote:
 On 11/26/2012 10:36 AM, luigi scarso wrote:

 On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz
 wrote:

 Hello,
 I have a big context source file which contains pictures from different
 sources. The problem is, that there are some pictures the context cannot
 process. It displays an error message and ends. I run the context from
 another script in batchmode. After finishing, the context creates a PDF
 file, which contains this problematic picture but the pdf is broken. It
 does
 not have numbers in the table of contents and it is not arranged by
 setup.
 Here is a minimal example:
 \starttext

 \externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
 \stoptext



 when I save the jpg  as eps from gimp
 I see
 width = 6096,00
 height=4064,00

 The first value is off for TeX.


 if i print the values from the img object i get

 17344.8pt
 11563.2pt

 so the problem is deep down in the jpg reader ... the image is crippled in
 the sense that it has no valid resolution information

 something for hartmut to check in the img lib

Hm, I'm not sure. It's an image that could be correct, but TeX cannot manage it.
It has 240x160 pixels and 1ppi, so it's 6,096 meters x 4,06400meters
and 6 meters are too much for TeX (which still has its limits around 5meters)
It's ok to print poster maybe, but then  TeX  is not the right tool.

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


Re: [NTG-context] error when using externalfigure

2012-11-26 Thread Martin Schröder
2012/11/26 luigi scarso luigi.sca...@gmail.com:
 It has 240x160 pixels and 1ppi, so it's 6,096 meters x 4,06400meters

I doubt that 1ppi is intended. :-)

Best
   Martin
___
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] error when using externalfigure

2012-11-26 Thread Pavel Dohnal
I can see the problem. Image has wrong information in its header. But what
to do with it? As I mentioned before, I create context source by another
script (PHP script) and php runs context. I have thousands of images so it
is impossible to me every single image convert. But I created php gate
which try convert images on the fly. When I try this particural image
convert it gives me this image:
http://cdn-images-squared.tripomatic.com/e46c68903d2c4445f05a0369578c17dd-270.jpg
But after context runs this file it falls down with error message:

!LuaTeX error: reading JPEG image failed (no JPEG header found)
 == Fatal error occurred, no output PDF file produced!

mtx-context | fatal error: return code: 70

Which is even worse, because although the user gets bad PDF it contains
some information. In this case there is no pdf created. I looked in gimp
for something bad in this image, but it looks ok to me.
So do you have any advice what to do?
Thanks

2012/11/26 Martin Schröder mar...@oneiros.de

 2012/11/26 luigi scarso luigi.sca...@gmail.com:
  It has 240x160 pixels and 1ppi, so it's 6,096 meters x 4,06400meters

 I doubt that 1ppi is intended. :-)

 Best
Martin

 ___
 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] formulas: numbering problem

2012-11-26 Thread Andreas Mang
Dear all,

I've spotted a problem with the numbering of the formulas  (default setting: 
(CHAPTER.FORMULANUMBER)):

If a heading that does not come with a number is introduced, the chapter number 
vanishes from the reference number for the formula. I have provided a minimal 
example to illustrate the behaviour.

Any ideas for a quick fix?!

Thanks,
Andreas

ConTeXt  ver: 2012.11.23 17:35 MKIV

minimal example
\setuphead[subsection][number=no]

\starttext
\chapter{First Chapter}
\section{First Section}

\placeformula
\startformula 
Ax=b % as expected: (1.1)
\stopformula

\subsection{First Subsection}
\placeformula
\startformula
Ax=b % not as expected: (2) instead of (1.2)
\stopformula

\stoptext
minimal example
___
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] Footnotes in Linecorrection/ Placeongrid

2012-11-26 Thread H. Özoguz

Hi there,

because I use gridsetting and mixed arabic and latin words together, I 
have to use \placeongrid{} or \startlinecorrection\stoplinecorrection to 
achieve gridsetting.


Now this probelm arised: In these environments footnotes disappear, they 
are simply not printed, but the footnotenumber itself is printed.


\setuplayout[grid=yes]

\starttext

\startlinecorrection

This is a test-text.\footnote{This footnote disappears...Why?}

\stoplinecorrection

\stoptext

How to correct that? Thanks.
Huseyin


___
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] error when using externalfigure

2012-11-26 Thread luigi scarso
On Mon, Nov 26, 2012 at 11:40 AM, Pavel Dohnal pavel.doh...@twobits.cz wrote:
 I can see the problem. Image has wrong information in its header. But what
 to do with it? As I mentioned before, I create context source by another
 script (PHP script) and php runs context. I have thousands of images so it
 is impossible to me every single image convert. But I created php gate which
 try convert images on the fly. When I try this particural image convert it
 gives me this image:
 http://cdn-images-squared.tripomatic.com/e46c68903d2c4445f05a0369578c17dd-270.jpg
 But after context runs this file it falls down with error message:

 !LuaTeX error: reading JPEG image failed (no JPEG header found)
  == Fatal error occurred, no output PDF file produced!

 mtx-context | fatal error: return code: 70

 Which is even worse, because although the user gets bad PDF it contains some
 information. In this case there is no pdf created. I looked in gimp for
 something bad in this image, but it looks ok to me.
 So do you have any advice what to do?
 Thanks
no errors here for
\starttext
\externalfigure[e46c68903d2c4445f05a0369578c17dd-270.jpg][width=26.5mm]
\externalfigure[e46c68903d2c4445f05a0369578c17dd-270.jpg]%[width=26.5mm]
\externalfigure[http://cdn-images-squared.tripomatic.com/e46c68903d2c4445f05a0369578c17dd-270.jpg][width=26.5mm]
\stoptext



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


Re: [NTG-context] Footnotes in Linecorrection/ Placeongrid

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 11:47 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Hi there,
 
 because I use gridsetting and mixed arabic and latin words together, I have 
 to use \placeongrid{} or \startlinecorrection\stoplinecorrection to achieve 
 gridsetting.
 
 Now this probelm arised: In these environments footnotes disappear, they are 
 simply not printed, but the footnotenumber itself is printed.
 
 \setuplayout[grid=yes]
 
 \starttext
 
 \startlinecorrection
 
 This is a test-text.\footnote{This footnote disappears...Why?}
 
 \stoplinecorrection
 
 \stoptext
 
 How to correct that? Thanks.

Add \automigrateinserts to your document (before \starttext).

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] Footnotes in Linecorrection/ Placeongrid

2012-11-26 Thread H. Özoguz

Am 26.11.2012 12:00, schrieb ntg-context-requ...@ntg.nl:

Add \automigrateinserts to your document (before \starttext).

Wolfgang
Thanks! Just curious about that: Why not integrate this into these 
environments by default?


Huseyin
___
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] error when using externalfigure

2012-11-26 Thread Robert Blackstone

On 26 Nov 2012, at 11:41 , Pavel Dohnal pavel.doh...@twobits.cz , wrote:
 When I try this particural image
 convert it gives me this image:
 http://cdn-images-squared.tripomatic.com/e46c68903d2c4445f05a0369578c17dd-270.jpg
 But after context runs this file it falls down with error message:


I have no idea what you are trying to make, but if you can see the picture on 
your screen and you make a screenshot, ConTeXt will process that without a 
problem. The problem is perhaps that its resolution is a bit low so that you 
are limited as far as its size of the picture is concerned. But 4x4 cm would 
give an acceptable result, I think. (I tested it and the result is quite OK.)

Best regards,

Robert Blackstone


___
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] Footnotes in Linecorrection/ Placeongrid

2012-11-26 Thread Hans Hagen

On 11/26/2012 12:05 PM, H. Özoguz wrote:

Am 26.11.2012 12:00, schrieb ntg-context-requ...@ntg.nl:

Add \automigrateinserts to your document (before \starttext).

Wolfgang

Thanks! Just curious about that: Why not integrate this into these
environments by default?


because it's not always okay (yet)

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
___


Re: [NTG-context] formulas: numbering problem

2012-11-26 Thread Philipp Gesang
Hi Andreas,

···date: 2012-11-26, Monday···from: Andreas Mang···

 I've spotted a problem with the numbering of the formulas  (default setting: 
 (CHAPTER.FORMULANUMBER)):
 
 If a heading that does not come with a number is introduced, the chapter 
 number vanishes from the reference number for the formula. I have provided a 
 minimal example to illustrate the behaviour.
 
 Any ideas for a quick fix?!

Use the unnumbered counterparts \title (=\chapter), \subject
(\section), \subsubject and \subsubsubject. See strc-def.mkiv for
more information if you prefer to define your own sectioning
commands.

 minimal example
 \setuphead[subsection][number=no]
 
 \starttext
 \chapter{First Chapter}
 \section{First Section}
 
 \placeformula
 \startformula 
   Ax=b % as expected: (1.1)
 \stopformula
 
 \subsection{First Subsection}

\subsubject{First Subsection} %% = like so

 \placeformula
 \startformula
   Ax=b % not as expected: (2) instead of (1.2)
 \stopformula
 
 \stoptext
 minimal example

Also, see http://wiki.contextgarden.net/Titles#Default.

Regards
Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp2vZ57KTrE1.pgp
Description: PGP signature
___
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] error when using externalfigure

2012-11-26 Thread Hans Hagen

On 11/26/2012 11:00 AM, luigi scarso wrote:

On Mon, Nov 26, 2012 at 10:50 AM, Hans Hagen pra...@wxs.nl wrote:

On 11/26/2012 10:36 AM, luigi scarso wrote:


On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz
wrote:


Hello,
I have a big context source file which contains pictures from different
sources. The problem is, that there are some pictures the context cannot
process. It displays an error message and ends. I run the context from
another script in batchmode. After finishing, the context creates a PDF
file, which contains this problematic picture but the pdf is broken. It
does
not have numbers in the table of contents and it is not arranged by
setup.
Here is a minimal example:
\starttext

\externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
\stoptext




when I save the jpg  as eps from gimp
I see
width = 6096,00
height=4064,00

The first value is off for TeX.



if i print the values from the img object i get

17344.8pt
11563.2pt

so the problem is deep down in the jpg reader ... the image is crippled in
the sense that it has no valid resolution information

something for hartmut to check in the img lib


Hm, I'm not sure. It's an image that could be correct, but TeX cannot manage it.
It has 240x160 pixels and 1ppi, so it's 6,096 meters x 4,06400meters
and 6 meters are too much for TeX (which still has its limits around 5meters)
It's ok to print poster maybe, but then  TeX  is not the right tool.


yes, but the 1,1 resolution prevents us from doing anything useful, i.e. 
we could for instance have something


if xresolution  72 then xresolution = 72 end

but I'm not sure what the pdf backend will do as then the uses 
resolution for front and backend differ too much


i'll add an overflow check but keep in mind that in that case scaling is 
bases on the limited size


-
  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] Find all words set into the margin

2012-11-26 Thread H. Özoguz

I use

\definefontfeature[default][default][expansion=quality,protrusion=quality]

\setupalign[hz,hanging]

\usetypescript[times]

\setupbodyfont[times,11pt]


\setuptolerance[verystrict]


Is there a command or a macro to find all occurences in a file (or 
projekt), where some word is printed into the margin? (Maybe because of 
bad hyphenation or something else.) - Would be perfect for manual 
check-up and corrections!



Thanks.
Huseyin


___
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] MetaPost instance mechanism broken

2012-11-26 Thread Sietse Brouwer
Aditya wrote:
 I am still using the old 2012.11.16 version, but now you have to specify
 the instance in the \startuseMPgraphic as well (Hans had announced this
 on the mailing list a few weeks ago):
 \startuseMPgraphic{instance::mygraphic}
 ...
 \stopuseMPgraphic

Since I don't use MetaPost, I don't think I'm the best person to
document this. But I took this as an opportunity to create the command
reference pages for a bunch of the \...MP... commands; perhaps one of
you could add this info to the proper page(s)? E.g. at
http://wiki.contextgarden.net/Command/startuseMPgraphic
There is an overview of the new stubs at
http://wiki.contextgarden.net/Template:MetaPost_see_also

Also: a question about
\startuseMPgraphic and
\startuniqueMPgraphic.
Both are supposed to be recompiled at every usage, so how are they
different? Actually trying it out suggests that useMPgraphic is the
only one of the two that re-evaluates its code every time; compare the
examples at
* http://wiki.contextgarden.net/Command/startuseMPgraphic and
* http://wiki.contextgarden.net/Command/startuniqueMPgraphic
But then \startuniqueMPgraphic would be the same as
\startreuseMPgraphic, so I think I'm still missing something.

Cheers,
Sietse
___
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] error when using externalfigure

2012-11-26 Thread Sietse Brouwer
This seems to me a case of garbage in, garbage out; I'd say it's the
script's job, rather than ConTeXt's, to ensure the images have the
correct dpi to get a reasonable width in inches. (Brr. I hate inches.
Disgusting, Mars-mission-wrecking way of measuring things.)

Here is some pseudocode. You'd still need a way to get
image.width_in_pixels and image.dpi from the image; I daresay either
`convert` or `exiftool` can do the job. See also this recent mail to
the list by Guy Stalnaker:
http://archive.contextgarden.net/message/20121123.232556.bf205641.en.html

projected_width = image.width_in_pixels / image.dpi
if projected_width  max_width_in_inches then
   required_dpi = image.width_in_pixels / max_width_in_inches
   shell('convert --density %f %s', required_dpi, image_name)
end

Cheers,
Sietse

On Mon, Nov 26, 2012 at 1:32 PM, Hans Hagen pra...@wxs.nl wrote:
 On 11/26/2012 11:00 AM, luigi scarso wrote:

 On Mon, Nov 26, 2012 at 10:50 AM, Hans Hagen pra...@wxs.nl wrote:

 On 11/26/2012 10:36 AM, luigi scarso wrote:


 On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz
 wrote:


 Hello,
 I have a big context source file which contains pictures from different
 sources. The problem is, that there are some pictures the context
 cannot
 process. It displays an error message and ends. I run the context from
 another script in batchmode. After finishing, the context creates a PDF
 file, which contains this problematic picture but the pdf is broken. It
 does
 not have numbers in the table of contents and it is not arranged by
 setup.
 Here is a minimal example:
 \starttext


 \externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
 \stoptext




 when I save the jpg  as eps from gimp
 I see
 width = 6096,00
 height=4064,00

 The first value is off for TeX.



 if i print the values from the img object i get

 17344.8pt
 11563.2pt

 so the problem is deep down in the jpg reader ... the image is crippled
 in
 the sense that it has no valid resolution information

 something for hartmut to check in the img lib


 Hm, I'm not sure. It's an image that could be correct, but TeX cannot
 manage it.
 It has 240x160 pixels and 1ppi, so it's 6,096 meters x 4,06400meters
 and 6 meters are too much for TeX (which still has its limits around
 5meters)
 It's ok to print poster maybe, but then  TeX  is not the right tool.


 yes, but the 1,1 resolution prevents us from doing anything useful, i.e. we
 could for instance have something

 if xresolution  72 then xresolution = 72 end

 but I'm not sure what the pdf backend will do as then the uses resolution
 for front and backend differ too much

 i'll add an overflow check but keep in mind that in that case scaling is
 bases on the limited size


 -
   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] MetaPost instance mechanism broken

2012-11-26 Thread Marco Patzer
2012-11-26 Sietse Brouwer:

 Since I don't use MetaPost, I don't think I'm the best person to
 document this. But I took this as an opportunity to create the command
 reference pages for a bunch of the \...MP... commands; perhaps one of
 you could add this info to the proper page(s)?

Thanks. I added some info about the change mentioned in this thread.

 Also: a question about
 \startuseMPgraphic and
 \startuniqueMPgraphic.
 Both are supposed to be recompiled at every usage, so how are they
 different? Actually trying it out suggests that useMPgraphic is the
 only one of the two that re-evaluates its code every time; compare the
 examples at

AFAIK useMPgraphic is always recalculated, reusableMPgraphic never
is. uniqueMPgraphic takes the size into account and recalculates if
the graphic dimensions change. If I recall correctly this is
mentioned somewhere in the MetaFun manual. But I agree, all these
commands for including MP graphics are confusing, given the fact
that one can survive pretty well with only useMPgraphic. I attached
a small example to show the difference.


Marco
\startuseMPgraphic{alpha}
	fill unitsquare
		xyscaled (\overlaywidth, \overlayheight)
		withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1);
\stopuseMPgraphic

\defineoverlay
	[alpha]
	[\useMPgraphic{alpha}]

\startreusableMPgraphic{beta}
	fill unitsquare
		xyscaled (\overlaywidth, \overlayheight)
		withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1);
\stopreusableMPgraphic

\defineoverlay
	[beta]
	[\reuseMPgraphic{beta}]

\startuniqueMPgraphic{gamma}
	fill unitsquare
		xyscaled (\overlaywidth, \overlayheight)
		withcolor (uniformdeviate 1, uniformdeviate 1, uniformdeviate 1);
\stopuniqueMPgraphic

\defineoverlay
	[gamma]
	[\uniqueMPgraphic{gamma}]

\starttext

\dontleavehmode
\framed[background=alpha]{foo}
\framed[background=alpha]{foo}
\framed[background=alpha]{foobar}

\dontleavehmode
\framed[background=beta]{foo}
\framed[background=beta]{foo}
\framed[background=beta]{foobar}

\dontleavehmode
\framed[background=gamma]{foo}
\framed[background=gamma]{foo}
\framed[background=gamma]{foobar}

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

Re: [NTG-context] MetaPost instance mechanism broken

2012-11-26 Thread Aditya Mahajan

On Mon, 26 Nov 2012, Marco Patzer wrote:


2012-11-26 Sietse Brouwer:


Since I don't use MetaPost, I don't think I'm the best person to
document this. But I took this as an opportunity to create the command
reference pages for a bunch of the \...MP... commands; perhaps one of
you could add this info to the proper page(s)?


Thanks. I added some info about the change mentioned in this thread.


Also: a question about
\startuseMPgraphic and
\startuniqueMPgraphic.
Both are supposed to be recompiled at every usage, so how are they
different? Actually trying it out suggests that useMPgraphic is the
only one of the two that re-evaluates its code every time; compare the
examples at


AFAIK useMPgraphic is always recalculated, reusableMPgraphic never
is. uniqueMPgraphic takes the size into account and recalculates if
the graphic dimensions change. If I recall correctly this is
mentioned somewhere in the MetaFun manual. But I agree, all these
commands for including MP graphics are confusing, given the fact
that one can survive pretty well with only useMPgraphic. I attached
a small example to show the difference.


The distinction was more important in MkII when extra runs for different 
MP graphics could take a lot of time. But it MkIV, the difference in 
performance is, I believe, inconsequential.


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] MetaPost instance mechanism broken

2012-11-26 Thread Hans Hagen

On 11/26/2012 5:10 PM, Marco Patzer wrote:

2012-11-26 Sietse Brouwer:


Since I don't use MetaPost, I don't think I'm the best person to
document this. But I took this as an opportunity to create the command
reference pages for a bunch of the \...MP... commands; perhaps one of
you could add this info to the proper page(s)?


Thanks. I added some info about the change mentioned in this thread.


Also: a question about
\startuseMPgraphic and
\startuniqueMPgraphic.
Both are supposed to be recompiled at every usage, so how are they
different? Actually trying it out suggests that useMPgraphic is the
only one of the two that re-evaluates its code every time; compare the
examples at


AFAIK useMPgraphic is always recalculated, reusableMPgraphic never
is. uniqueMPgraphic takes the size into account and recalculates if
the graphic dimensions change. If I recall correctly this is


Can be more than dimensions. This is the default hash:

\def\overlaystamp
  {\overlaywidth :%
   \overlayheight:%
   \overlaydepth :%
   \MPcolor\overlaycolor:%
   \MPcolor\overlaylinecolor}

so: width, height, depth, background color, line color

but is one says

\startuniqueMPgraphic{mygraphic}{linewidth,.}

given that linewidth is set, those values are also taken into account


mentioned somewhere in the MetaFun manual. But I agree, all these
commands for including MP graphics are confusing, given the fact
that one can survive pretty well with only useMPgraphic. I attached
a small example to show the difference.


It does make a difference when you have documents with thousands of 
graphics (mkiv is much faster btw) and the pdf file is also smaller when 
reuse is applied


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
___


[NTG-context] fonts list

2012-11-26 Thread Vyatcheslav Y.
Hi,

What is modern way to see the list of available fonts?
mtxrun --script fonts --list does not work anymore.

Seems like a lot changed while I was not paying attention to ConTeXt )

Regards,
Vyatcheslav
___
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] fonts list

2012-11-26 Thread luigi scarso
On Mon, Nov 26, 2012 at 6:01 PM, Vyatcheslav Y. yatskov...@gmail.com wrote:
 mtxrun --script fonts --list

mtxrun --script fonts --list --all


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


[NTG-context] print context version

2012-11-26 Thread Thomas A. Schmitz

Hi all,

this is a very easy one, but I couldn't find information: for a document 
under version control, I would like to typeset the git revision and the 
context version used in a footer. For git, I have come up with


\starttext

git revision \ctxlua{context(os.resultof(git --no-pager log 
--pretty='\%h of \%aD' -1))}


\stoptext

But what is the easiest way to typeset the context version? There must 
be something easier than


\ctxlua{context(os.resultof(context --version | grep current))}, right?

All best

Thomas
___
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] print context version

2012-11-26 Thread Aditya Mahajan

On Mon, 26 Nov 2012, Thomas A. Schmitz wrote:


Hi all,

this is a very easy one, but I couldn't find information: for a document 
under version control, I would like to typeset the git revision and the 
context version used in a footer. For git, I have come up with


\starttext

git revision \ctxlua{context(os.resultof(git --no-pager log --pretty='\%h of 
\%aD' -1))}


\stoptext

But what is the easiest way to typeset the context version? There must be 
something easier than


\ctxlua{context(os.resultof(context --version | grep current))}, right?


\contextversion

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] print context version

2012-11-26 Thread Thomas A. Schmitz

On 11/26/2012 07:39 PM, Aditya Mahajan wrote:



\contextversion

Aditya


Oh gosh, how embarrassing! Thank you Aditya, I should definitely have 
found that myself...Thomas




___
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] simple question on kerning activation

2012-11-26 Thread Pablo Rodríguez
Hi there,

I have the following file to check a feature in FreeSerif:

\setuppapersize[A4,landscape]
\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext

dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

Sorry for the stupid question: isn't it font kerning (not kern OT table,
but traditional non-OT kerning) enabled when compiling this source?

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


Re: [NTG-context] fonts list

2012-11-26 Thread Sietse Brouwer
The help text mentions this, but somewhat cryptically --- it's not
quite clear that --all requires --list. Maybe mention that, like so?

--list --name list installed fonts, filter by name [--pattern]
--list --spec list installed fonts, filter by spec [--filter]
--list --file list installed fonts, filter by file [--pattern]

--pattern=str filter files using pattern
--filter=list key-value pairs
- --all show all found instances
+ --all show all found instances (combine with --list)
--infogive more details
--track=list  enable trackers
--statistics  some info about the database

Cheers,
Sietse

On Mon, Nov 26, 2012 at 6:03 PM, luigi scarso luigi.sca...@gmail.com wrote:
 On Mon, Nov 26, 2012 at 6:01 PM, Vyatcheslav Y. yatskov...@gmail.com wrote:
 mtxrun --script fonts --list

 mtxrun --script fonts --list --all


 --
 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
 ___
___
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] fonts list

2012-11-26 Thread Hans Hagen

On 11/26/2012 8:52 PM, Sietse Brouwer wrote:

The help text mentions this, but somewhat cryptically --- it's not
quite clear that --all requires --list. Maybe mention that, like so?

--list --name list installed fonts, filter by name [--pattern]
--list --spec list installed fonts, filter by spec [--filter]
--list --file list installed fonts, filter by file [--pattern]

--pattern=str filter files using pattern
--filter=list key-value pairs
- --all show all found instances
+ --all show all found instances (combine with --list)
--infogive more details
--track=list  enable trackers
--statistics  some info about the database


it's more the reverse ... some flag give more info when --all is given 
i.e. --list triggers an action



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


Re: [NTG-context] error when using externalfigure

2012-11-26 Thread Dr. Hartmut Henkel
On Mon, 26 Nov 2012, Hans Hagen wrote:
 On 11/26/2012 10:36 AM, luigi scarso wrote:
  On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz
  wrote:
   I have a big context source file which contains pictures from different
   sources. The problem is, that there are some pictures the context cannot
   process. It displays an error message and ends. I run the context from
   another script in batchmode. After finishing, the context creates a PDF
   file, which contains this problematic picture but the pdf is broken. It
   does
   not have numbers in the table of contents and it is not arranged by setup.
   Here is a minimal example:
   \starttext
   \externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
   \stoptext

i just tried the minimal example here, it gives a valid PDF with a
properly (afaics) scaled image.

Creator:ConTeXt - 2012.11.26 13:31
Producer:   LuaTeX-0.70.2

  when I save the jpg  as eps from gimp
  I see
  width = 6096,00
  height=4064,00

tried, can't see here.

  The first value is off for TeX.

 if i print the values from the img object i get

 17344.8pt
 11563.2pt

 so the problem is deep down in the jpg reader ... the image is crippled in the
 sense that it has no valid resolution information

 something for hartmut to check in the img lib

can't confirm. Is this solved already?

Regards, Hartmut
___
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] simple question on kerning activation

2012-11-26 Thread Hans Hagen

On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:

Hi there,

I have the following file to check a feature in FreeSerif:

\setuppapersize[A4,landscape]
\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext

dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

Sorry for the stupid question: isn't it font kerning (not kern OT table,
but traditional non-OT kerning) enabled when compiling this source?


kerning is *always* driven by the font, given that the font has kerns 
(not all fonts need them)


you can see kern sin action with:

\starttext

\showfontkerns \input ward

\stoptext


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
___


Re: [NTG-context] error when using externalfigure

2012-11-26 Thread Hans Hagen

On 11/26/2012 8:54 PM, Dr. Hartmut Henkel wrote:

On Mon, 26 Nov 2012, Hans Hagen wrote:

On 11/26/2012 10:36 AM, luigi scarso wrote:

On Mon, Nov 26, 2012 at 10:20 AM, Pavel Dohnal pavel.doh...@twobits.cz
wrote:

I have a big context source file which contains pictures from different
sources. The problem is, that there are some pictures the context cannot
process. It displays an error message and ends. I run the context from
another script in batchmode. After finishing, the context creates a PDF
file, which contains this problematic picture but the pdf is broken. It
does
not have numbers in the table of contents and it is not arranged by setup.
Here is a minimal example:
\starttext
\externalfigure[http://cdn-locations-images.tripomatic.com/img-poi1295-5ZTynx-s.jpg][width=26.5mm]
\stoptext


i just tried the minimal example here, it gives a valid PDF with a
properly (afaics) scaled image.

Creator:ConTeXt - 2012.11.26 13:31
Producer:   LuaTeX-0.70.2


when I save the jpg  as eps from gimp
I see
width = 6096,00
height=4064,00


tried, can't see here.


The first value is off for TeX.


if i print the values from the img object i get

17344.8pt
11563.2pt

so the problem is deep down in the jpg reader ... the image is crippled in the
sense that it has no valid resolution information

something for hartmut to check in the img lib


can't confirm. Is this solved already?


the latest beta clips ... something:

local maxdimen = 2^30-1

function img.check(figure)
if figure then
local width = figure.width
local height = figure.height
if height  width then
if height  maxdimen then
figure.height = maxdimen
figure.width  = width * maxdimen/height
end
elseif width  maxdimen then
figure.width  = maxdimen
figure.height = height * maxdimen/width
end
return figure
end
end

so it's taken care of (in principle the img library is right in handling 
 maxdimen dimensions as lua has no such limit)


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
___


Re: [NTG-context] verbatim boxes

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 21:42 schrieb Erik Margraf erik.marg...@gmail.com:

 Dear List,
 
 is there a Context function/macro which enables me to set
 a box with verbatim file input. I.e. something
 similar to :
 
 \setbox\scratchbox\hbox{\verbatimfileinput{FileName}}


You have to use a \vbox because a \hbox would put everything in a single line.

The important question is why do you want to store the text in a box.

When you plan to frame the text something like this can be used:

\definetyping
  [framedfile]
  [file]
  [before={\startframedtext[width=max]},
after=\stopframedtext]

\starttext
\typefile[framedfile]{knuth.tex}
\stoptext

To store text and reuse it buffers are the best tool:

\startbuffer[ward]
The Earth, as a habitat for animal life, is in old age and
has a fatal illness. Several, in fact. It would be happening
whether humans had ever evolved or not. But our presence is
like the effect of an old-age patient who smokes many packs
of cigarettes per day – and we humans are the cigarettes.
\stopbuffer

\starttext

\typebuffer[ward]

\getbuffer[ward]

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


Re: [NTG-context] simple question on kerning activation

2012-11-26 Thread Pablo Rodríguez
On 26/11/12 21:39, Hans Hagen wrote:
 On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:
 Sorry for the stupid question: isn't it font kerning (not kern OT table,
 but traditional non-OT kerning) enabled when compiling this source?
 
 kerning is *always* driven by the font, given that the font has kerns 
 (not all fonts need them)

Thanks for your reply, Hans.

Sorry, my question was inaccurate.

I know that kerning information is in the font, but it is ConTeXt that
uses this information (or not).

As far as I know, there are two kinds of kerningns: an OT kern feature
from the GPOS table and an old TrueType 'kern' table.

In the following sample OpenType features aren't enabled:

\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext
dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

I'm using TrueType fonts of FreeSerif. Isn't the TrueType 'kern' enabled
by default in ConTeXt? (The glyphs in the example above have no kerning
at all, so I wonder whether at least the TrueType 'kern' table should be
used by ConTeXt.)

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


Re: [NTG-context] verbatim boxes

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 23:06 schrieb Erik Margraf erik.marg...@gmail.com:

 I thought a box would be the best to use it in connection with the
 FunnyFrame of the Metafun manual page 137. In particular
 I wanted to set the the Frametitle with the contents of a file.
 (The actual contents of the file should be short enough to fit
 in the title frame) Actually the definition of FrameTitle uses a \hbox …

It puts the “title” (in the example Zapf (…)”) in the box and not the text.

The text itself for the frame is put in a framedtext environment.

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] simple question on kerning activation

2012-11-26 Thread Hans Hagen

On 11/26/2012 11:04 PM, Pablo Rodríguez wrote:

On 26/11/12 21:39, Hans Hagen wrote:

On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:

Sorry for the stupid question: isn't it font kerning (not kern OT table,
but traditional non-OT kerning) enabled when compiling this source?


kerning is *always* driven by the font, given that the font has kerns
(not all fonts need them)


Thanks for your reply, Hans.

Sorry, my question was inaccurate.

I know that kerning information is in the font, but it is ConTeXt that
uses this information (or not).

As far as I know, there are two kinds of kerningns: an OT kern feature
from the GPOS table and an old TrueType 'kern' table.

In the following sample OpenType features aren't enabled:

\usemodule[simplefonts][size=30pt]
\setmainfont[FreeSerif]
\starttext
dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
{\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\stoptext

I'm using TrueType fonts of FreeSerif. Isn't the TrueType 'kern' enabled
by default in ConTeXt? (The glyphs in the example above have no kerning
at all, so I wonder whether at least the TrueType 'kern' table should be
used by ConTeXt.)


Sure, kern tables are used and are quite valid in open type as well 
(open type includes truetype).


I see lots of kerns in:

\starttext

\startTEXpage[offset=10pt]

\definedfont[file:freeserif.ttf*default] \showfontkerns \input ward

\stopTEXpage

\stoptext

I assume simplefonts uses the default featureset

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
___


Re: [NTG-context] simple question on kerning activation

2012-11-26 Thread Wolfgang Schuster

Am 26.11.2012 um 23:04 schrieb Pablo Rodríguez oi...@web.de:

 On 26/11/12 21:39, Hans Hagen wrote:
 On 11/26/2012 8:01 PM, Pablo Rodríguez wrote:
 Sorry for the stupid question: isn't it font kerning (not kern OT table,
 but traditional non-OT kerning) enabled when compiling this source?
 
 kerning is *always* driven by the font, given that the font has kerns 
 (not all fonts need them)
 
 Thanks for your reply, Hans.
 
 Sorry, my question was inaccurate.
 
 I know that kerning information is in the font, but it is ConTeXt that
 uses this information (or not).
 
 As far as I know, there are two kinds of kerningns: an OT kern feature
 from the GPOS table and an old TrueType 'kern' table.
 
 In the following sample OpenType features aren't enabled:
 
 \usemodule[simplefonts][size=30pt]
 \setmainfont[FreeSerif]
 \starttext
 dadedidodufafefifofufrflftlalelilolutatetitotu\par
 {\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 {\bf dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 {\bf\em dadedidodufafefifofufrflftlalelilolutatetitotu\par}
 \stoptext
 
 I'm using TrueType fonts of FreeSerif. Isn't the TrueType 'kern' enabled
 by default in ConTeXt? (The glyphs in the example above have no kerning
 at all, so I wonder whether at least the TrueType 'kern' table should be
 used by ConTeXt.)

Is there a difference between the two lines?

\usemodule[simplefonts]
\setmainfont[FreeSerif]
\starttext
\showfontkerns
dadedidodufafefifofufrflftlalelilolutatetitotu\par
{\definedfont[file:serif*default]dadedidodufafefifofufrflftlalelilolutatetitotu\par}
\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] Find all words set into the margin

2012-11-26 Thread H. Özoguz

Am 26.11.2012 18:01, schrieb ntg-context-requ...@ntg.nl:

Is there a command or a macro to find all occurences in a file (or projekt),
where some word is printed into the margin? (Maybe because of bad
hyphenation or something else.) - Would be perfect for manual check-up and
corrections!

\version[temporary]
prints blocks next to lines that run into the margin.
http://wiki.contextgarden.net/Command/version
Is that what you're looking for?

--Sietse


Thanks for that! These black blocks are quite useful, but not as 
powerful, as I am looking for.


I am looking for a command, which builds a register of all occurences of 
these blocks. Imagine I am working on a 300-page book, than I have to 
check every single page for these margin-runs (f.e. after changing the 
layout), with these black boxes its much easier, of course, but still a 
mess.


Is there a command like \showallmarginruns, which gives something like 
this: Margin runs on p. 34,67,101,145,204,298 - it may use somehow the 
blocks of \version[temporary], that would be perfect for me.


Could I make clear, what I am looking for (sorry for my leck of English)?

Thanks.
Huseyin
___
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] Euler Constant and limit

2012-11-26 Thread Kip Warner
On Sun, 2012-11-25 at 22:17 +0100, Wolfgang Schuster wrote:
 You have to define a typeface and enable it but Latin Modern as text font 
 with patella etc.
 for math doesn’t look very nice.
 
 \definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
 \definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
 \definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
 \definetypeface[mainface][mm][math] [pagella]
 
 \setupbodyfont[mainface]

So that would define a typeface for Latin Modern as the main body text
and Pagella for math? So any time one typesets formulas or uses \math,
it will automatically come out as Pagella? If that is the case, it
didn't seem to work. I added the following to my environment, but the
typesetting of formulae did not change:

...
% Font to use for math...
\definetypeface[mainface][mm][math][pagella]
...

  In addition, the following formula does not typeset correctly. There is
  no arrow linking 't' to infinity symbol:
  
  \placeformula[formula:Limit of Verhulst equation]
  \startformula
  \math{\lim_{t\to\infty} P(t) = K.\,}
  \stopformula
  
  Works for me (Version 2012.11.23).
  
  It's probably the font I am using.
  
  BTW: Why do you use \math inside of \startformula because it’s the command 
  for inline math in normal text?
  
  I haven't any explanation. I just thought that that was how you were
  suppose to do it from reading the manuals. How should it be?
 
 \setupbodyfont[pagella]
 
 \starttext
 
 left \math{1 + 2 = 3} middle \m{\Eulerconst} right % \math and \m are synonyms
 
 \blank
 
 before
 \startformula
 1 + 2 = 3release a new 
 \stopformula
 after
 
 \stoptext
 
 Wolfgang

Sorry Wolfgang, you lost me. What should the following have been written as?

\placeformula[formula:Limit of Verhulst equation]
\startformula
\math{\lim_{t\to\infty} P(t) = K.\,}
\stopformula

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com



signature.asc
Description: This is a digitally signed message part
___
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] Euler Constant and limit

2012-11-26 Thread Wolfgang Schuster

Am 27.11.2012 um 07:39 schrieb Kip Warner k...@thevertigo.com:

 On Sun, 2012-11-25 at 22:17 +0100, Wolfgang Schuster wrote:
 You have to define a typeface and enable it but Latin Modern as text font 
 with patella etc.
 for math doesn’t look very nice.
 
 \definetypeface[mainface][rm][serif][modern] [default][designsize=auto]
 \definetypeface[mainface][ss][sans] [modern] [default][designsize=auto]
 \definetypeface[mainface][tt][mono] [modern] [default][designsize=auto]
 \definetypeface[mainface][mm][math] [pagella]
 
 \setupbodyfont[mainface]
 
 So that would define a typeface for Latin Modern as the main body text
 and Pagella for math? So any time one typesets formulas or uses \math,
 it will automatically come out as Pagella? If that is the case, it
 didn't seem to work. I added the following to my environment, but the
 typesetting of formulae did not change:
 
 ...
% Font to use for math...
\definetypeface[mainface][mm][math][pagella]

Better define a complete set which includes also serif and sans.
Afterwards you have to enable it with \setupbodyfont[…].

 In addition, the following formula does not typeset correctly. There is
 no arrow linking 't' to infinity symbol:
 
 \placeformula[formula:Limit of Verhulst equation]
 \startformula
 \math{\lim_{t\to\infty} P(t) = K.\,}
 \stopformula
 
 Works for me (Version 2012.11.23).
 
 It's probably the font I am using.
 
 BTW: Why do you use \math inside of \startformula because it’s the command 
 for inline math in normal text?
 
 I haven't any explanation. I just thought that that was how you were
 suppose to do it from reading the manuals. How should it be?
 
 \setupbodyfont[pagella]
 
 \starttext
 
 left \math{1 + 2 = 3} middle \m{\Eulerconst} right % \math and \m are 
 synonyms
 
 \blank
 
 before
 \startformula
 1 + 2 = 3release a new 
 \stopformula
 after
 
 \stoptext
 
 Wolfgang
 
 Sorry Wolfgang, you lost me. What should the following have been written as?
 
\placeformula[formula:Limit of Verhulst equation]
\startformula
\math{\lim_{t\to\infty} P(t) = K.\,}
\stopformula

\placeformula[formula:Limit of Verhulst equation]
\startformula
\lim_{t\to\infty} P(t) = K.
\stopformula

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] Problematic Nightly (2012.11.23 17:35)

2012-11-26 Thread Kip Warner
Hey list,

I'm having trouble getting my book to build with nightly 2012.11.23
17:35. This is the error I am receiving which I do not understand:

! Math error: parameter \Umathquad\displaystyle is not set.
\textmath ...\normalstartimath #1\normalstopimath 
  \endgroup \fi 
\symb_place_indeed ...name \??symbol #1\endcsname 
  \relax
\endgroup 
\symb_place_retry ...name \symb_place_indeed {:#1}
  \else #1\fi 
\symb_place_normal_c ...lace_retry \currentsymbol 
  \fi 
\symb_place_normal_b ...else \symb_place_normal_c 
  \fi 
\symb_place_indeed ...name \??symbol #1\endcsname 
  \relax
\endgroup 
...
l.16 T
  o encourage contributors to refine their ideas, think them
through, an...
? You want to edit file Preface/Preface.tex at line 22

This is the file it is referring to. I don't see anything unusual on
line 22:


https://bazaar.launchpad.net/~avaneya/avaneya/trunk/view/head:/Documentation/Contributors/Handbook/Preface/Preface.tex

PS Please cc me, as I am not on the list currently.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
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] Find all words set into the margin

2012-11-26 Thread luigi scarso
On Tue, Nov 27, 2012 at 7:36 AM, H. Özoguz h.oezo...@mmnetz.de wrote:
 Am 26.11.2012 18:01, schrieb ntg-context-requ...@ntg.nl:

 Is there a command or a macro to find all occurences in a file (or
 projekt),
 where some word is printed into the margin? (Maybe because of bad
 hyphenation or something else.) - Would be perfect for manual check-up
  and
 corrections!

 \version[temporary]
 prints blocks next to lines that run into the margin.
 http://wiki.contextgarden.net/Command/version
 Is that what you're looking for?

 --Sietse


 Thanks for that! These black blocks are quite useful, but not as powerful,
 as I am looking for.

 I am looking for a command, which builds a register of all occurences of
 these blocks. Imagine I am working on a 300-page book, than I have to check
 every single page for these margin-runs (f.e. after changing the layout),
 with these black boxes its much easier, of course, but still a mess.

 Is there a command like \showallmarginruns, which gives something like
 this: Margin runs on p. 34,67,101,145,204,298 - it may use somehow the
 blocks of \version[temporary], that would be perfect for me.

 Could I make clear, what I am looking for (sorry for my leck of English)?
Not an answer, but do you have seen the informations of the log ?
___
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] Change the title of the index of contents

2012-11-26 Thread H. Özoguz
I use \completecontent - in German the title is printed as Inhalt, how 
to change that? (f.e.: to Inhaltsverzeichnis)


Thanks
Huseyin
___
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] toppath

2012-11-26 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

there was a discussion about 'toppath' or 'pathrelativetome'.

Is 'toppath:' prefix working?

Or what other way is to refer to the path of the current file (i.e. the file 
I'm referring from)?

The following code doesn't work - t-Hello.mkiv is not found although it's located in the same 
directory as t-TopPath.mkiv; the t-TopPath.mkiv is compiled from ONE LEVEL UP.

So e.g. let's have:

c:\Lukas\ConTeXt\Test\t-TopPath.mkiv
c:\Lukas\ConTeXt\Test\t-Hello.mkiv

and let's switch to current (working) directory to:

c:\Lukas\ConTeXt

and call:

context.exe Test\t-TopPath.mkiv

In this situation compilation fails.

How to make it work?

TIA.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Hello.mkiv
Description: Binary data


t-TopPath.mkiv
Description: Binary data
___
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] Change the title of the index of contents

2012-11-26 Thread Wolfgang Schuster

Am 27.11.2012 um 08:38 schrieb H. Özoguz h.oezo...@mmnetz.de:

 I use \completecontent - in German the title is printed as Inhalt, how to 
 change that? (f.e.: to Inhaltsverzeichnis)

\setupheadtext[de][content=Inhaltsverzeichnis]

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
___