Re: [NTG-context] Making a verbatim file for another language
On Tue, 26 Dec 2006, [EMAIL PROTECTED] wrote: > After looking at these files a bit more closely, I decided I didn't > have a week to spare. Too much to learn and too few instructions. For > now I'm sticking with plain old black verbatim code listings. > Sometimes one has to set one's sights a little lower...! :-) Is there vim syntax file for your language? Mojca and I are working on a module which uses VIM syntax highlighting to pretty print verbatim files. It is almost release quality right now. The following features are working. You can define \defineVIMtyping [MATLAB] [syntax=matlab] and then use \startMATLAB \stopMATLAB where the result is pretty printed. A whole file can be printed using \definetypeVIMfile [typeMATLAB] [syntax=matlab] \typeMATLAB[file.m] You can select the lines of the file to print, though there is no support for showing linenumbers yet. The script is slooow, and the delay is noticable for anything close to 1000 lines. But a few 100 lines should work just fine. If you have vim and are interested in testing, you can be the first tester of the module :) Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Elevated text blocks
Hi, in the book which I'm translating there are many exercises which should be elevated. The original sets grey bars at the beginning and the end. My solutions tends to light grey background over the whole text block. Partially the exercises exceed a page. If possible they should kept as wholes. What is the suitable logical isolation of these blocks in context? Framedtexts? Textblocks? Gerhard -- Gerhard Kugler Psychotherapeut http://www.psychotherapie-kugler.de ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Font for enumeration
consider the following setup: \startitemize[m] \item this \item that \item the other \stopitemize this should give enumeration using oldstyle numbers. now, I have created my own typescript file that sets everything to Sabon, except the oldstyle numbers in question, which are set using computer modern's oldstyle numbers. what do I do to get the base font here? I have set up my typescript file so that {\Var[osf] 123} are set using the base fonts oldstyle numbers. -- Rolf Lindgren [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] shading with stitching functions
Mojca Miklavec wrote: > On 12/27/06, Peter Rolf wrote: >> Hi Mojca, >> >> this is also on my wishlist (and christmas is over). Currently I use >> several color gradients in a row, to simulate the same effect. But sadly >> this way is too viewer dependent (rendering is a matter of luck with >> every new version), not to mention the big size. So if there would be a >> cleaner solution, I would be a happy man. >> >> I'm willing to help, but I haven't looked into specials yet. Give me >> some time for reading and some more time for understanding... ;) > > With Hans's hint I finally got some kind of result. However, the > numbers in the stream seem to influence the colors, but not in the way > I want them to. I have to do some further explorations. Does anyone > know how to convert PS to PDF without compression? > I used \pdfcompresslevel=0 with your example code. > Btw: TikZ supports such shadings, so if you don't necessary need a > metapost graphic, you can take a look at it as well. Here's an example >>from the manual: > I need them as mp graphic, but it shouldn't hurt to look into that. > \usemodule[tikz] > \starttext > \pgfdeclarehorizontalshading{myshadingA} > {1cm}{rgb(0cm)=(1,0,0); color(2cm)=(green); color(4cm)=(blue)} > \pgfuseshading{myshadingA} > \stoptext > > (I've just found out that it uses another aproach for "sampled > functions", perhaps I'll have more chances to figure out how to > implement it that way.) > > Mojca > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] shading with stitching functions
On 12/27/06, Peter Rolf wrote: > Hi Mojca, > > this is also on my wishlist (and christmas is over). Currently I use > several color gradients in a row, to simulate the same effect. But sadly > this way is too viewer dependent (rendering is a matter of luck with > every new version), not to mention the big size. So if there would be a > cleaner solution, I would be a happy man. > > I'm willing to help, but I haven't looked into specials yet. Give me > some time for reading and some more time for understanding... ;) With Hans's hint I finally got some kind of result. However, the numbers in the stream seem to influence the colors, but not in the way I want them to. I have to do some further explorations. Does anyone know how to convert PS to PDF without compression? Btw: TikZ supports such shadings, so if you don't necessary need a metapost graphic, you can take a look at it as well. Here's an example from the manual: \usemodule[tikz] \starttext \pgfdeclarehorizontalshading{myshadingA} {1cm}{rgb(0cm)=(1,0,0); color(2cm)=(green); color(4cm)=(blue)} \pgfuseshading{myshadingA} \stoptext (I've just found out that it uses another aproach for "sampled functions", perhaps I'll have more chances to figure out how to implement it that way.) Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] ' undefined inside \startformula .. \stopformula
Aditya>>> This is a typo in math-pln.tex. The end of the file should be Hans>> this trickery is related to a change in the catcode management of Hans>> context (which interferes with some plain tex left-overs) Taco> Hans has uploaded a new version, with fix (context 2006.12.27). Just tested on my test file and it works. Thanks to all, -Sanjoy `Not all those who wander are lost.' (J.R.R. Tolkien) ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] spurious space in figurebase graphics
On 12/27/06, Peter Rolf wrote: > > BTW: Is there a way to upload some file to ConTeXt Live, so that things > like this can be tested on 'neutral ground'? It's fairly simple to add that functionality (let's say for a restricted set of file endings and a restricted file size), but: is live.contextgarden.net working at all? I guess it's been more than a month or so since I saw it working for the last time, but I cannot figure out what goes wrong from the current log (logfile on the server doesn't reveal any more information). Does anyone have any suggestions? Patrick is probably too busy to read mails. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] spurious space in figurebase graphics
Hi all, even with the today's version I get a spurious space in front of every figurebase graphic. Can someone please confirm this. I have made a small test file (7zip,38k), but it's still too big for the list. So if you are interested, please mail me off list and I send you the file. Or you can change the attached tex code from the example, so that it fits your figurebase. Thanks in advance. BTW: Is there a way to upload some file to ConTeXt Live, so that things like this can be tested on 'neutral ground'? Greetings, Peter \usemodule[fig-base] \usefigurebase[windows-xp-icons] \setupexternalfigures[directory=..] \starttext \ss Graphics from a figure database have some spurious space. \blank[big] from a database: \framed[offset=overlay]{\externalfigure[computer][width=10mm,height=10mm]} \framed[offset=overlay]{\externalfigure[computer]} from a single picture file: \framed[offset=overlay]{\externalfigure[computer_24bpp-48x48.png][width=10mm,height=10mm]} \framed[offset=overlay]{\externalfigure[computer_24bpp-48x48.png]} \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] shading with stitching functions
Hi Mojca, this is also on my wishlist (and christmas is over). Currently I use several color gradients in a row, to simulate the same effect. But sadly this way is too viewer dependent (rendering is a matter of luck with every new version), not to mention the big size. So if there would be a cleaner solution, I would be a happy man. I'm willing to help, but I haven't looked into specials yet. Give me some time for reading and some more time for understanding... ;) Greetings, Peter Mojca Miklavec wrote: > Hello, > > I'm still trying to get shading in MetaPost as the one in the attached > eps file, but I don't manage to decipher the way how other shandings > are done. > > There's a .tex file attached with a failed (hardcoded) example tries > ... but I don't know where to explore further. > > I would appreciate any hints, > Mojca > > > > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] ' undefined inside \startformula .. \stopformula
Hans Hagen wrote: >> >>This is a typo in math-pln.tex. The end of the file should be >> >>\bgroup >> \catcode`\_ = 13 >> \catcode`\' = 13 >> \doglobal\appendtoks >> \let_\activemathunderscore >> \let'\activemathquote >> \to \everymathematics %<--- was \everymath >>\egroup >> > > ok, fixed ... the _ thing is kind of weird and taco and i could not cook > up a reason why plain does/needs that ; the ' (prime) is needed > > this trickery is related to a change in the catcode management of > context (which interferes with some plain tex left-overs) Hans has uploaded a new version, with fix (context 2006.12.27). Best, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] ' undefined inside \startformula .. \stopformula
Aditya Mahajan wrote: > On Tue, 26 Dec 2006, Sanjoy Mahajan wrote: > > >> I just noticed this test file failing: >> >> \starttext >> $f'(x)$ >> \startformula >> f^\prime(x)\quad f'(x) >> \stopformula >> \stoptext >> >> It gives: >> >> ! Undefined control sequence. >> l.4 f^\prime(x)\quad f' >>(x) >> >> > > This is a typo in math-pln.tex. The end of the file should be > > \bgroup > \catcode`\_ = 13 > \catcode`\' = 13 > \doglobal\appendtoks > \let_\activemathunderscore > \let'\activemathquote > \to \everymathematics %<--- was \everymath > \egroup > ok, fixed ... the _ thing is kind of weird and taco and i could not cook up a reason why plain does/needs that ; the ' (prime) is needed this trickery is related to a change in the catcode management of context (which interferes with some plain tex left-overs) Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] shading with stitching functions
Mojca Miklavec wrote: > Hello, > > I'm still trying to get shading in MetaPost as the one in the attached > eps file, but I don't manage to decipher the way how other shandings > are done. > > There's a .tex file attached with a failed (hardcoded) example tries > but I don't know where to explore further. well, 'where' coul dbe spec-tpd, or the pdftex manual -) {\immediate\pdfobj stream attr {/FunctionType 0 /Order 1 /BitsPerSample 8 /Domain [\gMPs1 \gMPs2] /Decode [ 0 1 0 1 0 1 ] /Range [ 0 1 0 1 0 1 ] /Size [ 11 ]} {00 00 00 51 00 96 71 02 f3 8c 07 f3 a1 10 96 b4 20 00 c6 37 00 d5 57 00 e4 83 00 f2 ba 00 ff ff 00}% you can try to define a stream but then you also must maks sure that there is a corresponding length key Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] ' undefined inside \startformula .. \stopformula
Aditya Mahajan wrote: > On Wed, 27 Dec 2006, Zhichu Chen wrote: > > >> Hi Aditya, >> >> I've copied your codes and replaced the original ones with them, but I >> failed when I make the formats: >> texexec --make --all >> >> It gives me the following message: >> --- >> >> (d:\ConTeXt\usr\local\context\tex\texmf-local/tex/context/base/math-pln.tex >> ! Undefined control sequence. >> \@@toks ->\everymathematics >> >> \dodoappendtoks ->\dodoglobal \@@toks >> [EMAIL PROTECTED] [EMAIL PROTECTED] >> \the [EMAIL PROTECTED] \@@toks \the >> ... >> l.382 \to \everymathematics >> >> ? q >> OK, entering \batchmode >> > > Sorry, about that. This is because of the loading order of files. For > the time being, you can copy the definitions to cont-new.tex or to the > top of your tex file. > such temp hacks go into cont-new indeed and when ok can go into a core module > Hans, what is the proper way of getting this to work. Also append to > \everydisplay, or move the definitions to core-mat? (Or I am > completely missing the point?) everymathematics covers both inline and display math Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] \ifshellescape
Mojca Miklavec wrote: > On 12/26/06, Hans Hagen wrote: > >> core-job.tex:\ifx\pdfshellescape\undefined \else >> core-job.tex:\chardef\systemcommandmode \ifcase\pdfshellescape >> \plusone \else \plustwo \fi >> >> so \systemcommandmode is your friend >> > > What exactly is the advantage of using \pdfshellescape over \ifeof18 > as the basis of \systemcommandmode? The second one works in XeTeX as > well while the first is only good for pdfTeX, but perhaps there are > other reasons for using it. > > write 18 is a hack and pdfshellescape a sane replacement in luatex it will probably be gone completely since there we have \directlua 0 { os.execute("...") } Hans ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] pb inserting multipage documents
Le Mon, 25 Dec 2006 13:03:36 -0500, Aditya Mahajan a écrit : > Aditya Thanks for random questions url, will try it. I've played a bit with D.P Story Acrotex bundle, but I was'nt able to run IIS effectively for sending/receiving *.fdf data, and moreover, style or functions are (for me) complicated pdf commands, so I gave over. -- Olivier TURLIER CRP La Rouguière 101 Bd des Libérateurs 13367 MARSEILLE CEDEX 11 tel : (33) 04 91 18 56 00 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context