[NTG-context] Get rid of LuaTeX warning on duplicate destination identifier
Hi, I am trying to pick up on an old thread of creating an overview page [1]. Basically, the idea is to create an overvew slide at the end of a presentation that shows the first page of different sections in a presentation. Based on Wolfgang's answer in that old thread, I save the relevant pages in a box, and then display them again at the end of the presentation. This works, except that I get a series of warnings: l.86 \placeoverviewpage LuaTeX warning (ext4): destination with the same identifier (name{aut:10}) has been already used, duplicate ignored How do I get rid of these? I am afraid that I cannot create a small example illustrating this warning, so I am attaching the complete test file. [1]: http://thread.gmane.org/gmane.comp.tex.context/72556/focus=72571 Aditya test.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] Fwd: Re: beta / initials
Original Message Subject: Re: [NTG-context] beta / initials Date: Wed, 28 Aug 2013 23:16:33 +0200 From: Hans Hagen To: Otared Kavian On 8/26/2013 4:22 PM, Otared Kavian wrote: Hi Hans, I apologize for being so late to answer your message and test the new code about dropped capitals and fancy first lines (have been travelling sometime without access to the Internet). It seems that your changes have broken \placeinitial now: the following results in an error: \starttext \placeinitial \input ward.tex \par \input ward.tex \stoptext Hopefully fixed ... in the process i decided to experiment with a better auto sizing .. there is now SomeFont ht somedimen : scale to ascender height SomeFont cp somedimen : scale to X height example: \setupbodyfont[dejavu] \starttext \start \showstruts {\type{at}: TEST \strut\definedfont[Normal at 10pt] TEST} {\type{ht}: TEST \strut\definedfont[Normal ht \the\strutht] TEST} {\type{cp}: TEST \strut\definedfont[Normal cp \the\strutht] TEST} \placeinitial \strut \input ward.tex \start \setupinitial[style=\bfd,voffset=.25\lineheight,n=1] \placeinitial \strut \input ward.tex \par \stop \start \setupinitial[font=Bold at 60pt] \placeinitial \strut \input ward.tex \par \stop \start \setupinitial[font=Bold at 60pt,voffset=2\lineheight] \placeinitial \strut \input ward.tex \par \stop \start \setupinitial[font=Bold cp \measure{initial:n},n=4,hoffset=.5em] \placeinitial \strut \input ward.tex \par \stop \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] textext sync problem?
On 8/28/2013 10:12 PM, Meer, H. van der wrote: Do I understand ypu correctly then that: (1) textext delivers a picture containing what it did typeset, regardless of the setting of drawop (2) drawoptions (withcolor red) then applies the color to that picture? But then there is a complication. On input textext("\tfb text") the above seems to apply, but submitting textext("\orange\tfb text") makes the text orange coloured in spit of the drawoptions setting. Thus textext seems to behave differently for getting an explicit color for its content or not. Before ripping the program for a minimal example I would like to first have a clear understanding of the functioning of textext in relation to metapost. It seems that as yet I do not have a clear enough picture of that process. even then, as aditya mentioned, a minimal example is needed as now i had to made one myself anyhow, textext is not a real picture in the sense that it only carries around dimensions and the text string dealing with color is already somewhat complex and the 'current' color of the picture is taken into account, so with "draw somepic withcolor red" the color gets applied to all picture components and drawoptions are also applied (part of the draw definition) i made a patch that also carries some extra color info but i'm not sure how robust it is (i also did some further optimization) btw, we do have a 'named properties' feature in metafun: \startMPpage property p[] ; p1 = properties(withcolor blue) ; p2 = properties(withcolor red) ; % fill fullcircle scaled 2cm withproperties p1 ; picture pic ; pic := textext("one") ; draw pic withproperties p1 ; draw pic shifted (1cm,0) withproperties p2 ; drawoptions(withcolor red); pic := textext("one") shifted (1cm,0) ; drawoptions(); draw pic ; drawoptions(withcolor green); draw textext("one") shifted (2cm,0) ; drawoptions(); \stopMPpage Hans (in flu-mode so more bugs than usual) - 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] textext sync problem?
On Wed, 28 Aug 2013, Meer, H. van der wrote: Do I understand ypu correctly then that: (1) textext delivers a picture containing what it did typeset, regardless of the setting of drawop (2) drawoptions (withcolor red) then applies the color to that picture? But then there is a complication. On input textext("\tfb text") the above seems to apply, but submitting textext("\orange\tfb text") makes the text orange coloured in spit of the drawoptions setting. Thus textext seems to behave differently for getting an explicit color for its content or not. Before ripping the program for a minimal example I would like to first have a clear understanding of the functioning of textext in relation to metapost. It seems that as yet I do not have a clear enough picture of that process. The example below illustrates what is happening: \starttext \startMPcode newpicture p; drawoptions (withcolor red); p := image (addto currentpicture doublepath unitsquare scaled 1cm ); drawoptions (); draw p; \stopMPcode \stoptext drawoptions() are used only when you use draw or fill (look up their definition in mp-base.mpiv). textext does not use draw or fill. If you want drawoptions to be honored, you can do something as follows: \starttext \startMPcode newpicture p; drawoptions (withcolor red); p := image (draw textext("\tfd text")); drawoptions (); draw p; \stopMPcode \stoptext 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] textext sync problem?
Do I understand ypu correctly then that: (1) textext delivers a picture containing what it did typeset, regardless of the setting of drawop (2) drawoptions (withcolor red) then applies the color to that picture? But then there is a complication. On input textext("\tfb text") the above seems to apply, but submitting textext("\orange\tfb text") makes the text orange coloured in spit of the drawoptions setting. Thus textext seems to behave differently for getting an explicit color for its content or not. Before ripping the program for a minimal example I would like to first have a clear understanding of the functioning of textext in relation to metapost. It seems that as yet I do not have a clear enough picture of that process. Hans van der Meer On 28 aug. 2013, at 21:20, Aditya Mahajan wrote: > > > On 2013-08-28, at 1:40 PM, "Meer, H. van der" wrote: > >> I am using textext to draw text from inside a metapost program. The >> drawoptions macro is used by metapost to set drawing options such as color. >> As I understand, the textext call is handled by the tex-side of the >> metapost-context system, initiated of course from the metapost side. My >> impression is that this occurs asynchronously, judging by the problem I >> encountered. >> >> On the metapost side I have: >> >> drawoptions(withcolor blue); >> pic := textext(labeltext); >> drawoptions(); >> % the pic is output later > > Can you posts complete minimal example? Drawoptions are only taken into > consideration when the picture is drawn, and textext does not draw the > picture. So, it is not surprising that when you actually draw the picture, > the current draw options are used. > > 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 > ___ ___ 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] textext sync problem?
On 2013-08-28, at 1:40 PM, "Meer, H. van der" wrote: > I am using textext to draw text from inside a metapost program. The > drawoptions macro is used by metapost to set drawing options such as color. > As I understand, the textext call is handled by the tex-side of the > metapost-context system, initiated of course from the metapost side. My > impression is that this occurs asynchronously, judging by the problem I > encountered. > > On the metapost side I have: > > drawoptions(withcolor blue); > pic := textext(labeltext); > drawoptions(); > % the pic is output later Can you posts complete minimal example? Drawoptions are only taken into consideration when the picture is drawn, and textext does not draw the picture. So, it is not surprising that when you actually draw the picture, the current draw options are used. 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] textext sync problem?
I am using textext to draw text from inside a metapost program. The drawoptions macro is used by metapost to set drawing options such as color. As I understand, the textext call is handled by the tex-side of the metapost-context system, initiated of course from the metapost side. My impression is that this occurs asynchronously, judging by the problem I encountered. On the metapost side I have: drawoptions(withcolor blue); pic := textext(labeltext); drawoptions(); % the pic is output later [cid:3EBB8ADD-F7B8-4DE1-8990-9EB0E0F45EF6@fritz.box] Deleting the reset implied by the second drawoptions does honor the coloring: drawoptions(withcolor blue); pic := textext(labeltext); [cid:8813D244-4326-4F4A-8520-3C704619954C@fritz.box] I am inclined to conclude that the calling environment containing the drawoptions setting is not captured the moment the textext call is placed, but somewhat later. Because so it can be explained why the latter has the blue color but the former does not (drawoptions has already been reset before it is taken into account). The following code variation seems to corroborate this conclusion: drawoptions(withcolor blue); pic := textext(labeltext); drawoptions(withcolor darkgreen); [cid:415E4344-B8AA-492B-B320-D57D405462EB@fritz.box] If the conclusion is correct, I have a serious problem, because it then becomes impossible to predictably change the drawoptions used by textext. The result then might be dependent on timing conditions in the system. In my opinion, calling textext should capture all relevant data at the precise moment of the call in metapost. I might be wrong, of course, but otherwise I am in need of a repair. Hans van der Meer <><><>___ 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] Documentation for EPUB conversion
You will probably need CSS styling. Maybe you can use one of the popular CSS reset or normalize stylesheets available. I haven't tested, but http://necolas.github.io/normalize.css/ is pretty popular. Beware, a lot of EPUB rendering engines are crap, and there is not a lot of conformity throughout various products. This seems sad... since it is just XHTML. -Mica On Wed, Aug 28, 2013 at 9:29 AM, Thangalin wrote: > Hi, > > I ran the following simple document through ConTeXt: > > \setupbackend[export=yes,xhtml=yes] > > \enableregime[utf-8] > \mainlanguage[en] > \language[en] > > \setupexport[ > title={A nice book}, > author={John Doe}, > firstpage={cover.jpg}, > ] > > \starttext > \startitemize > \item First > \item Second > \item Third > \stopitemize > > \stoptext > > I then ran mtxrun: > > mtxrun --script epub --make t.specification > > This produced a document with the cover page correctly; however, the items > were listed on a single line in the EPUB, instead of on lines by themselves. > > I have a couple of questions: > >- *Styling.* Is custom styling required to format bullet or numbered >lists in the resulting EPUB XHTML document? >- *Knowledge.* Would anyone be willing to share their experiences (and >tips) for transforming ConTeXt documents to EPUB? >- *Examples.* Where can I find examples of simple and complex ConTeXt >documents being converted to EPUB documents having a similar layout? > > Many thanks and kind regards. > > > ___ > 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] Documentation for EPUB conversion
Hi, I ran the following simple document through ConTeXt: \setupbackend[export=yes,xhtml=yes] \enableregime[utf-8] \mainlanguage[en] \language[en] \setupexport[ title={A nice book}, author={John Doe}, firstpage={cover.jpg}, ] \starttext \startitemize \item First \item Second \item Third \stopitemize \stoptext I then ran mtxrun: mtxrun --script epub --make t.specification This produced a document with the cover page correctly; however, the items were listed on a single line in the EPUB, instead of on lines by themselves. I have a couple of questions: - *Styling.* Is custom styling required to format bullet or numbered lists in the resulting EPUB XHTML document? - *Knowledge.* Would anyone be willing to share their experiences (and tips) for transforming ConTeXt documents to EPUB? - *Examples.* Where can I find examples of simple and complex ConTeXt documents being converted to EPUB documents having a similar layout? Many thanks and kind regards. ___ 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] Beamer block - like frame definition?
On 2013–08–28 seasoul wrote: > How to define a customized frame with the title (of the frame) and the > contents separated. > > My intention is to use some function like the block environment in beamer. Some time ago I wrote custom presentation module¹ which implemented those kind of blocks. I intended to expand it and make it a more generic module, but I never did. Maybe it's helpful to you and you can borrow some ideas or concepts. I just run a recent context version on the code and noticed that the block placement is broken. When I find some time the next days I'll look into that. Marco ¹ https://github.com/mpfusion/context-slide signature.asc Description: Digital signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Beamer block - like frame definition?
How to define a customized frame with the title (of the frame) and the contents separated. My intention is to use some function like the block environment in beamer. ___ 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] [***SPAM***] Continuous preview
I use the perl program `atchange`[1] for continous preview. For simple documents, you can just run atchange filename.tex "context --batch filename" Thanks Aditja. Because I have no experience with Pearl: What to do with this text-file of your link? Should I just copy it as text-file in the same folder, where the contex files are stored in, or do I have to install any pearl-interpreter first? Some instructions to get this working here would be nice :) Huseyin ___ 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 ___