本期要点
install
terminal
lsb_release -a
sudo apt-get install texlive
bare bone
test.tex
\documentclass[11pt, a4paper]{book}
\begin{document}
This is the content
\end{document}
terminal
xelatex test.tex
evince test.pdf
top matter
test.tex
\title{Linux Guide for Chinese Beginners}
\author{Peter Wang}
\date{2012.4.1}
\maketitle
main content
test.tex
\chapter{name of chapter}
\section{name of section}
text go here
\subsection{name of subsection}
text go here
packages
test.tex
\usepackage[urlcolor = blue, colorlinks = true]{hyperref}
...
\url{http://google.com}
terminal
texdoc hyperref
- http://en.wikibooks.org/wiki/LaTeX/Basics#LaTeX_commands
- http://en.wikibooks.org/wiki/LaTeX/Basics#Packages
add graphics
test.tex
\usepackage{graphicx}
...
\begin{figure}[htb]
\centering
\includegraphics{./figures/1.1.png}
\caption{Local version control diagram}
\end{figure}
change page layout
test.tex
\usepackage{fullpage}
code blocks
test.tex
{\footnotesize \begin{quote}\begin{verbatim}
#include <stdio.h>
int main()
{
printf("hello\n");
return 0;
}
\end{verbatim}\end{quote}}
add table of contents
test.tex
\tableofcontents\newpage
NOTE: need to run xelatex test.tex twice!!
so you need to re-run LaTeX one extra time to ensure that all ToC pagenumber
references are correctly calculated.
Chinese support
terminal
fc-list :lang=zh|grep CN
sudo apt-get install ttf-arphic-uming
test.tex
\usepackage{xeCJK}
\setCJKmainfont{AR PL UMing CN}
end result with Chinese support
test.tex
\documentclass[11pt, a4paper]{book}
\usepackage[urlcolor = blue, colorlinks = true, linkcolor = black ]{hyperref}
\usepackage{graphicx}
\usepackage{fullpage}
\usepackage{xeCJK}
\setCJKmainfont{AR PL UMing CN}
\begin{document}
\title{Linux Guide for Chinese Beginners}
\author{Peter Wang}
\date{2012.4.1}
\maketitle
\tableofcontents\newpage
\chapter{ 中文 name of chapter}
\section{name of section}
text go here 中文 中文 中文
\begin{figure}[htb]
\centering
\includegraphics{./figures/1.1.png}
\caption{Local version control diagram}
\end{figure}
\subsection{name of subsection}
text go here
{\footnotesize \begin{quote}\begin{verbatim}
#include <stdio.h>
int main()
{
printf("hello\n");
return 0;
}
\end{verbatim}\end{quote}}
\end{document}
10评论
Markdown Cheat Sheet
| You write: | You get: |
|---|---|
[Link](http://example.com/) |
Link |
*Italic* |
Italic |
**Bold** |
Bold |
* Listed * Items |
|
``` puts "hello" ``` |
puts "hello"
|

太赞了,正需要用这个。
https://www.writelatex.com
https://www.sharelatex.com/
markdown 文件到幻灯片的转换,现在的一个方案是:
http://jeromyanglim.blogspot.jp/2012/07/beamer-pandoc-markdown.html
https://github.com/limingth/NCCL/blob/master/slides/md2pdf.sh
一个 md 到 pdf 的 slides 生成方案。
很棒的视频,有时候看几个小时的书籍或者资料,不如看一个10分钟的视频效果好。
感谢@happypeter 的视频,我根据此视频写了一篇博客
@andyque 学习了
http://www.latexstudio.net/latex-that-is-designed-to-graduate-resume-template/
一个简历 template