Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Trying to use ntheorem's \theoremindent seems to indent the left side rather than the right side when used with polyglossia and right-to-left languages:

\documentclass{article}

\usepackage{ntheorem}
\theoremindent2cm
\theorembodyfont{\normalfont}
\theoremseparator{:}
\newtheorem{theorem}{משפט}

\usepackage{polyglossia}
\setdefaultlanguage[calendar=hebrew, numerals=arabic]{hebrew}
\setotherlanguage{english}
\newfontfamily\hebrewfont{David CLM}

\begin{document}
א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א א
\begin{theorem}
ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב ב
\end{theorem}
\end{document}

enter image description here

Is this fixable?

Also it seems the numbering and separators are displayed wrong.

share|improve this question
    
Note that the positioning of the colon (:) is also wrong: To the right, rather than the left, of the number. I guess ntheorem is very RTL-oriented in general... –  einpoklum Dec 12 '11 at 8:42
    
Have split-off the separator question to here. –  einpoklum Dec 12 '11 at 10:57
add comment

1 Answer 1

up vote 1 down vote accepted

The offending lines in ntheorem-hyper.sty (or ntheorem.sty, depending on your distribution) seem to be:

\newdimen\theoremindent
\global\theoremindent0cm
\newdimen\theorem@indent
%...
\advance\@totalleftmargin \theorem@indent
\parshape \@ne \@totalleftmargin \linewidth

So, unsurprisingly, ntheorem assumes margins are on the left. Here's a suggested micro-patch, partially due to @egreg:

\usepackage{ntheorem}
\usepackage{etoolbox}
\makeatletter
\@ifpackageloaded{polyglossia}{
\patchcmd{\@thm}
  {\advance\@totalleftmargin\theorem@indent}
  {\if@RTL\else\advance\@totalleftmargin\theorem@indent\fi}
  {}{}
}
\makeatother

This should be adaptable into a patch for ntheorem-hyper.sty itself.

share|improve this answer
    
I could not post this as a comment so I had to post it as an answer. A modified version of Eyal/Egreg's patch is added to version 11.152 of bidi package which should be on CTAN soon. –  Simurgh12 Apr 16 '12 at 6:01
    
user13617 Have a look at the faq to know why you cannot comment yet. That's not a reason to use features with a different purpose instead. –  Stefan Kottwitz Apr 16 '12 at 7:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.