中文 Tex
\documentclass{article}
\usepackage{ctex}
\begin{document}
中文English
\[E = m c^2\]
\end{document}
\documentclass{ctexart}
\begin{document}
中文English
\[E = m c^\]
\end{document}
\documentclass[12pt,a4paper]{article}
\usepackage{xltxtra,fontspec,xunicode}
\usepackage[slantfont,boldfont]{xeCJK} % 允许斜体和粗体
\setCJKmainfont{SimSun} % 设置缺省中文字体
\setCJKmonofont{SimHei} % 设置等宽字体
\setCJKsansfont{SimHei} % 中文无衬线字体
\setmainfont{NotoSerif} % 英文衬线字体
\setmonofont{DejaVuSansMono} % 英文等宽字体
\setsansfont{NotoSans} % 英文无衬线字体
\begin{document}
\begin{verse}
Stray birds of summer come to my window to sing and fly away. \\
And yellow leaves of autumn, which have no songs, \\
flutter and fall there with a sign.\\
\hfill \emph{Rabindranath Tagore}
\end{verse}
\begin{verse}
夏天的飞鸟,飞到我的窗前唱歌,又飞去了。\\
秋天的黄叶,它们没有什么可唱,只叹息一声,飞落在那里。\\
\hfill \emph{罗宾德拉纳特·泰戈尔}
\end{verse}
\end{document}
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{SimHei}
\title{石头记}
\author{曹雪芹}
\date{}
\begin{document}
\maketitle
\begin{center}
满纸荒唐言\\
一把辛酸泪\\
都云作者痴\\
谁解其中味\\
\end{center}
\end{document}
使用XeLatex生成pdf
参考
列举字体
列举系统中已有字体
fc-list : family
输出某字体的详细信息
fc-list '思源宋体 CN' file family style fullname
Markdown 转 PDF
参考
- How I wrote my book using Markdown, Pandoc, and a little help from the internet
- Why doesn't Pandoc convert citations correctly from Markdown to LaTeX?
使用以下命令可将 markdown 文件转为 latex 文件
pandoc --csl ieee-transactions-on-computers.csl --mathjax --smart --standalone --bibliography hello.bib --template template.tex -o test.tex test.md
其中 csl 文件可以在 Zotero Style Repository 找到,用来控制参考文献的显示格式。
bib 文件为 BibTeX 文件。
template.tex 为生成 Latex 文件时所用的模板。可在
找到合适的并修改。
参考 Pandoc User’s Guide/#templates。
更具体的Pandoc的使用方法参考 Pandoc User’s Guide
自用 template.tex
\documentclass[oneside]{ctexart}
\usepackage{geometry}
\geometry{a4paper,centering,scale=0.8} %a4paper letterpaper legelpaper
%\usepackage[paperheight=20in,paperwidth=11in,top=1in,bottom=1in,right=1in,left=1in,heightrounded]{geometry}
%\usepackage{org-preamble-xelatex}
\usepackage{listings}
\usepackage{color}
\usepackage{amsmath}
\usepackage{xeCJK}
\usepackage{CJK}
\usepackage{marginnote}
\usepackage[format=hang,font=small,textfont=it]{caption}
%\newfontfamily\figcapfont{FandolKai}% Some other font
\DeclareCaptionFormat{figcapfont}{\kaishu \textbf{#1#2}#3}
\captionsetup[figure]{format=figcapfont}
\usepackage{fancyhdr}
\fancypagestyle{plain}{
\fancyfoot[C]{\thepage}}
\pagestyle{plain}
\definecolor{lightgray}{gray}{0.9}
\lstset{
showstringspaces=false,
basicstyle=\ttfamily,
keywordstyle=\color{blue},
commentstyle=\color[grey]{0.6},
stringstyle=\color[RGB]{255,150,75}
}
\newcommand{\incode}[1]{\colorbox{lightgray}{\texttt{#1}}}
\newcommand\blfootnote[1]{%
\begingroup
\renewcommand\thefootnote{}\footnote{#1}%
\addtocounter{footnote}{-1}%
\endgroup
}
\usepackage{hyperref}
\hypersetup{
colorlinks=false,
linkcolor=black,
filecolor=black,
urlcolor=black,
bookmarks=true,
bookmarksopen=true,
pdftitle={Title}, % title
pdfsubject={Subject}, % subject of the document
pdfauthor={Xuewei Ma}, % author
%pdfcreator={}, % creator of the document
%pdfproducer={}, % producer of the document Microsoft® PowerPoint® 2010
pdfkeywords={key1,key2,key3}, % list of keywords
pdfinfo={
CreationDate={20171225142535},
ModDate={20180101224824},
},
}
%\usepackage[autosize]{dot2texi}
\usepackage{tikz}
\usetikzlibrary{graphs}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{automata,positioning}
\usepackage[depth=4,open]{bookmark}% Show up to level 4 (\paragraph) in bookmarks
\setcounter{tocdepth}{3}% Show up to level 3 (\subsubsection) in ToC
\setCJKmainfont{思源宋体 CN}%[AutoFakeSlant]
\setCJKmonofont{Noto Sans CJK SC}
\setCJKsansfont{Noto Sans CJK SC}
\setmainfont{Times New Roman} % 英文衬线字体
\setmonofont{DejaVu Sans Mono} % 英文等宽字体
\setsansfont{Helvetica}
\usepackage{titlesec}
\titleformat*{\section}{\Large\bfseries\sffamily}
\titleformat*{\subsection}{\large\bfseries\sffamily}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri}
\usepackage{float}
%\input{vc}
$if(lhs)$
\lstnewenvironment{code}{\lstset{language=r,basicstyle=\small\ttfamily}}{}
$endif$
$if(highlighting-macros)$
$highlighting-macros$
$endif$
$if(verbatim-in-note)$
\usepackage{fancyvrb}
$endif$
$if(tables)$
\usepackage{longtable}
$endif$
$if(graphics)$
\usepackage{graphicx}
% We will generate all images so they have a width \maxwidth. This means
% that they will get their normal width if they fit onto the page, but
% are scaled down if they would overflow the margins.
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth
\else\Gin@nat@width\fi}
\makeatother
\let\Oldincludegraphics\includegraphics
\renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}
$endif$
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
%\title{{\heiti MainTitle}\\ { \hspace{8\baselineskip}——\ SubTitle}}
%\author{\kaishu Xuewei Ma}
%\date{2017.12.25}
$if(title)$
\title{\bigskip \bigskip $title$}
$endif$
%\author{$for(author)$$author$$sep$\\$endfor$}
\author{$for(author)$\Large $author.name$\vspace{0.05in} \newline\normalsize\emph{$author.affiliation$} \newline\footnotesize \url{$author.email$}\vspace*{0.2in}\newline $sep$ \and $endfor$}
\date{}
\begin{document}
\setkeys{Gin}{width=1\textwidth}
%\setromanfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}
%\setsansfont[Mapping=tex-text]{Minion Pro}
%\setmonofont[Mapping=tex-text,Scale=0.8]{Pragmata}
%\chapterstyle{article-4}
%\pagestyle{kjh}
%\published{$date$.}
$if(title)$
\maketitle
$endif$
$if(toc)$
{
\hypersetup{linkcolor=black}
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
}
$endif$
$if(abstract)$
\begin{abstract}
\noindent $abstract$
\end{abstract}
$endif$
$body$
$if(natbib)$
$if(biblio-files)$
$if(biblio-title)$
$if(book-class)$
\renewcommand\bibname{Bibliography}
$else$
\renewcommand\refname{References}
$endif$
$endif$
\bibliography{$biblio-files$}
$endif$
$endif$
$if(biblatex)$
\printbibliography$if(biblio-title)$[title=References]$endif$
$endif$
$for(include-after)$
$include-after$
$endfor$
\end{document}
Beamer with notes/Beamer Handout
andrejbauer/beamer-slides-with-notes.pdf
END
中文 Tex的更多相关文章
- CTEX windedt 打开中文tex乱码问题
% !TEX encoding = System % !TEX program = pdflatex % !TEX encoding = System% !TEX program = pdflatex ...
- Windows下TEX排版论文攻略—CTeX、JabRef使用心得
笔者刚刚接触到TEX排版,相关知识完全空白,用了两天时间学习并完成了一篇论文的完整排版. 期间遇到不少小问题,着实辛苦,分享至上,现将其解决办法总结归纳,共同学习. 一.工具介绍 TeX是一个 ...
- Tex
关于Tex,有许多概念.许多软件.这些软件是做什么的,要解决哪些问题,今日好好总结一下. 就像任何领域一旦引入代数系统,一切都会变得井然有序一样.就像用五行八卦描述事物,事物的规律就变得清晰一样,类比 ...
- <2013 08 13> TeX and LaTeX, some introduction
1. TeX是Donald E. Knuth教授的精心杰作,它是个功能非常强大的幕后排版系统,含有弹性很大,而且很低阶的排版语言.含有九百多条指令,用Pascal语言(的一个子集)写成. 2. T ...
- Windows下LATEX排版论文攻略—CTeX、JabRef使用介绍
Windows下LATEX排版论文攻略—CTeX.JabRef使用介绍 一.工具介绍 TeX是一个很好排版工具,在学术界十分流行,特别是数学.物理学和计算机科学界. CTeX是TeX中的一个版本,指的 ...
- CTeX学习心得总结
CTeX 又称 CTeX中文套装,是基于 Windows 下的 MiKTeX 的发行版,集成了编辑器WinEdt 和 PostScript 处理软件 Ghostscript 和 GSview 等主要工 ...
- 【转】LaTeX 符号命令大全
函数.符号及特殊字符 声调 语法 效果 语法 效果 语法 效果 \bar{x} \acute{\eta} \check{\alpha} \grave{\eta} \breve{a} \ddot{y} ...
- Latex:简介及安装
http://blog.csdn.net/pipisorry/article/details/53998352 LaTex是一个排版工具,功能强大.它是一个"所想即所得"的工具,你 ...
- Latex排版全解
Latex排版全解 LATEX(英语发音:/ˈleɪtɛk/ LAY-tek或英语发音:/ˈlɑːtɛk/ LAH-tek,音译“拉泰赫”),是一种基于TEX的排版系统,由美国电脑学家莱斯利•兰伯特在 ...
随机推荐
- 码农也来关注下经济问题<美元加息>对我们的影响
昨天凌晨三点,美联储宣布加息25个基点,这是今年美联储第四次加息,也是2015年12月份以来的第九次加息.基准利率又上调了25个基点,全球市场又要开始惴惴不安了. 要知道上一次美国基准利率上调25个基 ...
- java 向上向下取整
Math.floor(1.4)=1.0 Math.round(1.4)=1 Math.ceil(1.4)=2.0 Math.floor(1.5)=1.0 Math.round(1.5)=2 Math. ...
- 在vultr安装和使用golang
1.vultr可以用微信或支付宝充值,方便.好像推荐别人用还能挣美分,懒得弄了,参加了一个充10刀送50刀的活动,感觉实惠(实际用时感觉有点小贵). 2.注册登录后,控制面板上billing可查看余额 ...
- 毕业设计(1)基于MicroPython的大棚监测控制系统的程序设计与模型设计
智慧农业就是将物联网技术运用到传统农业中去,运用传感器和软件通过移动平台或者电脑平台对农业生产进行控制,使传统农业更具有“智慧”.除了精准感知.控制与决策管理外,从广泛意义上讲,智慧农业还包括农业电子 ...
- BAT面试题:请使用递归构建N叉树
题目要求: 现在我们拥有全国的省.市.县.镇的行政信息,比如 浙江省 -> 杭州市 -> 西湖区 --> xx街道,请将这些信息构建成一棵树,根节点为全国,叶子节点为镇. 我的误解: ...
- C#之Using(转)
1.using指令. using 命名空间名字.例如: using System; 这样可以在程序中直接用命令空间中的类型,而不必指定类型的详细命名空间,类似于Java的import,这个功能也是最常 ...
- 【刷题】Git知识点
参考:学习总结之Git学习-总 1-origin是什么? 答:origin 是默认的远程版本库名称,可以在 .git/config 之中进行修改.在默认情况下,origin指向的就是你本地的代码库托管 ...
- 【刷题】【LeetCode】总
参考资料 用动画的形式呈现解LeetCode题目的思路 目录: 000-十大经典排序算法 001-两数之和-easy 暴力法(遍历):两遍哈希表:一遍哈希表 002- 003- 004- 005- 0 ...
- git异常操作解决办法合集
1. git add .后发现提交错误,想撤销 git reset head 文件名-----撤销某个文件 git reset head --hard 强制撤销当前的所有操作到上次提交的版本 2. g ...
- g.DrawImage图片合成在本机可以,在服务器一直报内存不够
g.DrawImage图片合成在本机可以,在服务器一直报内存不够,发现是这个要设为false