Re: [NTG-context] contextbeta moved or server down?

2018-09-07 Thread Harald Koenig
On Sep 07, Alan Braslau wrote:

> rsync uses port 873
> 
> This often gets blocked at many sites.

an easy and "naiive" test can be trying to connect to that port via rsync:


telnet 193.2.4.200 rsync
or
telnet 193.2.4.200 873


the output should look similar to this if that outgoing port is open (not 
blocked):

Trying 193.2.4.200...
Connected to 193.2.4.200.
Escape character is '^]'.
@RSYNCD: 31.0


Harald
-- 
"I hope to die  ___   _
before I *have* to use Microsoft Word.",   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen.<_/  /  /OOO\
\  \/OOO\
  \ O|//
       \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] how to set PDF TrimBox ?

2015-05-20 Thread Harald Koenig
Hi,

how can I set the /TrimBox values in PDF ?
right now I use

  \setuppapersize[A4][B4]

with

\setuplayout[marking=color,...]

and the print shop asks to set the /TrimBox to A4 (which right now is set to B4 
paper format).

obviously I can change that with pdftk/qpdf/sed/... in a nice shell-one-liner
but I guess there is a more context way to achieve this? ;-)


thanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] how to set figure label ?

2015-04-17 Thread Harald Koenig
On Apr 16, Alan BRASLAU wrote:

 I much prefer the syntax
 
 \startplacefigure [reference=fig:,location={here,force},title={}]
\externalfigure[]...
 \stopplacefigure
 
 Depending on the strange macros that you want to use,
 this should generally work. I find that this gives one many more
 options.

ACK!  works even for my strange macros ;-)


thanks a lot,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] how to set figure label ?

2015-04-16 Thread Harald Koenig
Hi,

how can I set a label for a figure without 

\placefigure[][fig:...]{} 

for some figures I use strange macros -- and at those places I get errors 
when calling \placefigure
BUT I'd like to check the page numbers of those places using

  \doifreferencefoundelse{fig:bild\the\bildnr}%

and right now I get 

  references   unknown reference '[][fig:bild5]'

for those pictures...


thanks -- and greetings from the DANTE meeting in Stralsund, Germany

Harald

PS: Hans -- we miss you so much!!!
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] (hindi) font questions

2015-04-13 Thread Harald Koenig
On Apr 10, Wolfgang Schuster wrote:

 You forgot the “range” setting for the fallback font which tells context 
 which glyphs should be taken from the font.

opps sorry!  
I only removed the range after my first attempt didn't succeed...

now it's working fine, but only after copying the font to 
tex/texmf-local/fonts/truetype/
and running context --generate.  
thanks!!!


for my first naiive approach with \definefont it was ok/sufficient
to keep the TTF file in the local project's directory.

why is not true for your \definefallbackfamily solution ?


thanks again!!

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] (hindi) font questions

2015-04-08 Thread Harald Koenig
Hi,

I'd like to type set a single hindi/devanagari word in a chapter heading (using 
standalone MkVI),
where I need your help for some questions/problems:

- which (free) font do you suggest ?  right now I'm using Lohit-Devanagari. 
  text font is 11pt Palatino, Lohit doesn't match too good, and a bold version
  would be nice for the chapter head.

- font size: how do I define this font to get automatic/matching font sizes
  for both the chapter head and the title of contents ?

right now I use

  \definefont [hindib] [Lohit-Devanagari at 24pt]
  ...
  \mychapter{Danke -- {\hindib  धन्यवाद}}

which gives a reaosonable font size for the chapter title,
but of course that's way too large for the TOC:-(


what's the right way to define a scalable single font (or two, if you have a 
suggestion
for a normal+bold devanagari font) in ConTeXt ?
  

thanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] currentreferencerealpage wrong (how to detect even/odd pages?)

2015-03-16 Thread Harald Koenig
On Mar 15, Wolfgang Schuster wrote:

 
  Am 15.03.2015 um 16:40 schrieb Harald Koenig 
  koe...@tat.physik.uni-tuebingen.de:
  
  Hi,
  
  right now I use \currentreferencerealpage to detect if I'm on an even or 
  odd page
  (because my picture placement rules depend on it) like this:
  
  \newcount\bildpage
  \bildpage=1
  % ...
  \def\bild#1...{%
  {\global\bildpage=\realpageno}%
  \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
  % ...
  \if o\eo odd...\else even...\fi
 \message{ bildpage=\the\bildpage \space eo=\eo \space 
  currentreferencerealpage=\currentreferencerealpage \space  }%
  }
  
  but now I notice that for some pages/pictures the value of 
  \currentreferencerealpage
  is not correct (only for the first picture on a new page?):-(
 
 To test whether you’re on a left or right page you can use the 
 \signalrightpage and \doifrightpageelse commands

this doesn't seem to work well -- at least not within \placefigure

I've tried this replacement in my \bild macro which should be equivalent (or 
better?)

%   \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
%   \ifodd\bildpage \def\lr{r}\else \def\lr{l}\fi
\dontleavehmode\signalrightpage
\doifrightpageelse{\def\eo{o}}{\def\eo{e}}%
\doifrightpageelse{\def\lr{r}}{\def\lr{r}}%

(with and without \dontleavehmode\signalrightpage)
and now I get more wrong picture placements for the first picture on some 
pages...


I vaguely remember that 

 {\global\bildpage=\currentreferencerealpage}%
 {\global\bildpage=\realpageno}%

was a hack from Hans to work arround issues to get the real page number 
within those floats ?!


Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] currentreferencerealpage wrong (how to detect even/odd pages?)

2015-03-15 Thread Harald Koenig
Hi,

right now I use \currentreferencerealpage to detect if I'm on an even or odd 
page
(because my picture placement rules depend on it) like this:

\newcount\bildpage
\bildpage=1
% ...
\def\bild#1...{%
 {\global\bildpage=\realpageno}%
 \ifodd\bildpage \def\eo{o}\else \def\eo{e}\fi
 % ...
 \if o\eo odd...\else even...\fi
\message{ bildpage=\the\bildpage \space eo=\eo \space 
currentreferencerealpage=\currentreferencerealpage \space  }%
}

but now I notice that for some pages/pictures the value of 
\currentreferencerealpage
is not correct (only for the first picture on a new page?):-(

I'm writing some  ...  data to the log file:

pagesflushing realpage 34, userpage 34
 bildpage=35 eo=o currentreferencerealpage=35 
 bildpage=35 eo=o currentreferencerealpage=35 
pagesflushing realpage 35, userpage 35
 bildpage=35 eo=o currentreferencerealpage=35 
 bildpage=36 eo=e currentreferencerealpage=36 
pagesflushing realpage 36, userpage 36
 bildpage=37 eo=o currentreferencerealpage=0   
 bildpage=37 eo=o currentreferencerealpage=0   
 bildpage=37 eo=o currentreferencerealpage=0   

typically after that flushing realpage XX, userpage XX messages (not from me;)
the currentreferencerealpage is set to the new page number.

but NOT for page 36:  here after flushing realpage 35 
it's still currentreferencerealpage=35 for the first picture on this page:-(


any idea how this can go wrong ?
what can I test, which debug info can  I provide ?
is there a possible 

the attached zip file contains a minimal example 
with only 2 pages and 4 images: on the 2nd page (#36)
the first image should bleed to the left like all other pictures...


so far this seems to happen 3 times according to the log file:

pagesflushing realpage 10, userpage 10
 bildpage=11 eo=o currentreferencerealpage=11 
 bildpage=12 eo=e currentreferencerealpage=12 
pagesflushing realpage 11, userpage 11


pagesflushing realpage 14, userpage 14
 bildpage=15 eo=o currentreferencerealpage=15 
 bildpage=15 eo=o currentreferencerealpage=15 
 bildpage=16 eo=e currentreferencerealpage=16 
pagesflushing realpage 15, userpage 15



thanks for any help,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] shrink JPGs to some resolution (dpi) ?

2015-03-10 Thread Harald Koenig
On Mar 10, Peter Münster wrote:

 Does this work: http://modules.contextgarden.net/grph-downsample ?
 (I did not test it with the latest context version...)
 
 There is no support for changing the quality, but it should be easy to
 add it.

that should great! 
but how do I use it ?

problems with me as newbe start with installation:  reading

 http://wiki.contextgarden.net/Modules#Installation

I unzipped the file in .../context/tex/texmf/ and run context --generate
BUT then I found the hint about 

first-setup.sh --modules=grph-downsample

which removed the unzipped module:-(
so for now I stay with unzup and context --generate
and do not run first-setup.sh again.

what's the real way here ?



next problem: how to use your module ?  
I can't find the docs and just a 

  \usemodule[grph-downsample]

doesn't seem to do the trick ?!
btw, I've added your suggested patch to grph-inc.lua


thanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] jpeg problem: Dimension too large

2015-03-10 Thread Harald Koenig
Hi,

and here a 1st problem including (some) JPGs which are created/converted using 
convert 
from ImageMagick (using ImageMagick-6.8.6.9-2.28.1.x86_64 from openSUSE 13.1 -- 
just in case...)

btw. -- I'm using a decent standalone context installation, full log file 
attached...

running context j1.tex I get

LuaTeX warning: arithmetic: number too big
graphics inclusion  limiting natural dimensions of 
'./IMG_9712c1_bad.jpg' (height)

tex errorerror on line 1 in file 
/home/harald/tex/Indien-2015/j1.tex: ! Dimension too large

for IMG_9712c1_bad.jpg which was generated with this command:

 convert -resize 632x330 IMG_9712c1_ok.jpg IMG_9712c1_bad.jpg


using other tools I can't find any problem with that bad jpg, only context 
complains:-(

what's wrong with IMG_9712c1_bad.jpg ?


tanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^


j1.tex
Description: TeX document
open source  1  1  
/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt  ver: 2015.02.03 23:55 MKIV beta  fmt: 2015.3.5  int: english/english 

system   'cont-new.mkiv' loaded
open source  2  2  
/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
close source 2  2  
/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-new.mkiv
system   files  jobname 'j1', input './j1', result 'j1'
fontslatin modern fonts are not preloaded
languageslanguage 'en' is active
open source  2  3  /home/harald/tex/Indien-2015/j1.tex
fontspreloading latin modern fonts (second stage)
fonts'fallback modern-designsize rm 12pt' is loaded

LuaTeX warning: arithmetic: number too big
graphics inclusion  limiting natural dimensions of 
'./IMG_9712c1_bad.jpg' (height)

tex errorerror on line 1 in file /home/harald/tex/Indien-2015/j1.tex: 
! Dimension too large


\relocateexternalfigure ...d \foundexternalfigure 
  \bgroup \box \foundexterna...
l.1 \relocateexternalfigure
 
\grph_include_place ...\ctxlua {figures.include()}
  \ctxlua {figures.scale()}\...
\grph_include_figure ...include_place [#1][#2][#3]
  \fi 
\syst_helpers_triple_empty_two_spaced ...{#2}][][]
   
to be read again 
\par 
l.6 
  

 1   \starttext
 2 
 3 \externalfigure[IMG_9712c1_ok]
 4 
 5 \externalfigure[IMG_9712c1_bad]
 6 
 7 \stoptext
 8 
 9 
10 


? 

tex errorerror on line 1 in file /home/harald/tex/Indien-2015/j1.tex: 
! Dimension too large


\page_otr_eject_page_and_flush_inserts ...getotal 
  \pagegoal \else \normalvf...
\228last ...ge_otr_command_next_page_and_inserts 
  \relax \doifbothsidesoverr...
\page_breaks_handle_step ...ent_option \endcsname 
  \else \ifcsname \??pagebre...
\91 #1,-\page_breaks_handle_step {#1}
\syst_helpers_do_process_comma_item 
\syst_helpers_do_process_comma_list ...rgument #1,
  ]\relax \global \advance \...
\page_breaks_process ...t \page_breaks_handle {#1}
  \else \page_breaks_handle_...
...
l.7 \stoptext
   

 1   \starttext
 2 
 3 \externalfigure[IMG_9712c1_ok]
 4 
 5 \externalfigure[IMG_9712c1_bad]
 6 
 7 \stoptext
 8 
 9 
10 


? 
backend  xmp  using file 
'/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pagesflushing realpage 1, userpage 1
pagesflushing realpage 2, userpage 2
close source 2  3  /home/harald/tex/Indien-2015/j1.tex
close source 1  3  
/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont-yes.mkiv

system   structure  start used structure

used structure   text: j1

system   structure  stop used structure


system   files  start used files

used file   1: filename=cont-yes.mkiv filetype=tex 
foundname=/home/harald/tex/Indien-2015/ct/tex/texmf-context/tex/context/base/cont

[NTG-context] Hello -- and RFH (Request For Help) for privately typesetting a new travelling book

2015-03-09 Thread Harald Koenig
Hello ConTeXt users!

since I'm new to this list (and the group of context users;) a quick 
introduction
to myself and my current project: 

I've been using LaTeX since 1986 -- some of you may know me from some TeX 
meetings
(and recently also the context users's meetings -- without really using context 
so far).

in 2009 using LaTeX I typeset a 100 page diary+pictures book about a group tour 
from our parish to Israel and Jordan.  making text flowing around the picutres
with LaTeX (in the way I'd like to typeset it) was a real nightmare with LaTeX.

so after finishing that project with LaTeX due to severe time constraints,
I've used that text to convert it to context and learn a bit how this book
can be typeset (much better?) using context -- mostly whenever I met Hans
at every tex conference I could et hands on him, and also Willi and other 
helpers!
but the context-way Isreal book  always remained unfinished or at least 
unpolished
as there was no need (and again no time) to really perfectly finish up.


now this happend again: 
recently I've been traveling through India, again with a group of our parish.
and again, there was that idea to make such a nice book like for the Isreal 
tour.
so this time, I'd like to use context instead of latex...


BUT, there are still quite some issues where I'll need *your* help
to make this really work and get a nice book.

I'll try to split up my questions into separate mails, 
hopefully with small to minimal examples if possible
(and if you'd like to get hards on my complete ugly tex code,
plesae feel free to ask me!... ;-)



so thanks in advance for any advice and help,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] shrink JPGs to some resolution (dpi) ?

2015-03-09 Thread Harald Koenig
Hi,

so here's my very generic question #1 for my India book:

is it possible that context (lua?) will shrink all \externalfigure jpegs
automatically to some specified dpi resolution and quality
(e.g. 300 dpi with 95% jpeg 'quality' for print and
100 dpi and 75% for screen quality) ?

since I'm only using Linux, using Acrobat unfortueately is not an option 
(thanks, Adobe:-(


that book will be ~100 A4 pages with ~50% and 50% pictures, 
trying to have 2 pictures per page with text flowing around.

the pictures are JPG photos with quite high resolution, upto 24 Mpixel.
so those picutres are HUGE and horrible overkill for a final print
on A4 with typical images withs around 0.5\textwith.


I know about ghostscript being able to convert/shrink PDFs,
but first the original PDF with full size JPGs with be really huge,
and ghostscript takes ages to shrink them.  so that's not real fun 
doing this too often...


right now I write the real typeset size of all images to the log file
and use some external script to calculate the current resolution
and then create a new set of images which e.g. 300 dpi.

but that's still an ugly hack still has some issues with EXIF data, rotation, 
clipping, ...
and right now leads to strage problems (see mext mail;)



any hints to read the original large JPGs, but only write print quality 
300dpi images,
or low quaity 75dpi images for speed (and saving net bandwidth when mailing PDFs
to co-workers of the group)?


thanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] shrink JPGs to some resolution (dpi) ?

2015-03-09 Thread Harald Koenig
On Mar 09, Hans Hagen wrote:

 On 3/9/2015 10:50 PM, Alan BRASLAU wrote:
 
 This can be done once and is much better than getting ConTeXt to
 convert every time on the fly.
 
 Do you really think that we let context convert a big file each run
 in a critical workflow? Context will only resample when an image
 file changed (which happens when you have to process from
 repositories updated by authors).

I guess that's a question for me ?

of course I don't plan to run context on the big files every time -- as I know 
that that's still way too slow;)
but it would be nice if I don't need magic external tools to guess 
the correct physical print size, calculate the actual number of pixels for e.g. 
300 dpi, etc.

I already have script which extracts all JPGs from a context's pdf using 
pdfimage,
and then rename them to the input file names according to the log file.

right now I shrink the PDFs using 'gs -dPDFSETTINGS=/screen ...'
and then extract a copy of the small images into some ...-screen/ directory
and use them for all futur context runs.

but using gs or ImageMagick's convert plus some magic log file 
reading/calculation is a bit ugly,
while context knows all the details about physical image size, native pixel 
size of input jpgs etc.
so that context perfectly could do the job if asked to (and without huge 
intermediate PDFs)...


finally I like the idea to be able to create the final PDF in a single 
context run
from *original* source (== original JPGs) without lots of additional tools and 
steps/scripts
(or if I want to start over form scratch from input files).


just an idea... (more to come;-)

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] shrink JPGs to some resolution (dpi) ?

2015-03-09 Thread Harald Koenig
On Mar 09, Aditya Mahajan wrote:

 Why not eliminate the orignal high quality jpegs altogether? Use

one reason is that the jpgs are not in final shape either.
the selected pictures will be reworked from raw files, 
maybe some brightness/contrast correction, clipped,  etc.

whenever the images are reworked, this will happen on the original pictures
and then the resize/... steps are needed again.

yes I know, makefiles and easy shell scripting  can do all this work (actually 
they do already;)
but I dream of reducing the number of tools, processing steps, ...

I thought everyone using jpeg images might have the same interest without 
additional hassle: 
just make my output PDF suitable for printing at 300dpi quality or similar...
runtime potimisation (e.g. caching) is a different topic,
and that also can be solves nicely with lua I'd guess?!;-)


 imagemagick or your favorite photo batch processor to convert all
 the high quality jpegs to low quality jpegs.

ACK -- sort of:  
have a look for my next mail jpeg problem: Dimension too large
as I'm running into a strange problem exactly using imagemagick to shrink the 
images...

and I need information about the rendering size of the image from context (if 
pictures
are used in different sizes or come from different types of cameras etc.), 
so it's not a imagemagick-only thing.


 Say you have directories images/print that contain 300dpi images and
 images/screen that contain 100dpi images. Then you can use:
 
 \setupexternalfigures
 [directory={images/print}]
 
 \startmode[screen]
 \setupexternalfigures
 [directory={images/screen}]
 \stopmode
 
 Run with context --mode=screen to get low-resolution images.

except for the mode thing (thanks for that nice context example!!)
that's how my setup looks already!  though I'd like context (lua?) to shrink 
the images
(and maybe even write to some cache directory?  not really needed, but nice 
idea while typing;-)


thanks,

Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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] shrink JPGs to some resolution (dpi) ?

2015-03-09 Thread Harald Koenig
On Mar 10, Hans Hagen wrote:

 anyway, i need to think a bit about it but we do have all the info
 available, like
 
 - needed width/height
 - original width/height

 and from that we can calculate some conversion parameters

if you start thinking/working on this, some data from EXIF
might be interesting and helpful too, esp. the Orientation.
using that data, automatic rotation to the correct orientation 
would be possible.  

maybe there are more interesting information in the exif data?!
what about color space infos ?  
or time stamps or GPS data which might be used to be typeset...


 if it would help you i can provide a tracker that will save info
 like this (per image):

that would be great as my current \message{} stuff is far from being perfect...



Harald
-- 
I hope to die  ___   _
before I *have* to use Microsoft Word.,   0--,|/OOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen._/  /  /OOO\
\  \/OOO\
  \ O|//
   \/\/\/\/\/\/\/\/\/
Harald Koenig   //  / \\  \
koe...@tat.physik.uni-tuebingen.de ^   ^
___
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
___