ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Write once layout everwhere (?)
@ 2007-06-10 22:31 Pepe Barbe
  2007-06-11  3:49 ` Aditya Mahajan
  2007-06-11 20:28 ` nico
  0 siblings, 2 replies; 13+ messages in thread
From: Pepe Barbe @ 2007-06-10 22:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

I have used ConTeXt in the past and I have been very pleased with it
and the results obtained, much more than LaTeX.

Now I am looking into a solution that would allow me to layout the
content ConTeXt and in other formats that ConTeXt does not (Forgive my
ignorance, if I am wrong) output, like HTML, Plain Text, or RTF (Those
are the formats that I can think of that are interesting to me
currently).

Reading the Wiki one of those solutions would be XML, but I know very
little about the subject, so this email is to ask about experiences in
similar endeavors, other solutions for the same problem and how
practical this is.

I suppose that I would use this for general writing and for academic
as well (Maths and engineering).

Thanks,
Pepe
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-10 22:31 Write once layout everwhere (?) Pepe Barbe
@ 2007-06-11  3:49 ` Aditya Mahajan
  2007-06-11  5:16   ` luigi scarso
                     ` (2 more replies)
  2007-06-11 20:28 ` nico
  1 sibling, 3 replies; 13+ messages in thread
From: Aditya Mahajan @ 2007-06-11  3:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, 10 Jun 2007, Pepe Barbe wrote:

> Hello,
>
> I have used ConTeXt in the past and I have been very pleased with it
> and the results obtained, much more than LaTeX.
>
> Now I am looking into a solution that would allow me to layout the
> content ConTeXt and in other formats that ConTeXt does not (Forgive my
> ignorance, if I am wrong) output, like HTML, Plain Text, or RTF (Those
> are the formats that I can think of that are interesting to me
> currently).
>
> Reading the Wiki one of those solutions would be XML, but I know very
> little about the subject, so this email is to ask about experiences in
> similar endeavors, other solutions for the same problem and how
> practical this is.

I have been exploring for something like this, but unfortunately have 
not found anything completely satisfactory. For "simple" documents, 
that is, only text, XML is the easiest. You have to determine a xml 
dtd, and then it is relatively easy to write context commands to parse 
it. It is also easy (but slightly cumbersome) to write a xsl 
stylesheet to parse xml into html. Most browsers do the xslt 
transformation on the fly. I found xml+css to be the easiest way to 
go, since you can do almost a one-to-one mapping of your ConTeXt 
commands. But most xml websites say that it is the "old" method and 
should not be used.

To get plain text, you can do lynx -dump or something similar. I am 
sure there will be ways to convert xml to rtf, but I have not explored 
them.

Some of the difficulties that I faced with simple documents was:

1. What is the xml equivalent of ||
2. What is the xml equivalent of ~ (  ??)
3. What is the xml equivalent of

\abbreviation {EECS} {Electrical Engineering and Computer Science}
and then \EECS\ and \infull{EECS}.

I did not have time to explore further, so I left my xml experiments 
there. For me the hardest part was to learn the xml way of thinking.


> I suppose that I would use this for general writing and for academic
> as well (Maths and engineering).

For more complext documents (esp math), I do not like xml as an input 
format. Mathml is too verbose for me to write. Then there is the 
question of how useful is it to have a xml + mathml document. ConTeXt 
can parse it, and so can some of the browsers, but most browsers can 
not. Converting to html + images looks ugly, unless you put in a lot 
of effort. I have not tried converting xml+mathml to rtf or some 
office format. For complicated documents, I do not see the use of 
having an xml document. Most people are happy receiving a pdf. If 
someone wants to edit my files, and cannot edit tex file, he/she will 
not be able to edit xml files. If they use an office application to 
edit the file, I will need to backport the modifications manually. So 
he/she might as well use pdf annotation tools.


If you do want to explore furhter, perhaps the easiest way is to use 
tex4ht, which does a decent job with most context documents and can 
convert to html, xml, and open office format. I do not like tex4ht 
because its html output is too verbose, and its documentation is a bit 
hard to follow.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11  3:49 ` Aditya Mahajan
@ 2007-06-11  5:16   ` luigi scarso
  2007-06-11 12:26   ` John R. Culleton
  2007-06-11 12:26   ` Thomas A. Schmitz
  2 siblings, 0 replies; 13+ messages in thread
From: luigi scarso @ 2007-06-11  5:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 6/11/07, Aditya Mahajan <adityam@umich.edu> wrote:
> > Reading the Wiki one of those solutions would be XML,

try
tbookdtd.sf.net

myabe can help you.
-- 
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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11  3:49 ` Aditya Mahajan
  2007-06-11  5:16   ` luigi scarso
@ 2007-06-11 12:26   ` John R. Culleton
  2007-06-11 13:15     ` Aditya Mahajan
  2007-06-11 12:26   ` Thomas A. Schmitz
  2 siblings, 1 reply; 13+ messages in thread
From: John R. Culleton @ 2007-06-11 12:26 UTC (permalink / raw)
  To: ntg-context

On Sunday 10 June 2007 23:49, Aditya Mahajan wrote:
> On Sun, 10 Jun 2007, Pepe Barbe wrote:
> > Hello,
> >
> > I have used ConTeXt in the past and I have been very pleased with
> > it and the results obtained, much more than LaTeX.
> >
> > Now I am looking into a solution that would allow me to layout
> > the content ConTeXt and in other formats that ConTeXt does not
> > (Forgive my ignorance, if I am wrong) output, like HTML, Plain
> > Text, or RTF (Those are the formats that I can think of that are
> > interesting to me currently).
> >
I don't think it is possible to come up with an "universal elixir" 
that does any format from source and is efficient to use. Plain text 
is the exchange medium I use.  XML is too cumbersome to code by hand. 
Therefore I have solutions for specific situations. For example when 
a customer presents me with a non-fiction document already laid out 
in MSWord, I first save it as rtf. Then I run it through the program 
rtf2latex2e. This gives me an executable LaTeX file, with all the 
font changes etc. preserved. The I edit it in Gvim, using mass 
changes to convert LaTeX tags to an equivalent Context format. Some, 
like all the begin/end tags I just delete en masse. 

It is easy to go from the output of Context to plain text.  There are 
plenty of pdf to ascii converters in GhostScript and PSUtils etc.   
The only big problem comes when there are columns involved. 
In that situation cut and paste from a pdf viewer window to an editor 
window can be helpful.


-- 
John Culleton
Able Indexing and Typesetting
Precision typesetting (tm) at reasonable cost.
Satisfaction guaranteed. 
http://wexfordpress.com

___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11  3:49 ` Aditya Mahajan
  2007-06-11  5:16   ` luigi scarso
  2007-06-11 12:26   ` John R. Culleton
@ 2007-06-11 12:26   ` Thomas A. Schmitz
  2007-06-11 13:09     ` Aditya Mahajan
  2 siblings, 1 reply; 13+ messages in thread
From: Thomas A. Schmitz @ 2007-06-11 12:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users


On Jun 11, 2007, at 5:49 AM, Aditya Mahajan wrote:

> Some of the difficulties that I faced with simple documents was:
>
> 1. What is the xml equivalent of ||
> 2. What is the xml equivalent of ~ (&nbsp; ??)
> 3. What is the xml equivalent of
>
> \abbreviation {EECS} {Electrical Engineering and Computer Science}
> and then \EECS\ and \infull{EECS}.

Hi Aditya,

I've just begun experimenting with xlm (because, as Duncan has  
pointed out, I'm sure that every line I write is for eternity...).  
Anyway, what I say here may be totally wrong, but here's how I treat  
this stuff:

1. For || or |-|, I have defined an entity in my DTD:

<!ENTITY conthyph "-">

In my environment for processing the xml files, I have

\defineXMLentity[conthyph]{|-|}

so I can write context&conthyph;specific and get the output I expect.

2. Yes, I use &nbsp; with these definitions:
<!ENTITY nbsp "&#x000A0;">
\defineXMLentity[nbsp]{~}

3. Abbreviations: does xtag-ent.tex do what you want?

Not sure if this is what you're looking for, but it does appear to  
work for me.

All best

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11 12:26   ` Thomas A. Schmitz
@ 2007-06-11 13:09     ` Aditya Mahajan
  2007-06-11 13:34       ` Wolfgang Schuster
  0 siblings, 1 reply; 13+ messages in thread
From: Aditya Mahajan @ 2007-06-11 13:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Thomas,

On Mon, 11 Jun 2007, Thomas A. Schmitz wrote:

>
> On Jun 11, 2007, at 5:49 AM, Aditya Mahajan wrote:
>
>> Some of the difficulties that I faced with simple documents was:
>>
>> 1. What is the xml equivalent of ||
>> 2. What is the xml equivalent of ~ (&nbsp; ??)
>> 3. What is the xml equivalent of
>>
>> \abbreviation {EECS} {Electrical Engineering and Computer Science}
>> and then \EECS\ and \infull{EECS}.
>
> Hi Aditya,
>
> I've just begun experimenting with xlm (because, as Duncan has
> pointed out, I'm sure that every line I write is for eternity...).
> Anyway, what I say here may be totally wrong, but here's how I treat
> this stuff:
>
> 1. For || or |-|, I have defined an entity in my DTD:
>
> <!ENTITY conthyph "-">
>
> In my environment for processing the xml files, I have
>
> \defineXMLentity[conthyph]{|-|}
>
> so I can write context&conthyph;specific and get the output I expect.
>
> 2. Yes, I use &nbsp; with these definitions:
> <!ENTITY nbsp "&#x000A0;">
> \defineXMLentity[nbsp]{~}

Ah. Thanks. This was easy :)

> 3. Abbreviations: does xtag-ent.tex do what you want?
>
> Not sure if this is what you're looking for, but it does appear to
> work for me.

Hmm... somehome I had missed xtag-ent.tex. I was looking at xml 
introductions, and did not look into ConTeXt sources. I will have a 
look and see how it goes.

Thanks,
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11 12:26   ` John R. Culleton
@ 2007-06-11 13:15     ` Aditya Mahajan
  0 siblings, 0 replies; 13+ messages in thread
From: Aditya Mahajan @ 2007-06-11 13:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 11 Jun 2007, John R. Culleton wrote:

> On Sunday 10 June 2007 23:49, Aditya Mahajan wrote:
>> On Sun, 10 Jun 2007, Pepe Barbe wrote:
>>> Hello,
>>>
>>> I have used ConTeXt in the past and I have been very pleased with
>>> it and the results obtained, much more than LaTeX.
>>>
>>> Now I am looking into a solution that would allow me to layout
>>> the content ConTeXt and in other formats that ConTeXt does not
>>> (Forgive my ignorance, if I am wrong) output, like HTML, Plain
>>> Text, or RTF (Those are the formats that I can think of that are
>>> interesting to me currently).
>>>
> I don't think it is possible to come up with an "universal elixir"
> that does any format from source and is efficient to use. Plain text
> is the exchange medium I use.  XML is too cumbersome to code by hand.
> Therefore I have solutions for specific situations. For example when
> a customer presents me with a non-fiction document already laid out
> in MSWord, I first save it as rtf. Then I run it through the program
> rtf2latex2e. This gives me an executable LaTeX file, with all the
> font changes etc. preserved. The I edit it in Gvim, using mass
> changes to convert LaTeX tags to an equivalent Context format. Some,
> like all the begin/end tags I just delete en masse.

This approach is fine if you have to convert only once. However, if 
you want to occassionally update the sources and get an updated html 
and pdf output, it can be too much work. For situations like this, I 
think that, at least for just text + graphics, xml is the most robust 
way.

Of course, there are also plain text markup formats, like wiki markup, 
restructured text, textile, etc. If the document is really simple, 
they may be easier to use. There are many plain text markup to LaTeX 
convertor, but no plain text to ConTeXt convertor that I know of. I 
remember there was someone on the list who had written scripts to 
convert wiki markup into context and then to pdf. I do not know if 
these scripts are publically available.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11 13:09     ` Aditya Mahajan
@ 2007-06-11 13:34       ` Wolfgang Schuster
  2007-06-11 15:42         ` Aditya Mahajan
  0 siblings, 1 reply; 13+ messages in thread
From: Wolfgang Schuster @ 2007-06-11 13:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2007/6/11, Aditya Mahajan <adityam@umich.edu>:

> Hmm... somehome I had missed xtag-ent.tex. I was looking at xml
> introductions, and did not look into ConTeXt sources. I will have a
> look and see how it goes.
>
> Thanks,
> Aditya

Hi Aditya,

the XML-Document example.pdf is a little bit outdated (Hans changed a few
commands). The important files for xml are xtag-ini and xtag-ext, you should
take a look into the contml module.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11 13:34       ` Wolfgang Schuster
@ 2007-06-11 15:42         ` Aditya Mahajan
  2007-06-11 19:35           ` nico
  0 siblings, 1 reply; 13+ messages in thread
From: Aditya Mahajan @ 2007-06-11 15:42 UTC (permalink / raw)
  To: ntg-context

Quoting Wolfgang Schuster <schuster.wolfgang@googlemail.com>:

> 2007/6/11, Aditya Mahajan <adityam@umich.edu>:
>
>> Hmm... somehome I had missed xtag-ent.tex. I was looking at xml
>> introductions, and did not look into ConTeXt sources. I will have a
>> look and see how it goes.
>>
>> Thanks,
>> Aditya
>
> Hi Aditya,
>
> the XML-Document example.pdf is a little bit outdated (Hans changed a few
> commands). The important files for xml are xtag-ini and xtag-ext, you should
> take a look into the contml module.

Thanks. I had not looked at them and some of the things about handling 
at the ConTeXt end are more clear now. But I think that I did not 
explain my question correctly.

What I do not understand how are abbreviations etc. handled by xslt for 
conversion into html. For example, how do I write an xsl style sheet 
that converts this xml input

<abbreviation value="EECS", short="EECS", full="Electrical Engineering 
and Computer Science" />

<p> I study <abbrev value="EECS"> which stands for <abbrev 
value="EECS", infull="yes"> </p>

into html as

<p> I study EECS which stands for Electrical Engineering and Computer 
Science </p>

I know that this is not the right list to ask this sort of questions, 
but I am hoping that there are xml users here and they will be able to 
point me to the right direction.

Thanks,
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-11 15:42         ` Aditya Mahajan
@ 2007-06-11 19:35           ` nico
  2007-06-11 20:19             ` Aditya Mahajan
  0 siblings, 1 reply; 13+ messages in thread
From: nico @ 2007-06-11 19:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

On Mon, 11 Jun 2007 11:42:23 -0400, Aditya Mahajan <adityam@umich.edu>  
wrote:

> Thanks. I had not looked at them and some of the things about handling
> at the ConTeXt end are more clear now. But I think that I did not
> explain my question correctly.
>
> What I do not understand how are abbreviations etc. handled by xslt for
> conversion into html. For example, how do I write an xsl style sheet
> that converts this xml input
>
> <abbreviation value="EECS", short="EECS", full="Electrical Engineering
> and Computer Science" />
>
> <p> I study <abbrev value="EECS"> which stands for <abbrev
> value="EECS", infull="yes"> </p>
>
> into html as
>
> <p> I study EECS which stands for Electrical Engineering and Computer
> Science </p>
>
> I know that this is not the right list to ask this sort of questions,
> but I am hoping that there are xml users here and they will be able to
> point me to the right direction.

I haven't followed the thread, but attached an idea of doing what you want  
with XSLT. Note that your example is not valid at all (commas between  
attributes, missing ending '/' for empty elements). BTW, it's not a good  
idea to use the same attribute ("value") as an reference identifier, and  
for referencing to another element.

Regards,

[-- Attachment #2: myxsl.xsl --]
[-- Type: application/octet-stream, Size: 1063 bytes --]

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>

<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<xsl:template match="abbrev">
  <xsl:variable name="abbrev" select="//abbreviation[@value=current()/@value]"/>
  <xsl:if test="$abbrev">
    <xsl:apply-templates select="$abbrev" mode="short"/>
  </xsl:if>
</xsl:template>

<xsl:template match="abbrev[@infull='yes']">
  <xsl:variable name="abbrev" select="//abbreviation[@value=current()/@value]"/>
  <xsl:if test="$abbrev">
    <xsl:apply-templates select="$abbrev" mode="full"/>
  </xsl:if>
</xsl:template>

<xsl:template match="abbreviation"/>

<xsl:template match="abbreviation" mode="full">
  <xsl:value-of select="@full"/>
</xsl:template>

<xsl:template match="abbreviation" mode="short">
  <xsl:value-of select="@short"/>
</xsl:template>

<xsl:template match="p">
  <p>
  <xsl:apply-templates/>
  </p>
</xsl:template>

<xsl:template match="/">
  <xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: myfile.xml --]
[-- Type: text/xml; name=myfile.xml, Size: 228 bytes --]

<body>
<abbreviation value="EECS" short="EECS"
              full="Electrical Engineering and Computer Science" />
 
<p> I study <abbrev value="EECS"/> which stands for <abbrev 
value="EECS" infull="yes"/> </p>

</body>

[-- Attachment #4: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Write once layout everwhere (?)
  2007-06-11 19:35           ` nico
@ 2007-06-11 20:19             ` Aditya Mahajan
  0 siblings, 0 replies; 13+ messages in thread
From: Aditya Mahajan @ 2007-06-11 20:19 UTC (permalink / raw)
  To: ntg-context

Quoting nico <nicolas.marsgui@libertysurf.fr>:

> On Mon, 11 Jun 2007 11:42:23 -0400, Aditya Mahajan 
> <adityam@umich.edu>  wrote:
>
>> Thanks. I had not looked at them and some of the things about handling
>> at the ConTeXt end are more clear now. But I think that I did not
>> explain my question correctly.
>>
>> What I do not understand how are abbreviations etc. handled by xslt for
>> conversion into html. For example, how do I write an xsl style sheet
>> that converts this xml input
>>
>> <abbreviation value="EECS", short="EECS", full="Electrical Engineering
>> and Computer Science" />
>>
>> <p> I study <abbrev value="EECS"> which stands for <abbrev
>> value="EECS", infull="yes"> </p>
>>
>> into html as
>>
>> <p> I study EECS which stands for Electrical Engineering and Computer
>> Science </p>
>>
>> I know that this is not the right list to ask this sort of questions,
>> but I am hoping that there are xml users here and they will be able to
>> point me to the right direction.
>
> I haven't followed the thread, but attached an idea of doing what you 
> want  with XSLT. Note that your example is not valid at all (commas 
> between  attributes, missing ending '/' for empty elements).

Thank you. This is exactly what I wanted. I will now go back to using 
xml for simple documents and see how things go.

> BTW, it's not a good  idea to use the same attribute ("value") as an 
> reference identifier, and  for referencing to another element.

Ok. I will keep this in mind.

Thanks,
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
  2007-06-10 22:31 Write once layout everwhere (?) Pepe Barbe
  2007-06-11  3:49 ` Aditya Mahajan
@ 2007-06-11 20:28 ` nico
  1 sibling, 0 replies; 13+ messages in thread
From: nico @ 2007-06-11 20:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

On Sun, 10 Jun 2007 17:31:45 -0500, Pepe Barbe <elventear@gmail.com> wrote:

> I have used ConTeXt in the past and I have been very pleased with it
> and the results obtained, much more than LaTeX.
>
> Now I am looking into a solution that would allow me to layout the
> content ConTeXt and in other formats that ConTeXt does not (Forgive my
> ignorance, if I am wrong) output, like HTML, Plain Text, or RTF (Those
> are the formats that I can think of that are interesting to me
> currently).
>
> Reading the Wiki one of those solutions would be XML, but I know very
> little about the subject, so this email is to ask about experiences in
> similar endeavors, other solutions for the same problem and how
> practical this is.
>
> I suppose that I would use this for general writing and for academic
> as well (Maths and engineering).

XML is a good format if you need several output formats without losing  
information (XHTML, HTML, PDF, manpages, plain text). But I recommend some  
well established grammar (DITA, DocBook) to be able to use their official  
transformation tools, and to be able to use some XML WYSIWYG editor that  
supports them natively (like XXE).

Strangely enough the PDF output is weakest point since most of the tools  
use FO and the related compilers (well known FOP, maybe xmlroff, maybe  
fotex) which can give very ugly output. The only good compiler I know is  
XEP, but it is not free (there's a full featured personnal edition that  
sticks its logo on every page).

For docbook, you can try marginal tools to convert the XML to *tex formats  
(DocbookInContext, db2latex, dblatex). You can also directly use the  
native XML handling of context (method used by DocbookInContext) but IMHO  
it needs some context knowledge.

Personnaly I use docbook, mostly because I have to produce PDF, HTML, and  
troff (manpages) outputs. It is even possible to convert some already  
existing manpages to docbook with doclifter.

Regards,
BG
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Write once layout everwhere (?)
       [not found] <mailman.429.1181527849.2368.ntg-context@ntg.nl>
@ 2007-06-11 10:46 ` Duncan Hothersall
  0 siblings, 0 replies; 13+ messages in thread
From: Duncan Hothersall @ 2007-06-11 10:46 UTC (permalink / raw)
  To: ntg-context

Hi Pepe,

If you want your content to remain maintainable and manageable for a 
long period (e.g. decades), if you can afford it, and if you have a 
sufficiently large amount of content, then I strongly recommend 
investing the time and effort in an XML-based solution.

My experience is in large scale educational/commercial applications, in 
which managing content in XML and using tools like ConTeXt to create 
beautiful print output, and alternate tools to create web output from 
the same source, is a very good solution. I can certainly let you know 
the technology we use, but some of it is commercial and expensive, and 
other bits are just complicated! I did a talk at the user group meeting 
which was kinda about this: http://context.aanhet.net/epen2007/share/duncan/

The first question to ask yourself is how much effort is your content 
worth. The rest of the answers flow from that, in my experience. :-)

Duncan
> Hello,
>
> I have used ConTeXt in the past and I have been very pleased with it
> and the results obtained, much more than LaTeX.
>
> Now I am looking into a solution that would allow me to layout the
> content ConTeXt and in other formats that ConTeXt does not (Forgive my
> ignorance, if I am wrong) output, like HTML, Plain Text, or RTF (Those
> are the formats that I can think of that are interesting to me
> currently).
>
> Reading the Wiki one of those solutions would be XML, but I know very
> little about the subject, so this email is to ask about experiences in
> similar endeavors, other solutions for the same problem and how
> practical this is.
>
> I suppose that I would use this for general writing and for academic
> as well (Maths and engineering).
>
> Thanks,
> Pepe
>   
>   
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2007-06-11 20:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-10 22:31 Write once layout everwhere (?) Pepe Barbe
2007-06-11  3:49 ` Aditya Mahajan
2007-06-11  5:16   ` luigi scarso
2007-06-11 12:26   ` John R. Culleton
2007-06-11 13:15     ` Aditya Mahajan
2007-06-11 12:26   ` Thomas A. Schmitz
2007-06-11 13:09     ` Aditya Mahajan
2007-06-11 13:34       ` Wolfgang Schuster
2007-06-11 15:42         ` Aditya Mahajan
2007-06-11 19:35           ` nico
2007-06-11 20:19             ` Aditya Mahajan
2007-06-11 20:28 ` nico
     [not found] <mailman.429.1181527849.2368.ntg-context@ntg.nl>
2007-06-11 10:46 ` Duncan Hothersall

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).