On Thu, 23 Jun 2011, Kip Warner wrote:

On Thu, 2011-06-23 at 06:36 +0200, Khaled Hosny wrote:
ConTeXt MkIV (assuming it is what you use) has no proper support for
Devanagari or other Indic scripts. Since you need only few words, you
can produce them externally (say ConTeXt MkII with XeTeX or Inkscape)
and include the resultant PDF as inline figure.

It's an inelegant, albeit workable solution - but perhaps the only way.
Thanks for your help.

If you really have to do it this way .... the dev version of the filter module [1] supports pre and postambles (@Mojca: you needed these for gnuplot module). You can use:

\usemodule[filter]

\defineexternalfilter[mkii]
                     [filter={texexec --xtx --result=\externalfilteroutputfile  
},
                      output=\externalfilterbasefile.pdf,
                      directory=output,
                      continue=yes,
                      readcommand=\readMKII]

\define[1]\readMKII
    {\dontleavehmode\externalfigure[#1][location=lohi]}

\startmkiipreamble
  \enableregime[utf-8]
  % I don't know how to setup typescripts with xetex
  % The rending is wrong. I think that one needs to enable
  % some language specific ligatures
  \font\devnagari="Lohit-Hindi" at 12pt
  \starttext
  \startTEXpage[foregroundstyle=\devnagari]
\stopmkiipreamble

\startmkiipostamble
  \stopTEXpage
  \stoptext
\stopmkiipostamble

\starttext

Check if this works.

\startmkii
\startlines
जाति न पूछो साधु की, पूछ लीजिए ग्‍यान।
मोल करो तलवार के, पड़ा रहन दो म्‍यान।।
\stoplines
\stopmkii

\stoptext
% \inlinemkii does not currently work with pre- and postamble

Aditya

[1]: https://github.com/adityam/filter/blob/dev/
___________________________________________________________________________________
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