presentations in ConTeXt
I've decided to bite the bullet and do my presentations in ConTeXt this term. So far, I'm quite satisfied. I've done only very basic stuff so far (if you're interested, you can have a look at http:// www.uni-bonn.de/www/Philologie/Personal/Schmitz/Dateien.html ), but I like the result. The background is just a pdf-image that I created with metapost and reused as a page background (I found this was faster and easier than recalculating it every time...) Things I would like to know: I like the idea of having the small bar showing at which place in the presentations we are (such as in pre-colorful). I'd like it very minimal, though: maybe just grey squares, with the current position being white or yellow. I have a hunch that this could be achieved with \setupinteractionbar, but this command is a bit underdocumented. Hints, anybody? I am still at a loss how to achieve one thing in ConTeXt that was pretty easy in Keynote or (shudder) Powerpoint: When I wanted to highlight something on a map or a picture, I would just draw a red circle around it. What would be the proper way to do this in ConTeXt? Adding a layer with a red circle drawn in Metapost, then positioning it by trial and error? Or can anyone point to a better solution? And lastly: I have never seen transitions working on OS X (both Apple's Preview and Adobe Reader 7.0). Can anybody confirm that they got this working on other systems? Sorry for the long post. I'm hoping for some enlightenment. Best Thomas
On 5/23/05, Thomas A. Schmitz
I am still at a loss how to achieve one thing in ConTeXt that was pretty easy in Keynote or (shudder) Powerpoint: When I wanted to highlight something on a map or a picture, I would just draw a red circle around it. What would be the proper way to do this in ConTeXt? Adding a layer with a red circle drawn in Metapost, then positioning it by trial and error? Or can anyone point to a better solution?
What kind of picture do you have? If you have .jpg/.png/..., you can get (x,y) position of the pixel where the center of circle should be. One possibility is to create a new metapost figure and draw the circle on it using the measured coordinates: (This circles the blue tulip on http://contextgarden.net/images/6/65/Kochloewe_c.jpg.) \setupcolors[state=start] \starttext \startuseMPgraphic{CircleBlueTulip} % center point pair size, c; % figure will be 10 cm wide scale := 10cm/400; % center of the blue tulip is on (219,333), image is 400*460 size := (400,460) scaled scale; c := (222,460-330) scaled scale; % diameter of the circle should be 50 pixels d := 50scale; pickup pencircle scaled 2pt; externalfigure "Kochloewe_c.jpg" xyscaled size; draw fullcircle scaled d shifted c withcolor red; \stopuseMPgraphic \useMPgraphic{CircleBlueTulip} \stoptext I believe there exists a more straightforward way if you make uniqueMPgraphic and specify coordinate fractions of the circle to be drawn, but if you say: \framed[background=SomeGraphicWithACircle]{\externalfigure[Kochloewe_c][width=10cm]}, the circle (if any) is drawn behind the figure and cannot be used as such. Unless you specify the figure in a new layer and draw both layers in the proper order. In this case it would be fine to have a \framed[...foreground=...] command :)
And lastly: I have never seen transitions working on OS X (both Apple's Preview and Adobe Reader 7.0). Can anybody confirm that they got this working on other systems?
They work in Windows XP (I'n not sure if they're also working using ConTeXt commands). But they are so ugly that you don't want to use them. Mojca
Mojca Miklavec wrote:
On 5/23/05, Thomas A. Schmitz
wrote: I am still at a loss how to achieve one thing in ConTeXt that was pretty easy in Keynote or (shudder) Powerpoint: When I wanted to highlight something on a map or a picture, I would just draw a red circle around it. What would be the proper way to do this in ConTeXt? Adding a layer with a red circle drawn in Metapost, then positioning it by trial and error? Or can anyone point to a better solution?
What kind of picture do you have? If you have .jpg/.png/..., you can get (x,y) position of the pixel where the center of circle should be.
One possibility is to create a new metapost figure and draw the circle on it using the measured coordinates:
(This circles the blue tulip on http://contextgarden.net/images/6/65/Kochloewe_c.jpg.)
\setupcolors[state=start] \starttext \startuseMPgraphic{CircleBlueTulip} % center point pair size, c; % figure will be 10 cm wide scale := 10cm/400;
% center of the blue tulip is on (219,333), image is 400*460 size := (400,460) scaled scale; c := (222,460-330) scaled scale; % diameter of the circle should be 50 pixels d := 50scale;
pickup pencircle scaled 2pt;
externalfigure "Kochloewe_c.jpg" xyscaled size; draw fullcircle scaled d shifted c withcolor red; \stopuseMPgraphic
\useMPgraphic{CircleBlueTulip}
\stoptext
I believe there exists a more straightforward way if you make uniqueMPgraphic and specify coordinate fractions of the circle to be drawn, but if you say:
\framed[background=SomeGraphicWithACircle]{\externalfigure[Kochloewe_c][width=10cm]}, the circle (if any) is drawn behind the figure and cannot be used as such. Unless you specify the figure in a new layer and draw both layers in the proper order.
In this case it would be fine to have a \framed[...foreground=...] command :)
Use \framed [background={foreground,BgFront}] {\externalfigure[Kochloewe_c][width=10cm]}} Define your picture as BgFront. 'foreground' is fixed word that identifies layer 0 (text). So you can stack bacground as follow: background={...,MyLayer-2,MyLayer-1,foreground,MyLayer1,MyLayer2,...} Vit
Vit Zyka wrote:
Mojca Miklavec wrote:
Thomas A. Schmitz wrote:
I am still at a loss how to achieve one thing in ConTeXt that was pretty easy in Keynote or (shudder) Powerpoint: When I wanted to highlight something on a map or a picture, I would just draw a red circle around it. What would be the proper way to do this in ConTeXt? Adding a layer with a red circle drawn in Metapost, then positioning it by trial and error? Or can anyone point to a better solution?
...
In this case it would be fine to have a \framed[...foreground=...] command :)
Use
\framed [background={foreground,BgFront}] {\externalfigure[Kochloewe_c][width=10cm]}}
Define your picture as BgFront. 'foreground' is fixed word that identifies layer 0 (text). So you can stack bacground as follow: background={...,MyLayer-2,MyLayer-1,foreground,MyLayer1,MyLayer2,...}
Uau! Thanks a lot for a very nice hint. So you can make something like that: \setupcolors[state=start] \starttext \setupMPvariables[CircleSomething][dimension={(100,100)},center={(50,50)},r=10] \startuseMPgraphic{CircleSomething} pair dimension, center; % TODO: this also has to be passed as parameter!!! % now it stands for: width=10cm scale := 10cm/(xpart \MPvar{dimension}); picture bboxpicture; dimension := \MPvar{dimension} scaled scale; center := \MPvar{center} scaled scale; r := \MPvar{r}*scale; pickup pencircle scaled 2pt; % proper bounding box fill unitsquare xyscaled dimension; bboxpicture := currentpicture; currentpicture := nullpicture; draw fullcircle scaled (2*r) shifted center withcolor red; setbounds currentpicture to boundingbox bboxpicture; \stopuseMPgraphic \defineoverlay[CircleBlueTulip][\uniqueMPgraphic{CircleSomething}{dimension={(400,460)},center={(222,460-330)},r=25}] \defineoverlay[CircleRedTulip][\useMPgraphic{CircleSomething}{dimension={(400,460)},center={(148,460-330)},r=25}] \framed[background={foreground,CircleBlueTulip},offset=0pt,strut=no]{\externalfigure[Kochloewe_c][width=10cm]} \framed[background={foreground,CircleRedTulip},offset=0pt,strut=no]{\externalfigure[Kochloewe_c][width=10cm]} \stoptext Mojca
Some time ago, Mojca Miklavec
Uau! Thanks a lot for a very nice hint. So you can make something like that:
-------------------------------------------------- \setupcolors[state=start] \starttext \setupMPvariables[CircleSomething][dimension={(100,100)},center={(50,50)},r=10] \startuseMPgraphic{CircleSomething} pair dimension, center; % TODO: this also has to be passed as parameter!!! % now it stands for: width=10cm scale := 10cm/(xpart \MPvar{dimension}); picture bboxpicture; dimension := \MPvar{dimension} scaled scale; center := \MPvar{center} scaled scale; r := \MPvar{r}*scale; pickup pencircle scaled 2pt; % proper bounding box fill unitsquare xyscaled dimension; bboxpicture := currentpicture; currentpicture := nullpicture; draw fullcircle scaled (2*r) shifted center withcolor red; setbounds currentpicture to boundingbox bboxpicture; \stopuseMPgraphic \defineoverlay[CircleBlueTulip][\uniqueMPgraphic{CircleSomething}{dimension={(400,460)},center={(222,460-330)},r=25}] \defineoverlay[CircleRedTulip][\useMPgraphic{CircleSomething}{dimension={(400,460)},center={(148,460-330)},r=25}] \framed[background={foreground,CircleBlueTulip},offset=0pt,strut=no]{\externalfigure[Kochloewe_c][width=10cm]} \framed[background={foreground,CircleRedTulip},offset=0pt,strut=no]{\externalfigure[Kochloewe_c][width=10cm]} \stoptext -------------------------------------------------- So, do you get any real output (besides the image)? I cannot see any circles in the pdf. ConTeXt ver: 2005.06.07 fmt: 2005.6.7 int: english mes: english Patrick -- ConTeXt wiki and more: http://contextgarden.net
Patrick Gundlach wrote:
So, do you get any real output (besides the image)? I cannot see any circles in the pdf.
ConTeXt ver: 2005.06.07 fmt: 2005.6.7 int: english mes: english
Patrick
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt. ConTeXt ver: 2005.05.30 fmt: 2005.6.13 int: english mes: english Mojca
Hi Mojca,
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt.
Thanks. There must be something wrong with my setup/version at home. I'll check again. Patrick -- ConTeXt wiki and more: http://contextgarden.net
Mojca Miklavec wrote:
Patrick Gundlach wrote:
So, do you get any real output (besides the image)? I cannot see any circles in the pdf.
ConTeXt ver: 2005.06.07 fmt: 2005.6.7 int: english mes: english
Patrick
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt.
isn't there some use/unique mix up as well? 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 -----------------------------------------------------------------
Hans Hagen wrote:
Mojca Miklavec wrote:
Patrick Gundlach wrote:
So, do you get any real output (besides the image)? I cannot see any circles in the pdf.
ConTeXt ver: 2005.06.07 fmt: 2005.6.7 int: english mes: english
Patrick
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt.
isn't there some use/unique mix up as well?
I compiled the file attached in Mojca's mail. Except that I do not have the Kochloewe_c picture it works. So I get the gray dummy background and on each page a red circle. Although there is the mentioned mix up it seems not to harm the result. After changing the use of the command it still works. This test was performed with Context january 2005 and Pdfetex ...20a. Willi
Willi Egger wrote:
Hans Hagen wrote:
Mojca Miklavec wrote:
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt.
isn't there some use/unique mix up as well?
Excuse me, I started with an "unique" graphic and had to change into "use" graphic as it didn't work. Later on I forgot to change it on one place, but it worked anyway.
I compiled the file attached in Mojca's mail. Except that I do not have the Kochloewe_c picture it works.
http://contextgarden.net/images/6/65/Kochloewe_c.jpg (the one on the first page). Mojca
I compiled the file attached in Mojca's mail. Except that I do not have the Kochloewe_c picture it works. http://contextgarden.net/images/6/65/Kochloewe_c.jpg (the one on the first page). BTW this picture was drawn by my former wife for a "ConTeXt cookbook"
Am 2005-06-28 um 19:25 schrieb Mojca Miklavec: project that rests in peace. I never could convince her to draw some gardening lions for ConTeXtgarden. At the moment I know noone who can draw and would do it for free (and I can't really draw myself). Any artists here around? My idea was a lion with watering can (and perhaps an apron) watering three tulips (red, black and blue) with a fence (garden!) in the background. You could think of more similar pictures, perhaps featuring characters as garden plants, Meta the lioness having Meta-Fun (juggling?), lion de-bugging (with insecticide?)... I don't like the original TeX drawings by Duane Bibby so much, and I think we should use a different style for ConTeXt. I like the cooking lion, but I could image something completely different like pragma vector art, oil painting, manga style etc. ;-) But it should keep a certain quality level, matching ConTeXt itself. The artwork must not infringe any copyrights, so please don't scan anything printed! On the other hand the artist must agree to put her/ his work under the GNU free doc license. I'd really appreciate good artwork for the garden and would be glad to help with scanning, cleaning, logo-ing, perhaps animating etc. Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net
Hello, in additon to the just posted mail I can say, that it works also under Context latest and pdfetex ...1.20a Willi Hans Hagen wrote:
Mojca Miklavec wrote:
Patrick Gundlach wrote:
So, do you get any real output (besides the image)? I cannot see any circles in the pdf.
ConTeXt ver: 2005.06.07 fmt: 2005.6.7 int: english mes: english
Patrick
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt.
isn't there some use/unique mix up as well?
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
Mojca, I think I never actually said thanks for this wonderful trick you taught us! It's wonderful, and I'm still experimenting with it. For the time being, it's still very much trial and error to position the circle, but I'll learn. Now I'd be so happy if someone (well I guess Hans) could teach me how to have this neat progressbar that's in pre- color on my own slides; I don't seem to be able to isolate the code that produces it. Thanks a lot, and all best Thomas On Jun 28, 2005, at 4:37 PM, Mojca Miklavec wrote:
Patrick Gundlach wrote:
So, do you get any real output (besides the image)? I cannot see any circles in the pdf.
ConTeXt ver: 2005.06.07 fmt: 2005.6.7 int: english mes: english
Patrick
I get this PDF (page size adapted to 10x11.5 cm) with not-the-very-latest-version of ConTeXt.
ConTeXt ver: 2005.05.30 fmt: 2005.6.13 int: english mes: english
Mojca
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Thomas A. Schmitz wrote:
Now I'd be so happy if someone (well I guess Hans) could teach me how to have this neat progressbar that's in pre- color on my own slides; I don't seem to be able to isolate the code that produces it.
Do you mean those "funny little things" which run from the beginning to the end as the presentation runs from the first towards the last slide? There are "PageNumber" and "NOfPages" variables defined somewhere in metafun. So you can say something like: if(NOfPages > 2) and (PageNumber > 0): fraction := (PageNumber-1)/(NOfPages-1) else: fraction := 1; fi; And then you can do with it whatever you want. You can for example change slide colour: SlideColour := fraction[\MPcolor[my color 1],\MPcolor[my color 2]]; or draw a progress bar: fill unisquare xscaled fraction xyscaled size withcolor red; draw unitsquare xyscaled size; An alternative are \pageno and \lastpage, defined inside ConTeXt. Hope this helps, Mojca
Mojca, thanks again, that's a useful trick! However, there is a command \interactionbar which seems to provide this functionality, and there is \setupinteractionbar, but the commands are somewhat underdocumented :-) At least, I don't get any visible output on my slides when I include them; there seems to be some kind of secret... (Your code doesn't compile here, it dies with this message: This is MetaPost, Version 0.641 (Web2C 7.5.4) (p-mpgraph.mp
NOfPages-2 ! Unknown relation will be considered false. <to be read again> ) l.118 if(NOfPages > 2) and (PageNumber > 0): fraction := (PageNumber-1)/(NOf...
? Thanks, and best Thomas On Jul 15, 2005, at 9:46 PM, Mojca Miklavec wrote:
Do you mean those "funny little things" which run from the beginning to the end as the presentation runs from the first towards the last slide?
There are "PageNumber" and "NOfPages" variables defined somewhere in metafun. So you can say something like:
if(NOfPages > 2) and (PageNumber > 0): fraction := (PageNumber-1)/(NOfPages-1) else: fraction := 1; fi;
And then you can do with it whatever you want. You can for example change slide colour:
SlideColour := fraction[\MPcolor[my color 1],\MPcolor[my color 2]];
or draw a progress bar:
fill unisquare xscaled fraction xyscaled size withcolor red; draw unitsquare xyscaled size;
An alternative are \pageno and \lastpage, defined inside ConTeXt.
Hope this helps, Mojca
Thomas A. Schmitz wrote:
Mojca,
thanks again, that's a useful trick! However, there is a command \interactionbar which seems to provide this functionality, and there is \setupinteractionbar, but the commands are somewhat underdocumented :-) At least, I don't get any visible output on my slides when I include them; there seems to be some kind of secret...
(Your code doesn't compile here, it dies with this message:
This is MetaPost, Version 0.641 (Web2C 7.5.4) (p-mpgraph.mp
NOfPages-2 ! Unknown relation will be considered false. <to be read again> ) l.118 if(NOfPages > 2) and (PageNumber > 0): fraction := (PageNumber-1)/(NOf...
?
Thanks, and best
if you want access to those variables (some of them only make sense at pag ebuilding time) you need to say: LoadPageState ; (this is done automatically in StartPage ... StopPage) 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 -----------------------------------------------------------------
Thanks Hans! What about a small refresher about \interactionbar cum suis. Could you post a minimal example of what is needed to get output from it? I tried with a couple of combinations of \setupinteraction[state=start] and \setupinteractionbar [alternative=d] etc, but I'm not getting any output on my pdf's. I'd be very grateful! Best Thomas On Jul 17, 2005, at 11:10 PM, Hans Hagen wrote:
Thomas A. Schmitz wrote:
Mojca,
thanks again, that's a useful trick! However, there is a command \interactionbar which seems to provide this functionality, and there is \setupinteractionbar, but the commands are somewhat underdocumented :-) At least, I don't get any visible output on my slides when I include them; there seems to be some kind of secret...
(Your code doesn't compile here, it dies with this message:
This is MetaPost, Version 0.641 (Web2C 7.5.4) (p-mpgraph.mp
NOfPages-2 ! Unknown relation will be considered false. <to be read again> ) l.118 if(NOfPages > 2) and (PageNumber > 0): fraction := (PageNumber-1)/(NOf...
?
Thanks, and best
if you want access to those variables (some of them only make sense at pag ebuilding time) you need to say: LoadPageState ;
(this is done automatically in StartPage ... StopPage) 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
Dear all: Sorry if this question is not appropriate for this forum - I am a newbie, I tried to read at least one month's worth of emails, and... I do not come to this list from the perspective of an author, who can afford to give his work huge amounts of time till it is set just right. I come here from the perspective of a publisher/editor (Indiana University Mathematics Journal), where the outlook is quite different: You take many papers (LaTeX source files), written by people whose expertise ranges from spaghetti-TeX to guru-TeX, and you "massage" them to conform to the Journal format and to make them look as nice as possible. (Perfection remains always on the horizon - you got to meet the printers' deadlines.) That said by way of introduction, I am contemplating a move for the IUMJ away from LaTeX to ... I have two reasons to recommend abandoning LaTeX: (1) LaTeX's conversion to other formats (excluding PDF) is laborius and falls very short of the ideal, and (2) long-term archiving and long-term reusability in settings we may not even envisage at this time forces me to think XML... XML... XML. So, I have been delving into ConTeXt, and I like its syntax: far "cleaner" than LaTeX. I have also read that there is work in progress to convert XML to ConTeXt --- my question is, any thoughts, hints, recommendations about reverse-engineering, that is, from ConTeXt to XML? If the IUMJ switched production to ConTeXt, we would still want to preserve on "archival" copy in XML. (As of now we translate LaTeX to XML using "hermes", but it would not work with ConTeXt.) If nothing is contemplated in the area of *from ConTeXt to XML", might this strategy work ConTeXt -> pdf - pdf to XML ? I apologize if the topic is off bounds, and will be grateful if anyone decides to think outloud on this subject. Best, elena Elena Fraboschi Indiana University Mathematics Journal
At 09:18 AM 7/19/2005, Elena Fraboschi
So, I have been delving into ConTeXt, and I like its syntax: far "cleaner" than LaTeX. I have also read that there is work in progress to convert XML to ConTeXt --- my question is, any thoughts, hints, recommendations about reverse-engineering, that is, from ConTeXt to XML? If the IUMJ switched production to ConTeXt, we would still want to preserve on "archival" copy in XML.
I'm reminded of a presentation that Kaveh Bazargan (from River Valley Technologies) gave at the PracticalTeX 2004 conference on a LaTeX/XML process they use, but unfortunately he hasn't provided any paper to go with his presentation. One of the things, though, that I specifically remember was that, since they also were archiving XML, their process specifically converted the authors' LaTeX to XML (specifically with the mathematics in MathML, rather than as embedded LaTeX as I know some publishers do), and then converted that from XML back to LaTeX and thence to PDF (or Postscript, possibly) for actual production -- thus guaranteeing that the archival XML would in fact reproduce the production versions exactly. With a workflow like that, I'm not certain how much conversion from ConTeXt to XML will be necessary -- you'll probably, at least for the time being, still be getting author submissions in LaTeX. You could then convert that to XML using a version of your present process, adjust the XML as needed to fit your standards, archive the XML, and then dump the XML into an automated sort of process that converts it to ConTeXt and thence to PDF, html, and whatever else you need. The only requirement, then, is that the XML -> ConTeXt -> PDF workflow not involve any manual adjustments to the ConTeXt code -- all manual changes would need to be made in the XML. (That may be a good idea anyway, as it guarantees that the XML is always the "true" version.)
(As of now we translate LaTeX to XML using "hermes", but it would not work with ConTeXt.) If nothing is contemplated in the area of *from ConTeXt to XML", might this strategy work
ConTeXt -> pdf - pdf to XML ?
I suspect that, insofar as it worked, you'd probably lose most of the metadata (this is a section header, this is a subsection header, etc.) unless it was a PDF to XML converter that was very specific to your particular PDF files. ... On a different note, it may be worth pointing out that ConTeXt's support for typesetting of complicated equations -- that is, the sort of stuff for which one really wants the AMSmath package in LaTeX -- really isn't especially great; it's pretty much limited to the capabilities of Plain TeX. I'm currently working (very slowly) on trying to improve this by doing a port of AMSmath to ConTeXt, but I have no idea how compatible that will be with ConTeXt's MathML/XML support, nor when I'd have it to a point where it would be ready for production work. The other alternative I know of for doing math in XML is embedding bits of LaTeX code within the XML. Since most "conversion to non-PDF formats" involves converting the math to bitmap images anyway (or, at least, any conversion to HTML for the web does!), I don't think that's really complicating things much. It's certainly possible in theory to embed LaTeX-coded equations in ConTeXt, and there's a small bit of comment on this on the Wiki. In practice, it may take a bit of coding to make work, but the amount won't be excessive. ... And, on yet a third note, you might find it useful to talk to Steve Grathwohl at the Duke University Press -- he was also at the PracticalTeX 2004 conference, and had clearly "caught the ConTeXt bug", and I suspect he may well have some useful practical experience in this area. - Brooks
Brooks Moses wrote:
On a different note, it may be worth pointing out that ConTeXt's support for typesetting of complicated equations -- that is, the sort of stuff for which one really wants the AMSmath package in LaTeX -- really isn't especially great; it's pretty much limited to the capabilities of Plain TeX. I'm currently working (very slowly) on trying to improve this by doing a port of AMSmath to ConTeXt, but I have no idea how compatible that will be with ConTeXt's MathML/XML support, nor when I'd have it to a point where it would be ready for production work.
The other alternative I know of for doing math in XML is embedding bits of LaTeX code within the XML. Since most "conversion to non-PDF formats" involves converting the math to bitmap images anyway (or, at least, any conversion to HTML for the web does!), I don't think that's really complicating things much. It's certainly possible in theory to embed LaTeX-coded equations in ConTeXt, and there's a small bit of comment on this on the Wiki. In practice, it may take a bit of coding to make work, but the amount won't be excessive.
there is a math module (m-math) and a new implementation of that (m-newmat) which does quite some ams math; i have no problem with adding more code but each time i ask for specs, nothing comes up -) 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 -----------------------------------------------------------------
At 01:40 PM 7/19/2005, you wrote:
Brooks Moses wrote:
The other alternative I know of for doing math in XML is embedding bits of LaTeX code within the XML. Since most "conversion to non-PDF formats" involves converting the math to bitmap images anyway (or, at least, any conversion to HTML for the web does!), I don't think that's really complicating things much. It's certainly possible in theory to embed LaTeX-coded equations in ConTeXt, and there's a small bit of comment on this on the Wiki. In practice, it may take a bit of coding to make work, but the amount won't be excessive.
there is a math module (m-math) and a new implementation of that (m-newmat) which does quite some ams math;
It does some, yes, though not (yet) the multiline alignment parts that I need.
i have no problem with adding more code but each time i ask for specs, nothing comes up -)
Yeah, I know. The specs for what I need are "I've got this pile of equations written in LaTeX with the AMSmath package, and I'd like to be able to copy them back and forth between LaTeX and ConTeXt without needing to edit them." I'm slowly working on reducing that to something that's actually useful as specifications (and as some code), and I hope to get some of that to you within the next few months or so. - Brooks
Hi, I would like that whan i click over 'Bho' at page 1 I go to page 2 and see the title Bho \setupinteraction[state=start, focus=width] \starttext \about[etichetta] \page \section[etichetta]{Bho} \input tufte \stoptext This piece of latex does the thing I want %%% latex \documentclass[a4paper, 12pt]{article} \usepackage[bookmarks=false, pdfstartview=FitH, pdfview=FitH]{hyperref} \usepackage{nameref} \begin{document} \nameref{etichetta} \clearpage \section{Bho}\label{etichetta} \input{tufte} \end{document} %%%% thanks luigi
luigi.scarso wrote:
Hi, I would like that whan i click over 'Bho' at page 1 I go to page 2 and see the title Bho
\setupinteraction[state=start, focus=width] \starttext \about[etichetta] \page \section[etichetta]{Bho} \input tufte \stoptext
This piece of latex does the thing I want %%% latex \documentclass[a4paper, 12pt]{article} \usepackage[bookmarks=false, pdfstartview=FitH, pdfview=FitH]{hyperref} \usepackage{nameref} \begin{document} \nameref{etichetta} \clearpage \section{Bho}\label{etichetta} \input{tufte} \end{document} %%%%
thanks luigi _______________________________________________
If I use \setupinteraction[state=start, focus=minwidth] I have ! Undefined control sequence. <argument> \v!minwidth To work\unprotect \def\dosetuppageview#1% watch the v-h swapping here {\processaction [#1] [ \v!fit=>\def\PDFpageviewkey {fit}\def\PDFpageviewwrd{/Fit}, \v!width=>\def\PDFpageviewkey {fith}\def\PDFpageviewwrd{/FitH}, \v!height=>\def\PDFpageviewkey {fitv}\def\PDFpageviewwrd{/FitV}, minwidth=>\def\PDFpageviewkey{fitbh}\def\PDFpageviewwrd{/FitBH}, minheight=>\def\PDFpageviewkey{fitbv}\def\PDFpageviewwrd{/FitBV}, standard=>\def\PDFpageviewkey{xyz \PDFpagexyzspec}\def\PDFpageviewwrd{/XYZ \PDFpagexyzspec}, \s!unknown=>\def\PDFpageviewkey {fit}\def\PDFpageviewwrd{/Fit}]% \edef\PDFpageview{/View [\PDFpageviewwrd]}} \protect
Brooks Moses wrote:
At 01:40 PM 7/19/2005, you wrote:
Brooks Moses wrote:
The other alternative I know of for doing math in XML is embedding bits of LaTeX code within the XML. Since most "conversion to non-PDF formats" involves converting the math to bitmap images anyway (or, at least, any conversion to HTML for the web does!), I don't think that's really complicating things much. It's certainly possible in theory to embed LaTeX-coded equations in ConTeXt, and there's a small bit of comment on this on the Wiki. In practice, it may take a bit of coding to make work, but the amount won't be excessive.
there is a math module (m-math) and a new implementation of that (m-newmat) which does quite some ams math;
It does some, yes, though not (yet) the multiline alignment parts that I need.
ok, so just isolate the code that you want to be included
i have no problem with adding more code but each time i ask for specs, nothing comes up -)
Yeah, I know. The specs for what I need are "I've got this pile of equations written in LaTeX with the AMSmath package, and I'd like to be able to copy them back and forth between LaTeX and ConTeXt without needing to edit them." I'm slowly working on reducing that to something that's actually useful as specifications (and as some code), and I hope to get some of that to you within the next few months or so.
Ok, maybe we can also make a small manual then -) 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 -----------------------------------------------------------------
Elena Fraboschi wrote:
So, I have been delving into ConTeXt, and I like its syntax: far "cleaner" than LaTeX. I have also read that there is work in progress to convert XML to ConTeXt --- my question is, any thoughts, hints, recommendations about reverse-engineering, that is, from ConTeXt to XML? If the IUMJ switched production to ConTeXt, we would still want to preserve on "archival" copy in XML.
(As of now we translate LaTeX to XML using "hermes", but it would not work with ConTeXt.) If nothing is contemplated in the area of *from ConTeXt to XML", might this strategy work
There are several things involved in such a translation - the general structure, this is not that hard and can easily be scripted - special characters, also easy to script - special markup, like math, chemistry etc concerning math, one can use: - content mathml, which is very structured and configurable - presentation mathml, which looks like tex, and does not always lead to nice looking output - embedded tex, which is ok as a start one can consider "structure in xml and embedded tex for formulas", its not that hard to generate web pages from that i'm considering adding open math support (needed for a project)
ConTeXt -> pdf - pdf to XML ?
the best way is: xml -> context xml -> html xml -> anything normally magazines are not that complex so oen can use context's direct mapping; depending on the amount of manipulations, one can xml -> context reading xml -> pdf xml -> xslt -> xml -> context reading xml -> pdf xml -> xslt -> context code -> context reading tex -> pdf in any case, try to cut the problem into small parts and find solutions for that; so far i never ran into things/demands that could not be solved
I apologize if the topic is off bounds, and will be grateful if anyone decides to think outloud on this subject. Best, elena
no problem, if you want to know more you can either use this list (it could also be a nice thread for those who want to do similar things) if you don't want to bother the list., you may also mail me directly pdf is pages while xml is structured markup, so converting pdf into xml is non trivial, (btw, the dutch math societies journal is made up in context, i.e. non standard layout (2/3 columns, grayscales, two non cm font sets, graphics, pictures etc; the main reason why we now have the columnsets mechanism-) 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 -----------------------------------------------------------------
Hi Elena Concerning the math and xml, it all depends on what kind of math is used. In most cases some tex -> presentation mathml results in sub optimal results. One of the advantages of context is that one can easilly modulate on layouts, so for publishing on the web one can as well use pdf in a more screen/navigation friendly layout. It's no real problem to generate multiple instances from one document using processing modes. That way you get quality on paper and on screen. 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 -----------------------------------------------------------------
Thomas A. Schmitz wrote:
Thanks Hans! What about a small refresher about \interactionbar cum suis. Could you post a minimal example of what is needed to get output from it? I tried with a couple of combinations of \setupinteraction[state=start] and \setupinteractionbar [alternative=d] etc, but I'm not getting any output on my pdf's. I'd be very grateful!
there are some examples or usage in the presentation styles
grep interactionbar s-pre* s-pre-01.tex:%D {interactionbar} s-pre-01.tex: {\interactionbar[alternative=f,width=.5\makeupwidth,height=1 ex]} s-pre-01.tex:%D {setupinteractionbar, interactionbuttons} s-pre-01.tex:\setupinteractionbar s-pre-04.tex:%D {setupinteractionbar} s-pre-04.tex:\setupinteractionbar s-pre-04.tex: [\interactionbar] s-pre-04.tex:%D setupbackgrounds,setupinteraction,setupinteractionbar, s-pre-04.tex: \setupinteractionbar[state=stop] s-pre-04.tex: \setupinteractionbar[state=start] s-pre-05.tex: \setupinteractionbar[state=stop] s-pre-05.tex: \setupinteractionbar[state=start]
----------------------------------------------------------------- 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 -----------------------------------------------------------------
Thanks again, Hans! I just figured out how to do it by experimenting with s-pre-01.tex. The key was \setuplayout[bottom=12pt] % or some dimension Without it, I'd get no bar, but now it works, and it looks just amazing! I'm looking forward to my next presentation!! Best Thomas On Jul 19, 2005, at 8:23 PM, Hans Hagen wrote:
there are some examples or usage in the presentation styles
grep interactionbar s-pre*
s-pre-01.tex:%D {interactionbar} s-pre-01.tex: {\interactionbar[alternative=f,width=.5 \makeupwidth,height=1 ex]} s-pre-01.tex:%D {setupinteractionbar, interactionbuttons} s-pre-01.tex:\setupinteractionbar s-pre-04.tex:%D {setupinteractionbar} s-pre-04.tex:\setupinteractionbar s-pre-04.tex: [\interactionbar] s-pre-04.tex:%D setupbackgrounds,setupinteraction,setupinteractionbar, s-pre-04.tex: \setupinteractionbar[state=stop] s-pre-04.tex: \setupinteractionbar[state=start] s-pre-05.tex: \setupinteractionbar[state=stop] s-pre-05.tex: \setupinteractionbar[state=start]
----------------------------------------------------------------- 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
participants (10)
-
Brooks Moses
-
Elena Fraboschi
-
Hans Hagen
-
Henning Hraban Ramm
-
luigi.scarso
-
Mojca Miklavec
-
Patrick Gundlach
-
Thomas A. Schmitz
-
Vit Zyka
-
Willi Egger