Hi Hans.

** Hans Hagen [2010-11-09 17:40:44 +0100]:

> On 8-11-2010 3:52, Vladimir Lomov wrote:
> 
>>I compiled them with context (mkIV, context minimal) and got
>>ex{1,2,3}.export. I thought that I get not only the document content but
>>also its logical structure (for example some markup for font switching).
> 
> Bold in itself is not structure so best tag it as (e.g.) important:
> 
> \setupbackend[export=yes]
> 
> \definestartstop[important][style=bold]
> 
> \starttext
> 
> This is second example.
> This time we try to use font switching mechanism:
> This is normal, but this \important{one is bold}. Normal again.
> 
> \stoptext
So, if I want to get structured xml file I need to either redefine all
usual command to be tagged (start/stop) and, that is more logical define
my own tag commands. IMHO the use of 'important' as in example above is
logical, the actual presentation of 'importtant' words could be define
separately and in different ways (I like idea of xml+styles).

>>Is it true that 'backend' only output document content not its logic
>>strcuture? Does it work with math? The third example gives for math only
>>not letters.
> 
> Math becomes:
> 
>  This is inline formula
>   <math>
>     <mrow>
>       <mi>𝐸</mi>
>       <mo>=</mo>
>       <mi>𝑚</mi>
>       <msup>
>         <mi>𝑐</mi>
>         <mn>2</mn>
>       </msup>
>     </mrow>
>   </math>
> .
>   <break/>
>  This is display formula
>   <formula>
>     <formulacontent>
>       <math>
>         <mrow>
>           <mi> 𝐸</mi>
>           <mo>=</mo>
>           <mi>𝑚</mi>
>           <msup>
>             <mi>𝑐</mi>
>             <mn>2</mn>
>           </msup>
>         </mrow>
>       </math>
>     </formulacontent>
>   </formula>
E-er, yes. I don't see characters (my terminal use UTF8 and good font)
even now. But I saw them in web intterface to ML (contextgarden because
another shows something different). Also I saw tthem in Emacs. AFAIU,
this is in private region of Unicode, these are _italic_ E, m and c. I
thought that there should be letter from ASCII (codes < 127).

>>I attached the resulted export files.
>>
>>P.S. Then I saw the announce about 'backend'&  'export=yes' I thought
>>that context would be good tool for notes. I imagine that I could wrote
>>a text file and make from it either pdf (for printing/screening) or html
>>(for screening) or may be convert xml (using existing tools and
>>methods) to other formats (rtf/odt/xhtml) that would contain math,
>>images, tables. But seems that I was wrong or this will be in future
>>of the backend?
> 
> indeed it should be possible to use context that way and afaik the
> export is already quite okay (you might need a recent luatex as
> there have been issues with attributes in math mode that were sorted
> out a while ago)
Well, this were simple tests. I'll make more complex one in next weeks.
Texts, with font switching, maths, images, tables. I want to have tool
using which I could convert from one source to several formats (pdf,
xhtml, rtf/odt).

---
WBR, Vladimir Lomov

-- 
Have a nice day!
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to