diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.tex')
-rw-r--r-- | macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.tex | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.tex b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.tex new file mode 100644 index 0000000000..fbdf5c8b91 --- /dev/null +++ b/macros/latex/contrib/reledmac/examples/2-reledmac-right-to-left.tex @@ -0,0 +1,75 @@ +\documentclass{article} +\usepackage[osf,p]{libertinus} +\usepackage{microtype} +\usepackage[pdfusetitle,hidelinks]{hyperref} +\usepackage[noend,nofamiliar,noeledsec,series={A}]{reledmac} + +\usepackage{ifluatex} +\ifluatex + \usepackage[main=english,bidi=basic]{babel} + \babelprovide[import=he]{hebrew} + \babelfont{rm}{Libertinus Serif} + \babelfont[hebrew]{rm}{Ezra SIL} + \newcommand{\texthebrew}[2][]{\foreignlanguage{hebrew}{#2}} + \newenvironment{hebrew}[2][]{\begin{otherlanguage}{hebrew}}{\end{otherlanguage}} + \usepackage{metalogo} +\else + \usepackage{polyglossia} + \setmainlanguage{english} + \setotherlanguage{hebrew} + \newfontfamily{\hebrewfont}[Scale=0.9]{Ezra SIL} +\fi + +\Xarrangement{paragraph} +\Xbeforeinserting{\LTR} +\Xlemmaseparator{[}%Will be reversed by Ezra SIL font +\Xafterlemmaseparator{0.5em} +\Xbeforelemmaseparator{0.25em} +\Xwrapcontent{\textenglish} +\Xwraplemma{\RL} + +\linenumincrement{2} +\firstlinenum{1} + +\title{Editing right-to-left text with left-to-right notes} +\date{} +\begin{document} +\maketitle +\begin{abstract} + + +In this file, we provide an example of an edition with right-to-left text and left-to-right notes, using \XeLaTeX. + +\begin{itemize} + \item The `hebrew' environment allows us to write Hebrew right-to-left. + \item \verb+\Xbeforeinserting{\LTR}+ makes the critical notes to be typeset left-to-right. + \item \verb+\Xwraplemma{\RL}+ assures the lemmas, which are in Hebrew, be typeset right-to-left. + \item \verb+\Xwrapcontent{\textenglish}+ assures the content of the note is marked as English text. + \item As the `Ezra SIL' font transforms a `]' to a `[', we use a `[' as lemma separator, that will be typeset as `]' by `Ezra SIL'. So the need for \verb+\Xlemmaseparator+ is not directly linked to reledmac. +\end{itemize} + +\end{abstract} + +\begin{hebrew} +\beginnumbering + + +\pstart +\edtext{בְּרֵאשִׁ֖ית בָּרָ֣א}{\Afootnote{Some comment}} +אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃ +\edtext{וְהָאָ֗רֶץ הָיְתָ֥ה}{\Afootnote{Some comment}} +\edtext{ + תֹ֨הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְהֹ֑ום וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃ +וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י אֹ֑ור וַֽיְהִי־אֹֽור׃ +}{\Afootnote{Some comment on a long lemma}} +וַיַּ֧רְא אֱלֹהִ֛ים אֶת־הָאֹ֖ור כִּי־טֹ֑וב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָאֹ֖ור וּבֵ֥ין הַחֹֽשֶׁךְ׃ +\edtext{וַיִּקְרָ֨א אֱלֹהִ֤ים׀}{\Afootnote{Some comment}} + לָאֹור֙ יֹ֔ום וְלַחֹ֖שֶׁךְ קָ֣רָא לָ֑יְלָה וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר יֹ֥ום אֶחָֽד׃ פ +\edtext{וַיַּ֤רְא אֱלֹהִים֙}{\Afootnote{Some comment}} + אֶת־כָּל־אֲשֶׁ֣ר עָשָׂ֔ה וְהִנֵּה־טֹ֖וב מְאֹ֑ד וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר יֹ֥ום הַשִּׁשִּֽׁי׃ פ + +\pend +\endnumbering + +\end{hebrew} +\end{document} |