[LyX/master] Fixes to heb-article, by Udi Fogiel (#12735)

Juergen Spitzmueller spitz at lyx.org
Mon Apr 10 15:19:51 UTC 2023


commit d0a83d33fcc0db64bd2b8bc79671c4427ddc18e6
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Mon Apr 10 18:24:04 2023 +0200

    Fixes to heb-article, by Udi Fogiel (#12735)
    
    For some reason theorems titles has \beginR without a \endR, and since
    this is basically inside restricted horizontal mode, TeX complains about
    a missing \endR.
    
    I could not figure out why were they there in the first place so I
    removed them and the output did not change, and the warnings are gone.
    
    Beside that the numbering of the theorems is wrong (e.g. 1.0 instead of
    0.1), the \@makelr thing should happen after babel is loaded.
    
    The theorems layouts did not have a counter (in LyX) so I added one.
---
 lib/layouts/heb-article.layout |   59 +++++++++++++++++++++-------------------
 1 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/lib/layouts/heb-article.layout b/lib/layouts/heb-article.layout
index beb28ef..5281c26 100644
--- a/lib/layouts/heb-article.layout
+++ b/lib/layouts/heb-article.layout
@@ -4,26 +4,14 @@
 # Hebrew article textclass definition file.
 # Author: Dekel Tsur <dekel at math.tau.ac.il>
 # Few changes by Baruch Even <baruch.even at writeme.com>
+# Edited by Udi Fogiel <udifoglle at gmail.com>
 
 Format 99
 Input article
 
-Preamble
-\usepackage{theorem}
-\theorembodyfont{\upshape}
-% LuaTeX/luabidi does not know \beginR
-% FIXME LuaTeX/luabidi does not get the order right
-\AtBeginDocument{
-\@ifundefined{setRTL}{}{\providecommand\beginR{\setRTL}}
-}
-\newtheorem{theorem}{{\beginR משפט}}[section]
-% Only needed by babel, not polyglossia (which does
-% not have \make at lr defined)
-\@ifundefined{make at lr}{}{%
-   \AtBeginDocument{\make at lr\thetheorem}
-}
-EndPreamble
-
+Counter theorem
+	Within	section
+End
 
 Style Theorem
 	Category              Reasoning
@@ -41,7 +29,8 @@ Style Theorem
 	Align                 Block
 	AlignPossible         Block, Left
 	LabelType             Static
-	LabelString           "Theorem #."
+	LabelString           "Theorem \thetheorem."
+	LabelCounter		theorem
 	Font
 	  Shape               Up
 	  Size                Normal
@@ -50,56 +39,70 @@ Style Theorem
 	  Shape               Up
 	  Series              Bold
 	EndFont
+	Preamble
+		\usepackage{theorem}
+		\theorembodyfont{\upshape}
+		\newtheorem{theorem}{משפט}[section]
+		% Only needed by babel-hebrew
+		\AtBeginDocument{\@ifundefined{make at lr}{}{%
+		  \make at lr\thetheorem
+		}}
+	EndPreamble
 End
 
 
 Style Lemma
 	CopyStyle             Theorem
 	LatexName             lemma
-	LabelString           "Lemma #."
+	LabelString           "Lemma \thetheorem."
 	Preamble
-		\newtheorem{lemma}[theorem]{{\beginR למה}}
+		\newtheorem{lemma}[theorem]{למה}
 	EndPreamble
+	DependsOn Theorem
 End
 
 
 Style Corollary
 	CopyStyle             Theorem
 	LatexName             corollary
-	LabelString           "Corollary #."
+	LabelString           "Corollary \thetheorem."
 	Preamble
-		\newtheorem{corollary}[theorem]{{\beginR מסקנה}}
+		\newtheorem{corollary}[theorem]{מסקנה}
 	EndPreamble
+	DependsOn Theorem
 End
 
 
 Style Claim
 	CopyStyle             Theorem
 	LatexName             claim
-	LabelString           "Claim #."
+	LabelString           "Claim \thetheorem."
 	Preamble
-		\newtheorem{claim}[theorem]{{\beginR טענה}}
+		\newtheorem{claim}[theorem]{טענה}
 	EndPreamble
+	DependsOn Theorem
 End
 
 
 Style Definition
 	CopyStyle             Theorem
 	LatexName             definition
-	LabelString           "Definition #."
+	LabelString           "Definition \thetheorem."
 	Preamble
-		\newtheorem{definition}[theorem]{{\beginR הגדרה}}
+		\newtheorem{definition}[theorem]{הגדרה}
 	EndPreamble
+	DependsOn Theorem
 End
 
 
 Style Remarks
 	CopyStyle             Theorem
 	LatexName             remark
-	LabelString           "Remarks #."
+	LabelString           "הערות \thetheorem."
 	Preamble
-            \newtheorem{remark}[theorem]{{\beginR הערה}}
+            \newtheorem{remark}[theorem]{הערה}
 	EndPreamble
+	DependsOn Theorem
 End
 
 
@@ -131,7 +134,7 @@ Style Proof
 	EndFont
 	Preamble
 		\newenvironment{proof}%
-			{{\beginR \textbf{הוכחה:}}}%
+			{\textbf{הוכחה:}}%
 			{\hfill\rule{2mm}{2mm}\par\vspace{2mm}}
 	EndPreamble
 End


More information about the lyx-cvs mailing list