Open pharpend opened 9 years ago
I got this far with some limited success:
diff --git a/ru/build b/ru/build
index 3829971..3c9050f 100755
--- a/ru/build
+++ b/ru/build
@@ -18,9 +18,9 @@ mkdir tmp
cp -rvf lysa.ltx appendices/* chapters/* bibliographies/* images/* tmp/
cd tmp
-pdflatex lysa.ltx || clean_and_die 1
+xelatex lysa.ltx || clean_and_die 1
bibtex lysa
-pdflatex lysa.ltx && pdflatex lysa.ltx
+xelatex lysa.ltx && xelatex lysa.ltx
cp lysa.pdf ..
clean_and_die 0
diff --git a/ru/lysa.ltx b/ru/lysa.ltx
index b6f6153..710c8af 100644
--- a/ru/lysa.ltx
+++ b/ru/lysa.ltx
@@ -23,9 +23,6 @@
\usepackage[toc,page]{appendix}
\usepackage[backend=bibtex]{biblatex}
\usepackage{centernot}
-\usepackage[answerdelayed]{exercise}
-\usepackage[T1]{fontenc}
-\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage{mathtools}
\usepackage{relsize}
@@ -37,6 +34,11 @@
\usepackage[hidelinks]{hyperref}
\usepackage{cleveref}
+% Russian
+\usepackage[T2]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[russian]{babel}
+
\crefname{chapter}{\S}{\S}
\crefname{section}{\S}{\S}
\crefname{subsection}{\S}{\S}
@@ -93,7 +95,7 @@
\newcommand{\link}[2]{#2 (\url{#1})}
% Section & Chapter he
-\newcommand{\ch}[1]{\chapter{#1}\label{ch: #1}}
+\renewcommand{\ch}[1]{\chapter{#1}\label{ch: #1}}
\newcommand{\s}[1]{\section{#1}\label{s: #1}}
\renewcommand{\ss}[1]{\subsection{#1}\label{ss: #1}}
\newcommand{\sss}[1]{\subsubsection{#1}\label{sss: #1}}
@@ -186,15 +188,17 @@
{
\newpage
\ss{Exercises}
- \begin{ExerciseList}
+ \begin{enumerate}
}
{
- \end{ExerciseList}
+ \end{enumerate}
\newpage
\sss{Answers}
- \shipoutAnswer
\newpage
}
+\newcommand{\Exercise}{\item}
+\newcommand{\Answer}{\item}
+
\newenvironment{iquote}{\begin{quote}\it}{\end{quote}}
\lstnewenvironment{plainfile}[1][]
@@ -216,6 +220,7 @@
\newcommand{\filepath}{\texttt}
+% \DeclareUnicodeCharacter{00A0}{ }
\title{Learn You Some Algebras for Glorious Good!}
\begin{document}
Here's the result:
This might help: https://tex.stackexchange.com/questions/816/cyrillic-in-latex
Great, thank you for help!
It may be better for y'all to write the book from scratch (i.e. a fresh TeX document). That way, you can build in the Russian stuff from the start, instead of having to patch everything up.
Additionally, the format is not rigid. That is, you could make this into a website, EPub, what-have-you. You don't have to make it a PDF.
Last I checked, y'all were having issues with TeX and the Cyrillic alphabet.
inputenc
.texlive-langcyrillic
.Then run
./build
and you'll be golden-ish. This may be an issue on my machine, but: