I am new to ConTeXt world, however what I need to achieve is simply to be able to typeset Arabic/Hebrew text along with English text (Bidi) in ConTeXt. I came across this part of the context garden being relevant to what I am after, but to no avail at compilation, no PDF was generated and no errors were thrown.
These steps were followed as described in the link above:
- create
ara-sty.tex
file (code provided in the same link above), presumably in the same dir of the.tex
file - create the
MWE.tex
file below:
MWE: (compile with luatex)
\environment ara-sty
\starttext
\setarabic
هذا نص بالعربية يحتوي على ارقام ١، ٢، ٣ بالعربية أيضاً.
\stoptext
%%% Local Variables:
%%% mode: context
%%% TeX-master: t
%%% TeX-engine: luatex
%%% End:
Output file
Running `ConTeXt' on `MWE' with ``texexec --once --texutil --engine=luatex --interface=en --passon="--synctex=1" --nonstop MWE.tex''
There is no PDF file generated, what am I missing here?
Notes
- compiling English-only files we successful using ConTeXt, the problem arises only dealing with Arabic/Hebrew text.
- ConTeXt version on mu Ubuntu machine
context --version
in the terminal:current version: 2015.05.18 12:26
- Luatex version
luatex --version
in terminal issues:This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/Debian) (rev 5238)
Update-1
Now I updated ConteXt on my machine successfully as described in this link of ConTeXtgarden wiki for Ubuntu using the standalone installation and then initialized the tree in ./baschrc
, and now I have these versions installed:
ConTeXt
mtx-context | ConTeXt Process Management 1.01 mtx-context | mtx-context | main context file: /usr/local/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2017.06.27 18:05
Luatex
This is LuaTeX, Version 1.05.0 (TeX Live 2017)
I get the same problem even with the latest stable release of ConTeXt:
current version: 2017.05.15 21:48
So the same problem, no PDF file is generated, any help would be appreciated.
Update-2
After googling around, I found out that one issue is my Emacs setup (GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2017-05-06) using AucTeX needs some adjustment which is to set the ConTeXt-Mark-version
variable to "IV"
instead of its default "II"
.
After setting this globally in my dot file (setup Emacs file) as follows:
(setq ConTeXt-Mark-version "IV")
Now, when I do compilation of the MWE I got these lines of complaint: Problems after (1) page.
Running `ConTeXt' on `MWE' with ``context --once --texutil --synctex=1 --nonstop MWE.tex''
mtx-context | warning: synctex is enabled
mtx-context | run 1: luatex --fmt="/var/lib/texmf/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luatex/cont-en" --interaction="nonstopmode" --jobname="MWE" --lua="/var/lib/texmf/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luatex/cont-en.lui" --no-parse-first-line --synctex=1 --c:currentrun=1 --c:directives="system.synctex=1" --c:fulljobname="./MWE.tex" --c:input="./MWE.tex" --c:kindofrun=3 --c:maxnofruns=1 --c:nonstopmode --c:once --c:synctex="1" --c:texutil "cont-yes.mkiv"
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/Debian) (rev 5238)
\write18 enabled.
system > synctex functionality is enabled (1)!
open source > 1 > 1 > /usr/share/texmf/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2015.05.18 12:26 MKIV current fmt: 2016.5.14 int: english/english
system > 'cont-new.mkiv' loaded
open source > 2 > 2 > /usr/share/texmf/tex/context/base/cont-new.mkiv
close source > 2 > 2 > /usr/share/texmf/tex/context/base/cont-new.mkiv
system > files > jobname 'MWE', input './MWE', result 'MWE'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > 2 > 3 > /home/ffs/.emacs.d/docs/context/MWE.tex
open source > 3 > 4 > ara-sty.tex
tex error > error on line 64 in file ara-sty.tex: ! Undefined control sequence
l.64 \setcharactermirroring
[1]
54 \usetypescript[lm]%
55 \setupbodyfont[lm,20pt]}
56
57 \definestartstop
58 [latinpar]
59 [commands=\Arabic\LatinParDir]
60
61 \define[1]\LT
62 {{\LatinTextDir#1}}
63
64 >> \setcharactermirroring[1]
65
66 \stopenvironment
67
68
69
70 %%% Local Variables:
71 %%% mode: context
72 %%% TeX-master: t
73 %%% End:
74
close source > 3 > 4 > ara-sty.tex
fonts > preloading latin modern fonts (second stage)
fonts > 'fallback modern-designsize rm 12pt' is loaded
fonts > bodyfont '20pt' is defined (can better be done global)
fonts > bodyfont '24pt' is defined (can better be done global)
fonts > bodyfont '16pt' is defined (can better be done global)
backend > xmp > using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml'
pages > flushing realpage 1, userpage 1
close source > 2 > 4 > /home/ffs/.emacs.d/docs/context/MWE.tex
close source > 1 > 4 > /usr/share/texmf/tex/context/base/cont-yes.mkiv
mkiv lua stats > used config file: /usr/share/texmf/web2c/texmfcnf.lua;/usr/share/texlive/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats > used cache path: readable: '/var/lib/texmf/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442' | readable+writable: '/home/ffs/.texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442'
mkiv lua stats > synctex tracing: synctex has been enabled (extra log file generated)
mkiv lua stats > resource resolver: loadtime 0.129 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 10 found files, scanned paths: <none>
mkiv lua stats > stored bytecode data: 371 modules (0.335 sec), 78 tables (0.009 sec), 449 chunks (0.344 sec)
mkiv lua stats > traced context: maxstack: 1134, freed: 2, unreachable: 1132
mkiv lua stats > running in nuts mode: yes
mkiv lua stats > cleaned up reserved nodes: 44 nodes, 439 lists of 438
mkiv lua stats > node memory usage: 2 glue, 2 penalty, 9 attribute, 35 glue_spec, 3 attribute_list, 2 temp
mkiv lua stats > node list callback tasks: 6 unique task lists, 5 instances (re)created, 44 calls
mkiv lua stats > used backend: pdf (backend for directly generating pdf output)mkiv lua stats > loaded patterns: ar::26 en::2, load time: 0.000
mkiv lua stats > jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats > callbacks: 176 direct, 312 indirect, 488 total
mkiv lua stats > result saved in file: MWE.pdf, compresslevel 3, objectcompresslevel 3
mkiv lua stats > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats > fonts load time: 0.263 seconds for 7 fonts, 2 shared in backend, 0 common vectors, 2 common hashes
mkiv lua stats > used platform: linux-64, type: unix, binary subtree: usr
mkiv lua stats > luatex banner: this is luatex, version beta-0.80.0 (tex live 2015/debian) (rev 5238)
mkiv lua stats > control sequences: 44153 of 65536 + 100000
mkiv lua stats > lua properties: engine: lua, used memory: 90 MB (ctx: 90 MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
mkiv lua stats > runtime: 0.680 seconds, 1 processed pages, 1 shipped pages, 1.471 pages/second
SyncTeX written on MWE.synctex.gz.
mtx-context | fatal error: return code: 1
TeX Output exited abnormally with code 1 at Thu Jun 29 03:50:01
I noticed from the error message above that my luatex is 2015 instead of being updated to 2017 as shown earlier in this post, so how can I fix that?
\setarabic
.ara-sty.tex
first. The file's contents can be found in the Garden: wiki.contextgarden.net/Arabic_and_Hebrew\setcharactermirroring
is not available in MKIV.