Re: [NTG-context] Bug (?) using \externalfigure with layers and backgrounds
Oh, I see. Nice, thank you a lot. Jairo :) El jue, 3 de dic. de 2020 a la(s) 12:19, Wolfgang Schuster ( wolfgang.schuster.li...@gmail.com) escribió: > Jairo A. del Rio schrieb am 03.12.2020 um 18:14: > > Hi everyone. The following > > > > \setuppagenumbering[state=stop] > > \definelayer[mybg] > > [ > > repeat=yes, > > x=0mm, y=0mm, > > width=\paperwidth, height=\paperheight, > > ] > > > \setlayer[mybg]{\externalfigure[cow][width=\paperwidth,height=\paperheight]} > > \setupbackgrounds[page][background=mybg,state=repeat] > > \setupindenting[yes,small] > > \startsetups background:default > > \setupbackgrounds[page][background=mybg,state=repeat] > > \stopsetups > > \startsetups background:void > > \setupbackgrounds[page][background=] > > \stopsetups > > \starttext > > \dorecurse{7}{\input knuth} > > \page > > \setups[background:void] > > \dorecurse{8}{\input tufte} > > \page > > \setups[background:default] > > \dorecurse{7}{\input knuth} > > \page > > \stoptext > > > > works with a local image (say, if "cow" is in the same folder as the > > main file), but it doesn't find sample images (cow, hacker, etc.). Is > > that a bug or an intended result? Thank you in advance. > > This is normal, to load figures from the tex directory use > \setupexternalfigures[location=default]. > > More information are on the wiki: > https://wiki.contextgarden.net/Command/setupexternalfigure > > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug (?) using \externalfigure with layers and backgrounds
Jairo A. del Rio schrieb am 03.12.2020 um 18:14: Hi everyone. The following \setuppagenumbering[state=stop] \definelayer[mybg] [ repeat=yes, x=0mm, y=0mm, width=\paperwidth, height=\paperheight, ] \setlayer[mybg]{\externalfigure[cow][width=\paperwidth,height=\paperheight]} \setupbackgrounds[page][background=mybg,state=repeat] \setupindenting[yes,small] \startsetups background:default \setupbackgrounds[page][background=mybg,state=repeat] \stopsetups \startsetups background:void \setupbackgrounds[page][background=] \stopsetups \starttext \dorecurse{7}{\input knuth} \page \setups[background:void] \dorecurse{8}{\input tufte} \page \setups[background:default] \dorecurse{7}{\input knuth} \page \stoptext works with a local image (say, if "cow" is in the same folder as the main file), but it doesn't find sample images (cow, hacker, etc.). Is that a bug or an intended result? Thank you in advance. This is normal, to load figures from the tex directory use \setupexternalfigures[location=default]. More information are on the wiki: https://wiki.contextgarden.net/Command/setupexternalfigure 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Bug (?) using \externalfigure with layers and backgrounds
Hi everyone. The following \setuppagenumbering[state=stop] \definelayer[mybg] [ repeat=yes, x=0mm, y=0mm, width=\paperwidth, height=\paperheight, ] \setlayer[mybg]{\externalfigure[cow][width=\paperwidth,height=\paperheight]} \setupbackgrounds[page][background=mybg,state=repeat] \setupindenting[yes,small] \startsetups background:default \setupbackgrounds[page][background=mybg,state=repeat] \stopsetups \startsetups background:void \setupbackgrounds[page][background=] \stopsetups \starttext \dorecurse{7}{\input knuth} \page \setups[background:void] \dorecurse{8}{\input tufte} \page \setups[background:default] \dorecurse{7}{\input knuth} \page \stoptext works with a local image (say, if "cow" is in the same folder as the main file), but it doesn't find sample images (cow, hacker, etc.). Is that a bug or an intended result? Thank you in advance. Best regards, Jairo ___ 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] bug in \externalfigure
The bug is fixed in the newest beta. Thanks to everyone Jannik Am 02.08.2013 um 22:08 schrieb Jannik Voges researchj...@icloud.com: 'context --make' gives an error: ! LuaTeX error .../context/tex/texmf-context/tex/context/base/back-pdf.lua:86: attempt to index global 'nodepool' (a nil value) stack traceback: .../context/tex/texmf-context/tex/context/base/back-pdf.lua:86: in function 'code' .../context/tex/texmf-context/tex/context/base/util-lua.lua:84: in function 'loadedluacode' .../context/tex/texmf-context/tex/context/base/luat-env.lua:104: in function 'luafilechunk' .../context/tex/texmf-context/tex/context/base/luat-cod.lua:45: in function 'registercode' [string \directlua ]:1: in main chunk. system tex error on line 35 in file /usr/local/context/tex/texmf-context/tex/context/base/back-pdf.mkiv: LuaTeX error ... 25 \registerctxluafile{lpdf-wid}{1.001} 26 \registerctxluafile{lpdf-fld}{1.001} 27 \registerctxluafile{lpdf-mov}{1.001} 28 \registerctxluafile{lpdf-u3d}{1.001} 29 \registerctxluafile{lpdf-swf}{1.001} 30 \registerctxluafile{lpdf-tag}{1.001} 31 \registerctxluafile{lpdf-fmt}{1.001} 32 \registerctxluafile{lpdf-epd}{1.001} 33 \registerctxluafile{lpdf-epa}{1.001} 34 35 \registerctxluafile{back-pdf}{1.001} % some code will move to lpdf-* 36 37 \unprotect 38 39 %D We will minimize the number of calls to \PDF\ specific primitives 40 %D and delegate all management and injection of code to the backend. 41 %D 42 %D Here we initialize some internal quantities. We also protect them. 43 44 \pdfoutput 1 \let\pdfoutput \undefined \newcount\pdfoutput \pdfoutput 1 45 \pdfhorigin 1 true in \let\pdfhorigin\undefined \newdimen\pdfhorigin \pdfhorigin 1 true in \registerctxluafile ...ua.registercode(#1,#2)} l.35 \registerctxluafile{back-pdf}{1.001} % some code will move to lpdf-* ? Jannik Am 02.08.2013 um 21:58 schrieb Hans Hagen pra...@wxs.nl: function nodepool.pdfsetmatrix(rx,sx,sy,ry,tx,ty) local t = copy_node(pdfsetmatrix) if type(rx) == string then t.data = rx else t.data = formatters[%s %s %s %s](rx or 1,sx or 0,sy or 0,ry or 1) -- todo: tx ty end return t end ___ 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] bug in \externalfigure
On Thu, Aug 01 2013, Jannik Voges wrote: Okay, a reader dependent bug/error. I used Preview (OS X 10.8.4). The second figure (\externalfigure[cow.pdf][width=10cm]) and the following sentence didn't appear. The same happens when you use height instead of width. Perhaps you could add this issue to the tracker: http://tracker.luatex.org/ -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \externalfigure
On 8/1/2013 5:19 PM, Jannik Voges wrote: You are right. I was a little bit confused, because I didn't know, that you have to add 'location=default' to get the sample files, so I thought, that might also be buggy. 'test' is a test-file (pdf, jpeg, ...) in the current directory (I have not mentioned that). In my second Mail I included the source files with 'test.pdf'. You can see the bug there or when you compile the example below. This time, the sample files are loaded correctly and you will see, that the second graphic and sentence are missing. \setupexternalfigures[location=default] \starttext \externalfigure[cow.pdf] \page This text will appear. \externalfigure[cow.pdf][width=10cm] This text will not appear. \stoptext i can't repeat your problem here .. two figures and two texts show up 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] bug in \externalfigure
On 8/2/2013 8:36 PM, Jannik Voges wrote: yes its a tricky bug. When you view the pdf with Preview under Mac OS X (10.8.4) you will see, that the second graphic and sentence isn't displayed. When you use evince (linux) the pdf is displayed correctly. I attache a zip-file with the pdf-file of the minimal example and a screenshot of the second page, when you view it with Apple's Preview (Preview.png) and evince (Evince.png). Peter Münster reported, that he can confirm the problem with acrobat reader (I have not installed Acrobat), so I think, there is a problem with the generated pdf. can you try with \nopdfcompression (that way we can look into the file) - 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] bug in \externalfigure
No problem. Pdf is attached. Am 02.08.2013 um 20:55 schrieb Hans Hagen pra...@wxs.nl: On 8/2/2013 8:36 PM, Jannik Voges wrote: yes its a tricky bug. When you view the pdf with Preview under Mac OS X (10.8.4) you will see, that the second graphic and sentence isn't displayed. When you use evince (linux) the pdf is displayed correctly. I attache a zip-file with the pdf-file of the minimal example and a screenshot of the second page, when you view it with Apple's Preview (Preview.png) and evince (Evince.png). Peter Münster reported, that he can confirm the problem with acrobat reader (I have not installed Acrobat), so I think, there is a problem with the generated pdf. can you try with \nopdfcompression (that way we can look into the file) - 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 ___ Untitled.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \externalfigure
On 8/2/2013 9:05 PM, Jannik Voges wrote: No problem. Pdf is attached. ok, i see the problem ... will try to fix it (cannot upload from where i am now) you can try this in back-pdf.lua: function nodepool.pdfsetmatrix(rx,sx,sy,ry,tx,ty) local t = copy_node(pdfsetmatrix) if type(rx) == string then setfield(t,data,rx) else setfield(t,data,formatters[%s %s %s %s](rx or 1,sx or 0,sy or 0,ry or 1)) -- todo: tx ty end return t end 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] bug in \externalfigure
I added the function in back-pdf.lua, but that doesn't fix the problem. Jannik Am 02.08.2013 um 21:35 schrieb Hans Hagen pra...@wxs.nl: On 8/2/2013 9:05 PM, Jannik Voges wrote: No problem. Pdf is attached. ok, i see the problem ... will try to fix it (cannot upload from where i am now) you can try this in back-pdf.lua: function nodepool.pdfsetmatrix(rx,sx,sy,ry,tx,ty) local t = copy_node(pdfsetmatrix) if type(rx) == string then setfield(t,data,rx) else setfield(t,data,formatters[%s %s %s %s](rx or 1,sx or 0,sy or 0,ry or 1)) -- todo: tx ty end return t end Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \externalfigure
On 8/2/2013 9:49 PM, Jannik Voges wrote: I added the function in back-pdf.lua, but that doesn't fix the problem. Jannik Am 02.08.2013 um 21:35 schrieb Hans Hagen pra...@wxs.nl: On 8/2/2013 9:05 PM, Jannik Voges wrote: No problem. Pdf is attached. ok, i see the problem ... will try to fix it (cannot upload from where i am now) you can try this in back-pdf.lua: function nodepool.pdfsetmatrix(rx,sx,sy,ry,tx,ty) local t = copy_node(pdfsetmatrix) if type(rx) == string then setfield(t,data,rx) else setfield(t,data,formatters[%s %s %s %s](rx or 1,sx or 0,sy or 0,ry or 1)) -- todo: tx ty end return t end function nodepool.pdfsetmatrix(rx,sx,sy,ry,tx,ty) local t = copy_node(pdfsetmatrix) if type(rx) == string then t.data = rx else t.data = formatters[%s %s %s %s](rx or 1,sx or 0,sy or 0,ry or 1) -- todo: tx ty end return t end and remake the format - 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] bug in \externalfigure
'context --make' gives an error: ! LuaTeX error .../context/tex/texmf-context/tex/context/base/back-pdf.lua:86: attempt to index global 'nodepool' (a nil value) stack traceback: .../context/tex/texmf-context/tex/context/base/back-pdf.lua:86: in function 'code' .../context/tex/texmf-context/tex/context/base/util-lua.lua:84: in function 'loadedluacode' .../context/tex/texmf-context/tex/context/base/luat-env.lua:104: in function 'luafilechunk' .../context/tex/texmf-context/tex/context/base/luat-cod.lua:45: in function 'registercode' [string \directlua ]:1: in main chunk. system tex error on line 35 in file /usr/local/context/tex/texmf-context/tex/context/base/back-pdf.mkiv: LuaTeX error ... 25 \registerctxluafile{lpdf-wid}{1.001} 26 \registerctxluafile{lpdf-fld}{1.001} 27 \registerctxluafile{lpdf-mov}{1.001} 28 \registerctxluafile{lpdf-u3d}{1.001} 29 \registerctxluafile{lpdf-swf}{1.001} 30 \registerctxluafile{lpdf-tag}{1.001} 31 \registerctxluafile{lpdf-fmt}{1.001} 32 \registerctxluafile{lpdf-epd}{1.001} 33 \registerctxluafile{lpdf-epa}{1.001} 34 35 \registerctxluafile{back-pdf}{1.001} % some code will move to lpdf-* 36 37 \unprotect 38 39 %D We will minimize the number of calls to \PDF\ specific primitives 40 %D and delegate all management and injection of code to the backend. 41 %D 42 %D Here we initialize some internal quantities. We also protect them. 43 44 \pdfoutput 1 \let\pdfoutput \undefined \newcount\pdfoutput \pdfoutput 1 45 \pdfhorigin 1 true in \let\pdfhorigin\undefined \newdimen\pdfhorigin \pdfhorigin 1 true in \registerctxluafile ...ua.registercode(#1,#2)} l.35 \registerctxluafile{back-pdf}{1.001} % some code will move to lpdf-* ? Jannik Am 02.08.2013 um 21:58 schrieb Hans Hagen pra...@wxs.nl: function nodepool.pdfsetmatrix(rx,sx,sy,ry,tx,ty) local t = copy_node(pdfsetmatrix) if type(rx) == string then t.data = rx else t.data = formatters[%s %s %s %s](rx or 1,sx or 0,sy or 0,ry or 1) -- todo: tx ty end return t end ___ 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] bug in \externalfigure
Hello everyone, I found a bug in the current ConTeXt Beta with externalfigure. The following minimal example will show you what happens \starttext \externalfigure[cow] \externalfigure[cow][width=10cm] \page \externalfigure[test] \page This text will appear. This text will not appear. \externalfigure[test][width=10cm] This text will not appear. \stoptext The first two \externalfigure-commands (with cow) will give a grey placeholder with 'state:unknown' in it. The third \externalfigure-command (\externalfigure[test]) will work, and the last one won't. In this example, you will get an empty third page and the text after the \externalfigure-command doesn't appear in the pdf. 'test' can be a pdf-file or jpeg-file (I only tested whose types of files). Thanks Jannik ___ 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] bug in \externalfigure
On 2013–08–01 Jannik Voges wrote: I found a bug in the current ConTeXt Beta with externalfigure. The following minimal example will show you what happens \starttext \externalfigure[cow] \externalfigure[cow][width=10cm] \page \externalfigure[test] This reads in the file texmf-modules/doc/fonts/urw/garamond/test.tex which is not desired. But I assume you have a “test” graphic in your current directory which is used instead, so this is unrelated to your problem. \page This text will appear. This text will not appear. \externalfigure[test][width=10cm] This text will not appear. When I change \externalfigure[test] to \externalfigure[cow] it works here. The text appears. Marco signature.asc Description: Digital 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] bug in \externalfigure
On Thu, 1 Aug 2013, Jannik Voges wrote: Hello everyone, I found a bug in the current ConTeXt Beta with externalfigure. The following minimal example will show you what happens \starttext \externalfigure[cow] \externalfigure[cow][width=10cm] \page \externalfigure[test] \page This text will appear. This text will not appear. \externalfigure[test][width=10cm] This text will not appear. \stoptext The first two \externalfigure-commands (with cow) will give a grey placeholder with 'state:unknown' in it. See http://wiki.contextgarden.net/Using_Graphics#Specifying_image_directories You need to add \setupexternalfigures [location={local,global,default}] The third \externalfigure-command (\externalfigure[test]) will work, and the last one won't. In this example, you will get an empty third page and the text after the \externalfigure-command doesn't appear in the pdf. 'test' can be a pdf-file or jpeg-file (I only tested whose types of files). I don't have the latest beta yet, so cannot comment on this. 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] bug in \externalfigure
On Thu, Aug 01 2013, Jannik Voges wrote: The first two \externalfigure-commands (with cow) will give a grey placeholder with 'state:unknown' in it. Yes, you need \setupexternalfigures[location=default] for finding the sample files of the distribution. The third \externalfigure-command (\externalfigure[test]) will work, and the last one won't. In this example, you will get an empty third page and the text after the \externalfigure-command doesn't appear in the pdf. 'test' can be a pdf-file or jpeg-file (I only tested whose types of files). If you want, that other people can reproduce your problem, you have at least 2 possibilities: 1.) You use \setupexternalfigures[location=default] and the sample files of the distribution. 2.) Or if 1.) doesn't work, you provide somewhere the needed files for reproducing the problem. See also http://wiki.contextgarden.net/ConTeXt_Mailing_Lists#Before_asking_on_the_list -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \externalfigure
On Thu, 1 Aug 2013, Marco Patzer wrote: On 2013–08–01 Jannik Voges wrote: I found a bug in the current ConTeXt Beta with externalfigure. The following minimal example will show you what happens \starttext \externalfigure[cow] \externalfigure[cow][width=10cm] \page \externalfigure[test] This reads in the file texmf-modules/doc/fonts/urw/garamond/test.tex which is not desired. But I assume you have a “test” graphic in your current directory which is used instead, so this is unrelated to your problem. I think that the advice of omitting the file extension given in most LaTeX introductions is more trouble than it is worth in ConTeXt. Omitting file extensions is important if you are generating both dvi and pdf outputs. In ConTeXt, one never uses the DVI output, so I think that one should ALWAYS specify the file extension. That removes a lot of headaches with the wrong file being sourced. 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] bug in \externalfigure
On Thu, Aug 1, 2013 at 3:56 PM, Aditya Mahajan adit...@umich.edu wrote: I think that the advice of omitting the file extension given in most LaTeX introductions is more trouble than it is worth in ConTeXt. Omitting file extensions is important if you are generating both dvi and pdf outputs. In ConTeXt, one never uses the DVI output, so I think that one should ALWAYS specify the file extension. That removes a lot of headaches with the wrong file being sourced. +1. -- 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] bug in \externalfigure
On 2013–08–01 Aditya Mahajan wrote: I think that the advice of omitting the file extension given in most LaTeX introductions is more trouble than it is worth in ConTeXt. Omitting file extensions is important if you are generating both dvi and pdf outputs. In ConTeXt, one never uses the DVI output, so I think that one should ALWAYS specify the file extension. That removes a lot of headaches with the wrong file being sourced. I agree with you on that one. However, I think it's unexpected that files from the texmf-modules/doc directory are included by default. Hasn't it been made more strict some time ago? Why does this still work (or better: fail): %% \setupexternalfigures[location=default] \starttext \externalfigure[test] \stoptext Marco signature.asc Description: Digital 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] bug in \externalfigure
On Thu, 1 Aug 2013 16:01:27 +0200 luigi scarso luigi.sca...@gmail.com wrote: On Thu, Aug 1, 2013 at 3:56 PM, Aditya Mahajan adit...@umich.edu wrote: I think that the advice of omitting the file extension given in most LaTeX introductions is more trouble than it is worth in ConTeXt. Omitting file extensions is important if you are generating both dvi and pdf outputs. In ConTeXt, one never uses the DVI output, so I think that one should ALWAYS specify the file extension. That removes a lot of headaches with the wrong file being sourced. +1. -1 One might have png, jpeg, pdf, eps and other figure files. The choice of which will be used depends eventually on where the file is to be found... (and setupexternalfigures). This is a *feature*. It has nothing to do with LaTeX. Of course, one can always specify an extension explicitly if one so wishes... Furthermore, the file extension is simply a convenient label which makes no difference whatsoever on any serious system. (but not so on more primitive operating systems. ;) 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \externalfigure
On Thu, Aug 1, 2013 at 4:43 PM, Alan BRASLAU alan.bras...@cea.fr wrote: On Thu, 1 Aug 2013 16:01:27 +0200 luigi scarso luigi.sca...@gmail.com wrote: On Thu, Aug 1, 2013 at 3:56 PM, Aditya Mahajan adit...@umich.edu wrote: I think that the advice of omitting the file extension given in most LaTeX introductions is more trouble than it is worth in ConTeXt. Omitting file extensions is important if you are generating both dvi and pdf outputs. In ConTeXt, one never uses the DVI output, so I think that one should ALWAYS specify the file extension. That removes a lot of headaches with the wrong file being sourced. +1. -1 One might have png, jpeg, pdf, eps and other figure files. The choice of which will be used depends eventually on where the file is to be found... (and setupexternalfigures). This is a *feature*. It has nothing to do with LaTeX. yes, right, in combination with \ifmode it's useful -- 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] bug in \externalfigure
On 8/1/2013 4:43 PM, Alan BRASLAU wrote: On Thu, 1 Aug 2013 16:01:27 +0200 luigi scarso luigi.sca...@gmail.com wrote: On Thu, Aug 1, 2013 at 3:56 PM, Aditya Mahajan adit...@umich.edu wrote: I think that the advice of omitting the file extension given in most LaTeX introductions is more trouble than it is worth in ConTeXt. Omitting file extensions is important if you are generating both dvi and pdf outputs. In ConTeXt, one never uses the DVI output, so I think that one should ALWAYS specify the file extension. That removes a lot of headaches with the wrong file being sourced. +1. -1 One might have png, jpeg, pdf, eps and other figure files. The choice of which will be used depends eventually on where the file is to be found... (and setupexternalfigures). This is a *feature*. It has nothing to do with LaTeX. Of course, one can always specify an extension explicitly if one so wishes... Furthermore, the file extension is simply a convenient label which makes no difference whatsoever on any serious system. (but not so on more primitive operating systems. ;) actually it's not that primitive as it helps to identify what we're dealing with (e.g. in the source and backend use different code paths for identifying the dimensions, conversion and inclusion) 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] bug in \externalfigure
You are right. I was a little bit confused, because I didn't know, that you have to add 'location=default' to get the sample files, so I thought, that might also be buggy. 'test' is a test-file (pdf, jpeg, ...) in the current directory (I have not mentioned that). In my second Mail I included the source files with 'test.pdf'. You can see the bug there or when you compile the example below. This time, the sample files are loaded correctly and you will see, that the second graphic and sentence are missing. \setupexternalfigures[location=default] \starttext \externalfigure[cow.pdf] \page This text will appear. \externalfigure[cow.pdf][width=10cm] This text will not appear. \stoptext Am 01.08.2013 um 15:52 schrieb Peter Münster pmli...@free.fr: On Thu, Aug 01 2013, Jannik Voges wrote: The first two \externalfigure-commands (with cow) will give a grey placeholder with 'state:unknown' in it. Yes, you need \setupexternalfigures[location=default] for finding the sample files of the distribution. The third \externalfigure-command (\externalfigure[test]) will work, and the last one won't. In this example, you will get an empty third page and the text after the \externalfigure-command doesn't appear in the pdf. 'test' can be a pdf-file or jpeg-file (I only tested whose types of files). If you want, that other people can reproduce your problem, you have at least 2 possibilities: 1.) You use \setupexternalfigures[location=default] and the sample files of the distribution. 2.) Or if 1.) doesn't work, you provide somewhere the needed files for reproducing the problem. See also http://wiki.contextgarden.net/ConTeXt_Mailing_Lists#Before_asking_on_the_list -- 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://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] bug in \externalfigure
On Thu, Aug 01 2013, Jannik Voges wrote: \externalfigure[cow.pdf][width=10cm] This text will not appear. I can confirm this with acroread 9.5.5 No problem with evince. -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \externalfigure
Okay, a reader dependent bug/error. I used Preview (OS X 10.8.4). The second figure (\externalfigure[cow.pdf][width=10cm]) and the following sentence didn't appear. The same happens when you use height instead of width. Am 01.08.2013 um 22:34 schrieb Peter Münster pmli...@free.fr: On Thu, Aug 01 2013, Jannik Voges wrote: \externalfigure[cow.pdf][width=10cm] This text will not appear. I can confirm this with acroread 9.5.5 No problem with evince. -- 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://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] Bug in \externalfigure[...][factor=max]
\externalfigure[...][factor=max] behaves incorrectly (or at lease does not behave as expected) when the width of the figure is less than the height. Minimal example: \startbuffer \startTABLE[frame=off,align={middle,lohi}] \NC none \NC \externalfigure[cow][ratio] \NC \NR \NC max \NC \externalfigure[cow][ratio][factor=max] \NC \NR \NC fit \NC \externalfigure[cow][ratio][factor=fit] \NC \NR \stopTABLE \stopbuffer \starttext \subject {Width Height} \defineexternalfigure[ratio][height=1cm,width=5cm] \getbuffer \subject {Height Width} \defineexternalfigure[ratio][width=1cm,height=5cm] \getbuffer \stoptext See attached output. I thought that factor=max scales the figure (while maintaining the aspect ratio) until the used_width asked_width and used_height asked_height. Looking at the grph-inc.mkiv (in particular \grph_scale_apply_size), I no longer understand what factor=max is supposed to do! facor=fit seems to behave as expected, although I don't understand the purpose of factor=broad (why subtract 4*bodyfont? To fit the caption?) Aditya test.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___