Re: [NTG-context] mathmatrix and grid: followup

2017-01-06 Thread Henri Menke
Bump and (belated) Happy New Year!

On 12/10/2016 10:37 AM, Henri Menke wrote:
> Bump
> 
> On 11/27/2016 07:45 PM, Henri Menke wrote:
>> Bump
>>
>> On 11/22/2016 02:18 PM, Henri Menke wrote:
>>> Dear list,
>>>
>>> some time ago I asked about the interplay of mathmatix with grid 
>>> typesetting: https://mailman.ntg.nl/pipermail/ntg-context/2016/087018.html
>>>
>>> I noticed that when the grid is enabled, the height of a mathmatrix is 
>>> rounded down which leaves less space above than below.  In my opinion 
>>> either the height should be rounded up or the depth rounded down here.  In 
>>> the original thread Wolfgang proposed using \setupformula[grid=tolerant] 
>>> and adding a blank line before the formula (otherwise grid=tolerant is 
>>> applied to the paragraph before).  This workaround leads to the depth being 
>>> rounded down in the example below which produces a more balanced output.  
>>> Could this somehow be made the default behaviour or something?  Currently 
>>> it requires the user to notice that vertical spacing is off and correct it 
>>> manually, including adding a blank line before the formula to prevent 
>>> grid=tolerant being applied to the paragraph.
>>>
>>> Cheers, Henri
>>>
>>> ---
>>>
>>> \setuplayout[grid=yes]
>>> \showgrid
>>>
>>> \starttext
>>>
>>> \input knuth
>>> \startformula
>>>   \vrule % make lineheight and depth visible
>>>   \startmathmatrix
>>> \NC A \NR
>>> \NC B \NR
>>> \NC C \NR
>>>   \stopmathmatrix
>>> \stopformula
>>> \input tufte
>>>
>>> \stoptext
>>>
>>
> 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] rotating some pages of a pdf

2017-01-06 Thread luigi scarso
On Fri, Jan 6, 2017 at 5:47 AM, Cesar Romani  wrote:
> On 05/01/2017 04:14 a.m., Hans Hagen wrote:
>> On 1/5/2017 12:34 AM, Cesar Romani wrote:
>>> Thanks, it works fine.
>>>
>>> I noticed that the resolution of the rotated pages decreases. Is there
>>> any possibility to maintain or increase the resolution of the rotated
>>> pages?
>>
>> in what sense decrease ...
>
> The quality of the rotated pdfs, which are images, drops off a little.

Can you make a comparison with different viewer ?
Under Windows, you can take Adobe Reader as reference.


-- 
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] 'overprint' swallows leading number

2017-01-06 Thread Peter Rolf
Hi,

title says it all.

(ConTeXt 2016.12.28 17:55)

minimal example:

\starttext
\startluacode
local bCI,eCI = context.startcolorintent, context.stopcolorintent

bCI({"overprint"})context("1.2345\\crlf")eCI() -- also no 'overprint'
for that text part in the PDF
bCI({"overprint"})context("First number is missing.\\crlf")eCI()

\stopluacode
\stoptext
-

I also get an overflow exception with one of my tables, but I could
'fix' that with '\setupalign[nothyphenated]'. The table is complex (lua
generated), so no minimal example at hand. Anyhow, here the error
message (space-ali.mkiv).

-
tex error   > tex error on line 13283 in file
g:/mydocs/TeX/dokumente/test/lua/titanfall2/titanfall2-weapons.mkiv: !
Arithmetic overflow


\setraggedness ...hsize /\dimexpr #1\relax \relax
  \fi
\spac_align_set_horizontal_center ...dness_middle
  \raggedstatus \plustwo
\at...
\raggedcommand ...pac_align_set_horizontal_center
  \relax
\spac_align_set_ver...
\next ...th \pack_framed_do_setups \raggedcommand
  \pack_framed_do_top
\bgrou...
\tabl_ntb_cell_process_b_c ...raltablelocalframed
  {\tabl_ntb_cell_start
#5\t...
 ...ass 1 34 \tabl_ntb_skip {6}\tabl_ntb_pass 1 40
  \tabl_ntb_plus
\tabl_ntb_p...
...
l.249 ...x\vbox{\ctxlua{userdata.printweaponTABLE()}
  }%
-

Maybe related to the prior bug (also overprinting numbers in the TABLE),
will check again later.


Best wishes,  Peter

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] rotating some pages of a pdf

2017-01-06 Thread Alan Braslau
On Thu, 5 Jan 2017 23:47:00 -0500
Cesar Romani  wrote:

> The quality of the rotated pdfs, which are images, drops off a little.
> For example, some characters are not so sharp as in the original pdf.
> 
> If I use GraphicsMagick I would remedy this with the parameter
> -density as in:
> gm convert -density 300x300 original.pdf -rotate 45 rotated.pdf

From the web:

"A PDF file does not have a density anyway. IM will apply a default
interpretation of 72dpi unless you override it (e.g. -density 300x300
-units pixelsperinch)."


Testing:

convert original.tif -rotate 45 rotated.png

keeps the original density.

1) original.tif was 6000x6000; rotated.png is 8488x8488 (2400dpi)
2) converting to rotated.tif fails
convert: TIFF: negative image positions unsupported rotated.tif @ 
error/tiff.c/WriteTIFFImage/3609.
3) converting to rotated.pdf does produce a much reduced resolution image.

Indeed, PDF is container, not the best format for manipulating bitmap images.
I take two approaches to this:
1) I manipulate/modify the images explicitly "upstream" before including them 
in ConTeXt,
   using any of my favorite tools; or
2) I manipulate/modify the images using MetaPost, within ConTeXt.
   This gives very satisfactory results and does not rely on ImageMagik.

Alan
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] 'overprint' swallows leading number

2017-01-06 Thread Hans Hagen

On 1/6/2017 3:49 PM, Peter Rolf wrote:

Hi,

title says it all.


\unexpanded\def\registercolorintent#1#2% \relax is needed !

{\setevalue{\??colorintent#1}{\attribute\colorintentattribute\clf_registercolorintent{#2}\relax}}



(ConTeXt 2016.12.28 17:55)

minimal example:

\starttext
\startluacode
local bCI,eCI = context.startcolorintent, context.stopcolorintent

bCI({"overprint"})context("1.2345\\crlf")eCI() -- also no 'overprint'
for that text part in the PDF
bCI({"overprint"})context("First number is missing.\\crlf")eCI()

\stopluacode
\stoptext
-

I also get an overflow exception with one of my tables, but I could
'fix' that with '\setupalign[nothyphenated]'. The table is complex (lua
generated), so no minimal example at hand. Anyhow, here the error
message (space-ali.mkiv).

-
tex error   > tex error on line 13283 in file
g:/mydocs/TeX/dokumente/test/lua/titanfall2/titanfall2-weapons.mkiv: !
Arithmetic overflow


\setraggedness ...hsize /\dimexpr #1\relax \relax
  \fi
\spac_align_set_horizontal_center ...dness_middle
  \raggedstatus \plustwo
\at...
\raggedcommand ...pac_align_set_horizontal_center
  \relax
\spac_align_set_ver...
\next ...th \pack_framed_do_setups \raggedcommand
  \pack_framed_do_top
\bgrou...
\tabl_ntb_cell_process_b_c ...raltablelocalframed
  {\tabl_ntb_cell_start
#5\t...
 ...ass 1 34 \tabl_ntb_skip {6}\tabl_ntb_pass 1 40
  \tabl_ntb_plus
\tabl_ntb_p...
...
l.249 ...x\vbox{\ctxlua{userdata.printweaponTABLE()}
  }%
-

Maybe related to the prior bug (also overprinting numbers in the TABLE),
will check again later.


Best wishes,  Peter

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] 'overprint' swallows leading number

2017-01-06 Thread Peter Rolf
Am 06.01.2017 um 20:01 schrieb Hans Hagen:
> On 1/6/2017 3:49 PM, Peter Rolf wrote:
>> Hi,
>>
>> title says it all.
> 
> \unexpanded\def\registercolorintent#1#2% \relax is needed !
> 
> {\setevalue{\??colorintent#1}{\attribute\colorintentattribute\clf_registercolorintent{#2}\relax}}
> 
>

Thanks, that fixed it. The overflow still occurs, will look deeper into it.

> 
>> (ConTeXt 2016.12.28 17:55)
>>
>> minimal example:
>> 
>> \starttext
>> \startluacode
>> local bCI,eCI = context.startcolorintent, context.stopcolorintent
>>
>> bCI({"overprint"})context("1.2345\\crlf")eCI() -- also no 'overprint'
>> for that text part in the PDF
>> bCI({"overprint"})context("First number is missing.\\crlf")eCI()
>>
>> \stopluacode
>> \stoptext
>> -
>>
>> I also get an overflow exception with one of my tables, but I could
>> 'fix' that with '\setupalign[nothyphenated]'. The table is complex (lua
>> generated), so no minimal example at hand. Anyhow, here the error
>> message (space-ali.mkiv).
>>
>> -
>> tex error   > tex error on line 13283 in file
>> g:/mydocs/TeX/dokumente/test/lua/titanfall2/titanfall2-weapons.mkiv: !
>> Arithmetic overflow
>>
>>
>> \setraggedness ...hsize /\dimexpr #1\relax \relax
>>   \fi
>> \spac_align_set_horizontal_center ...dness_middle
>>   \raggedstatus \plustwo
>> \at...
>> \raggedcommand ...pac_align_set_horizontal_center
>>   \relax
>> \spac_align_set_ver...
>> \next ...th \pack_framed_do_setups \raggedcommand
>>   \pack_framed_do_top
>> \bgrou...
>> \tabl_ntb_cell_process_b_c ...raltablelocalframed
>>   {\tabl_ntb_cell_start
>> #5\t...
>>  ...ass 1 34 \tabl_ntb_skip {6}\tabl_ntb_pass 1 40
>>   \tabl_ntb_plus
>> \tabl_ntb_p...
>> ...
>> l.249 ...x\vbox{\ctxlua{userdata.printweaponTABLE()}
>>   }%
>> -
>>
>> Maybe related to the prior bug (also overprinting numbers in the TABLE),
>> will check again later.
>>
>>
>> Best wishes,  Peter
>>
>> ___
>>
>> If your question is of interest to others as well, please add an entry
>> to the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> ___
>>
>>
> 
> 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___