samdark / yii2-cookbook

Yii 2.0 Community Cookbook
1.45k stars 296 forks source link

how to translate and compile to Chinese #176

Closed bubifengyun closed 6 years ago

bubifengyun commented 6 years ago

good book! I hope that it could be inserted or translated to chinese, then make can produce a pdf file which written in Chinese. however, if even only one Chinese character used, it will pop error. Any suggestions? thank you.

samdark commented 6 years ago

We have https://github.com/yiisoft-contrib/yiiframework.com that seems to build Chinese well. Could be adopted to this repository as well.

cebe commented 6 years ago

yiiframework.com does not build PDF for chinese yet. Turns out to be quite hard to make chinese and japanese characters to work in LaTeX.

bubifengyun commented 6 years ago

Thank you @cebe I think, it may be better to use xetex instead of pdflatex. I find another markdown template for Chinese, bookdown, which is RMarkdown. I will use it. Thank you.

cebe commented 6 years ago

if you come up with a way to produce a PDF from markdown in chinese I'd love to take a look at the solution to adopt it for yiiframework.com

bubifengyun commented 6 years ago

@cebe OK, I will test it. I am new bee. it may cost long time to give the answer.

bubifengyun commented 5 years ago

@cebe I had write a Bookdown template for UTF8 chinese which based on xelatex. here is my template. https://github.com/bubifengyun/deepin-bible/releases But it requires R language, pandoc and texlive 2018, it cost so many tools. Can it ok? Thank you.

cebe commented 5 years ago

@bubifengyun thanks for sharing it. Installing tools should not be a problem, but your repo is completely in chinese so I don't know where to start :) Could you make a description in english on how to use it?

bubifengyun commented 5 years ago

@cebe OK, I will try. But it had only Chinese version now. I will try make an english version first.

bubifengyun commented 5 years ago

@cebe

How To Make Book {#chap:makebookenglish}

This is a description in English.

Required Software

Before make this book, you need install several software in your computer. Such as,

Here I will show how to make in Linux Deepin 15.5.

$\$$ sudo apt-get install r-base r-base-dev \
rstudio texlive-full pandoc make

If version cannot meet the requirements, please download from office site.

Build Book

Download source code from github: https://github.com/bubifengyun/deepin-bible

Then change to the download-directory, run make, if success, you will get the book in ./_book/deepin-bible.pdf.

If pops error, maybe you should install some software, please let me know, thank you.

Back words

All the title and contents is Chinese, if you need it, I can change to English. Then Chinese and other UTF-8 characters could be added in this book.