niccokunzmann / 12characters-translations

Translations of the play 12 Characters

Home Page:https://12characters.org.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Romanian language PDF broken - font trouble

jasonestewart opened this issue · comments

The default font for Romanian leaves out some of the letters. For example, the title of "Let's party like it's 2099" in Romanian should be: "Să ne distrăm ca și cum am fi în 2099" - but in the PDF it appears as: "S ne distrm ca i cum am fi în 2099". So all of the 'ă' and 'ș' are missing.

https://tex.stackexchange.com/questions/347629/issue-with-diacritics-in-romanian-language-document

It appears to be a problem with LaTeX and their fonts. LuaLaTeX should support Romanian fonts properly but it appears that the following is missing from main.tex

\usepackage[utf8]{inputenc}
\usepackage[romanian]{babel}

structure.tex has the following lines:

\usepackage[english]{babel}

which conflict with Romanian

replacing this in structure.tex fixes the text but the headings are still broken

Hm. I wonder if we should also release an HTML version of the book. This would in my view fix these problems as there are many fonts which support many more characters. I do not really know how to fix this as I am not so proficient in latex.

replacing this in structure.tex fixes the text but the headings are still broken

What do you replace this with? Can you make a pull request? We can also change this content.

OK. So I have it working.

In structure.tex I needed to comment out

%\usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs

The T1 font encoding doesn't work well for Romanian according to that link above.

In main.tex I needed to comment out the \afont directive

Something in that definition messes with two of the Romanian characters.

Now it handles the Romanian characters fine - even with the \usepackage[english]{babel}. But if we don't use \usepackage[romanian]{babel} then it uses the english names for "Table of Contents" instead of the Romanian word.

So now I need to know how we can insert directives with a conditional based on language.

So now I need to know how we can insert directives with a conditional based on language.

Is there any if/then/else in Latex?
Also, we can include a file which has the language code, e.g. en.tex and ro.tex in a folder.
They can be included at the very beginning and define commands which can be inserted at the right place. This would be the object-oriented way to do it. But I do not know how to achieve this with LaTeX.
It should be possible and needs some research.