Re: [NTG-context] Passing variables on invocation- and reading them in ConTEXt
Thanks to all. After about 30 mins exploring, it all came together. I'll try to add something to the wikithe link below is fine if you know it's there, and that this is what you want. But the search function (arguments and variants thereof did not find it for me). The best match for what I was sure would be there, is \env{}. I still have no idea how it's (semantically) related to --arguments...unless its all Dutch... Kind regards Ian On 10 Sep 2012, at 14:02, Sietse Brouwer sbbrou...@gmail.com wrote: Documented at http://wiki.contextgarden.net/Command/getdocumentargument, in the category Command/Internals. --Sietse On Mon, Sep 10, 2012 at 2:00 PM, Marco Patzer home...@lavabit.com wrote: 2012-09-10: Peter Münster pmli...@free.fr Then you have to be sure, that --number and --time will never be special parameters for context. Indeed. Alternatives: --MarcoPatzerNumber=8 --MarcoPatzerTime=full-time Or: % context --arguments=number=8,time=full-time test.tex This seems the better alternative, since that's what the option was made for. Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Simple rings with svg
Aha, Well, my contribution will be to adjust the wiki for simple minded people like me…as I think my solution will be (if I decide for svg) to batch convert these before launching the context build process. Thanks to all On 11 May 2012 08:57, Hans Hagen pra...@wxs.nl wrote: On 10-5-2012 18:50, Aditya Mahajan wrote: On Thu, 10 May 2012, Hans Hagen wrote: On 10-5-2012 16:59, Aditya Mahajan wrote: On Thu, 10 May 2012, Ian Lawrence wrote: I read on the wiki that now svg is natively supported. Hmm. No. You need to have inkscape installed (and in your PATH) for svg to pdf conversion to work. FWIW, I cannot find the intermediate file 'm_k_i_v_ChangingField_ILUC.pdf' on my disk either…both graphics files are in the same location, both exist, both are named correctly…. @Hans, could we change the conversion so that it checks for inkscape and gives a more sensible warning if inkscape is absent? so what is a robust check ... How about just implementing the unix which command in lua? (untested code) Indeed -) It's more complicated as on windows there can be implicit 'exe', 'cmd', 'bat' suffixes but some testing shows that a path checker is faster than calling which/where so I've added an os.[which|where] to l-os.lua that we can use. I've added a check to the graphic converter code but didn't test (not in the mood to rename/remove programs and/or make a test file). 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 ___
[NTG-context] Simple rings with svg
I read on the wiki that now svg is natively supported. Hmm. I am missing a trick here: I try ___ \starttext Hello world \externalfigure[ChangingField_ILUC.pdf \stoptext __ And all goes as expected: I get output with the expected graphic in place But if I try ___ \starttext Hello world \externalfigure[ChangingField_ILUC.svg] \stoptext ___ I get : !LuaTeX error: cannot find image file 'm_k_i_v_ChangingField_ILUC.pdf' == Fatal error occurred, no output PDF file produced! Is it time to update context? From the date of the wiki revision it seems not, since I am on ConTeXt ver: 2011.11.29 23:11 MKIV FWIW, I cannot find the intermediate file 'm_k_i_v_ChangingField_ILUC.pdf' on my disk either…both graphics files are in the same location, both exist, both are named correctly…. Thanks Ian ___ 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] Passing variable values on invoking context
A bit of help, please. I currently have a chunk at the start of a text file, like this \setvariables [Path] [Thread={Ee_01_PN}, . Mode=full] \stopbuffer I invoke the file with context filename.tex Is there a way to pass the value of the variable to context on invocation? So the top of the header might read: \setvariables [Path] [Thread={Ee_01_PN}, . ] \stopbuffer And the invocation: context filename.tex (bit of magic) Mode=full If so, I could use this a few times...it's not a big deal but would mean I could prepare some fixed command files, rather than a search and replace for Mode=full to Mode=light through al the text files called by this kind of invocation. Thanks in anticipation. Ian ___ 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] A bit more help with referencing local filenames
At the moment I have two bits of code that conspire to build a link to a file that is on a website. So, variables set on a per-document basis, giving the folder: swfURLPath={http://some location or other/PN01_media/}, supportURLPath={http://some location or other/PN01_support/}, These combine with a macro, ending with: [url(\swflocation#1/#1.swf)]} and a piece in the actual file that gives the filename to be retrieved \PlaceSWF{ModelACircuit} What I'd like to do is be able to alter swfURLPath to designate a local folder for retrieving the swf and launching it in a browser Same thing for the supportURLPath, which always opens PDFs in a browser. I tried stuff like: swfURLPath={\\PN01_media/}, supportURLPath={\\PN01_support/}, And have trawled the context wiki and documentation, but cannot find anything authoritative on linking to local files using relative references, as you might in html. I'm keen not to try and use the same hooks so that I can switch back and forth between remote and local access to the supporting files. There is a good reason for this - honest. Thanks in anticipation. Ian ___ 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] A bit more help with referencing local filenames
OK, a bit early! This one swfURLPath={\\PN01_media/}, supportURLPath={\\PN01_support/}, works with Acrobat, but not with the Preview PDF viewer on the Mac Anyone know why, or can suggest a more robust mechanism? On 15 February 2012 10:18, Ian Lawrence physics.roo...@gmail.com wrote: At the moment I have two bits of code that conspire to build a link to a file that is on a website. So, variables set on a per-document basis, giving the folder: swfURLPath={http://some location or other/PN01_media/}, supportURLPath={http://some location or other/PN01_support/}, These combine with a macro, ending with: [url(\swflocation#1/#1.swf)]} and a piece in the actual file that gives the filename to be retrieved \PlaceSWF{ModelACircuit} What I'd like to do is be able to alter swfURLPath to designate a local folder for retrieving the swf and launching it in a browser Same thing for the supportURLPath, which always opens PDFs in a browser. I tried stuff like: swfURLPath={\\PN01_media/}, supportURLPath={\\PN01_support/}, And have trawled the context wiki and documentation, but cannot find anything authoritative on linking to local files using relative references, as you might in html. I'm keen not to try and use the same hooks so that I can switch back and forth between remote and local access to the supporting files. There is a good reason for this - honest. Thanks in anticipation. Ian ___ 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] Possible bug in \unit
I solved this = getting what I wanted by writing my own macro: \define[3]\physicalquantitye{\hbox{#1 \times \unit{10^#2 #3}}} % \physicalquantitye{number}{exponent}{unit} -- gives short form of unit That makes sense to me and is working fine. There are a few more like this on the wiki (units page), in case anyone finds them useful. On 7 Dec 2011, at 21:27, Marco wrote: Another thing: \unit{3.4e-5} yields to 3.4⁻⁵ that's expected according to the manual. But how to get 3.4·10⁻⁵ (either with \cot or \times)? ___ 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] captions for figures - none - no longer working
Morning all, It seems the parameter {none} is no longer effective in \placefigure: From the wiki: You get no caption with none. On at least: ConTeXt ver: 2011.11.29 23:11 MKIV fmt: 2011.12.1, this appears **not** to be the case... Anyone else - or is there some change not yet documented on the wiki. My markup worked on previous versions of the beta. ___ Minimal example % make with context /Users/Ian/SPT_PDF_context/tryouts/test_simplest.tex \starttext Hello world \placefigure[place]{none}{\externalfigure[myone]} \stoptext Thanks Ian___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] beta
New units are a great improvement. Thanks. Ian On 29 Nov 2011, at 17:57, Hans Hagen wrote: Hi, I uploaded a new beta. The usual fixes (as reported to/suggested on this list) and an updated unit mechanism. I'll also upload the new (but yet incomplete) units manual. http://www.pragma-ade.com/general/manuals/units-mkiv.pdf 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] \unit and Hertz, lux, and degrees/minutes/seconds
Maybe it’s possible with MkIV to check if the text before the \unit command was a number but of the number is part of the unit them put in the command, such things are always tricky with TeX and it’s better to force users to use proper input. Within \type{phys-dim.lua} all the units and all the prefixes seem to have capitalised names; in fact, they should be all lowercase (even when they are named after some person). The exception is Celsius. I suggested a list to Hans some time ago, so more than one person has this opinion... I think this is a feature because Hans saves also a lowercase version of all keywords and you can use both as input. I wonder whether \tex{unit} should only parse and format units, and have another macro \tex{quan} or \tex{quantity} to handle number+unit combinations (obviously using \tex{digit} and \tex{unit}). I put my solution to this (expressing physical quantities) on the wiki a while ago…. ___ 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] [m-chart] Focus feature
Another one on flow cells: The latest beta adds an unwanted frame around the text ' radiations that ionise', for cells like: \startFLOWcell \name{episode_04_title} \location {1,5} \shape{7} \text[align=left]{{\bf Radiations that ionise}} \connection[nb,pt]{episode_05_title} \stopFLOWcell And I'm not expert enough to figure out another way of aligning them left… On 19 Oct 2011, at 21:00, Otared Kavian wrote: On 18 oct. 2011, at 23:49, Hans Hagen wrote: On 18-10-2011 21:32, Marco wrote: Another issue: According to the manual, “action” should be the default shape. However, when no shape is specified, an error is raised. Is it a bug? fixed in next beta also connection parsing is more tolerant now: + left - right in addition to lr etc Dear Hans, The command \comment[r]{blabla} does not work anymore in mkiv when using \usemodule[chart]: one gets an error message. (ConTeXt version 2011.10.19 00:02). It seems that in the file m-chart.mkvi there is a typo at line 277: one finds there \do_FLOW_commment instead of \do_FLOW_comment. Fixing this typo eliminates the error message but the comment does not show up. Best regards: OK ___ 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] relative references in OSX Lion
I got to the bottom of this with the aid of paper (lots) and a pencil. My misunderstanding was this. The home folder for context is not the folder from which the tex file is invoked. Context has one fixed home folder. You can set this by a bash profile and then completely forget that you have. I hope this is correct and save someone else some time. Ian On 23 Aug 2011, at 15:55, Wolfgang Schuster wrote: Am 23.08.2011 um 15:37 schrieb Ian Lawrence: Is anyone else successfully running context on OS X Lion? Apparently the relative references work in the terminal - that's the command line interface to unix. I can move around different folders using relative reference there. However there is a complete failure to repeat relative references within Context (absolute references work fine). Even with well structured tex files from Wolfgang or Willi… I have also Lion on my machine and can’t reproduce the behavior you mentioned. I tried it with the small example i sent a while back but everywhere i get the correct output. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Units misbehaving, I think
Thanks Hans.. This now seems fixed. Ian On 12 Aug 2011, at 17:50, Hans Hagen wrote: On 10-8-2011 6:50, Ian Lawrence wrote: I don't think the /unit and /lunit command like a quantity that starts with a zero.. Any one else? First two work fine, last one causes all kinds of grief, in lists, lines etc. The leading zero and decimal point are zapped. \unit{1.0 meter inverse second} \lunit{1.0 meter inverse second} \unit{0.1 meter inverse second} \lunit{0.1 meter inverse second} \lunit{0 meter inverse second} i'll fix it - 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] defected by simple stuff - agane
Hi All.. In the charts module you can set a whole cell to be a hyperlink \destination {url(http://www.talkphysics.org)} So what can I write to link to a local file? Along the lines of… \destination {url(file://XXX.pdf)} …where the pdf is in same directory as the file containing the target… This seems as if it ought to be kind of simple, but also seems undocumented… Thanks Ian ___ 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] Charts module…custom shapes
Anyone know how to add extra shapes, beyond those predefined? Thanks ___ 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] Reflections the interplay between units and digits
Morning all… I think that there are several issues in the interplay of the \units and \digits command that could be a bit better (Sorry Hans…all meant in the best possible way). digits_trial.pdf Description: Adobe PDF document So here is a complete example and the pdf I get, after some experimentation. With kludges of my own. I'd guess there are several people using ConTEXt for the sciences, so this may help some, or some may set me on a better path… ___ \starttext \setdigitmode 6 {\em digit exponent powers - don't work} \digits{20e-12} \digits{-123.222,00e-12} % this one gives nothing at all But it seems it should \emdash\ ConTEXt magazine3 May 2003, from which the following non-working examples come \digits 123.222,00^10 % this one gives nothing at all \digits 123.222,00e10 % this one gives nothing at all \digits /123.222,00e-12 % this one gives nothing at all \digits -123.222,00e-12 % this one gives nothing at all \digits +123.222,00e-12 % this one gives nothing at all {\em spacing and decimal points} \digits 12,345,000.90 Has the same effect as this hard-coded beasty. 12~345~000.78 Digits without exponents seem to work \digits 1230.92 \digits{12,460,800.89} {\em Now a little challenge - write out the speed of light, with units. So to combine units with digits} \unit{299792458 meter inverse second} % en-route, but I'd like every three digits separated by a non-breaking space So try the digits command - two possibilities %\digit {\unit{299792458 meter inverse second}} % digits nests units - well the interpreter rejected this one %\unit{\digit{299792458} meter inverse second} % units nests digits - and this one. Conclusion digits and units don't play nicely together...unless someone has a nice solution Maybe a bit hard coding - fugly, but maybe... \unit{299~792~458 meter inverse second} % fails to interpret units, so no good 299~792~\unit{458 meter inverse second} % looks OK, but inelegant Now for trying to write in standard form..first the inelegant form, but giving a passable result Speed = 3 \times\ \unit{10^8 meter inverse second} But I'd guess this will not be inside a tex box, so the layout might be dodgy... numbers and units should not be split over two lines... A much more elegant solution would be: Speed = \unit{3e8 meter inverse second} % the documentation seems to support this, but not the practice... This one would be cleanly coded, if only the exponentiation worked... {\em spread of a physical quantity} One more, whilst I'm here. People will want to indicate a spread in a physical quantity, so: \unit{400\endash 700 THz} % inserts an unwanted space after the 400: ( 400 –700 THz). (cf 11\endash 14 , which 'behaves' as expected You can again kludge, by 400\endash \unit{700 THz} But elegant coding it ain't \ldots and again probably no bounding tex box, so may get split over two lines. \stoptext ___ KR Ian___ 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] relative references in OSX Lion
-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm mkiv lua stats fonts load time - 0.238 seconds mkiv lua stats graphics processing time - 0.021 seconds including tex, 2 processed images mkiv lua stats luatex banner - this is luatex, version beta-0.70.1-2011051908 (rev 4277) mkiv lua stats control sequences - 30878 of 165536 mkiv lua stats current memory usage - 43 MB (ctx: 44 MB) mkiv lua stats runtime - 0.837 seconds, 1 processed pages, 1 shipped pages, 1.195 pages/second system | total runtime: 1.127 Ian-MBP:ConTEXt_production_ws Ian$ On 23 Aug 2011, at 15:49, Hans Hagen wrote: On 23-8-2011 15:37, Ian Lawrence wrote: \doifmodeelse{*product} {\setupexternalfigures[directory={graphics}]} {\setupexternalfigures[directory={../graphics}]} what happen if you just say \setupexternalfigures[directory={graphics,../graphics}] also say \enabletrackers[graphics.locating] to see where is searched 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] relative references in OSX Lion
Thanks…now I need unravel why the self-contained tex from Wolfgang did not run…and the other piece of more substantial work is also giving grief on this machine, in spite of working on another Mac…both of these are put together by experts… But at least I have something working, so I can begin to rebuild some confidence and understanding… Kind regards Ian On 26 Aug 2011, at 14:02, Taco Hoekwater wrote: You have a problem with your current directory. On 08/26/2011 02:02 PM, Ian Lawrence wrote: Here is the file: context /Users/Ian/SPT_PDF_context/ConTEXt_production_ws/trial/ref.tex And here is the graphic graphics inclusion found: /Users/Ian/SPT_PDF_context/ConTEXt_production_ws/trial/graphics/pic.pdf But here are you: Ian-MBP:ConTEXt_production_ws Ian$ Which is probably /Users/Ian/SPT_PDF_context/ConTEXt_production_ws right? Then that means that the graphics path of graphics inclusion path list: . .. ../.. graphics ../graphics expands into: /Users/Ian/SPT_PDF_context/ConTEXt_production_ws /Users/Ian/SPT_PDF_context /Users/Ian /Users/Ian/SPT_PDF_context/ConTEXt_production_ws/graphics /Users/Ian/SPT_PDF_context/graphics none of these contain the file! You would have needed \setupexternalfigures[directory={graphics,trial/graphics}] Best wishes, Taco ___ 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] relative references in OSX Lion
Is anyone else successfully running context on OS X Lion? Apparently the relative references work in the terminal - that's the command line interface to unix. I can move around different folders using relative reference there. However there is a complete failure to repeat relative references within Context (absolute references work fine). Even with well structured tex files from Wolfgang or Willi… I have razed the whole context installation and reinstalled the latest beta (ConTeXt ver: 2011.08.23 13:04 MKIV fmt: 2011.8.23 int: english/english). No joy at all…so anyone else using Lion? Thanks Ian On 12 Aug 2011, at 11:45, Ian Lawrence wrote: That was very kind of you, and I'd like to buy you a beer, even though your example seemed to be much more complex than mine. I assume your example ought to run 'out of the box' by just issuing the commend 'context relabs'. So I did, and what I got for my trouble was the following pdf (OK, so there was more white space, but this was all the content). Wolfgang.pdf There's not much to guide me in the log file ( the only not found was : files readfile asked name: 'loc', not found), but context (ConTeXt ver: 2011.08.04 00:42 MKIV fmt: 2011.8.12 int: english/english) seems not to have found the component text, or the graphic…. So far I have lost days to this…and I'm afraid I'm none the wiser now. But I do appreciate the effort. Thanks. On 12 Aug 2011, at 08:25, Wolfgang Schuster wrote: Am 12.08.2011 um 07:52 schrieb Ian Lawrence: So here is the simplest example I could manage… […] I show you how it’s done without problems on a simple example. All your files are in directory with the two subfolders “tex” for for subparts of your document and “graphic” for figures. relabs.tex relabs-environment.tex tex/pickedup.tex graphics/pic.pdf The content (i attached all files) of the tex-files is: file name=relabs.tex \startproduct relabs \environment relabs-environment \section{Graphic} \placefigure[force] {A Graphic} {\externalfigure[pic]} \section{File} \component pickedup \stopproduct /file file name=relabs-environment.tex \startenvironment relabs-environment \doifmodeelse{*product} {\setupexternalfigures[directory={graphics}]} {\setupexternalfigures[directory={../graphics}]} \usepath[tex] \stopenvironment /file file name=pickedup.tex \startcomponent pickedup \environment relabs-environment \subsection{Text} \input knuth \subsection{Graphic} \placefigure[force] {Another graphic} {\externalfigure[pic]} \stopcomponent /file I used product and component because you can now set different figure paths for both files. When you process the product context should search in the “graphic” folder which is in the same folder but when you process the component context should first go into the parent folder and then look in “graphics”. For the inclusion of files you can specify with “\usepath” where context should look and all you need as argument for \component is the name of the file. Wolfgang test.zip___ 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] beta
Back on topic... In starting out we often want to write out the units in full - that is the words, not the abbreviations. any chance of implementing these? At the moment I have (crudely, I suspect) a large number of definitions of the kind \define\metre{\;{\tf m}} \define\metrew{\;{\tf metre}} \define\kilometre{\;{\tf km}} \define\kilometrew{\;{\tf kilometre}} \define\millimetre{\;{\tf mm}} \define\millimetrew{\;{\tf millimetre}} \define\centimetre{\;{\tf cm}} \define\centimetrew{\;{\tf centimetre}} Which is *my way* of getting what I wanted - prior to this upgrade... Ian ___ 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] Ideas for restructuring the ConTeXt garden?
Well, I am a beginner. I have just lost 2 hours trying to do something which ought to be simple. Perhaps now I have spent 10's of hours working at my understanding, yet still I have to look up the simplest essentials, often. And I think knowing what kind of things it is, and where one might look are necessary lubricants for this process. I think you probably cannot have too many (documented) examples. Things which are very obvious to some , are not so obvious to others. And if too much has to be done by trial and error then everything is very slow... Very very slow. For me, there is too much that is cryptic in the Wiki. Often I read the entry and am no wiser. Each word is well formed, but there is no mental model emerging. Maybe a wiki is good place for archiving, curating and exchanging tips, but just not so good for learning from scratch. The 'Starting with Context' pdf I find very good, but for later work all kinds of things are 'bad style', 'deprecated' etc. So maybe a way in to thinking about what to do is to consider how the newer user might get a handle on what Context is really for, and why one might prefer it to manually typesetting documents... Kind regards Ian 2011/3/16 Vedran Miletić riva...@gmail.com: 2011/3/14 Carlos Breton Besnier breton.car...@gmail.com 2011/3/12 Florian Wobbe florian.wo...@awi.de Maybe we should start a discussion in a new thread to find out: 5) how to better promote context to new/latex users? I think is needed a installation guide for non-technical. A guide not only for programmers but a simple guide for dummies. Like me, I am no-developer, I write law books. Latex installation and update is very simple for beginners. On Windows with MiKTeX, everyone can write very soon his first document. Not so with ConTeXt, except old stand-alone installation. It's cause of frustration and after several attempts they give up. Then they return to LaTeX (like me too). Well, with TeX Live 2010 it's very simple to use MkII with both pdfTeX and XeTeX. Hopefully, some future version of TeX Live (2011?) will offer the same for MkIV. Script is already there, it's just not integrated with TeXworks in TeX Live yet. Regards, Vedran Miletić ___ 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] Layers again
I have a layer that I'd like to appear on some pages but not others, and for which I'd like to switch the content by page. (I need the layer to precisely and reliably locate some graphics. However, as I see it, you can only set the visibility of a layer in \definelayer, \setupbackgrounds - and these ought to preceed \starttext Any pointers / elegant suggestions / neat solutions? Thanks Ian ___ 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] Layers again
Thanks, as every. More information - I hope without overload. I was trying to make a test suite... And failed depressingly... I have a series of swf files that I'd like to position in exactly the same location on a page. Not all pages will have an swf on them. The swf will be specific to that page. Now I think need a layer to be able to position exactly - that is so many pixels in and down from the top ('Paper' size is 1024 by 768) - I don't know how to do this with overlays, and it seems to me that the documentation suggests that layers are made for this job: So I write: \definepapersize[Screen][width=1024px,height=768px] \setuppapersize[Screen][Screen] \definelayer[SPTinteractivemedium] % name of the layer [x=359px, y=140px, % from upper left corner of paper width=642px, height=492px, repeat=yes] % let the layer be large enough for the med swf And then \setupbackgrounds[page][state=page,background={SPTinteractivemedium}] Then i the text I write \starttext Hello world, etc \setlayer [SPTinteractivemedium] % name of the layer [hoffset=0px, voffset=0px,] % placement (from upper left corner of the layer) {\externalfigure [plug][width=200px]} % the actual contents of the layer But when I get to a new page I'd like to be able to change that plug, or even have the layer blank So \page[yes] \setlayer [SPTinteractivemedium] % name of the layer [hoffset=0px, voffset=0px,] % placement (from upper left corner of the layer) { \externalfigure [dummy][width=100px]} % the actual contents of the layer And; \page[yes] \setlayer [SPTinteractivemedium] % name of the layer [hoffset=0px, voffset=0px,] % placement (from upper left corner of the layer) { \externalfigure ??? } % HOW TO SET THE \externalfigure to NOTHING, or hide the layer? It seems this ought to be easy, but I tried guessing a 'state=page' parameter in \setlayer... And trawling wiki, manuals. No joy. I might try changing the backgrounds on a page by page basis, but this seems inelegant, as the \setups ought to be before the \starttext..? On 26 April 2011 13:35, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 26.04.2011 um 12:33 schrieb Ian Lawrence: I have a layer that I'd like to appear on some pages but not others, and for which I'd like to switch the content by page. (I need the layer to precisely and reliably locate some graphics. However, as I see it, you can only set the visibility of a layer in \definelayer, \setupbackgrounds - and these ought to preceed \starttext Any pointers / elegant suggestions / neat solutions? A better solution requires more information from you! \definelayer[test] \startsetups[test] \doifinset{\pagenumber}{1,3,7,10}{\setlayer[test][x=3cm,y=7cm]{\ssd Test: \test}} \stopsetups \setupbackgrounds[page][background=test,setups=test] \starttext \dorecurse{12} {\def\test{\convertnumber{A}{\recurselevel}}% \dontleavehmode\page} \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 ___ ___ 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] Layers again
OK, now maybe I get it. This might help someone... It's the **contents** of the layer that get repeated if you set repeat=yes in \definelayer - as in http://wiki.contextgarden.net/Layers If you do a \setlayer then this simply adds to the existing stack of contents displayed on the layer. You get more and more stuff until you do a \resetlayer, assuming you set repeat=yes in the \definelayer. Thus(?) \definelayer is all about the contents of the layer (? Apart from setting the dimensions and so on... I think that's what deflected me into thinking that this command was about the canvas, and the \setlayer about the contents.) The \setupbackgrounds[page][state=repeat,background={XXX}] is the command that puts the logical layer on each page. If this seems about right then I'll have a go at adding a sentence or two to the wiki...maybe on-one else thinks of it in terms of the existence and then the population of a layer...? On 26 April 2011 17:44, Hans Hagen pra...@wxs.nl wrote: On 26-4-2011 6:26, Ian Lawrence wrote: But when I get to a new page I'd like to be able to change that plug, or even have the layer blank that happens automatically unless the state of the layer is set to 'repeat' so normally, once a layer is placed its content is forgotten \page[yes] \setlayer [SPTinteractivemedium] % name of the layer [hoffset=0px, voffset=0px,] % placement (from upper left corner of the layer) { \externalfigure [dummy][width=100px]} % the actual contents of the layer And; \page[yes] \setlayer [SPTinteractivemedium] % name of the layer [hoffset=0px, voffset=0px,] % placement (from upper left corner of the layer) { \externalfigure ??? } % HOW TO SET THE \externalfigure to NOTHING, or hide the layer? \resetlayer [SPTinteractivemedium] I might try changing the backgrounds on a page by page basis, but this seems inelegant, as the \setups ought to be before the \starttext..? - 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] writing physical quantities in maths mode
Morning all, I have a need to write a lot of physical quantities - these should be in text mode. Mostly I can manage, but subscripts are causing me grief Eg \startformula \startmathalignment[n=3] \NC \text{F}\NC =\NC {\text{GMm} \over \text r^2}\NR \NC \text {force}_G \NC =\NC {\text{G} \times \text m_1 \times \text m_2 \over \text r^2}\NR \NC \text {force \low G} \NC =\NC {\text{G} \times \text m_1 \times \text m_2 \over \text r^2}\NR \stopmathalignment \stopformula In the second and third equantions I'd like force subscript G all in roman, not italic, to follow the standard conventin. The first one puts the G in the correct place, but in italic The second one manages roman, but it's offset. I suspect I could kludge this with hskips, but I think there should be a more elegant solution. If there is a paper on writing physics in ConTEXt (not maths... I have found the helpful couple by Aditya Mahajan) that would save me time. For most relationships I am planning to use predefine quantities, then slot these in Like this in the header \define \forceQA {{\sl F}/\Newton} \define \forceQU {{\tf force}/{\tf newton}} \define \forceQ {{\tf force}} (etc) And this in the body \startformula {\forceQA \over \massQA} = \accelerationQA \stopformula \startformula {\forceQU \over \massQU} = \accelerationQU \stopformula \startformula {\forceQ \over \massQ} = \accelerationQ \stopformula Any more elegant solutions out there? Thanks Ian ___ 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] A question about data types?
Sorry. me again...and I have been all over the wiki, mailing lists and manuals... I have this: \setlayer [progresssteps] % name of the layer [hoffset=904 px, voffset= 28\nuggetnumber px] % placement (from upper left corner of the layer) {\stepstack} % the actual contents of the layer And I am hoping that as I increase nuggetnumber the voffset of the layer will be 28*nuggetnumber I am setting nuggetnumber like this for the moment: \def \nuggetnumber{3} (in the other dev document it is the result of counter, so set dynamically) and this in the text \nuggetnumber which compiles to '3', so I assume the assignment is good to go. varying both nuggetnumber and the scale factor (28) shift the layer up and down, but not in a way that suggests that 28\nuggetnumber is being evaluated as a product (so a scale factor of 7 and a nuggetnumber of 2 do not give the same output as a scale factor of 2 and a nuggetnumber of 7). So I am led to think that there is something in the evaluating that is going wrong - data types / units? (if I hard code in the results I am expecting, say 28 px, 56 px or 84 px then I get exactly what I want... Thanks, as ever (Same result in ConTEXt ii or iv) Ian ___ 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] A question about data types?
Thank you both. I got as far as \dimexpr (expressions) page in the Wiki, and all the words made sense, more or less, but not the whole. In case anyone else find this useful, I have success with Wolfgang 2 and 3, with (2) being the simplestbut that may just be the fit to my brain. It's building stacked progress bars for documents with subsections, in case anyone searches this- colours and prettification to follow! Ian On 2 March 2011 11:41, Wolfgang Schuster schuster.wolfg...@googlemail.comwrote: Am 02.03.2011 um 12:25 schrieb Ian Lawrence: Sorry. me again...and I have been all over the wiki, mailing lists and manuals... I have this: \setlayer [progresssteps] % name of the layer [hoffset=904 px, voffset= 28\nuggetnumber px] % placement (from upper left corner of the layer) {\stepstack} % the actual contents of the layer And I am hoping that as I increase nuggetnumber the voffset of the layer will be 28*nuggetnumber Variant 1: \newdimen\baseoffset \baseoffset=28px \setlayer[…][voffset=4\nuggetnumber]{…} Variant 2: \def\nuggetnumber{4} \setlayer[…][voffset=\dimexpr28px*\nuggetnumber\relax]{…} Variant 3 (what i suggest): \definemeasure[baseoffset][28px] \definemeasure[verticaloffset][\dimexpr\measure{baseoffset}*4\relax] % replace “4” with your own factor \setlayer[…][voffset=\measure{verticaloffset}]{…} 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 ___ attachment: mini-menus.png___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Numbering again..
Sorry...Again I am stumped. I have a counter that I'd like to reset \newcounter \nuggetnumber \def \numberofnuggets{0} \definehead [nugget] [section] \setuphead [nugget] [number=yes,page=yes, before=\increment \nuggetnumber, after=\savecurrentvalue \numberofnuggets{\countervalue{nuggetnumber}},] % LO as nugget This counts the number of nuggets.. and seems to work fine. But when it gets to an episode it should resetso, maybe like this \definehead [episode] [title] \setuphead [episode] [numberstyle=bold, textstyle=cap, number=yes,before=\resetnumber[nuggetnumber]] % may be used But \resetnumber[nuggetnumber], where-ever I put it seems to have no impact. I think the Wiki suggests that it should, and the mailing list back catalogue and the manual shed no light on the matter while I am at it, I am equally unsure how to reset the numberofnuggets accumulator, which should also be done on meeting the episode structural element - I'd like to insert a whole chain of commands in the before=...' Thanks Ian ___ 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] Work available
Hi all, I think for the sake of my sanity I am going to stop building prototypes now. I am very grateful to those who have been very helpful along the way, answering what must have seemed like foolish questions. I'd have to say that getting to grips with Context has taken longer than I bargained for, and has not been as smooth as I hoped. But without you, collectively, extreme frustration would have kicked in long ago. I am based in the UK and have a moderate budget to develop some frameworks in which to publish a series of documents that'll be up for being maintained. This will be the third iteration for some of the collection, which have appeared on CD-ROM in a Macromedia shell, then as rich pdfs with an InDesign - Acrobat Pro workflow. Now, maybe, they'll find a final home in Context, at least for the pdf versions. There are two pieces of work, I think, requiring different skill sets, I think. 1) To build some context templates, using modes and layers to give me the ability to produce pdfs of varying 'heft' by switching in and out layers. What people might read on a smartphone / iPad ought to be different to what they might get on a fast desktop / laptop running Acrobat, so permitting embedded swfs. The text is already highly structured and the trick will be to implement a document that automates much of what must be done by hand in InDesign, and to fully exploit the facilities in Context. 2) (This might be some heavy lifting, so may be best thought of separately). To build the wherewithal to allow rich swfs to be placed in the resulting pdfs by Context, at their natural size and at a specified location, and loading in poster frames and directories of assets where these exist (for which you currently have to use Acrobat Pro). It is possible that I could, eventually manage the first, but I'd expect someone with a history of working on Context to do a much more elegant, clean and maintainable job. The second task is will need some cunning coding in Lua, or equivalent, I expect. Anyone interested, please contact me off list, where we can discuss further details. I am at: Ian.Lawrence at Physics.org Two notes: Since the work is on behalf of the right kind of organisation, I'd anticipate putting the results of (2) back into the community - that's what we're doing with our other 'engine' (Flash) development. It'll be easiest for my finance department if you are a consultant or business that can raise invoices. kind regards Ian ___ 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] Screen document design
So many things I am only vaguely aware of! But I think that pixels are a) undocumented b) work And I'm pretty sure i'll put both (ignorant) feet in it in trying to add something to the Wiki... Greetings from the grey England.. Ian On 24 February 2011 13:32, Henning Hraban Ramm hra...@fiee.net wrote: Am 2011-02-24 um 11:34 schrieb Marco: On 2011-02-24 Ian Lawrence physics.roo...@gmail.com wrote: Thanks for taking the trouble for what was really simple, but seems undocumented (?) Some other units: mm Millimetres cm Centimetres in Inches em em width, depends on the font ex ex height, depends on the font pc Picas (1pc = 12pt) pt Points (1in = 72.27pt) There’s also bp (big points). We have the difference between TeX points (pt) and PostScript points (bp) in ConTeXt like in every other TeX: 1 pt = 1/72,27 in = 0,3515 mm (traditional American printer’s point) 1 bp = 1/72 in = 0,3528 mm (after the Anglo-Saxon compromise inch of 1959 = 25.4 mm) (1 Didot point, traditionally used in Europe, was 0,376 mm) See also http://en.wikipedia.org/wiki/Point_(typography) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context 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] Interaction menu in layer
morning... Is it possible to put the interactionmenu in a layer to position it? Thanks Ian ___ 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] Screen document design
Morning all, Quick question. I want to design a screen document at 1024 by 768 pixels, so ideally work in pixels as units, and not mm / cm. I know pdfs are scalable and about \setuppapersize[S6][S6], but I'd prefer to work in pixels (I have swfs / images to embed, and these come in x by y pixels). Anyone have an easy answer? ...nothing I have found in the selection of downloadable documentation or on the wiki suggests that it is possible... Thanks Ian ___ 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] Screen document design
Thanks for taking the trouble for what was really simple, but seems undocumented (?) It does, and then all the offsets etc, seem to work in pixels as well. eg. \definelayer [topmatter] % name of the layer [x= 0 px, y=20 px, % from upper left corner of paper width=\paperwidth, height=\paperheight] % let the layer cover the full paper Ian On 24 February 2011 09:47, luigi scarso luigi.sca...@gmail.com wrote: On Thu, Feb 24, 2011 at 10:40 AM, Ian Lawrence physics.roo...@gmail.com wrote: Morning all, Quick question. I want to design a screen document at 1024 by 768 pixels, so ideally work in pixels as units, and not mm / cm. I know pdfs are scalable and about \setuppapersize[S6][S6], but I'd prefer to work in pixels (I have swfs / images to embed, and these come in x by y pixels). Anyone have an easy answer? \definepapersize[Screen][width=1024px,height=768px] \setuppapersize[Screen][Screen] You should check if it's ok, I'm not sure. -- 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] Speech bubbles
Thanks Wolfgang.. In case there are any others who are in need.. Here is one with curvy speech bubbles, left and right, and wrapped up so they don't overhang any text. __ \startuseMPgraphic{speechL} z1 = (0.25cm,0) ; z2=(1 cm,0) ; z3 = (0,-1cm) ; z4 = (2cm,0);z5 = (OverlayWidth-0.25cm,0) ; z6 = (OverlayWidth,0.25cm) ; z7 = (OverlayWidth,OverlayHeight-0.25cm) ; z8 = (OverlayWidth-0.25cm,OverlayHeight) ; z9 = (0.25 cm,OverlayHeight);z10=(0,OverlayHeight-0.25cm) ; z11=(0,0.25cm) ; path p ; p = z1--z2{down}..{dir 270}z3{dir 30}..{dir 70}z4--z5{right}..{up}z6--z7{up}..{left}z8--z9{left}..{down}z10--z11{down}..{right}z1--cycle ; fill p withcolor blue ; draw p withpen pencircle scaled 1 ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \startuseMPgraphic{speechR} z1 = (0.25cm,0) ; z2=(5 cm,0) ; z3 = (7cm,-1cm) ; z4 = (6cm,0);z5 = (OverlayWidth-0.25cm,0) ; z6 = (OverlayWidth,0.25cm) ; z7 = (OverlayWidth,OverlayHeight-0.25cm) ; z8 = (OverlayWidth-0.25cm,OverlayHeight) ; z9 = (0.25 cm,OverlayHeight);z10=(0,OverlayHeight-0.25cm) ; z11=(0,0.25cm) ; path p ; p = z1{left}..{up}z11--z10{up}..{right}z9--z8{right}..{down}z7--z6{down}..{left}z5--z4{down}..{dir 270}z3{dir 150}..{dir 110}z2--cycle ; fill p withcolor blue ; draw p withpen pencircle scaled 1 ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[speechL][\useMPgraphic{speechL}] \define [1] \speechbubbleL {\blank \framedtext[frame=off,background=speechL, width=7cm]{#1} \blank[1 cm]}] \defineoverlay[speechR][\useMPgraphic{speechR}] \define [1] \speechbubbleR {\blank \framedtext[frame=off,background=speechR, width=7cm]{#1} \blank[1 cm]}] \starttext Some text \speechbubbleL {'Who needs highlighter pens, anyway?'} If all three are satisfied then then sound radiates from the source to the detector. The source-medium-detector model was central to the model of sound. The vibrations, because of their nature, travel as variations in physical density, so rely on a medium made of particles connecting the source to the detector. Other vibrations, very similar in nature, could still travel out from the source, but not be detected. \speechbubbleR {They could be above or below the frequency we can hear, so called infra-sound or ultra-sound, or the amplitude could be just too small: so not enough power in the radiating pathway for the detector to respond.} More and more dog latin for beginners.. And so on.. And so on \stoptext __ Sorry the metapost is not parameterised...I should have variables in to set up the offsets and curvature of the corners. But I have not go that far yet...my floor is only a little higher, thanks to Wolfgang. On 3 Feb 2011, at 08:39, Wolfgang Schuster wrote: Am 02.02.2011 um 18:12 schrieb Ian Lawrence: Evening all: Has anyone got a nicer \speechbubble definition up their sleeve? Here is not-nice one, so you know the floor: \define [1] \speechBubble {\blank \framed [width=.6\textwidth ,autowidth=force,align={flushleft}, background=color, backgroundcolor=darkblue, foreground=color, foregroundcolor=white, frame=off,corner=0,backgroundoffset=5pt,] {#1} ~~~ \tfd \startcolor[darkblue]{'} \stopcolor \tfa \blank} Called with things like: \speechBubble {They could be above or below the frequency we can hear, so called infra-sound or ultra-sound, or the amplitude could be just too small: so not enough power in the radiating pathway for the detector to respond.} I guess there are some people with xs metapost skills out there... But is there as simple way to get a nice curved pointer left or right from the bottom of that rounded rectangle frame? \startuseMPgraphic{speechbubble} z1 = (0,0) ; z2 = (OverlayWidth,0) ; z3 = (OverlayWidth,OverlayHeight) ; z4 = (0,OverlayHeight) ; 1/2[x1,x2] = x8 + 2cm = x7 + 1cm = x9 - 1cm ; y7 = y9 = 0cm ; y8 = -2cm ; path p ; p = z1--z7--z8--z9--z2--z3--z4--cycle ; fill p withcolor blue ; draw p withpen pencircle scaled 5 ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay[speechbubble][\useMPgraphic{speechbubble}] \starttext \framedtext[frame=off,background=speechbubble]{\input ward } \blank[4cm] \framedtext[frame=off,background=speechbubble,width=6cm]{\input 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 ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg
[NTG-context] Speech bubbles
Evening all: Has anyone got a nicer \speechbubble definition up their sleeve? Here is not-nice one, so you know the floor: \define [1] \speechBubble {\blank \framed [width=.6\textwidth ,autowidth=force,align={flushleft}, background=color, backgroundcolor=darkblue, foreground=color, foregroundcolor=white, frame=off,corner=0,backgroundoffset=5pt,] {#1} ~~~ \tfd \startcolor[darkblue]{'} \stopcolor \tfa \blank} Called with things like: \speechBubble {They could be above or below the frequency we can hear, so called infra-sound or ultra-sound, or the amplitude could be just too small: so not enough power in the radiating pathway for the detector to respond.} I guess there are some people with xs metapost skills out there... But is there as simple way to get a nice curved pointer left or right from the bottom of that rounded rectangle frame? ___ 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] embedding swfs in pdfs
Any experts out there - with access to code (or the ability to assemble such code) that can do what acropro ( advanced options) offers on embedding swfs? -load in swf at x,y location relative to a fixed 1026 by 768 px background -set size correctly (native size of swf) -set poster frame (provided at fixed location) -load in a folder or directory full of assets (several subfolders are involved) -set up the launch settings for the swf So needs more than InDesign CS5 currently offers. Not just loading in a freestanding swf movie clip. THX Ian ___ 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] embedding swfs in pdfs
Hi Luigi, I found your stuff on context garden...looks like a sound start. I'm really interested in getting external swfs loaded in. I have both some legacy 'sealed unit' swfs where everything is all in one file, and some still being built, which have the assets external. simple/ sealed (~ several hundred, probably): https://spt.box.net/shared/static/xmz4vh0k4l.swf with assets (~75 of these): http://supportingphysics.org/spt/temp/SPT_14-16_Ra_01_PN_LE12_04_MakingaLens.swf The former are of varying dimensions, the latter are all one size - and yes, it still has (conceptual) errors in it. So I have plenty of real-life examples. I think the swfs with assets will be a tough one to crack... On 2 Feb 2011, at 20:53, luigi scarso wrote: On Wed, Feb 2, 2011 at 9:44 PM, Ian Lawrence physics.wande...@gmail.com wrote: Any experts out there - with access to code (or the ability to assemble such code) that can do what acropro ( advanced options) offers on embedding swfs? -load in swf at x,y location relative to a fixed 1026 by 768 px background -set size correctly (native size of swf) -set poster frame (provided at fixed location) -load in a folder or directory full of assets (several subfolders are involved) -set up the launch settings for the swf I've done something http://meeting.contextgarden.net/2010/talks/2010-09-17-luigi-flash/ but I need more samples -- 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 ___
[NTG-context] Layer(s)
Morning, I am completely defeated by layers...from a more or less complete beginner.. So please be gentle. I think you ought to be able to have multiple layers and so to switch them on and off, using modes. However I can only find examples and documentation for single layers in use at any one time. If this is true then I can also see that there ought to a parameter that sets the stacking order of the layer... So I think I need to know about \setuplayer (just guessing) But: http://wiki.contextgarden.net/Command_Syntax/Missing#layer_commands So if any one of you kind people can help with the missing syntax, or a **simple example** of a multiple layered document, I'd be grateful. Thanks Ian___ 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 ___