Re: [NTG-context] Handling EMBED tag in Tex
*d.svg* ?xml version=1.0 standalone=no? !DOCTYPE svg PUBLIC -//W3C//DTD SVG 20010904//EN http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd; svg id=root xml:space=preserve width=100% height=100% preserveAspectRatio=xMidYMid meet xmlns=http://www.w3.org/2000/svg; /svg can you help me to create svg files from the given embed tag. On Fri, Jan 7, 2011 at 9:23 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 07.01.2011 um 03:35 schrieb Anand Raj: Hi, Herewith I am attaching the question_svg.xml and question.tex files. With this I am trying to convert the xml to pdf. I encounter two problems here. 2. *embed* to *svg* In the last question in the xml, can find line *embed type='image/svg+xml' align='middle' width='250' height='250' src='/javascript/d.svg' script='initPicture(-10,130,-10,130);stroke=black;fill=gray;strokewidth=1;rect([0,0],[50,40]);rect([50,0],[100,100]);text([50/2,40+6],5y cm);text([75,106],17 cm);text([50,40/2],4y cm,right);text([100,50],13y cm,right);' /* Can you also provide the picture file the embed tag refers to. 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 ___ ___ 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] Handling EMBED tag in Tex
Hi Wolfgang, the next beta will provide \xmltofile{#1}{.}{filename} so that one can avoid a buffer. - 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] Handling EMBED tag in Tex
Am 07.01.2011 um 03:35 schrieb Anand Raj: Hi, Herewith I am attaching the question_svg.xml and question.tex files. With this I am trying to convert the xml to pdf. I encounter two problems here. I am using asciimath module in my tex. 1. times not rendered to X In the first question in the xml, can find lineam8.404 times 10^(-7)/am. The symbol for \times is “*”, not “times” as you expect. There is a short chapter about calculator math in the Mk manual but it doesn’t cover all symbols and you have to read the source to get all of them. 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] Handling EMBED tag in Tex
Am 07.01.2011 um 13:57 schrieb Wolfgang Schuster: Am 07.01.2011 um 03:35 schrieb Anand Raj: Hi, Herewith I am attaching the question_svg.xml and question.tex files. With this I am trying to convert the xml to pdf. I encounter two problems here. I am using asciimath module in my tex. 1. times not rendered to X In the first question in the xml, can find lineam8.404 times 10^(-7)/am. The symbol for \times is “*”, not “times” as you expect. There is a short chapter about calculator math in the Mk manual but it doesn’t cover all symbols and you have to read the source to get all of them. Sorry but but i mixed calcmath and asciimath but nevertheless you should look at the source where you can find the hint that \times is produced with “xx” as input. 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] Handling EMBED tag in Tex
Am 07.01.2011 um 03:35 schrieb Anand Raj: Hi, Herewith I am attaching the question_svg.xml and question.tex files. With this I am trying to convert the xml to pdf. I encounter two problems here. 2. embed to svg In the last question in the xml, can find line embed type='image/svg+xml' align='middle' width='250' height='250' src='/javascript/d.svg' script='initPicture(-10,130,-10,130);stroke=black;fill=gray;strokewidth=1;rect([0,0],[50,40]);rect([50,0],[100,100]);text([50/2,40+6],5y cm);text([75,106],17 cm);text([50,40/2],4y cm,right);text([100,50],13y cm,right);' / Can you also provide the picture file the embed tag refers to. 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] Handling EMBED tag in Tex
2011/1/7 Wolfgang Schuster schuster.wolfg...@googlemail.com Sorry but but i mixed calcmath and asciimath but nevertheless you should look at the source where you can find the hint that \times is produced with “xx” as input. Wolfgang there are 3 math operators which can be “times”: “·”, “×” and “∗” (not “*”) which of it is it? i am confused by your “x”es and other stuff *shudder* (modern linux systems have useful keyboard layouts to input these) ___ 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] Handling EMBED tag in Tex
Am 07.01.2011 um 14:43 schrieb Philipp A.: 2011/1/7 Wolfgang Schuster schuster.wolfg...@googlemail.com Sorry but but i mixed calcmath and asciimath but nevertheless you should look at the source where you can find the hint that \times is produced with “xx” as input. Wolfgang there are 3 math operators which can be “times”: “·”, “×” and “∗” (not “*”) which of it is it? i am confused by your “x”es and other stuff *shudder* (modern linux systems have useful keyboard layouts to input these) Asciimath: [xx]= \\times , Calcmath: elseif how == '*' then texprint(\\times) These are the relevant parts from the asciimath and calcmath sources, to get the output “3 \times 3 = 9” in TeX you have to type with asciimath “3 xx 3 = 9” and with calcmath “3 * 3 = 9”. 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] Handling EMBED tag in Tex
2011/1/7 Wolfgang Schuster schuster.wolfg...@googlemail.com Asciimath: [xx]= \\times , Calcmath: elseif how == '*' then texprint(\\times) These are the relevant parts from the asciimath and calcmath sources, to get the output “3 \times 3 = 9” in TeX you have to type with asciimath “3 xx 3 = 9” and with calcmath “3 * 3 = 9”. Wolfgang ok, sorry, now i understand. out of curiosity: how do you get “·”? ___ 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] Handling EMBED tag in Tex
Am 07.01.2011 um 15:02 schrieb Philipp A.: out of curiosity: how do you get “·”? asciimath: “*” calcmath: i guess “·” 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] Handling EMBED tag in Tex
2011/1/7 Wolfgang Schuster schuster.wolfg...@googlemail.com Am 07.01.2011 um 15:02 schrieb Philipp A.: out of curiosity: how do you get “·”? asciimath: “*” calcmath: i guess “·” Wolfgang thanks :) ___ 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] Handling EMBED tag in Tex
Am 06.01.2011 um 04:42 schrieb Anand Raj: Hi, I have embed tags in my xhtml can i render it in my pdf. How should I form the .tex file to handle this? embed type='image/svg+xml' align='middle' width='200' height='200' src='/javascript/d.svg' script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],44,above);text([3.5,2],44,right);stroke=red;fontfill=red;line([1,0],[1,4]);text([1,2],?,right);' / Write the whole block to a external file and read import it them with \externalfigure. \startxmlsetups xml:embed \setbuffer[embed]\xmlflush{#1}\endbuffer \savebuffer[embed][embed.svg] \externalfigure[embed.svg] \stopxmlsetups 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] Handling EMBED tag in Tex
On 6-1-2011 9:02, Wolfgang Schuster wrote: Am 06.01.2011 um 04:42 schrieb Anand Raj: Hi, I have embed tags in my xhtml can i render it in my pdf. How should I form the .tex file to handle this? embed type='image/svg+xml' align='middle' width='200' height='200' src='/javascript/d.svg' script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],44,above);text([3.5,2],44,right);stroke=red;fontfill=red;line([1,0],[1,4]);text([1,2],?,right);' / Write the whole block to a external file and read import it them with \externalfigure. \startxmlsetups xml:embed \setbuffer[embed]\xmlflush{#1}\endbuffer \savebuffer[embed][embed.svg] \externalfigure[embed.svg] \stopxmlsetups remind me to make a \xmltofile some time - 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] Handling EMBED tag in Tex
Yes. the svg content is not stored in the embed.svg. can you make it? Thanks On Thu, Jan 6, 2011 at 5:28 PM, Hans Hagen pra...@wxs.nl wrote: On 6-1-2011 9:02, Wolfgang Schuster wrote: Am 06.01.2011 um 04:42 schrieb Anand Raj: Hi, I have embed tags in my xhtml can i render it in my pdf. How should I form the .tex file to handle this? embed type='image/svg+xml' align='middle' width='200' height='200' src='/javascript/d.svg' script='initPicture(-.5,5,-.5,5);path([[0,0],[1,4],[4,4],[3,0],[0,0]]);text([2.5,4],44,above);text([3.5,2],44,right);stroke=red;fontfill=red;line([1,0],[1,4]);text([1,2],?,right);' / Write the whole block to a external file and read import it them with \externalfigure. \startxmlsetups xml:embed \setbuffer[embed]\xmlflush{#1}\endbuffer \savebuffer[embed][embed.svg] \externalfigure[embed.svg] \stopxmlsetups remind me to make a \xmltofile some time - 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 ___ ___ 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] Handling EMBED tag in Tex
Am 06.01.2011 um 10:32 schrieb Anand Raj: Yes. the svg content is not stored in the embed.svg. can you make it? You you at least give a few information, the thing you’re telling is that my example doesn’t work but you don’t tell how you integrated it in your own setups. 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] Handling EMBED tag in Tex
Hi, Herewith I am attaching the question_svg.xml and question.tex files. With this I am trying to convert the xml to pdf. I encounter two problems here. I am using asciimath module in my tex. 1. *times* not rendered to *X* In the first question in the xml, can find line*am8.404 times 10^(-7)/am*. 2. *embed* to *svg* In the last question in the xml, can find line *embed type='image/svg+xml' align='middle' width='250' height='250' src='/javascript/d.svg' script='initPicture(-10,130,-10,130);stroke=black;fill=gray;strokewidth=1;rect([0,0],[50,40]);rect([50,0],[100,100]);text([50/2,40+6],5y cm);text([75,106],17 cm);text([50,40/2],4y cm,right);text([100,50],13y cm,right);' /* Thanks Anand On Thu, Jan 6, 2011 at 9:50 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 06.01.2011 um 10:32 schrieb Anand Raj: Yes. the svg content is not stored in the embed.svg. can you make it? You you at least give a few information, the thing you’re telling is that my example doesn’t work but you don’t tell how you integrated it in your own setups. 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 ___ ?xml version=1.0 encoding=UTF-8? documentdiv class='question' divRewrite this as a normal number: center am8.404 times 10^(-7)/am /centerbr/br/ answer = __br/br/ Answers may be entered with or without commas, but answers must be exact (no rounding at all). Also, do not include any spaces in your answer. /div /divdiv class='question' divConvert the fraction am12/6/am to a decimal. Round your answer to three (3) decimal places if necessary:br/br/ Answer = __/div /divdiv class='question' divCompletely simplify the expressionbr/br/ am-3 y + 8 y -9 y/ambr/br/ Answer = __ /div /divdiv class='question' divCompletely simplify the expressionbr/br/ am8 w + 4 -11 w -10/ambr/br/ Answer = __ /div /divdiv class='question' divSimplify: am2 x^4 + 5 x^4/am/div /divdiv class='question' divSimplify: am5 x^5 - 9 x^5/am/div /divdiv class='question' divSimplify: am4 x^2 + 5 x^4 + 7 x^2 + 6 + 8 x^4/am/div /divdiv class='question' divThe expression am(4 x^2+6 x+5)+(5 x^2-6 x-2)/am equals br/ __ am x^2 +/am__ amx+/am__ br//div /divdiv class='question' divJon has two trees in his yard. One is 25 feet taller than the other. If we let amh/am be the height of the shorter tree, write an algebraic expression for the sum of the two trees' heights. Be sure to simplify your expression./div /divdiv class='question' divHere is a figure made of two rectangles.br/ embed type='image/svg+xml' align='middle' width='250' height='250' src='/javascript/d.svg' script='initPicture(-10,130,-10,130);stroke=black;fill=gray;strokewidth=1;rect([0,0],[50,40]);rect([50,0],[100,100]);text([50/2,40+6],5y cm);text([75,106],17 cm);text([50,40/2],4y cm,right);text([100,50],13y cm,right);' / br/ What is the bperimeter/b of the figure? Answer in terms of amy/am and simplify your expression.br/br/ __ cmbr/ /div /div/document question.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 ___