Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Romanian language PDF broken - font trouble #35

Open
jasonestewart opened this issue Mar 21, 2019 · 7 comments
Open

Romanian language PDF broken - font trouble #35

jasonestewart opened this issue Mar 21, 2019 · 7 comments

Comments

@jasonestewart
Copy link
Collaborator

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.

@jasonestewart
Copy link
Collaborator Author

jasonestewart commented Mar 21, 2019

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}

@jasonestewart
Copy link
Collaborator Author

structure.tex has the following lines:

\usepackage[english]{babel}

which conflict with Romanian

@jasonestewart
Copy link
Collaborator Author

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

@niccokunzmann
Copy link
Owner

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.

@niccokunzmann
Copy link
Owner

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.

@jasonestewart
Copy link
Collaborator Author

jasonestewart commented Mar 21, 2019

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.

@niccokunzmann
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants