* ConTexT conversion to html/rtf/odt
@ 2010-11-06 19:33 Manfred Lotz
2010-11-06 21:00 ` Aditya Mahajan
2010-11-07 9:51 ` Mojca Miklavec
0 siblings, 2 replies; 9+ messages in thread
From: Manfred Lotz @ 2010-11-06 19:33 UTC (permalink / raw)
To: ntg-context
Hi there,
I'm in a situation where I have to do some documentation which should
be available in html and rtf/odt (would be nice to have).
I do not need any fancy stuff, just simple things: ordered,
unordered lists, verbatim, tables etc.
As a ConTeXt newbie I thought this might be a good idea to get into
ConTeXt. However, I'm not quite sure how to create HTML from ConTeXt.
What I tried so far:
Created a simple document:
\starttext
\section{Some section}
\startitemize[1]
\item bla bla
\stopitemize
\stoptext
Tried htcontext test.tex and got:
! Undefined control sequence.
<argument> <dl class="dd-\itemlevel
">
\HCode ...ode \leavevmode \fi \ht:special {t4ht=#1
}\fi
\a:itemize-group ... {<dl class="dd-\itemlevel ">}
\global \let \end:dd
=\empty
\dostartitemgroup ... {\dodostartitemgroup [#2][]}
\fi
<to be read again>
\item
l.6 \item
bla bla
?
Perhaps there is some stupidity from my side. If yes I appreciate any
corrections. If no then htcontext from package tex4ht doesn't really
work for ConTeXt and then I would like to know what other alternatives
I have. Also regarding rtf or/and odt.
--
Thanks,
Manfred
--
Manfred
___________________________________________________________________________________
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: ConTexT conversion to html/rtf/odt
2010-11-06 19:33 ConTexT conversion to html/rtf/odt Manfred Lotz
@ 2010-11-06 21:00 ` Aditya Mahajan
2010-11-07 10:18 ` John Haltiwanger
` (2 more replies)
2010-11-07 9:51 ` Mojca Miklavec
1 sibling, 3 replies; 9+ messages in thread
From: Aditya Mahajan @ 2010-11-06 21:00 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1867 bytes --]
On Sat, 6 Nov 2010, Manfred Lotz wrote:
> I'm in a situation where I have to do some documentation which should
> be available in html and rtf/odt (would be nice to have).
There is an experimental feature of converting ConTeXt to XML. You can
then process XML using standard XML tools to get HTML.
> I do not need any fancy stuff, just simple things: ordered,
> unordered lists, verbatim, tables etc.
\setupbackend[export=yes]
> \starttext
>
> \section{Some section}
>
> \startitemize[1]
> \item bla bla
> \stopitemize
>
> \stoptext
Run "context filename". This will create a filename.export file in your
current directory that looks like this:
<?xml version='1.0' standalone='yes' ?>
<!-- input filename : back -->
<!-- processing date : Sat Nov 6 16:55:02 2010 -->
<!-- context version : 2010.10.14 13:14 -->
<!-- exporter version : 0.10 -->
<document language='en' file='back' date='Sat Nov 6 16:55:02 2010'
context='2010.10.14 13:14' version='0.10'>
<section detail='section'>
<sectionnumber>1</sectionnumber>
<sectiontitle>Some section</sectiontitle>
<sectioncontent>
<itemgroup detail='itemize' symbol='1'>
<item>
<itemtag><math><mrow><mo>•</mo></mrow></math></itemtag>
<itemcontent>bla bla</itemcontent>
</item>
</itemgroup>
</sectioncontent>
</section>
</document>
> work for ConTeXt and then I would like to know what other alternatives
> I have. Also regarding rtf or/and odt.
Since you do not need any fancy features, a simpler option is to use
markdown as your starting format and use pandoc to convert it to context,
html, and odt. However, creating even slightly complicated tables in
markdown is a pain, unless your editor supports an ascii table mode.
Aditya
[-- 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: ConTexT conversion to html/rtf/odt
2010-11-06 19:33 ConTexT conversion to html/rtf/odt Manfred Lotz
2010-11-06 21:00 ` Aditya Mahajan
@ 2010-11-07 9:51 ` Mojca Miklavec
1 sibling, 0 replies; 9+ messages in thread
From: Mojca Miklavec @ 2010-11-07 9:51 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, Nov 6, 2010 at 20:33, Manfred Lotz wrote:
>
> Tried htcontext test.tex and got:
>
> ! Undefined control sequence.
> <argument> <dl class="dd-\itemlevel
...
> l.6 \item
> bla bla
> ?
>
>
> Perhaps there is some stupidity from my side. If yes I appreciate any
> corrections. If no then htcontext from package tex4ht doesn't really
> work for ConTeXt and then I would like to know what other alternatives
> I have. Also regarding rtf or/and odt.
There is a group of maintainers
(http://tug.org/mailman/listinfo/tex4ht), but the author who was "the
big hacker" passed away not that long ago. You may ask on the mailing
list, but there is no guarantee ...
tex4ht would break each time when Hans does some bigger changes in the
core and this is probably the case now as well.
See Aditya's answer about the rest ...
Mojca
___________________________________________________________________________________
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: ConTexT conversion to html/rtf/odt
2010-11-06 21:00 ` Aditya Mahajan
@ 2010-11-07 10:18 ` John Haltiwanger
2010-11-07 20:50 ` Aditya Mahajan
2010-11-07 10:54 ` Manfred Lotz
2010-11-07 11:02 ` luigi scarso
2 siblings, 1 reply; 9+ messages in thread
From: John Haltiwanger @ 2010-11-07 10:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1625 bytes --]
On Sat, Nov 6, 2010 at 9:00 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Sat, 6 Nov 2010, Manfred Lotz wrote:
>
> work for ConTeXt and then I would like to know what other alternatives
>> I have. Also regarding rtf or/and odt.
>>
>
> Since you do not need any fancy features, a simpler option is to use
> markdown as your starting format and use pandoc to convert it to context,
> html, and odt. However, creating even slightly complicated tables in
> markdown is a pain, unless your editor supports an ascii table mode.
>
>
This is indeed a decent solution, one which worked for typesetting my thesis
in PDF and HTML. (You get RTF and ODT for free, assuming it doesn't take
much glue to get it to look the way you want). I had to write a wrapper
script to do regular expression parsing to take care of edge cases (pandoc
is written in Haskell, so to 'scripting' the application requires working in
that language; my choice was to do a more hackish approach that used a Ruby
script that generated multiple markdown files)
Aditya, do perhaps know one of these editors with ASCII table mode?
> Aditya
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
>
> ___________________________________________________________________________________
>
>
[-- Attachment #1.2: Type: text/html, Size: 2702 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: ConTexT conversion to html/rtf/odt
2010-11-06 21:00 ` Aditya Mahajan
2010-11-07 10:18 ` John Haltiwanger
@ 2010-11-07 10:54 ` Manfred Lotz
2010-11-07 11:09 ` luigi scarso
2010-11-07 11:12 ` Hans Hagen
2010-11-07 11:02 ` luigi scarso
2 siblings, 2 replies; 9+ messages in thread
From: Manfred Lotz @ 2010-11-07 10:54 UTC (permalink / raw)
To: ntg-context
On Sat, 6 Nov 2010 17:00:38 -0400 (EDT)
Aditya Mahajan <adityam@umich.edu> wrote:
> On Sat, 6 Nov 2010, Manfred Lotz wrote:
>
> > I'm in a situation where I have to do some documentation which
> > should be available in html and rtf/odt (would be nice to have).
>
> There is an experimental feature of converting ConTeXt to XML. You
> can then process XML using standard XML tools to get HTML.
>
> > I do not need any fancy stuff, just simple things: ordered,
> > unordered lists, verbatim, tables etc.
>
>
> \setupbackend[export=yes]
! Undefined control sequence.
l.1 \setupbackend
[export=yes]
This doesn't work for me. Perhaps my context from TeXLive 2010 is too
old. Not quite sure about that.
>
> Since you do not need any fancy features, a simpler option is to use
> markdown as your starting format and use pandoc to convert it to
> context, html, and odt. However, creating even slightly complicated
> tables in markdown is a pain, unless your editor supports an ascii
> table mode.
>
Thanks for pointing me to pandoc. On the one hand it works very well
but on the other hand it (markdown) seems a bit too rudimentary.
--
Manfred
___________________________________________________________________________________
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: ConTexT conversion to html/rtf/odt
2010-11-06 21:00 ` Aditya Mahajan
2010-11-07 10:18 ` John Haltiwanger
2010-11-07 10:54 ` Manfred Lotz
@ 2010-11-07 11:02 ` luigi scarso
2 siblings, 0 replies; 9+ messages in thread
From: luigi scarso @ 2010-11-07 11:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, Nov 6, 2010 at 10:00 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Sat, 6 Nov 2010, Manfred Lotz wrote:
>
>> I'm in a situation where I have to do some documentation which should
>> be available in html and rtf/odt (would be nice to have).
>
> There is an experimental feature of converting ConTeXt to XML. You can then
> process XML using standard XML tools to get HTML.
Not so experimental.
PDF/A was tested (I needs more testing with new version of AdobeAcrobat)
--
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: ConTexT conversion to html/rtf/odt
2010-11-07 10:54 ` Manfred Lotz
@ 2010-11-07 11:09 ` luigi scarso
2010-11-07 11:12 ` Hans Hagen
1 sibling, 0 replies; 9+ messages in thread
From: luigi scarso @ 2010-11-07 11:09 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, Nov 7, 2010 at 11:54 AM, Manfred Lotz <manfred.lotz@arcor.de> wrote:
> On Sat, 6 Nov 2010 17:00:38 -0400 (EDT)
> Aditya Mahajan <adityam@umich.edu> wrote:
>
>> On Sat, 6 Nov 2010, Manfred Lotz wrote:
>>
>> > I'm in a situation where I have to do some documentation which
>> > should be available in html and rtf/odt (would be nice to have).
>>
>> There is an experimental feature of converting ConTeXt to XML. You
>> can then process XML using standard XML tools to get HTML.
>>
>> > I do not need any fancy stuff, just simple things: ordered,
>> > unordered lists, verbatim, tables etc.
>>
>>
>> \setupbackend[export=yes]
>
> ! Undefined control sequence.
> l.1 \setupbackend
> [export=yes]
>
> This doesn't work for me. Perhaps my context from TeXLive 2010 is too
> old. Not quite sure about that.
Yes, can be.
Usually you should use the minimals, but with tlcontrib --- see
http://tlcontrib.metatex.org/ ---
thigs are changing.
Mojca ?
--
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: ConTexT conversion to html/rtf/odt
2010-11-07 10:54 ` Manfred Lotz
2010-11-07 11:09 ` luigi scarso
@ 2010-11-07 11:12 ` Hans Hagen
1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2010-11-07 11:12 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Manfred Lotz
On 7-11-2010 11:54, Manfred Lotz wrote:
> On Sat, 6 Nov 2010 17:00:38 -0400 (EDT)
> Aditya Mahajan<adityam@umich.edu> wrote:
>
>> On Sat, 6 Nov 2010, Manfred Lotz wrote:
>>
>>> I'm in a situation where I have to do some documentation which
>>> should be available in html and rtf/odt (would be nice to have).
>>
>> There is an experimental feature of converting ConTeXt to XML. You
>> can then process XML using standard XML tools to get HTML.
>>
>>> I do not need any fancy stuff, just simple things: ordered,
>>> unordered lists, verbatim, tables etc.
>>
>>
>> \setupbackend[export=yes]
>
> ! Undefined control sequence.
> l.1 \setupbackend
> [export=yes]
>
> This doesn't work for me. Perhaps my context from TeXLive 2010 is too
> old. Not quite sure about that.
it was added after tex live 2010 was frozen (this year we froze rather
early not knowing that there would be a long delay before 2010 showed
up; also we had to freeze in sync with luatex)
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: ConTexT conversion to html/rtf/odt
2010-11-07 10:18 ` John Haltiwanger
@ 2010-11-07 20:50 ` Aditya Mahajan
0 siblings, 0 replies; 9+ messages in thread
From: Aditya Mahajan @ 2010-11-07 20:50 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, 7 Nov 2010, John Haltiwanger wrote:
> Aditya, do perhaps know one of these editors with ASCII table mode?
Emacs org mode. Nothing else even comes close to it. There are a few
scripts that will convert csv to similar to rst tables.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-11-07 20:50 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06 19:33 ConTexT conversion to html/rtf/odt Manfred Lotz
2010-11-06 21:00 ` Aditya Mahajan
2010-11-07 10:18 ` John Haltiwanger
2010-11-07 20:50 ` Aditya Mahajan
2010-11-07 10:54 ` Manfred Lotz
2010-11-07 11:09 ` luigi scarso
2010-11-07 11:12 ` Hans Hagen
2010-11-07 11:02 ` luigi scarso
2010-11-07 9:51 ` Mojca Miklavec
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).