# RefugeePhrasebook - help needed to produce PDF [closed]

Hello everyone (and sorry for x-posting), I want to call your attention to a volunteer project that has been very active in the last couple of weeks, aiming to collectively produce and distribute phrasebooks to Refugees arriving to Europe and elsewhere. The project's main web-site is http://refugeephrasebook.de/ The different versions of the phrasebook are being published in Wikibooks https://en.wikibooks.org/wiki/Refugee_Phrasebook And discussion is mostly happening on facebook's refugeephrasebook group and some etherpads.

Currently the project is struggling to produce, small, readable paper phrasebooks. And each version contains several (around 7), in different alphabets. As a quick'n' dirty solution, collaborators have been using web-to-print to produce the PDFs and print. However this results in, large, ugly, barely readable collections of pages. (See both mw content and reslting PDFs in en.wikibooks.org/wiki/Refugee_Phrasebook#Print_versions)

I (but i might be wrong) think that creating a LaTex/LuaTex/XeLatex template for Pandoc, that'd take in consideration the specificities of the print-output, could be a good solution, since original content is stored in mediawiki markup. Then one would only need to use Pandoc to convert from mw to PDF, using the template. Right?

My knowledge of LaTex is very limited to create such template, however i am sure some of you might be able to do this easily.

Please reply if you are interested in helping out, or have some idea on how to do it.

Thanks. a

• welcome to TeX.SE. I'm sorry but this is more a post requiring help for a project than a question. There are boards on internet when you can make a call for a project and have more visibility and more answer I think – Romain Picot Sep 20 '15 at 8:28
• It seems that translations are stored in spreadsheet. It might be more convenient to export it as .csv or .ods and process that, instead of going through mediawiki > pandoc, etc. – michal.h21 Sep 20 '15 at 10:37
• The user chejnik seems to be involved in an Icelandic-Czech Students' Dictionary (also hvalur.org). Maybe they are able to share some experience if you ask them nicely. Other than that this question (with a very commendable aim) does not really fit the Q&A style here. Some of the formats mentioned in Which web forums specialize in LaTeX general discussion? or even Meta.TeX.SX (???) would be better suited to your request. – moewe Sep 20 '15 at 12:58

There is some example of simple dictionary for Syrian Arabic. It uses LuaLaTeX for typesetting Arabic and current version of odsfile package. It is included in TeX Live distribution, but fixes for some recent issues are only in development version at the moment.

I've downloaded your full spreadsheet in .ods format. Unfortunately, it couldn't be processes as it is, but it must be cleaned in LibreOffice first. Replace all \ characters with something else, like | for example. It would be interpreted as commands otherwise by odsfile (it is feature requested by some users, not a bug). Save it under some normal name, like full.ods.

Now, we can try to process it with LuaLaTeX:

\documentclass[a5page,10pt]{article}
\usepackage[margin=1.5cm]{geometry}
\usepackage{longtable}
\usepackage{odsfile}
\usepackage{polyglossia}
\usepackage{fontspec}
\setmainlanguage{english}
\setotherlanguages{arabic,syriac,urdu,farsi}
\setmainfont{Linux Libertine O}
% \newfontfamily\arabicfont[Script=Arabic,Language=Arabic]{Amiri}
\begin{document}
\catcode\_=12
% \begin{tabular}{l l}
% Syrian & Translations\endhead
\begin{description}
rowtemplate={\item[{\huge\textarabic{-{2}}}] {\textit{English}: -{6}; \textit{German}: -{1}; \textit{French}: -{7};}}]
\end{description}
% \end{tabular}
\end{document}


Some important moments:

\documentclass[a5page,10pt]{article}
\usepackage[margin=1.5cm]{geometry}


this defines the layout. You will probably want to change that, see Geometry package documentation. With a5paper, you can easily make a booklet, see pdfbook script.

\setmainfont{Linux Libertine O}
% \newfontfamily\arabicfont[Script=Arabic,Language=Arabic]{Amiri}


font declaration. You will need to declare font families similar to \arabicfont to other non Latin scripts, such as Urdu or Persian. See Polyglossia package for more details.

\begin{description}
rowtemplate={\item[{\huge\textarabic{-{2}}}] {\textit{English}: -{6}; \textit{German}: -{1}; \textit{French}: -{7};}}]
\end{description}


This will print actual dictionary. Syrian term is a header and translations in English, German and French follows.

With range=a4:az70 we select all rows between 4 and 70. The most important line is

 rowtemplate={\item[{\huge\textarabic{-{2}}}] {\textit{English}: -{6}; \textit{German}: -{1}; \textit{French}: -{7};}}]


all -{n} constructs will select nth column from the selected range. Syrian is second column, we need to include it in \textarabic command, in order to select correct font and text direction. I've used \huge command because the selected Arabic font was too small. You can play with other similar commands to get best size.

Compile the document with

 lualatex filename.tex


and this is the result:

• this seems really promising. I am hover struggling to build the polyglossia.sty. Running latext polyglossia.ins did not generate the polyglossia.sty. But this expected, as it is my first contact with LuaLaTex, and previously only had limited with latex. If you have any times on generating the polyglossia.ins please let me know. Thanks michal.h21 – Andre Sep 20 '15 at 20:52
• @Andre it is included in TeX Live, you don't need to build it yourself. – michal.h21 Sep 20 '15 at 21:09