-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathmain_he.tex
More file actions
57 lines (49 loc) · 1.54 KB
/
main_he.tex
File metadata and controls
57 lines (49 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% !TeX spellcheck = en_US
\documentclass[12pt]{article}
% Language setting
\usepackage[utf8]{inputenc}
\usepackage{fontspec} % For font settings
\usepackage{polyglossia} % Better for handling multiple languages with XeLaTeX or LuaLaTeX
\setmainfont[
Path = ./assets/fonts/LiberationSerif/,
Extension = .ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic]{LiberationSerif}
% Set languages
\newcommand{\setlanguages}[0]{
\setmainlanguage[calendar=hebrew]{hebrew} % Set the main language to Hebrew
\setotherlanguage{english} % Optional: if you have English text as well
}
% Command to enforce LTR for English text and numbers
\newcommand{\LTRtext}[1]{\bgroup\foreignlanguage{english}{#1}\egroup}
% Redefine \thepage to enforce LTR numerals in page numbers
\let\oldthepage\thepage
\renewcommand{\thepage}{\LTRtext{\oldthepage}}
% Set font for Hebrew script
\newfontfamily\hebrewfont{LiberationSerif}[
Path=./assets/fonts/LiberationSerif/,
Extension=.ttf,
UprightFont=*-Regular,
ItalicFont=*-Italic,
BoldFont=*-Bold,
BoldItalicFont = *-BoldItalic,
Script=Hebrew,
Scale=MatchLowercase
]
\newfontfamily\hebrewfonttt{LiberationSerif}[
Path = ./assets/fonts/LiberationSerif/,
Extension = .ttf,
UprightFont = *-Regular,
ItalicFont = *-Italic,
BoldFont = *-Bold,
BoldItalicFont = *-BoldItalic,
Script=Hebrew,
Scale=MatchLowercase
]
\def\sections{sections/translated/he}
\newtoggle{textright2left}
\toggletrue{textright2left}
\input{metadata.tex}
% TEST_SUBSTRING=אני עושה זאת