Re: [NTG-context] What happened to the ePub script?
Am 2015-01-19 um 15:48 schrieb Hans Hagen pra...@wxs.nl: On 1/17/2015 1:52 PM, Henning Hraban Ramm wrote: * How can I set the current \date in a metadata variable? (I know it’s also in the date tag of document, but I know how to format \date …) This doesn’t work (i.e. I get „\date“ in XML/XHTML): \settaggedmetadata[ version={\date} ] \the\normalyear-\the\normalmonth-\the\normalday Thanks, but that’s not the same. Not only because I get „2015-1-20“ and not „2015-01-20“. Is there a way to get „everything“ expanded within \settaggedmetadata ? * Can I influence the directory/file names of the export from within the source? E.g. if I compile „minimal.tex“, I get minimal-export and minimal-epub The —result switch doesn’t change anything. hm, honoring --result is doable but in general i'd like to keep the export quite basic and predictable (the less options the better) Ok, that means we have no influence on files names at all? * BTW: Can I set —result from within my ConTeXt source? no, because the context script also does some cleanup and checking (like not replacing the tuc file when there is an issue) (letting tex influence its own run is somewhat tricky and has limitations) Ok, would have been nice. Will write a wrapper script for my use case. Greetlings, Hraban --- http://www.fiee.net 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 ___
Re: [NTG-context] Issues in export
Am 2015-01-20 um 14:52 schrieb Henning Hraban Ramm te...@fiee.net: Ok, I’ll start a wishlist. See http://wiki.contextgarden.net/Export#Open_Issues Another issue: Quotations show up like delimited detail=quotation-1“Prophet!”/delimited The tagging is fine, even if I don’t understand „-1“, but the quotation marks are too much, at least in *-raw.xml Greetlings, Hraban --- http://www.fiee.net 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 ___
Re: [NTG-context] Issues in export
Am 2015-01-19 um 15:44 schrieb Hans Hagen pra...@wxs.nl: In raw.xml I’d prefer something like Quothdescription detail=footnote id=1by Edgar Allan Poe/description or Quothdescription detail=footnote id=1 / ... description detail=footnote id=1 descriptiontag1/descriptiontag descriptioncontentby Edgar Allan Poe/descriptioncontent /description and in div.xhtml something that works in HTML, like a title: Well, basically the export is visual with a few goodies; a footnote is nothing special unless i intercept it as such and even then it would be 'note' and again something generic it's probably no big deal to provide the crosslinked reference between the items but that would then not be '1' because there can be many 1's. Just collect such wishes and i can look at it when i'm in epub mode again. Visual might be ok, but please leave out „hard“ formatting like sup. The 1 is just a placeholder - doesn’t ConTeXt have some suitable internal ID? Ok, I’ll start a wishlist. Quothdiv class=descriptionsymbol footnote title=by Edgar Allan Poediv class=sup1/div/div That would be kind of arbitrary and unnatural: why should some content (of a description) suddenly end up as an attribute title. Just because it works in HTML. Of course it wouldn’t work with long or nested footnotes. And of course it’s a matter of taste (and usage of notes) if it makes sense to keep notes at the noted text. or a link: Quotha href=#footnote_1div class=descriptionsymbol footnotediv class=sup1/div/div/a … a name=„footnote_1“ div class=description footnote div class=descriptiontagdiv class=sup1/div /div div class=descriptioncontentby Edgar Allan Poe/div /div /a an automated link (when no reference is given) sounds ok Also here I’d use an unique note ID as anchor. Greetlings, Hraban --- http://www.fiee.net 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 ___
Re: [NTG-context] What happened to the ePub script?
On 1/20/2015 10:16 AM, Henning Hraban Ramm wrote: Am 2015-01-19 um 15:48 schrieb Hans Hagen pra...@wxs.nl: On 1/17/2015 1:52 PM, Henning Hraban Ramm wrote: * How can I set the current \date in a metadata variable? (I know it’s also in the date tag of document, but I know how to format \date …) This doesn’t work (i.e. I get „\date“ in XML/XHTML): \settaggedmetadata[ version={\date} ] \the\normalyear-\the\normalmonth-\the\normalday Thanks, but that’s not the same. Not only because I get „2015-1-20“ and not „2015-01-20“. Is there a way to get „everything“ expanded within \settaggedmetadata ? no, because \hbox{foo\smallcaps bar\kern10pt gnu} and such have no real string representation * Can I influence the directory/file names of the export from within the source? E.g. if I compile „minimal.tex“, I get minimal-export and minimal-epub The —result switch doesn’t change anything. hm, honoring --result is doable but in general i'd like to keep the export quite basic and predictable (the less options the better) Ok, that means we have no influence on files names at all? it would only be the directory and maybe the main files but not every specific file (it would demand an extra setup and lots of explanations in the manual) but maybe at soem point the mtx-epub script can do some magic ... it's already tricky to keep up cq. satisfy basic epub standards and it's really no fun to do that kind of stuff ... i have no real need for it so i cannot spend ages on it ... (in fact i only redid it because i wanted to play with the svg math and then noticed some possible improvements in the rest * BTW: Can I set —result from within my ConTeXt source? no, because the context script also does some cleanup and checking (like not replacing the tuc file when there is an issue) (letting tex influence its own run is somewhat tricky and has limitations) Ok, would have been nice. Will write a wrapper script for my use case. it it's systematic, predictable etc etc we can always add it as option but filenames and their use are pretty fragile in epub (i had no problems with crashing of locking the kobo) 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] bib module - urgent!
Hi Irdis, The answer to your question is quite simple, You are missing \setuppublications Here the MWE: setuppublications[alternative=apa] \starttext \startpublication[k=haq, t=book, a=Haq, y=1994, s=Haq94] \author[]{Syed Nomanul}[S.]{}{Haq} \title{Names, Natures, and Things} \pubname{Kluwer} \city{Dordrecht} \pubyear{1994} \stoppublication this is a cite from \cite[haq] \stoptext regards Keith. Am 20.01.2015 um 00:16 schrieb Idris Samawi Hamid ادريس سماوي حامد isha...@colostate.edu: Dear gang, I am currently writing an article (mkiv) with lots of bibliographical references. But t-bib.tex seems to have disappeared, and the following simple file fails: \starttext \usemodule[bib] \startpublication[k=haq, t=book, a=Haq, y=1994, s=Haq94] \author[]{Syed Nomanul}[S.]{}{Haq} \title{Names, Natures, and Things} \pubname{Kluwer} \city{Dordrecht} \pubyear{1994} \stoppublication \cite[haq] \stoptext C:/ConTeXt/tex/texmf-context/tex/context/base/publ-usr.lua:95: attempt to call field 'markasupdated' (a nil value) stack traceback: C:/ConTeXt/tex/texmf-context/tex/context/base/publ-usr.lua:95: in function 'addbtxentry' [\directlua]:1: in main chunk 4 \startpublication[k=haq, 5 t=book, 6 a=Haq, 7 y=1994, 8 s=Haq94] 9 \author[]{Syed Nomanul}[S.]{}{Haq} 10 \title{Names, Natures, and Things} 11 \pubname{Kluwer} 12 \city{Dordrecht} 13 \pubyear{1994} 14 \stoppublication 15 16 \cite[haq] 17 18 \stoptext ? Now my understanding is that the new biblio system does not use bbl files yet. But I stopped using .bib files the moment Taco released the original bibliography module. Biblio databases are all in .bbl format. I also set up an extensive bib environment (attached) to take care of all sorts of things. If this is broken, can it be fixed asap? Please don't make me have to convert bbl to bib; that will be beyond depressing. Also don't want to lose my environment commands. This is urgent because there is only a short time to finish this article, and I really want to spend more time writing the content than debugging Context! :-) :-) :-) Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523bib-env.tex___ 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] Issues in export
On 1/20/2015 10:19 AM, Henning Hraban Ramm wrote: Am 2015-01-20 um 14:52 schrieb Henning Hraban Ramm te...@fiee.net: Ok, I’ll start a wishlist. See http://wiki.contextgarden.net/Export#Open_Issues Another issue: Quotations show up like delimited detail=quotation-1“Prophet!”/delimited The tagging is fine, even if I don’t understand „-1“, but the quotation marks are too much, at least in *-raw.xml i can tag them (just add it to the wishlist) - 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] Issues in export
On 1/20/2015 9:52 AM, Henning Hraban Ramm wrote: Am 2015-01-19 um 15:44 schrieb Hans Hagen pra...@wxs.nl: In raw.xml I’d prefer something like Quothdescription detail=footnote id=1by Edgar Allan Poe/description or Quothdescription detail=footnote id=1 / ... description detail=footnote id=1 descriptiontag1/descriptiontag descriptioncontentby Edgar Allan Poe/descriptioncontent /description and in div.xhtml something that works in HTML, like a title: Well, basically the export is visual with a few goodies; a footnote is nothing special unless i intercept it as such and even then it would be 'note' and again something generic it's probably no big deal to provide the crosslinked reference between the items but that would then not be '1' because there can be many 1's. Just collect such wishes and i can look at it when i'm in epub mode again. Visual might be ok, but please leave out „hard“ formatting like sup. well, that would demand a lot more analysis as technically it can be a quote or whatever a user has set up ... keep in mind that we start from typesetting and not abstractions with prescribed rules (so we cannto demand users to stick to only things that html likes) if needed i can tag the symbols so that they can be nilled in a css The 1 is just a placeholder - doesn’t ConTeXt have some suitable internal ID? it often has but not exclusive (it can use a namespaces so there can be several 1's) Ok, I’ll start a wishlist. ok Quothdiv class=descriptionsymbol footnote title=by Edgar Allan Poediv class=sup1/div/div That would be kind of arbitrary and unnatural: why should some content (of a description) suddenly end up as an attribute title. Just because it works in HTML. Of course it wouldn’t work with long or nested footnotes. And of course it’s a matter of taste (and usage of notes) if it makes sense to keep notes at the noted text. 'it works in html' is a weak argument (as html is a rather messy evolved bunch of tags) .. what works now (or worked in the past) can be different (or depricated) in the future (take mathml: chrome dropped it) i think that all these special cases also depend on the usage so there is always the option of some css or xslt juggling .. the export can only provide the info (and even then only info is has) or a link: Quotha href=#footnote_1div class=descriptionsymbol footnotediv class=sup1/div/div/a … a name=„footnote_1“ div class=description footnote div class=descriptiontagdiv class=sup1/div /div div class=descriptioncontentby Edgar Allan Poe/div /div /a an automated link (when no reference is given) sounds ok Also here I’d use an unique note ID as anchor. a footnote is a note which is a combination of a floating object and a notation which is a kind of description which itself is ... there can be all kind of notes not even being footnotes and although there is some relation and in most cases only 'footnotes' it will always need some care in the final 'epub' i can provide some crosslink info (although that will be overridden when a user gives explicit references) (footnotes in an epub are kind of not-done anyway) 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] bib module - urgent!
On 20 Jan 2015, at 10:16 , Idris Samawi Hamid ادريس سماوي حامد wrote I also set up an extensive bib environment (attached) to take care of all sorts of things. If this is broken, can it be fixed asap? Please don't make me have to convert bbl to bib; that will be beyond depressing. Also don't want to lose my environment commands. This is urgent because there is only a short time to finish this article, and I really want to spend more time writing the content than debugging Context! :-) :-) :-) Best wishes What happens if you do not load the bib-module, in other words, omit \usemodule[bib], and input only your existing .bbl-files and your bibliograhy setups? This is what I always do and it still works with the standalone that I installed on january 13 this year. Best regards, 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] bib module - urgent!
Hi Robert, On Tue, 20 Jan 2015 03:20:10 -0700, Robert Blackstone blackstone.rob...@gmail.com wrote: On 20 Jan 2015, at 10:16 , Idris Samawi Hamid ادريس سماوي حامد wrote I also set up an extensive bib environment (attached) to take care of all sorts of things. If this is broken, can it be fixed asap? Please don't make me have to convert bbl to bib; that will be beyond depressing. Also don't want to lose my environment commands. This is urgent because there is only a short time to finish this article, and I really want to spend more time writing the content than debugging Context! :-) :-) :-) Best wishes What happens if you do not load the bib-module, in other words, omit \usemodule[bib], and input only your existing .bbl-files and your bibliograhy setups? This is what I always do and it still works with the standalone that I installed on january 13 this year. Best regards, Robert Blackstone I get the exact same lua error. Best wishes Idris -- Idris Samawi Hamid Professor 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] bib module - urgent!
Hi Keith, On Tue, 20 Jan 2015 06:07:23 -0700, Keith Schultz keithjschu...@icloud.com wrote: setuppublications[alternative=apa] Thank you very much. The strange thing is that that exact line is in the previously attached bib-env.tex (forgot to put it in the minimal file I sent to the list) but I was still getting an error. Yet now it seems to work. There must have been something else I was doing wrong in the original file. The \usemodule[bib] is just ignored -- ' modules 'bib' is not found' --, so that was not causing it (per Robert's suggestion). Anyway, it seems I'm back in business. Here is a complete working file (output attached): === \starttext % \usemodule[bib] \input bib-env \startpublication[k=haq, t=book, a=Haq, y=1994, s=Haq94] \author[]{Syed Nomanul}[S.]{}{Haq} \title{Names, Natures, and Things} \pubname{Kluwer} \city{Dordrecht} \pubyear{1994} \stoppublication \cite[haq] \citepage[haq][p.~20] \citeypage[haq][p.~20] \citeapypage[haq][p.~20] \citeyear[haq] \citeauthor[haq] \citeauthorp[haq] \stoptext === Note the extra cite definitions. Perhaps Alan and Hans could add similar functionality (with better names of course) to the upcoming new bib mechanism. Thanks again, Keith and Robert, and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 test-bib.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Problem with luacode
Hello Hans, sorry for that, here is the code I used to check some LUACODE. \definepapersize[normal][width=14.85cm, height=21cm] \setupbodyfont[10pt] \enableregime[il1] \setupcolor[xwi] \setuplayout[backspace=16mm, leftmargin=15mm,leftmargindistance=1mm,topspace=10mm,header=0mm,footer=0mm,height=200mm,rightmargin=0mm,width=131mm,location=middle,marking=on] \setuppapersize[normal][A4] \definelayer[OngletGauche][x=0mm, y=0mm, width=\paperwidth, height=\paperheight] \setupTABLE[r][1][color=dodgerblue,align={middle,lohi},height=1cm,style={\sansserif \bfx},framecolor=black] % variables \newdimen\hauteuronglet %height of tab \hauteuronglet=1cm %variables onglet bas \newdimen\largeurzoneongletsbas% total width available for tabs \newdimen\ordonneeongletsbas% vertical position of tab \newdimen\abscisseongletsbas% horizontal position of tab \newdimen\largeurongletbas % tab width \startluacode function test(opt_1, arg_1) local table = lpeg.split(,,interfaces.tolist(opt_1)) local labels = lpeg.split(,,arg_1) local NumLigne = table[1] local NbTotalOnglets = table[2] local PremierOnglet = table[3] local decalage = tex.sp(6.5pt) print(NumLigne) print(NbTotalOnglets) print(PremierOnglet) tex.dimen.ordonneeongletsbas = tex.dimen.paperheight - tex.dimen.hauteuronglet * NumLigne tex.dimen.largeurzoneongletsbas = tex.dimen.paperwidth - tex.dimen.backspace tex.dimen.largeurongletbas = tex.dimen.largeurzoneongletsbas / NbTotalOnglets tex.dimen.abscisseongletsbas = tex.dimen.backspace + tex.dimen.largeurongletbas * (PremierOnglet - 1) local x_ongletsbas = tex.dimen.abscisseongletsbas - decalage local y_ongletsbas = tex.dimen.ordonneeongletsbas local largeurongletbas = tex.dimen.largeurongletbas context.setupbackgrounds({page},{background = OngletBas,OngletGauche,ACouper}) context.setlayer({OngletBas},{hoffset = x_ongletsbas, voffset = y_ongletsbas}, context.setupTABLE({c},{1,2,3,4,5,6},{width = largeurongletbas}) context.bTABLE() context.bTR() context.bTD() context(labels[1]) context.eTD() context.eTR() context.eTABLE() ) end interfaces.definecommand { name = test, arguments = { { option, hash }, { content, string }, }, macro = test, } \stopluacode \starttext \ss \showframe \input{tufte} \test[1,6,1]{GROUND EGRESS} \stoptext This code is not working, I get an error while calling the function, and I don’t understand why. Can you explain if you have a bit of time the remark you made about the overload of table ? Eric Gerard ___ 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 - docx ??
On 01/17/2015 10:06 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: On Sat, 17 Jan 2015 13:32:07 -0700, Pablo Rodriguez wrote: [...] Sorry, what was wrong in the conversion to ePub? Just getting a simple copyright page prior to the TOC page was a pain. I ended up having to patch the xml manually (IIRC you helped me in that thread...) [...] Is there any other feature you miss when converting to ePub. As mentioned above, pandoc seems to have issues in getting the correct flow for Title-Page=Copyright-Page=TOC=Main-Text. Transmitting this info to ConTeXt was also problematic. That's why I finally had to decouple things at the end of the process. This was caused because the TOC page cannot be placed anywhere in the document. I think that having an option to place the TOC is essential (https://github.com/jgm/pandoc/issues/1612). pandoc-1.13.2 has a workaround for what you needed: the metadata field rights. pandoc itself seems to be able to deal with bibliographies (I have never used them myself [either in pandoc, or in TeX]). Perhaps I'll experiment, but *after* this article is finished :-) This is a wise decision ;-). 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] Page Breaks after Headings
On 1/20/2015 11:41 PM, Malte Stien wrote: Hi all, Is there a way I can avoid page breaks after “headings”, i.e. \section, \subsection, \subject, \subsubject, etc? example needed ... normally page breaks are avoided - 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] layers for odd and even pages
Am 20.01.2015 um 20:14 schrieb Pablo Rodriguez oi...@gmx.es: Dear list, I have the following sample: \setuppapersize[A5] \setuppagenumbering[alternative=doublesided,location=] \definelayer[testodd][state=start] \setlayer[testodd]{Odd page} \definelayer[testeven][state=continue] \setlayer[testeven]{Even page} \setupbackgrounds[page][background={testodd, testeven}] \starttext \dorecurse{5}{\dorecurse{\recurselevel}{\input zapf\par}\page[right]} \stoptext I need different layers in even and odd pages and that they are hidden on empty pages. Which is the way to do it? Not sure if this is the best way but it works. \setuppapersize[A5] \setuppagenumbering[alternative=doublesided,location=] \definelayer[test][state=repeat,doublesided=yes] \setlayer[test][right]{Odd page} \setlayer[test][left] {Even page} \setupbackgrounds[page][background=test] \starttext \dorecurse{5} {\dorecurse{\recurselevel}{\input zapf\par} \page \pushbackground[page] \setupbackgrounds[page][background=] \page[right] \popbackground} \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 ___
[NTG-context] Page Breaks after Headings
Hi all, Is there a way I can avoid page breaks after “headings”, i.e. \section, \subsection, \subject, \subsubject, etc? Thank you, Malte. -- “The Electric Monk was a labour-saving device, like a dishwasher or a video recorder... Electric Monks believed things for you, thus saving you what was becoming an increasingly onerous task, that of believing all the things the world expected you to believe.” ― Douglas Adams, Dirk Gently's Holistic Detective Agency ___ 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] Can I use mkii and mkiv side by side?
I have a finished mkii project and I’d like to be able to export it to a format that can be a start for other distributions (such as epub or the like). For this, I get the impression I need mkiv. Now, before I go on trying to move my project to mkiv I have a question. Can I run mkii and mkiv side by side? That is, if I configure my TeX setup for mkiv (I am using MacTeX 2014), can I still fall back to the old setup when I fail? Second, is there some step-by-step instruction to move a project from mkii to mkiv? G ___ 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] counting characters when dealing with XML
On 1/20/2015 8:50 PM, Pablo Rodriguez wrote: Dear list, I have a question when dealing with XML. Is there any way to write a conditional based on the number of characters in a given field? I mean, the following field: \xmltext{#1}{h1[@class='subtitle']} If subtitle 60 chars, then fontsize = 10pt. If subtitle 50 chars, then fontsize = 12pt. If subtitle 40 chars, then fontsize = 14pt. If subtitle 30 chars, then fontsize = 16pt. How could I write these conditionals? let tex do the work .. counting is not accurate for this anyway \starttexdefinition AutoFontSize #1 \begingroup \setbox\scratchbox\hbox{#1} \normalexpanded { \definedfont[Regular*default at \ifdim\wd\scratchbox30em 10pt\else \ifdim\wd\scratchbox25em 12pt\else \ifdim\wd\scratchbox20em 14pt\else \ifdim\wd\scratchbox15em 16pt\fi\fi\fi\fi ] } #1 \endgroup \stoptexdefinition \starttext \dostepwiserecurse{30}{80}{2}{\AutoFontSize{\dorecurse{#1}{x}}\par} \stoptext - - 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] Positioning an arrow between two values (Metapost)
\starttext \startMPcode u:=1cm ; path p, q ; p=fullsquare scaled u ; q=fullsquare scaled u shifted (4u,-2u) ; draw p ; draw q ; drawarrow center p--center q ; label(btex $5$ etex,center p) ; label(btex $-2 $ etex,center q) ; \stopMPcode \stoptext How about something like below. I'm not sure exactly how ncline works in PStricks, but this macro takes 4 arguments, namely a point, its corresponding label, a second point, and its corresponding label. \starttext \startMPcode vardef ncline (expr A,h,B,k) = save p,q; path p,q; label(h,A); p:=fullsquare scaled u shifted A; draw p; label(k,B); q:=fullsquare scaled u shifted B; draw q; drawarrow (A--B) cutbefore p cutafter q; enddef; u:=1cm ; ncline(origin,btex $5$ etex,(4*u,-2*u),btex $-2$ etex); \stopMPcode \stoptext Troy Henderson ___ 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 for odd and even pages
Dear list, I have the following sample: \setuppapersize[A5] \setuppagenumbering[alternative=doublesided,location=] \definelayer[testodd][state=start] \setlayer[testodd]{Odd page} \definelayer[testeven][state=continue] \setlayer[testeven]{Even page} \setupbackgrounds[page][background={testodd, testeven}] \starttext \dorecurse{5}{\dorecurse{\recurselevel}{\input zapf\par}\page[right]} \stoptext I need different layers in even and odd pages and that they are hidden on empty pages. Which is the way to do it? 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 ___
[NTG-context] counting characters when dealing with XML
Dear list, I have a question when dealing with XML. Is there any way to write a conditional based on the number of characters in a given field? I mean, the following field: \xmltext{#1}{h1[@class='subtitle']} If subtitle 60 chars, then fontsize = 10pt. If subtitle 50 chars, then fontsize = 12pt. If subtitle 40 chars, then fontsize = 14pt. If subtitle 30 chars, then fontsize = 16pt. How could I write these conditionals? 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 ___