Re: [NTG-context] Metapost/Metafun Q: using variables and building blocks?
On Mon, Apr 23, 2012 at 9:04 PM, Hans Hagen pra...@wxs.nl wrote: beware, metapost is addictive once you get better in it, It is. :-) This one is to both you and Peter, because your snippets together helped me adjust from WYSIWYG vector graphics to MetaPost - not that I'm that far yet, but I understand a lot more than I did. http://www.lucet.fi/textiles/ The fingerloop braiding patterns are still under construction, but I think I now know a lot better what I need to do there. And my fingerloop braiding suite idea was well received, so it looks like ConTeXt will be present at Braids 2012 in August (http://www.braidsociety.com/confer.htm); not as a talk, but as finished materials, in poster form and, obviously, on my computer. (btw, a talk about this will fit nicely in the upcoming eurotex theme) I think I already happened to promise that to Taco... I guess the title of my talk is now TeXtile craft or TeXtiles or something like that. You still time to make a wish or two. :-) Definitely hooked on MetaPost, Mari ___ 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] Metapost/Metafun Q: using variables and building blocks?
PS. I got this link from a friend who'd struggled with an event registration system, but it SO applies to my MetaPost project: http://www.howtogeek.com/102420/geeks-versus-non-geeks-when-doing-repetitive-tasks-funny-chart/ (Scary, I seem to count as geeknow...) ___ 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] Metapost/Metafun Q: using variables and building blocks?
On Sun, May 6, 2012 at 10:53 AM, Mari Voipio mari.voi...@iki.fi wrote: http://www.lucet.fi/textiles/ ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is not open source software, Hm, I'm not sure that it's correct. -- 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] Metapost/Metafun Q: using variables and building blocks?
Am 06.05.2012 um 11:16 schrieb luigi scarso: On Sun, May 6, 2012 at 10:53 AM, Mari Voipio mari.voi...@iki.fi wrote: http://www.lucet.fi/textiles/ ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is not open source software, Hm, I'm not sure that it's correct. ConTeXt is licensed under the GPL, you can find the information in this document: http://pragma-ade.com/general/manuals/mreadme.pdf 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 ___
[NTG-context] bug with \setupnotation[number=no] and sectioning commands
Hi there, I'm afraid that note numbering in body text is wrong in latest beta (the bug was also in previous beta). Here you have a sample that shows the bug: \setupnotation[footnote][number=no] \setuphead[chapter][number=no] \starttext \chapter{First chapter} one\footnote{two} \section{First section} three\footnote{four} \stoptext There should be no note numbering, but the body text takes the sectioning command number for the footnote references (which is obviously wrong). Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] Metapost/Metafun Q: using variables and building blocks?
On Sun, May 6, 2012 at 11:56 AM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 06.05.2012 um 11:16 schrieb luigi scarso: On Sun, May 6, 2012 at 10:53 AM, Mari Voipio mari.voi...@iki.fi wrote: http://www.lucet.fi/textiles/ ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is not open source software, Hm, I'm not sure that it's correct. ConTeXt is licensed under the GPL, you can find the information in this document: http://pragma-ade.com/general/manuals/mreadme.pdf yes I know: another useful link is http://en.wikipedia.org/wiki/Talk:ConTeXt I think we can say that, at least today, ConTeXt is not open source software is wrong, but maybe there are older versions for which this statement is still true. -- 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 ___
[NTG-context] change the page number
Hi, how do I change the page number? In april and may versions it does not work anymore: \setuppagenumber[number=5]% no effect \setuprealpagenumber[number=5]% no effect \setuppagenumber[number=5]% no effect %\setupuserpagenumber[numberconversion=Romannumerals]% works OK! \starttext \dorecurse{3}{\input tufte\page} %\setupuserpagenumber[numberconversion=numbers]% works OK! \dorecurse{3}{\input ward\page} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] change the page number
Am 06.05.2012 um 12:30 schrieb Steffen Wolfrum: Hi, how do I change the page number? In april and may versions it does not work anymore: \setuppagenumber[number=5]% no effect \setuprealpagenumber[number=5]% no effect \setuppagenumber[number=5]% no effect \setcounter[userpage][5] 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 ___
Re: [NTG-context] Metapost/Metafun Q: using variables and building blocks?
On Sun 06 May 2012, Wolfgang Schuster wrote: Am 06.05.2012 um 11:16 schrieb luigi scarso: On Sun, May 6, 2012 at 10:53 AM, Mari Voipio mari.voi...@iki.fi wrote: http://www.lucet.fi/textiles/ ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is not open source software, Hm, I'm not sure that it's correct. ConTeXt is licensed under the GPL, you can find the information in this document: http://pragma-ade.com/general/manuals/mreadme.pdf There was previous discussion and clarification on this at http://tex.stackexchange.com/questions/12431/using-context-commercially and http://archive.contextgarden.net/message/20110301.213750.c7a55835.en.html . Pont ___ 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] Complexeslide module
Hi all, In some of the lasts Aditya's posts, one can understand that some work is already done on a new module: complexeslide. Is there any information about this new module: goal (beamer like?), actual state, roadmap... Thanks. -- Romain Diss romain.d...@yahoo.fr ___ 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] Metapost/Metafun Q: using variables and building blocks?
On 6-5-2012 13:33, Pontus Lurcock wrote: On Sun 06 May 2012, Wolfgang Schuster wrote: Am 06.05.2012 um 11:16 schrieb luigi scarso: On Sun, May 6, 2012 at 10:53 AM, Mari Voipiomari.voi...@iki.fi wrote: http://www.lucet.fi/textiles/ ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is not open source software, Hm, I'm not sure that it's correct. ConTeXt is licensed under the GPL, you can find the information in this document: http://pragma-ade.com/general/manuals/mreadme.pdf There was previous discussion and clarification on this at http://tex.stackexchange.com/questions/12431/using-context-commercially and http://archive.contextgarden.net/message/20110301.213750.c7a55835.en.html . In the past (previous century, first releases) there hqad been some restrictions (i've forgotten which) that had to do with the fact that a third party was using context for a project and that we got notice that lawyers of that company would claimed copyright of context because it had become part of their workflow ... so, we had to make sure that by making context public it could not be used against us (like: we take context, add a few lines, and now it's ours). Then someone convinced us that people who 'd do such things would probably get themselves outcast from any community anyway, i.e. that there is some protection is being part of the tex community. I think that there are still some recomendations with respect to not using the same filenames for patched files (simply because tex is always a large file infrastructure and we don't want to be bothered with support for such patched). AFAIK that is not much different than with latex. Anyhow, license discussions are mostly wasted on me. 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] Metapost/Metafun Q: using variables and building blocks?
2012/5/6 Hans Hagen pra...@wxs.nl: (btw, I always wonder if the gpl restrictions also apply to the makers too ... i.e. if I extend context for a project should I then also make those extensions public ... quite a hassle if that would be true.) The copyright holders are free to use any license. So we have the free ConTeXt used by anybody but Pragma and the non-free version sold by Pragma to its customers. https://en.wikipedia.org/wiki/Dual_license Best Martin ___ 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] Metapost/Metafun Q: using variables and building blocks?
On 6-5-2012 14:53, Martin Schröder wrote: 2012/5/6 Hans Hagenpra...@wxs.nl: (btw, I always wonder if the gpl restrictions also apply to the makers too ... i.e. if I extend context for a project should I then also make those extensions public ... quite a hassle if that would be true.) The copyright holders are free to use any license. So we have the free ConTeXt used by anybody but Pragma and the non-free version sold by Pragma to its customers. https://en.wikipedia.org/wiki/Dual_license Ok. Not that we ever sold something (if needed we install it as part of a service). Of course we do make non public styles but I suppose that a 'free' context user can do that as well. 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] Metapost/Metafun Q: using variables and building blocks?
On Sun, May 6, 2012 at 3:47 PM, Hans Hagen pra...@wxs.nl wrote: http://www.lucet.fi/textiles/ Best change that in: ConTeXt, developed by the Dutch company Pragma Advanced Document Engineering, is open source software and avaliable as stand alone distribution (www.contextgarden.net) and is also part of regular tex distributions (like texlive). OK, done. And I added some more stuff that I forgot originally. Don't know if I should split the page into smaller units - but somehow I feel that those who'll be interested in it, are capable of reading more than one screenful. We'll see what this turns into. Today I used my new skills with frames and the Lucida OT Handwriting to create insides for a Mother's Day card as I needed something that is exactly the right size. :-D Thank you, Mari ___ 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] Complexeslide module
On 2012-05-06 Romain Diss romain.d...@yahoo.fr wrote: In some of the lasts Aditya's posts, one can understand that some work is already done on a new module: complexeslide. Is there any information about this new module: goal (beamer like?) Beamer like?? No. Much better :) actual state, roadmap... You can follow the code at bitbucket: https://bitbucket.org/adityam/complexslides/overview It still seems to be in a very early stage. But the ideas look very promising. 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 ___
Re: [NTG-context] Complexeslide module
On Sun, 6 May 2012, Marco wrote: On 2012-05-06 Romain Diss romain.d...@yahoo.fr wrote: In some of the lasts Aditya's posts, one can understand that some work is already done on a new module: complexeslide. Is there any information about this new module: goal (beamer like?) Beamer like?? No. Much better :) In all honesty, it is much more limited than Beamer. actual state, roadmap... You can follow the code at bitbucket: https://bitbucket.org/adityam/complexslides/overview It still seems to be in a very early stage. But the ideas look very promising. Thomas and I have been discussing how to modularize the simpleslides module for almost two years now, complex slides incorporates some of those ideas but some details are still missing. I do use the module for my presentations, but it does not have all the features needed for Thomas's presentations. So, it is in extremely preliminary stage and the interface and the backend are bound to change. It is for that reason that I have not released it. There is no fixed roadmap. This is a very time comsuming project, and Thomas and I work on it when we get some time or an itch to scratch. So, right now there is no roadmap for release. We will be releasing parts of the module as they are ready. The first part is the visual counter module https://github.com/adityam/visualcounter which is ready to be released one I finish the documentation: https://github.com/adityam/visualcounter/blob/master/visualcounter.tex I also have a backgrounds module in mind, which will be a collection of different frame backgrounds. This can be combined with Wolfgang's annotation module to have a more flexible implementation of the beamer block environment. 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 ___
[NTG-context] context to markdown/html
Dear gang, I have a paper done in ConTeXt that I would like to put online. I _could_ manually convert my input to markdown, but I was wondering if the xml/xhtml export options could be used to accomplish the same thing. Although I have done a lot of doc-to-context conversions via pandoc (doc-odt-markdown-context) I have never needed to go the other way till now. What would you guys suggest? Is there a way to convert context's xml/xhtml to markdown? (Note that I know little about html, css etc). One thing (bug?) I have noticed: bibliographic info gets lost in the backend export, so I end up with a lot of Xxxx () etc in the output. Isn't there a tmp file the export backend can access to pick up this info? Any advice appreciated and Best wishes Idris ___ 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] missing pagebreak using vim-module for typing
On 01.05.2012 19:35, Aditya Mahajan wrote: On Tue, 1 May 2012, Aditya Mahajan wrote: On Tue, 1 May 2012, Xenia wrote: Use \definetextbackground for the frame, framedtext’s are unbreakable boxes. Thanks, that works, but now the linewrapping does not work correctly (after the frame) The bad linebreaks also happen if you remove the background. I'll look into it (in any case, hypenation should be disabled, so there is a bug somewhere). Add: \startsetups linebreak \language\minusone %disable hypenation \raggedright %avoid overflow lines \stopsetups \unprotect \setupsyntaxhighlighting [setups={syntaxhighlighting@setup,linebreak}] \protect I am using your workaround and it works fine for most code-snippets. But with longer formulas, this fails. I am attaching a minimal example. (linewrap.tex ConTeXt ver: 2012.04.19 23:18 MKIV fmt: 2012.4.22 int: english/english system cont-new.mkiv loaded (/home/context/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system linewrap.top loaded system options start used options used options % runtime options files (command line driven) used options \unprotect used options % feedback and basic job control used options % handy for special styles used options \startluacode used options document = document or { } used options document.arguments={ used options } used options document.files={ used options linewrap, used options } used options \stopluacode used options % process info used options \setupsystem[inputfile=linewrap] used options \setupsystem[\c!n=2,\c!m=2] used options % modes used options % options (not that important) used options \startsetups *runtime:options used options \stopsetups used options % styles and modules used options \startsetups *runtime:modules used options \stopsetups used options % done used options \protect \endinput system options stop used options (linewrap.top) fontslatin modern fonts are not preloaded languageslanguage en is active resolversmodules loaded: 'vim' (/home/context/tex/texmf-modules/tex/context/third/vim/t-vim.tex loading Vim syntax highlighting (ver: 2012.04.18) resolversmodules loaded: 'filter' (/home/context/tex/texmf-modules/tex/context/third/filter/t-filter.mkiv loading Filter (ver: 2012.04.18) resolversmodules loaded: 'module-catcodes' (/home/context/tex/texmf-modules/tex/context/third/filter/t-module-catcodes.tex loading Module Catcodes (ver: 2011.12.17) )) resolversmodules loaded: 'syntax-highlight' (/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-highlight.mkiv loading Code syntax highlighting (ver: 2012.04.18) resolversmodules loaded: 'syntax-groups' (/home/context/tex/texmf-modules/tex/context/third/vim/t-syntax-groups.tex loading Syntax highlighting groups (ver: 2012.01.03) resolversmodules already loaded: 'module-catcodes' ) resolversmodules already loaded: 'filter' )){/home/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} fontspreloading latin modern fonts (second stage) fontstypescripts unknown: library 'loc' {/home/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map} fontsvirtual math unable to resolve name mapsfromchar fontsfallback modern rm 12pt is loaded (linewrap-temp-MATLAB-0.vimout Overfull \hbox (42.89201pt too wide) in paragraph at lines 2--2 [][][]\3modern-designsize-12pt-tt-tf-0--0 fprintf('random text random text random text: %g \n',(x_max-y_max)*z/random)[] \hbox(10.42677+4.05482)x426.78743, direction TLT .\whatsit ..\localinterlinepenalty=0 ..\localbrokenpenalty=0 ..\localleftbox=null ..\localrightbox=null .\hbox(0.0+0.0)x0.0, direction TLT .\latelua0_plib_.enhance(p:3) .\3modern-designsize-12pt-tt-tf-0--0 f .\3modern-designsize-12pt-tt-tf-0--0 p .etc. ) metapost initializing instance 'metafun' using format 'metafun' metapost loading 'metafun': /home/context/tex/texmf-context/metapost/context/base/metafun.mpiv backend xmp using file '/home/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml' pagesflushing realpage 1, userpage 1 )/home/context/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf/home/context/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf system files start used files used files 1: filename=linewrap | filetype=tex | foundname=linewrap.tex | usedmethod=filesystem used files 2: filename=cont-new.mkiv | filetype=tex | foundname=/home/context/tex/texmf-context/tex/context/base/cont-new.mkiv | usedmethod=database used files 3: filename=linewrap.top | foundname=linewrap.top | usedmethod=direct
Re: [NTG-context] context to markdown/html
On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote: I have a paper done in ConTeXt that I would like to put online. I _could_ manually convert my input to markdown, but I was wondering if the xml/xhtml export options could be used to accomplish the same thing. Why do you want to introduce markdown as an intermediate format? The exported XML can be used directly. Although I have done a lot of doc-to-context conversions via pandoc (doc-odt-markdown-context) I have never needed to go the other way till now. Pandoc has an latex reader, and it should not be too hard to write a context reader (although you end up loosing a lot of information about the structure, so it is not too useful). I had tried a proof of concept context to markdown writer by directly outputting the markdown in the pdf and converting it to text using pdftotext. I found that to be a more easily configurable way to export ConTeXt to markdown than tweaking a parser. What would you guys suggest? Is there a way to convert context's xml/xhtml to markdown? (Note that I know little about html, css etc). In one project, I used the ConTeXt export XML+custom CSS to display the results in a web-browser. For the most part it worked fine, although in some cases I had to tweak the lua code that generated the XML (mainly in order to control the conversion of images; Hans did add some support for image conversion after that). If you want more control, the best thing to do is to process the XML using xmlproc or something similar. One thing (bug?) I have noticed: bibliographic info gets lost in the backend export, so I end up with a lot of Xxxx () etc in the output. Isn't there a tmp file the export backend can access to pick up this info? Best create a minimal example to show the bug. It should be relatively simple to fix. 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] \systemparameter{n}
On 3-5-2012 19:01, Peter Rolf wrote: Hi, the system parameter 'n' is not properly set on the third run. % test.tex \starttext \ifnum\systemparameter{n}=1\relax \ctxlua{print(*** 1st run)}\fi \ifnum\systemparameter{n}=2\relax \ctxlua{print(*** 2nd run)}\fi \ifnum\systemparameter{n}=3\relax \ctxlua{print(*** 3rd run)}\fi \stoptext % A fresh run (three runs) gives *** 1st run *** 2nd run *** 2nd run from core-sys: \ifcase\directsystemparameter\c!n\relax %% 0 : unknown \or \setsystemmode\v!first % 1 : first run \or %% 2 : successive run \or \setsystemmode\v!first % 3 : first and only run \or \setsystemmode\v!last% 4 : (extra) last run \fi the run number is \systemparameter{m} 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 ___
[NTG-context] References to floats.
Dear list, Presently I am working on a book that contains many musical examples, some of them rather large (even page-filling). It is difficult to predict where they will finally be placed, at least when I do not want to spoil the layout too much by forcing every example to be placed at the point where it occurs in the .tex-file. So when dicussing an example I always refer to it with \in{ex.}{ref} and \at{page}[ref]. Sometimes however the example is placed at the same page as the text discussing it. Is there any trick to adapt the reference to this situation, so that, instead of saying, for instance, ex. 3.4 on page 12, it just says ex. 3.4, or ex. 3.4 below or even ex. 3.4 on this page? (One imagines that in the last stage of typesetting the file ConTeXt knows that the reference and the referenced float will be on the same page, but I have no clue how I could use this knowledge.) Thanks in advance for any help. Robert Blackstone ___ 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] context to markdown/html
On Sun, 06 May 2012 14:29:58 -0600, Aditya Mahajan adit...@umich.edu wrote: On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote: I have a paper done in ConTeXt that I would like to put online. I _could_ manually convert my input to markdown, but I was wondering if the xml/xhtml export options could be used to accomplish the same thing. Why do you want to introduce markdown as an intermediate format? The exported XML can be used directly. I opened the xml code in my browser, and there is zero formatting whatsoever. So it seems that something else is needed to get the formatting right for the web. Hence my thought of converting to markdown. Although I have done a lot of doc-to-context conversions via pandoc (doc-odt-markdown-context) I have never needed to go the other way till now. Pandoc has an latex reader, and it should not be too hard to write a context reader (although you end up loosing a lot of information about the structure, so it is not too useful). Yeah, I noticed the latex input reader, and there was some discussion way back about doing a context reader as well, but I did not keep up with that discussion. I had tried a proof of concept context to markdown writer by directly outputting the markdown in the pdf and converting it to text using pdftotext. I found that to be a more easily configurable way to export ConTeXt to markdown than tweaking a parser. that sounds interesting, although the Arabic text that Adobe exports from a context pdf is generally not good (something I want to look at one day). What would you guys suggest? Is there a way to convert context's xml/xhtml to markdown? (Note that I know little about html, css etc). In one project, I used the ConTeXt export XML+custom CSS to display the results in a web-browser. For the most part it worked fine, although in some cases I had to tweak the lua code that generated the XML (mainly in order to control the conversion of images; Hans did add some support for image conversion after that). Ok, so I have the .export and .css files. How do I turn them into something a browser can display correctly? How can I turn it into something I can copy and paste into, say, WordPress? If you want more control, the best thing to do is to process the XML using xmlproc or something similar. One thing (bug?) I have noticed: bibliographic info gets lost in the backend export, so I end up with a lot of Xxxx () etc in the output. Isn't there a tmp file the export backend can access to pick up this info? Best create a minimal example to show the bug. It should be relatively simple to fix. Turns out it was my fault. I saved a project as project-xml.tex but did not save the corresponding bbl file to the exact same name project-xml.bbl. So the bbl file was not read during compile. OTOH, the list of bibliography entries all run together in the xml output, with no tagging of each entry as a separate line, etc. Thanks Aditya for your help and advice, and Best wishes Idris -- Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] missing pagebreak using vim-module for typing
On Sun, 6 May 2012, Xenia wrote: \startsetups linebreak \language\minusone %disable hypenation \raggedright %avoid overflow lines \stopsetups \unprotect \setupsyntaxhighlighting [setups={syntaxhighlighting@setup,linebreak}] \protect I am using your workaround and it works fine for most code-snippets. I released a new version that incorporates this fix, so you no longer need to add this to your code. But with longer formulas, this fails. I am attaching a minimal example. Currently, breaks only occur at spaces. So, in your example, there are no good linebreaks. I released a new version that allows you some control over the linebreaks around each syntax group. You can add \setupsyntaxgroup[after={\allowbreak}] to allow a break after each syntaxgroup. If you prefer line breaks before a syntaxgroup, set \setupsyntaxgroup[before={\allowbreak}] Keep in mind that this may not result in good looking linebreaks. A better solution is to manually set linebreaks in your source code. 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] context to markdown/html
On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote: On Sun, 06 May 2012 14:29:58 -0600, Aditya Mahajan adit...@umich.edu wrote: On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote: I have a paper done in ConTeXt that I would like to put online. I _could_ manually convert my input to markdown, but I was wondering if the xml/xhtml export options could be used to accomplish the same thing. Why do you want to introduce markdown as an intermediate format? The exported XML can be used directly. I opened the xml code in my browser, and there is zero formatting whatsoever. So it seems that something else is needed to get the formatting right for the web. Hence my thought of converting to markdown. If you set \setupbackend [export=yes, xhtml=yes, css={context-export.css}, ] then the exported xhtml file should link to context-export.css file and most modern browsers render the xml correctly (at least opera, firefox, and chrome on Linux render it correctly). Ok, so I have the .export and .css files. How do I turn them into something a browser can display correctly? See above. How can I turn it into something I can copy and paste into, say, WordPress? You cannot. ConTeXt does not generate xhtml; it generate xml. The only way to convert xml to xhtml is to use a xmlproc stylesheet (or write your own xml conversion code in a programming language). 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] context to markdown/html
On Sun, 06 May 2012 16:37:18 -0600, Aditya Mahajan adit...@umich.edu wrote: If you set \setupbackend [export=yes, xhtml=yes, css={context-export.css}, ] then the exported xhtml file should link to context-export.css file and most modern browsers render the xml correctly (at least opera, firefox, and chrome on Linux render it correctly). For the attached test file, xml-bib.tex (also reproduced inline below), I get in the output xml-bib-images.css xml-bib-styles.css but no context-export.css, although the resultant xml-bib.xhtml does indeed mention all three css files. Opera will open xml-bib.xhtml without any formatting. Am I still missing something? Thanks again, Aditya! Idris xml-bib.tex \startpublication[k=Fry95, t=book, a=Fry, y=1995, s=] \author[]{Maxwell}[]{}{Fry} \title{ Money, Interest, and Banking in Economic Development} \pubyear{{1995}} \pubname{The Johns Hopkins University Press} \city{Baltimore} \stoppublication \setupbackend [export=yes, xhtml=yes, css={context-export.css}, ] \setuppublicationlist[totalnumber={},samplesize=,author={\invertedauthor}] \def \citeauthoroutpage[#1][#2]{\cite[alternative=authoryears,left={}, right={, #2)},inbetween={ (}][#1]} \starttext According to \citeauthoroutpage[Fry95][p.~38]: \startblockquote \dots a financial system is a collection of institutions that facilitate transactions between financial resources and their users, and provide support for the real sector of the economy to convert primary resources into production for final use. \stopblockquote \input zapf \startsubject[title={References}] {\tfx \setupinterlinespace{\dontleavehmode \placepublications[criterium=all]}} \stopsubject \stoptext = xml-bib.tex Description: TeX 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 ___
[NTG-context] Before I re-invent the wheel
Before I re-invent the wheel and write my own, has anybody written Mk IV-compatible typescripts for the Venturis ADF/VenturisSans ADF typefaces they wish to make available? -- Bill Meahan K8QN Cat: n; A purr-bearing mammal ___ 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] context to markdown/html
On Sun, 6 May 2012, Idris Samawi Hamid ادريس سماوي حامد wrote: On Sun, 06 May 2012 16:37:18 -0600, Aditya Mahajan adit...@umich.edu wrote: If you set \setupbackend [export=yes, xhtml=yes, css={context-export.css}, ] then the exported xhtml file should link to context-export.css file and most modern browsers render the xml correctly (at least opera, firefox, and chrome on Linux render it correctly). For the attached test file, xml-bib.tex (also reproduced inline below), I get in the output xml-bib-images.css xml-bib-styles.css but no context-export.css, although the resultant xml-bib.xhtml does indeed mention all three css files. Opera will open xml-bib.xhtml without any formatting. Am I still missing something? Thanks again, Aditya! You need to provide context-export.css file! There is an sample css file in the distribution. See export-example.{tex,css}. You can tweak it to style the resultant xml as you want. 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 ___