Preface
Many friends in the garden should use latex to write documents, papers, resumes, and blog posts. Do you know if anyone is used to sort books? Recently, I learned some latex and used it to arrange the android Design Guide into a 6-inch e-book format. I can read pad and e-ink on hand ..., Note: If you have never learned latex before, you may not understand the following content... (Use the Ctex suite and compile and use xelatex)
Structure of books
Actually, we use latex for typographical layout. Of course, we are still very professional (haha ~), The general structure of a book is as follows:
650) this. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "title =" book "border =" 0 "alt =" book "src =" http://img1.51cto.com/attachment/201202/25/3357586_1330166205JDcl.png "width =" 157 "height =" 484 "/>
For latex, the book style has been built in. You only need to declare the documentclass type.
\ Documentclass {book}
Of course, the default size is A4paper, and we need to design our own layout for this 6-inch electronic version.
650) this. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "title =" image "border =" 0 "alt =" image "src =" http://www.bkjia.com/uploads/allimg/131228/0ZA130C-1.png "width =" 296 "height =" 484 "/>
You need to set it as follows:
\ Usepackage [% paperpaperheight = 11.7, % margin = 0in, % left = 0.1, % right = 0.1, % top = 0.1, % bottom = 0.2] {geometry}
In this way, we can easily design the layout we need.
Then, use the built-in commands of latex for the layout of books.
% Preface used to generate Roman count \ frontmatter % preface content % generate Arabic count page number \ mainmatter % subject content % appendix, automatically count chapter \ appendix % appendix content with letters
Common Layout code blocks
1. Enable winEdit to automatically open the tex document in UTF-8 and add
%! Mode: "TeX: UTF-8"
2. Illustrations
Macro packages in the Introduction area:
% Insert illustration \ usepackage {graphicx }%generally we use floating body for illustration \ begin {figure }[! Hp] \ section {innovative visual effects} \ centering \ scalebox {1.0} {\ includegraphics [\ end {figure}
Effect:
650) this. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "title =" screen_shot-13397 "border =" 0 "alt =" screen_shot-13397 "src =" http://www.bkjia.com/uploads/allimg/131228/0ZA14595-2.gif "width =" 364 "height =" 484 "/>
3. Double or multi-column layout. I use multicol + float.
% Multi-column layout \ usepackage {multicol} \ usepackage {float} % double-column layout code block \ begin {multicols} {2} \ begin {figure} {H} % content \ end {figure} \ begin {figure} {H} % content \ end {figure} \ end {multicols}
Effect:
650) this. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "title =" screen_shot-13390 "border =" 0 "alt =" screen_shot-13390 "src =" http://img1.51cto.com/attachment/201202/25/3357586_1330166211xmlt.gif "width =" 364 "height =" 484 "/>
3. Non-Column Layout Scheme: Use miniage to implement it. If you have a better scheme, you are welcome to propose it.
% This column is 1/3 of the content width. Alignment uses c, t, and B, which is difficult to align. We recommend that you use this solution with a certain degree of knowledge .. \ begin {minipage} [c] {\ textwidth/3} % content \ begin {minipage} \ begin {minipage [c] {\ textwidth/3*2} % content \ begin {minipage}
Effect:
650) this. width = 650; "style =" border-right-0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px "title =" screen_shot-13388 "border =" 0 "alt =" screen_shot-13388 "src =" http://www.bkjia.com/uploads/allimg/131228/0ZA120J-4.gif "width =" 364 "height =" 484 "/>
Well, this is the code that needs to be recorded. This part is provided to people with latex basics as a reference... From kindle
Computer recommended online reading: http://www.topfun.us/adchs/
If you have an e-ink e-book or pad on your hand, you can download and read it.
Http://www.kuaipan.cn/file/id_2622545685707405.html