链接

视频教程(推荐)

latex中文教程-15集从入门到精通包含各种latex操作 (Bilibili) (西北农林科技大学 信息工程学院 耿楠)

配套笔记 LaTeX使用 | Chen的博客

字体问题 https://tieba.baidu.com/p/3937382897

安装

步骤1. CTeX (套装)

下载地址: http://www.ctex.org/CTeXDownload

CTeX包含编译器(MiKTeX)、编辑器(WinEdt)等多个软件.

步骤2. MiKTeX (编译器)

下载地址: https://miktex.org/download

我安装上CTeX之后, 其中的MiKTeX并不能用, 经过我搜索之后发现, 再安装一个MiKTeX可以解决问题.

安装的时候把CTeX自带的MiKTeX覆盖.

步骤3. TeXstudio(编辑器)

下载地址: http://texstudio.sourceforge.net/

上面提到了WinEdt这个编辑器, 但是TeXstudio更好用

配置

如果你跟我一样特别在乎软件的外观的话, 你一定会认为TeXstudio太丑了. 所以, 除了其它教程里提到的必要配置之外, 我这里还有一些操作是纯粹用来美化软件界面.

1. 样式

有Windows, WindowsXP, WindowsVista, Fusion, 默认5中选择. 建议选Fusion, 更好看

2. 配色方案

有经典和现代两种选择, 建议选经典. "现代"是黑色工具条, 不好看.

3. 字体

建议选微软雅黑

4. 语言

建议选中文简体(zh_CN)

5. 默认编译器

选择XeLaTeX. 默认的pdfLaTeX在某些情况下有问题

6. 字体

建议使用YaHei Consolas Hybrid (雅黑和Consolas混合字体) (百度即可下载)

7. 字号

字号选12, 否则太小

8. 默认字体编码

选择UTF-8, 最通用, 支持各种字符.

我的文档

我用LaTeX写了一份文档, 几乎用了我可能用到的所有功能, 下面就是例子

头部

%% head
\documentclass[UTF8]{ctexart}    % 文档类型(ctex + article)
\usepackage{geometry}
\usepackage{amsmath}            % 数学包% 图片包
\usepackage{graphicx}
\graphicspath{{images/},{pics/}}     % 图片默认路径% 设置图片和表格题注的格式
\usepackage{caption}
\captionsetup[figure]{labelfont={sf},textfont={sf},labelsep=quad}
%                       /|\标签和文字设置无衬线字体    /|\ 编号后面隔一个\quad
\captionsetup[table]{labelfont={sf},textfont={sf},labelsep=quad}% 将图片编号和章节关联起来
\renewcommand{\thefigure}{\thesection-\arabic{figure}} % set caption label style to 1.A
% \renewcommand{\thesubfigure}{\arabic{subfigure}}% 设置页边距
\geometry{left=3.18cm,right=3.18cm,top=2.54cm,bottom=2.54cm}
\linespread{1.5}% 设置页眉的格式
\pagestyle{plain}
% plain - Just a plain page number.
% empty - Produces empty heads and feet - no page numbers.
% headings - Puts running headings on each page. The document style specifies what goes in the headings.
% myheadings - You specify what is to go in the heading with the \markboth or the \markright commands.% 用于支持代码 - 列表包和颜色包
\usepackage{listings}
\usepackage{xcolor}
\lstset{% breaklines, 自动换行numbers=left, % numberstyle= \tiny, keywordstyle= \color{blue!70},commentstyle= \color{red!50!green!50!blue!50}, frame=shadowbox, % 阴影效果rulesepcolor= \color{ red!20!green!20!blue!20} ,escapeinside=``, % 英文分号中可写入中文xleftmargin=1em,xrightmargin=1em, aboveskip=1em%,%framexleftmargin=2em
}% 支持含合并单元格的表格
\usepackage{multicol}
\usepackage{multirow}% 支持粗横线和粗竖线的表格
\usepackage{tabu}
% 粗横线 \tabucline[2pt]{-}
% 粗竖线 {c|[2pt]c|c|c|c|c}% 斜线表头
\usepackage{diagbox}% 设置各级标题的格式
\ctexset{section={   % 完整的标题由name逗号坐标+数字+逗号右边+afternum组成format+=\zihao{3} \heiti \mdseries,name={,、},    % 逗号左边为空, 右边是顿号number=\chinese{section},  % 数字用中文(一 二 三)aftername= \hspace{0pt}  % 序号之后不添加东西, 可以换成空格、Tab等等。},subsection={format+=\zihao{4} \heiti \raggedright \mdseries,number=\arabic{section}.\arabic{subsection},},subsubsection={format+=\zihao{-4}}
}% 标题
\title{\heiti 中中中中中中(4)——中中中中}
\date{}
\author{}

正文

%% body
\begin{document}
%    \pagestyle{}\maketitle     % 使用标题、作者、日期等内容生成标题\zihao{-4}     % 全部字号设置为小四(特殊规定的除外)\section{概述}\subsection{聊天界面概述}中中中。中,中。中、中、中,中,中。\subsection{需求分析}中,中。如图 \ref{toolbar_img} 所示。\begin{figure}[ht]% 常用选项[htbp]是浮动格式:% 『h』当前位置。将图形放置在正文文本中给出该图形环境的地方。如果本页所剩的页面不够,这一参数将不起作用。% 『t』顶部。将图形放置在页面的顶部。% 『b』底部。将图形放置在页面的底部。% 『p』浮动页。将图形放置在一只允许有浮动对象的页面上。\includegraphics[width=1.0\textwidth]{toolbar}  % toolbar是文件路径, 只是省略了扩展名\caption{工具栏}\label{toolbar_img}\end{figure}中:中``中''中,中“中”中。中,中,中。中:中“中”中,中“中”中。中A中,中B中,中AB中。

    \section{技术实现}\subsection{使用LineRenderer绘画组件实现绘图工具}\label{sec:linerenderer}\subsubsection{LineRenderer介绍与使用过程}中。中:1)  中。点击菜单栏中的GameObject$>$Create Empty。2)  中。点击菜单栏中的Componet$\rightarrow$Effects>Line Render。3) 中。\subsubsection{使用LineRenderer绘制箭头}中。% 下面的语言csh是C#\begin{lstlisting}[language={csh}]
if (Input.GetMouseButtonDown(0)) {lineRenderer.positionCount = 0; // 线性渲染器的点的个数设置为0from = Input.mousePosition;     // 记录手指按下的位置isDrawing = true;
}\end{lstlisting}  中,中。\begin{lstlisting}[language={csh}]
else if ((Input.GetMouseButtonUp(0) || Input.GetMouseButton(0))) {lineRenderer.positionCount = 6;to = Input.mousePosition;
}\end{lstlisting}中。设$BC$和$BD$的长度为$l$,$BC$与$BA$的夹角是$\alpha$,$BA$与水平线的夹角是$\theta $。要计算$C$和$D$两点的坐标。其中$l$和$\theta $是常数。示意图如图\ref{arrow_img} 所示。\begin{figure}[ht]\centering\includegraphics[width=0.5\textwidth]{draw_arrow}\caption{箭头顶点示意图}\label{arrow_img}\end{figure}中,$\mathrm{sin}\alpha =\frac{{y}_{2}-{y}_{1}}{\sqrt{{\left({x}_{2}-{x}_{1}\right)}^{2}+{\left({y}_{2}-{y}_{1}\right)}^{2}}}$。中$C(x_3=x_2-\cos (\alpha-\theta),y_3=y_2+\sin (\alpha-\theta)\cdot l)$,$D(x_4=x_2-\cos (\alpha+\theta)\cdot l, y_4=y_2 + \sin (\alpha + \theta)\cdot l)$。中$\arcsin$中,$C$、$D$中$x$中,中。

    \begin{lstlisting}[language={csh}]
if (isDrawing && lineRenderer.positionCount == 6) {float length = Mathf.Sqrt((to.x-from.x)*(to.x-from.x)+(to.y-from.y)*(to.y-from.y));float l = 60f;                            // BC的长度float alpha = -Mathf.Asin((from.y - to.y) / length);float theta = 0.7854f;                   // 45度角Vector2 p3 = new Vector2(to.x - Mathf.Cos(alpha - theta) * l * (to.x >= from.x ? 1 : -1), to.y - Mathf.Sin(alpha - theta) * l);Vector2 p4 = new Vector2(to.x - Mathf.Cos(alpha + theta) * l * (to.x >= from.x ? 1 : -1), to.y - Mathf.Sin(alpha + theta) * l);lineRenderer.SetPosition(0, from);lineRenderer.SetPosition(1, to);lineRenderer.SetPosition(2, p3);lineRenderer.SetPosition(3, to));lineRenderer.SetPosition(4, p4);lineRenderer.SetPosition(5, to);
}\end{lstlisting}\subsubsection{使用LineRenderer绘制矩形}中,中,中。绘制方式见图\ref{draw_rect}。

    \begin{figure}[ht]\centering\includegraphics[width=0.5\linewidth]{images/draw_rect}\caption{矩形的绘制示意图}\label{draw_rect}\end{figure}\subsubsection{使用LineRenderer进行自由绘制}中,中:\begin{lstlisting}[language={csh}]
private LinkedList<Vector2> points = new LinkedList<Vector2>();\end{lstlisting}中,中,中points中中。中LineRender中。\subsection{使用LeanTouch实现模型移动、缩放和旋转}\subsubsection{LeanTouch实现移动和缩放}LeanTouch中Unity中,中、中、中。中Unity中LeanTouch中,中。然后点击菜单栏中的GameObject$\rightarrow$Lean$\rightarrow$Touch,中。中LeanScale中、LeanTranslate中,中。中,中1中,中3中。中,中。\subsubsection{实现模型旋转}LeanTouch中LeanRotate中$Z$中,中$X$中$Y$中,中LeanRotate中。中\ref{screen_coordinate} 中。\begin{figure}[th]\centering\includegraphics[width=0.3\linewidth]{images/screen_coordinate}\caption{手机屏幕坐标系}\label{screen_coordinate}\end{figure}

    中X中Y中。中,中:\begin{lstlisting}[language={csh}]
camera.transform.RotateAround(model.position, Vector3.up,mouse_x * 30 * speed);\end{lstlisting}中,中$X$中:\begin{lstlisting}[language={csh}]
camera.transform.RotateAround(model.position,camera.transform.right, mouse_y * 30 * speed);\end{lstlisting}\subsubsection{实现坐标系的转换}中,Unity中,\ref{sec:linerenderer} 节提到的LineRender需要提供三维的坐标,中Unity中。LeanTouch中。中,中。LeanTouch中,中Camera Distance中,中。\begin{lstlisting}[language={csh}]
depth.Conversion = LeanScreenDepth.ConversionType.CameraDistance;
depth.Distance = 0.5f;    \end{lstlisting}\ref{sec:linerenderer}的代码均需要用LeanTouch进行坐标转换。\begin{lstlisting}[language={csh}]
depth.Convert(point, camera);\end{lstlisting}\subsection{Animator动画控制实现模型拆解}\label{sec:animator}\subsubsection{Animator介绍}Animator中Animation Clips(中)、Animator Controller(中)中Avatar(中)中。Unity中Animation中,中,中,中,中。Unity中Animation中,中,中。Animator Controller中。Animator中Animation中,中。中,Animation中,中。中Animator中。

    \subsubsection{使用Animator实现播放爆炸图}中Animation,中,中,我们设计了如下结构(图\ref{fig:animator})来实现功能。\begin{figure}[th]\centering\includegraphics[width=0.6\linewidth]{images/animator}\caption{Animator状态转换图}\label{fig:animator}\end{figure}nimator中,中;中Condition,中。中,中bool中Next中,中False,中Next=True中Next=False。中,Animation Controller中Entry中Empty(中Entry中),中。中,中,Next中True,中。中,中。\begin{lstlisting}[language={csh}]
if (animator.GetBool("Next")) {animator.SetBool("Next", false);
} else {animator.SetBool("Next", true);
}\end{lstlisting}中,Next中False,中。中,中。中,Next中True,中。中。\subsection{实现发送消息与同步功能}\subsubsection{功能概述}中:1) 中2) 中3) 中4) 中5) 中中。1) 中,中ID、中ID、中、中4中。2) 中、中,中。3) 中、中,中。\subsubsection{模型与相机状态同步}中,中,中。\begin{lstlisting}[language={csh}]
if (timer > 0.025f) {timer = 0;if (!camera.position.Equals(LastSent.position)|| !camera.rotation.Equals(LastSent.rotation) || model.localScale.x != LastSent.localScale) {NetworkController._instance.SendModelPosition(camera.position, camera.rotation, model.localScale.x / defaultScale);LastSent.position = camera.position;LastSent.rotation = camera.rotation;LastSent.localScale = model.localScale.x;}
}\end{lstlisting}中:\begin{lstlisting}
{"type":"mpos",            //model_position 模型位置的缩写"content":{"pos":{                // 相机位置"x":12,"y":12,"z":12,"scale":0.5     // 模型缩放比例},"rotate":{            // 相机旋转"x":12,"y":12,"z":12,"w":12}}
}\end{lstlisting}中,中type中mpos中。\subsubsection{画笔同步}中,中,中,中。中,中。\begin{lstlisting}[language={csh}]
if (times > 0.15f) {if (!Input.mousePosition.Equals(LastSent.mousePosition)) {NetworkController._instance.SendNewLineMessage(from, Input.mousePosition);LastSent.mousePosition = Input.mousePosition;}times = 0f;
}\end{lstlisting}\subsubsection{动画同步与文本消息}根据\ref{sec:animator} 节的介绍,中,中,中。中,中JSON中。\section{总结}中,中——中,中。中,中LineRender、Animator中LeanTouch中,中。

    \section{贡献人员}\begin{table}[h]\caption{贡献人员}\centering\begin{tabu}{c c c c}        % l-eft c-enter r-ight\tabucline[2pt]{1-4} % ====================================================\multirow{2}{*}{序号} & \multicolumn{2}{c}{个人基本信息} & \multirow{2}{*}{权重} \\\cline{2-3}    % 横线 从第1列到第2列& 姓名   & 出生日期                &                       \\\hline %-------------------------------------------------------------------\hline %-------------------------------------------------------------------1                     & 亢小龙 & 1999/1/1                & 0.4                   \\ 2                     & 潜中龙 & 2000/12/31              & 0.2                   \\ 3                     & 飞大龙 & 1998/12/31              & 1.4                   \\\tabucline[2pt]{1-4} % ===================================================\end{tabu}\end{table}\begin{table}[h]\centering\caption{斜线表头似乎无法与multirow结合}\begin{tabu}{c|c c}\tabucline[2pt]{1-}\diagbox{姓名}{成绩}{科目} & 语文 & 数学\\\hline刘德某                     & 100  & 99\\安卑某                     & 60   & 72\\\tabucline[2pt]{1-}\end{tabu}\end{table}
\end{document}

PDF画统计图使用的包: pdfplots

Latex学习 (教程、安装和设置、示例)相关推荐

  1. LaTex学习教程——插入较复杂的表格(合并、换行以及加标题)

    较复杂表格--行列合并 注意:需要导入的宏包 \usepackage{multirow} \begin{tabular}{|c|c|c|c|c|}\hline%跨行(将两行合并为一行) 第一个参数指明 ...

  2. LaTex学习教程——插入图片及图片的引用

    以下代码可直接复制粘贴 运行: \documentclass{article} %注意需要导包 \usepackage{caption} \usepackage{graphicx, subfig} \ ...

  3. LATEX学习笔记2 - 字体设置

    字体设置: 字体编码:字体族(黑体):字体系列(粗细,宽度):字体形状(直立): 字体大小: 字体族设置: \textrm{Roman Family} 花括号内为对应字体设置 \rmfamily Ro ...

  4. LaTex学习教程——简单表格(三行线、普通表格)

    普通表格 \begin{table}[h] % [h]表格在文中放置的位置\centering %作用是使表格居中\begin{spacing}{1.35} %调整表格行距\caption{Natio ...

  5. 如何安装和设置WordPress多站点网络

    Do you want to set up and install WordPress multisite network? WordPress comes with a built-in capab ...

  6. Latex 安装及学习教程

    Latex 下载安装及使用教程 一 介绍 (一)关于 LaTeX和CTeX 二 TexLive2018+WinEdt10.3安装 (一)基本安装 (二)使用介绍 (三)完整的入门资源: 一 介绍 (一 ...

  7. 假装认真的LaTeX学习笔记(1)—— Sublime中自动补全LaTeX命令(LaTeX-cwl安装教程)

    假装认真的LaTeX学习笔记(1)-- Sublime中自动补全LaTeX命令 简介 使用环境 如何在Sublime中获得LaTeX自动补全功能 安装Sublime插件--LaTeX-cwl 方法一: ...

  8. 【LaTeX 教程】01. LaTeX 简介与安装

    [LaTeX 教程] 声明 由于最近在投稿,导师要求LaTeX版本的文章,结合最近学习,特将学习到的内容整理下来,从安装到应用,由于也是刚学习,我也是尽可能将文章中用到的LaTeX细节的地方强调出来, ...

  9. LaTeX中文学习教程 笔记

    视频地址: LaTeX中文学习教程(用于论文或稿件排版,15集全) 用LaTeX写期刊论文的详细教程 一.基本结构 % 导言区 \documentclass{article}%book,article ...

最新文章

  1. 重新设计一款Android App,我会怎么做?
  2. 【蓄电池维护】第二弹 看似普通的测试仪表笔暗藏了什么玄机?
  3. Spring Boot(04)——创建自己的自动配置
  4. 浅析weak指针的实现
  5. 苹果菠萝笔html5游戏在线玩,苹果菠萝笔游戏
  6. sps及pps在解码器内传递过程
  7. Samba配置文件解析
  8. python预测发展趋势_Python预测算法哪家强?权游龙妈是生还是凉凉?
  9. sublime3运行python_sublime中按ctrl+B调用python3运行
  10. 在MyEclipse显示struts2源码和doc文档及自动完成功能
  11. 解决 SQL 注入的另类方法
  12. 【DIY装机】华硕主板驱动安装失败的问题
  13. Java架构师发展路线
  14. 计算机文化基础—病毒
  15. checksum计算方法
  16. taskmgr多开补丁
  17. Php中应用透明链路追踪工具molten如何使用?
  18. 硬盘快满了,怎么办?查找重复文件
  19. java--servlet中三大作用域对象
  20. MySQL数据库总结

热门文章

  1. android高仿路口APP,路口app
  2. 使用 Apache的文件上传组件(common-fileupload)来实现文件的上传
  3. 你居然用计算机玩csgo,新潮流,用CSGO来测试电脑性能!最后一个你一定没听过...
  4. 如何防止开发者选项关闭动画后使其失效
  5. 如何制作视频黑白效果
  6. photoshop2022中文版怎么改成英文版?ps中文版改成英文版教程
  7. 计算机模拟在铸造领域的应用,计算机模拟在热加工领域的应用及研究方向.docx...
  8. Mendix快速开发网页移动App低代码化平台
  9. 网易新闻客户端Flutter混合开发实践
  10. 温度信号波形c 语言,基于CC2530的温度报警器的应用实现