0

I found a code somewhere in a community as:

%!tex program=xetex
% Enable right to left typesetting
\TeXXeTstate=1
% define a font (this is one I have)
\font\frmnorm = "IRCompset" at 24pt
\let\rm = \frmnorm
\uselanguage{farsi}
% At the start of a paragraph remove the indentation box then
% start right to left typesetting, after reinserting the indent
\everypar{{\setbox0=\lastbox}\beginR\kern\parindent}

\rm
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است

این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است این فقط یک آزمایش است
این فقط یک آزمایش است

\bye

AND AT THE END the author said thanks to creators of XePersian which made it possible to typeset complex scripts (including Persian) in TeX...

My question is are there any part of the code above, belong to XePersian Project !?!

More than the possibly negative answer, may I know about those who made it possible to typeset Farsi documents using TeX engines?

  • 2
    The plain TeX example you give does very little other than enable TeX--XeT (from e-TeX, NTS, 1999) and move the \parindent box to the 'correct' place (a very widely-known requirement). I'm not sure what we can really say here: it's RTL work, it uses TeX--XeT, ... – Joseph Wright Oct 27 '16 at 14:35
  • @JosephWright I think the ablity to typset Farsi/Persian in the posted code above is done by TeX--XeT (for RTL typesetting) and XeTeX (for using desires Font and Language) and nothing here is related to "xepersian" and "bidi" package! Am I right? – Omid Ghayour Oct 27 '16 at 14:50
  • Well that's almost impossible to say. Doing RTL work in XeTeX means dealing with the \parindent, and that means any package or document for such work will use more-or-less the same code. So I would expect the same idea to appear in xepersian, but I'm not sure why that would worry you. – Joseph Wright Oct 27 '16 at 14:54
  • @JosephWright since I am doing a research with literature review on "TeX and Farsi/Persian". So I don't want to miss a point. – Omid Ghayour Oct 27 '16 at 14:57
  • The only doubt might be in \uselanguage{farsi}, but the format accomplishes this by stating that \lang@farsi (and \lang@persian) have no hyphenation rule. I don't think there is any part of this that can be ascribed in any way to the author of XePersian besides, possibly, the code itself or the font in the original code. If the code has no attribution or belongs to a different person and the original font has no connection with the XePersian project, I don't think there is any more else to say. – egreg Oct 27 '16 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.