中文 Tex

 

\documentclass{article}
\usepackage{ctex}
\begin{document}
中文English
\[E = m c^2\]
\end{document}

 

\documentclass{ctexart}
\begin{document}
中文English
\[E = m c^2\]
\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

 

 

参考

使用xelatex生成中文pdf

LaTeX 实战经验:新手须知

 

 

 


列举字体

参考 如何使用「fc-list」這個指令

列举系统中已有字体

fc-list : family

输出某字体的详细信息

fc-list '思源宋体 CN' file family style fullname

 

 


 

Markdown 转 PDF

参考 

使用以下命令可将 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

 

posted @ 2017-07-18 21:12  maxuewei2  阅读(787)  评论(0编辑  收藏  举报
这是一段经过10次base64加密的密文:Vm0wd2VFMUhSblJXYTFwT1ZsWndUMVV3WkRSV2JHeDBZM3BHYUZKc1ZqTldiVEZIVjBaS2RHVkVRbFZXYkhCUVdWWlZlRll5U2tWVWJHUk9ZV3hhVFZkWGRHRlRNazE1Vkd0YVlWSnRhRzlVVnpGdlZWWmFjMWt6YUZOTlJGWjZWakkxVDJGc1NuTmpTRUpXWWxoU00xWkdXbUZqYkhCRlZXeHdWMkV5ZHpCV2FrbzBZekpHYzFOWVpGaGlSa3BoV1ZSS2IxSkdWbk5YYlVacVlraENSbFpYZUhkV01rVjZVV3BhVjJKVVFYaFdha1poWkVaT2MySkdTbWxXUjNoWFZtMTBWMWxXVWtkV1dHaFlZbGhTV0ZSV1pGTk5SbFowVFZoa1ZXSkdiRFJWTW5oelZqSktTRlJZYUZkV1JYQk1WV3BHVDJNeFduUmlSazVzWWxob2IxWXhXbE5TTWxGNFZXdGthbEp0YUhOVk1GVXhWMFpTV0dSSFJsTk5WMUo1VmpKek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