TeX使用范本

参考

对于安装LaTeX与TeXStudio使用可以查看博客
https://blog.csdn.net/simple_the_best/article/details/50608124

使用范本

%导言区
\documentclass[11pt]{
   article} 
%book,report,letter,ctexart,ctexbook,ctexrep,article
%10pt为设置一般字体大小为10pt

\title{
   TeX Demo}
\author{
   Tony Xu}
\date{
   发布日期: \today}

\usepackage{
   ctex} %加入中文
\usepackage{
   graphicx} %插图
\usepackage{
   amsmath}
\usepackage{
   amssymb}
\graphicspath{
   {
   figures/},{
   pics/}} %指定图像目录搜索路径
\bibliographystyle{
   plain} %指定参考文献格式 plain unsrt alpha abbrv

\newcommand{
   \myfont}{
    %定义新命令
    \textit{
   \textbf{
   \textsf{
   新命令}}}
}

%\newcommandming命令[参数个数][首参数默认值]{具体定义}
\newcommand\PRC{
   People's Republic of \emph{
   China}} %定义\PRC
\newcommand\loves[2]{
   #1 喜欢 #2}
\newcommand\love[3][喜欢]{
   #2#1#3} %带默认值

%重新定义已有的命令
\renewcommand\abstractname{
   简介}

%\newenvironment{环境名称}[参数个数][首参数默认值]
%               {环境前定义}
%               {环境后定义}
\newenvironment{
   myabstract}[1][摘要]
{
   \small %设定字号
    \begin{
   center}\bfseries #1 \end{
   center} %指定第一个参数排版
    \begin{
   quotation}}
	{
   \end{
   quotation}}

%正文区
\begin{
   document}
    \maketitle

    \PRC \\
    \loves{
   }{
   鱼儿} \\
    \love{
   }{
   鱼儿} \\
    \love[最爱]{
   }{
   鱼儿}
    \begin{
   abstract}
		这是一段摘要...
	\end{
   abstract}

    \begin{
   myabstract}[我的摘要]
		这是我的摘要...
	\end{
   myabstract}

    Hello Word    ! %多个空格也当一个
    %空一行为换行
    Let $f(x)$ be defined by the formula 
    $$f(x)=3x^2*(2+4x)$$ %单独一行公式

    \textrm{
   Roman 字体}
    \textsf{
   Sans Serif 字体}
    \texttt{
   Typewriter 字体}

    \rmfamily 后续都是 Roman 字体
    {
   \sffamily 括号内都是 Sans Serif 字体}
    \ttfamily 后续都是 Typewriter 字体

    \textmd{
   Medium 字体系列}
    \textbf{
   粗体字体}

    {
   \mdseries Medium 字体系列}
    {
   \bfseries 粗体字体系列}

    {
   \upshape Upright 字体形状}
    
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值