中文 Latex
How to build Texstudio
How to build Texstudio
如何建立中文Latex 文件,安裝與使用
如何建立中文Latex 文件,安裝與使用
(1) Download TeXstudio. website
(1) Download TeXstudio. website
(2) 執行 texstudio-2.12.22-win-qt5.exe
(2) 執行 texstudio-2.12.22-win-qt5.exe
(3) change setting: 起始畫面 pdfLatex 改成 XeLaTex
(3) change setting: 起始畫面 pdfLatex 改成 XeLaTex
Options->Configure TeXstudio -> Build -> Default compiler --> XeLaTex
Options->Configure TeXstudio -> Build -> Default compiler --> XeLaTex
(4) Prepare document.tex and compile this 中文 tex file.
(4) Prepare document.tex and compile this 中文 tex file.
(5) 如果沒有修改compiler,會出現錯誤
(5) 如果沒有修改compiler,會出現錯誤
(6) 恢復第4步,修正compiler, 再compile乙次,view乙次,document.pdf 產生,中文 pdf 編譯完成。
(6) 恢復第4步,修正compiler, 再compile乙次,view乙次,document.pdf 產生,中文 pdf 編譯完成。
Latex 語法設定
Latex 語法設定
\documentclass[12pt,a4paper]{article}
\documentclass[12pt,a4paper]{article}
%\documentclass[prb,preprint]{revtex4-1}
%\documentclass[prb,preprint]{revtex4-1}
\usepackage{amsmath}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amssymb}
\usepackage{amsthm} %要有這個才能寫proof
\usepackage{amsthm} %要有這個才能寫proof
\usepackage{amssymb,amsthm,amsmath,amsfonts,subfigure, mathrsfs}
\usepackage{amssymb,amsthm,amsmath,amsfonts,subfigure, mathrsfs}
%\usepackage{ctex}
%\usepackage{ctex}
\usepackage{xeCJK}
\usepackage{xeCJK}
\usepackage{fontspec} %加這個就可以設定字體
\usepackage{fontspec} %加這個就可以設定字體
\setCJKmainfont{標楷體}
\setCJKmainfont{標楷體}
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
\XeTeXlinebreakskip = 0pt plus 1pt
\usepackage[a4paper,margin=1in]{geometry}
\usepackage[a4paper,margin=1in]{geometry}
\title{compress sensing}
\title{compress sensing}
\usepackage{graphicx}
\usepackage{graphicx}
\usepackage{multirow}
\usepackage{multirow}
\usepackage{authblk}
\usepackage{authblk}
%add additional author names and affiliations
%add additional author names and affiliations
\usepackage{hyperref}
\usepackage{hyperref}
\usepackage[dvipsnames]{xcolor} %一般LaTeX不是Beamer 彩色用套件
\usepackage[dvipsnames]{xcolor} %一般LaTeX不是Beamer 彩色用套件
\newtheorem*{example}{Example}
\newtheorem*{example}{Example}
\newtheorem*{question}{Question}
\newtheorem*{question}{Question}
\newtheorem*{remark}{Remark}
\newtheorem*{remark}{Remark}
\newtheorem{corollary}{Corollary}
\newtheorem{corollary}{Corollary}
\theoremstyle{definition}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{definition}{Definition}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{lemma}{Lemma}[section]
\newtheorem{thm}{Theorem}[section]
\newtheorem{thm}{Theorem}[section]
\newtheorem{prop}{Proposition}[section]
\newtheorem{prop}{Proposition}[section]
%\newtheorem{thm}{Theorem}
%\newtheorem{thm}{Theorem}
%意思是我們要先建一個新的定理環境, 叫做thm, 顯示時標示為“Theorem”。比方說:
%意思是我們要先建一個新的定理環境, 叫做thm, 顯示時標示為“Theorem”。比方說:
%\begin{thm}
%\begin{thm}
% 定理的內容
% 定理的內容
%\end{thm}
%\end{thm}
\theoremstyle{remark}
\theoremstyle{remark}
%\newtheorem*{remark}{Remark}
%\newtheorem*{remark}{Remark}
\newtheorem*{exercise}{Exercise}
\newtheorem*{exercise}{Exercise}
%\newtheorem{corollary}{Corollary}
%\newtheorem{corollary}{Corollary}
%\newtheorem{definition}{Definition}
%\newtheorem{definition}{Definition}
%\newtheorem{lemma}{Lemma}
%\newtheorem{lemma}{Lemma}
\newtheorem{theorem}{Theorem}
\newtheorem{theorem}{Theorem}
%\newtheorem{example}{Example}
%\newtheorem{example}{Example}
%\newtheorem{環境名稱}{定理名稱}[章節層次]
%\newtheorem{環境名稱}{定理名稱}[章節層次]
%符號定義區
%符號定義區
%\newcommand{\abs}[1]{\left|#1\right|}
%\newcommand{\abs}[1]{\left|#1\right|}
\renewcommand{\(}{\left(}
\renewcommand{\(}{\left(}
\renewcommand{\)}{\right)}
\renewcommand{\)}{\right)}
%\renewcommand{\[}{\left[}
%\renewcommand{\[}{\left[}
%\renewcommand{\]}{\right]}
%\renewcommand{\]}{\right]}
%\newtheorem{example}{Example}
%\newtheorem{example}{Example}
\newcommand{\iid}{i.i.d.}
\newcommand{\iid}{i.i.d.}
\newcommand\pN{\mathcal{N}}
\newcommand\pN{\mathcal{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\R}{\mathbb{R}}
%\newcommand{\u}{\mathbf{u}}
%\newcommand{\u}{\mathbf{u}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\ds}{\displaystyle}
\newcommand{\ds}{\displaystyle}
\newcommand{\h}{\mathbf{h}}
\newcommand{\h}{\mathbf{h}}
\newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}}
\newcommand{\parallelsum}{\mathbin{\!/\mkern-5mu/\!}}
\newcommand\bigZero{\mbox{\huge$0$}}
\newcommand\bigZero{\mbox{\huge$0$}}
\newcommand\bigSigma{\mbox{\huge$\Sigma$}}
\newcommand\bigSigma{\mbox{\huge$\Sigma$}}
\renewcommand{\qedsymbol}{$\blacksquare$}
\renewcommand{\qedsymbol}{$\blacksquare$}
%{\textcolor{White}{白色}}
%{\textcolor{White}{白色}}
%{\color{green}{綠色的文字}}
%{\color{green}{綠色的文字}}
%{\textcolor{ForestGreen}{森林綠}}
%{\textcolor{ForestGreen}{森林綠}}
%{\textcolor{Plum}{深紫色}}
%{\textcolor{Plum}{深紫色}}
%{\textcolor{purple!70}{淡紫色}}
%{\textcolor{purple!70}{淡紫色}}
%{\textcolor{PineGreen}{松樹綠}}
%{\textcolor{PineGreen}{松樹綠}}
%{\textcolor{SpringGreen}{春天綠}}
%{\textcolor{SpringGreen}{春天綠}}
%{\color{Cyan}{青色}}
%{\color{Cyan}{青色}}
%{\color{BrickRed}{磚紅色}}
%{\color{BrickRed}{磚紅色}}
%{\color{red}{紅色}}
%{\color{red}{紅色}}
%{\color{green}{綠色的文字}}
%{\color{green}{綠色的文字}}
%{\textcolor{ForestGreen}{森林綠}}
%{\textcolor{ForestGreen}{森林綠}}
%{\textcolor{Plum}{深紫色}}
%{\textcolor{Plum}{深紫色}}
%{\textcolor{purple!70}{淡紫色}}
%{\textcolor{purple!70}{淡紫色}}
%{\textcolor{PineGreen}{松樹綠}}
%{\textcolor{PineGreen}{松樹綠}}
%{\textcolor{SpringGreen}{春天綠}}
%{\textcolor{SpringGreen}{春天綠}}
%{\color{Cyan}{青色}}
%{\color{Cyan}{青色}}
%{\color{BrickRed}{磚紅色}}
%{\color{BrickRed}{磚紅色}}
\begin{document}
\begin{document}
\author{李柏翰}
\author{李柏翰}
%\author[1]{ }
%\author[1]{ }
%\author[2]{Yau Yuan Shih}
%\author[2]{Yau Yuan Shih}
%\affil[1,2]{Parallel and Scientific Computing Laboratory }
%\affil[1,2]{Parallel and Scientific Computing Laboratory }
%\affil[2]{Department of Biology, University Y}
%\affil[2]{Department of Biology, University Y}
%\institute{ National Chiao Tung University}
%\institute{ National Chiao Tung University}
\date{\today}
\date{\today}
%\affil[1,2]{ National Chiao Tung University}
%\affil[1,2]{ National Chiao Tung University}
\affil{ 國立台北科技大學光電工程學系}
\affil{ 國立台北科技大學光電工程學系}
\title{ 微分方程初步 }
\title{ 微分方程初步 }
\maketitle
\maketitle
%\tableofcontents
%\tableofcontents
........
........
\begin{center}
\begin{center}
{\Large 謝謝大家收看!}
{\Large 謝謝大家收看!}
\end{center}
\end{center}
\end{document}
\end{document}
Equation LaTex 語法對照
Equation LaTex 語法對照