ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Html to pdf using pragma script
@ 2010-12-20  8:48 Anand Raj
  2010-12-20  9:18 ` Wolfgang Schuster
  2010-12-21  7:04 ` Anand Raj
  0 siblings, 2 replies; 9+ messages in thread
From: Anand Raj @ 2010-12-20  8:48 UTC (permalink / raw)
  To: ConTeXt Mainling List


[-- Attachment #1.1: Type: text/plain, Size: 102 bytes --]

Hi,

I want to convert the html page to pdf.

the html contains svg and mathml content.

Thanks
Anand

[-- Attachment #1.2: Type: text/html, Size: 155 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-20  8:48 Html to pdf using pragma script Anand Raj
@ 2010-12-20  9:18 ` Wolfgang Schuster
  2010-12-21  2:12   ` Anand Raj
  2010-12-21  7:04 ` Anand Raj
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Schuster @ 2010-12-20  9:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 254 bytes --]


Am 20.12.2010 um 09:48 schrieb Anand Raj:

> Hi,
> 
> I want to convert the html page to pdf.
> 
> the html contains svg and mathml content.

http://pragma-ade.com/general/manuals/xml-mkiv.pdf
http://dl.contextgarden.net/myway/tas/xhtml.pdf

Wolfgang



[-- Attachment #1.2: Type: text/html, Size: 698 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-20  9:18 ` Wolfgang Schuster
@ 2010-12-21  2:12   ` Anand Raj
  2010-12-21  8:13     ` Henning Hraban Ramm
  0 siblings, 1 reply; 9+ messages in thread
From: Anand Raj @ 2010-12-21  2:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1205 bytes --]

Hi,

Thank you so much for your prompt reply.

I am new to this.

my need is to convert the html page to pdf and this html contains svg and
mathml content.

I have linux environment

1. What are things to be installed to fulfill my need
2. how to convert html --> xml --> pdf using context (may be the commands)

Thanks
Anand

On Mon, Dec 20, 2010 at 5:18 PM, Wolfgang Schuster <
schuster.wolfgang@googlemail.com> wrote:

>
> Am 20.12.2010 um 09:48 schrieb Anand Raj:
>
> Hi,
>
> I want to convert the html page to pdf.
>
> the html contains svg and mathml content.
>
>
> http://pragma-ade.com/general/manuals/xml-mkiv.pdf
> http://dl.contextgarden.net/myway/tas/xhtml.pdf
>
> Wolfgang
>
>
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>
>

[-- Attachment #1.2: Type: text/html, Size: 2293 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-20  8:48 Html to pdf using pragma script Anand Raj
  2010-12-20  9:18 ` Wolfgang Schuster
@ 2010-12-21  7:04 ` Anand Raj
  2010-12-21  9:01   ` Hans Hagen
  1 sibling, 1 reply; 9+ messages in thread
From: Anand Raj @ 2010-12-21  7:04 UTC (permalink / raw)
  To: ConTeXt Mainling List


[-- Attachment #1.1: Type: text/plain, Size: 241 bytes --]

Hi,

how to map svg tags from xml and tex file.?



On Mon, Dec 20, 2010 at 4:48 PM, Anand Raj <anand.seed@gmail.com> wrote:

> Hi,
>
> I want to convert the html page to pdf.
>
> the html contains svg and mathml content.
>
> Thanks
> Anand

[-- Attachment #1.2: Type: text/html, Size: 552 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-21  2:12   ` Anand Raj
@ 2010-12-21  8:13     ` Henning Hraban Ramm
  2010-12-21  8:34       ` Thomas Schmitz
  0 siblings, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2010-12-21  8:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2010-12-21 um 03:12 schrieb Anand Raj:

> my need is to convert the html page to pdf and this html contains  
> svg and mathml content.
> I have linux environment
>
> 1. What are things to be installed to fulfill my need
> 2. how to convert html --> xml --> pdf using context (may be the  
> commands)

There's nothing ready-made that you can use out-of-the-nonexistant-box.
ConTeXt is (part of) a programmable system that you can and must adapt  
to your needs.
It's not that hard, but you can't expect us to provide you with a  
complete solution for your fuzzy needs.
If you're ready to throw in some money, then there are enough hireable  
consultants here to do your work for you.

- Install ConTeXt minimals.
- Learn how to use ConTeXt generally.
- Learn how to use ConTeXt with XML input.
- Write your conversion settings of HTML to ConTeXt, since there is  
and can be no general solution. (Only proper XHTML can work at all!)
- I guess you must write the SVG code to a buffer first to be able to  
use it as graphics input.
- I don't know about MathML, probably also there are some setups to do.
- Don't forget to write about your experiences in our wiki pages, in  
articles for TeX magazines, presetations at TeX conferences and  
perhaps in a MyWay tutorial.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-21  8:13     ` Henning Hraban Ramm
@ 2010-12-21  8:34       ` Thomas Schmitz
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Schmitz @ 2010-12-21  8:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 21 Dec 2010 09:13:00 +0100
  Henning Hraban Ramm <hraban@fiee.net> wrote:
> Am 2010-12-21 um 03:12 schrieb Anand Raj:
> 
>> my need is to convert the html page to pdf and this html 
>>contains  
>> svg and mathml content.
>> I have linux environment
>>
>> 1. What are things to be installed to fulfill my need
>> 2. how to convert html --> xml --> pdf using context 
>>(may be the  
>> commands)
> 
> There's nothing ready-made that you can use 
>out-of-the-nonexistant-box.
> ConTeXt is (part of) a programmable system that you can 
>and must adapt  to your needs.
> It's not that hard, but you can't expect us to provide 
>you with a  complete solution for your fuzzy needs.

Somehow, the OP reminds me of something I've read on the 
interwebs a long time ago: 
http://thedailywtf.com/Articles/plz-email-me-teh-codez.aspx

Thomas
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-21  7:04 ` Anand Raj
@ 2010-12-21  9:01   ` Hans Hagen
  2010-12-21  9:03     ` luigi scarso
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2010-12-21  9:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 21-12-2010 8:04, Anand Raj wrote:
> Hi,
>
> how to map svg tags from xml and tex file.?

Dump the svg blob in a file (say image-1.svg) and then use 
\extenalfigure[image-1.svg] to place it. Conversion to pdf will happen 
automatically then.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-21  9:01   ` Hans Hagen
@ 2010-12-21  9:03     ` luigi scarso
  2010-12-21  9:42       ` Anand Raj
  0 siblings, 1 reply; 9+ messages in thread
From: luigi scarso @ 2010-12-21  9:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Dec 21, 2010 at 10:01 AM, Hans Hagen <pragma@wxs.nl> wrote:
> On 21-12-2010 8:04, Anand Raj wrote:
>>
>> Hi,
>>
>> how to map svg tags from xml and tex file.?
>
> Dump the svg blob in a file (say image-1.svg) and then use
> \extenalfigure[image-1.svg] to place it. Conversion to pdf will happen
> automatically then
if you have inkscape installed


-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Html to pdf using pragma script
  2010-12-21  9:03     ` luigi scarso
@ 2010-12-21  9:42       ` Anand Raj
  0 siblings, 0 replies; 9+ messages in thread
From: Anand Raj @ 2010-12-21  9:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3822 bytes --]

Hi,

I have input xml file say *input.xml*

<?xml version="1.0" encoding="UTF-8"?>
<document>
    <div class='question'>
        <div>
            Solve by factoring:
            <br/><br/>
            *<am>
<math title="3/12"><mstyle displaystyle="true" fontfamily="serif"><mfrac><mn
>3</mn><mn>12</mn></mfrac></mstyle></math>
           </am>*
            <br/><br/>
            Give <i>either</i> of the two solutions.
        </div>
    </div>
</document>

Then I have the tex file to generate the pdf say *generate.tex*

\usemodule[mathml]

\setupbodyfont[palatino]

\startxmlsetups xml:testsetups
    \xmlsetsetup{test} {document|b|p|i|br|am}   {xml:*}
    \xmlsetsetup{test} {p[@class='tips']}       {xml:tips}
    \xmlsetsetup{test} {br[tag(1)='br']}        {xml:brbr}
    \xmlsetsetup{test} {div}                    {xml:div}
    \xmlsetsetup{test} {input}                  {xml:input}
    \xmlsetsetup{test} {input[@type='text']}    {xml:inputtext}
    \xmlsetsetup{test} {script|span}            {xml:skip}
    \xmlsetsetup{test} {div[@class='question']} {xml:question}
    \xmlsetsetup{test} {div[@class='review']}   {xml:review}
\stopxmlsetups

\xmlregistersetup{xml:testsetups}

\startxmlsetups xml:document
    \xmlflush{#1}
\stopxmlsetups

\startxmlsetups xml:skip
    \removeunwantedspaces\ignorespaces
\stopxmlsetups

\startxmlsetups xml:input
\stopxmlsetups

\startxmlsetups xml:inputtext
    \blank
%     \dontleavehmode\strut\blackrule[height=1pt,depth=0pt,width=\textwidth]
    \dontleavehmode\underbar{\strut\char0\hskip\textwidth\strut}
    \blank
\stopxmlsetups

\startxmlsetups xml:div
    \blank
    \xmlflush{#1}
    \blank
\stopxmlsetups

\newcount\QuestionCounter

\startxmlsetups xml:question
    \blank
    \global\advance\QuestionCounter\plusone
    \margintitle{\the\QuestionCounter}
    \xmlflush{#1}
    \blank
\stopxmlsetups

\startxmlsetups xml:review
%     \blank
%     \xmlflush{#1}
%     \blank
\stopxmlsetups

*\startxmlsetups xml:am
   \xmlprocessdata{}{
<math xmlns='http://www.w3.org/1998/Math/MathML'>
 <mrow>
  <msup> <mi>x</mi><mn>2</mn> </msup>
  <mo>+</mo>
  <mrow>
    <mn>4</mn><mi>x</mi>
  </mrow>
  <mo>+</mo>
  <mn>4</mn>
 </mrow>
</math>
}{}
\stopxmlsetups
*
\startxmlsetups xml:br
    \par
\stopxmlsetups

\startxmlsetups xml:p
    \par
\stopxmlsetups

\startxmlsetups xml:tips
    \blank
    \bgroup\bf Tips: \egroup\xmlflush{#1}
    \blank
\stopxmlsetups

\startxmlsetups xml:brbr
    \blank
\stopxmlsetups

\startxmlsetups xml:i
    \bgroup\it\xmlflush{#1}\egroup
\stopxmlsetups

\startxmlsetups xml:b
    \bgroup\it\xmlflush{#1}\egroup
\stopxmlsetups

\starttext
    \xmlprocessfile{test}{whatever-011.xml}{}
\stoptext

\stop


now, I need your help to use *<am></am>* value from input.xml and use it in
*\startxmlsetups xml:am* *\xmlprocessdata*as parameter.

Thanks
Anand




On Tue, Dec 21, 2010 at 5:03 PM, luigi scarso <luigi.scarso@gmail.com>wrote:

> On Tue, Dec 21, 2010 at 10:01 AM, Hans Hagen <pragma@wxs.nl> wrote:
> > On 21-12-2010 8:04, Anand Raj wrote:
> >>
> >> Hi,
> >>
> >> how to map svg tags from xml and tex file.?
> >
> > Dump the svg blob in a file (say image-1.svg) and then use
> > \extenalfigure[image-1.svg] to place it. Conversion to pdf will happen
> > automatically then
> if you have inkscape installed
>
>
> --
> luigi
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
>
> ___________________________________________________________________________________
>

[-- Attachment #1.2: Type: text/html, Size: 6113 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-12-21  9:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20  8:48 Html to pdf using pragma script Anand Raj
2010-12-20  9:18 ` Wolfgang Schuster
2010-12-21  2:12   ` Anand Raj
2010-12-21  8:13     ` Henning Hraban Ramm
2010-12-21  8:34       ` Thomas Schmitz
2010-12-21  7:04 ` Anand Raj
2010-12-21  9:01   ` Hans Hagen
2010-12-21  9:03     ` luigi scarso
2010-12-21  9:42       ` Anand Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).