3天的LaTeX学习笔记 ψ`∇´ψ、白嫖2018年河南专升本高数试卷一个——源码

这篇博客分享了作者3天学习LaTeX的心得,包括安装过程、TexStudio配置和使用技巧。提供了可以直接使用的LaTeX笔记模板,涵盖页眉页脚设置、超链接、行间距、插入视频、图片、制作标题等功能,并介绍了如何制作幻灯片和利用tikz绘图。是一份适合初学者的LaTeX入门资源。
摘要由CSDN通过智能技术生成

开始咯,助你迅速tex(科学与艺术)入门

安装

谁得小眼睛没有看老师~

  1. 首先我们需要下载tex
    链接:清华大学软件开源镜像站

  2. 楼上有得”卖“,开源可自行选择——你会占便宜的,下载可执行文件之后安装(稍微耐心等一下)

    安装后(目录一定是中文,下面配置编译需要用):在这里插入图片描述

  3. 下载一个用于咱们新手的studio._.
    链接:texstudio
    在这里插入图片描述

  4. 接下来很重要——瞪大眼睛
    需要对 texstudio进行配置,路径不能为中文!在这里插入图片描述

测试一下

新建文件,写下,点击两个播放粘一起的快捷键f5

\documentclass{
   article}
\begin{
   document}
	Hello,Word!
\end{
   document}

在这里插入图片描述

LaTeX_笔记 ->可直接copy使用

\documentclass[10pt,UTF8]{
   artile}	% {
   文本类型},[属性],支持10pt,11pt,12pt字体大小
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\usepackage{
   amsmath}	% 数学宏包
\usepackage{
   underscore}	% 手动输入下划线 正常显示包

正文

% 正文
\documentclass[10pt,UTF8]{
   artile}	% {
   文本类型},[属性],支持10pt,11pt,12pt字体大小
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
				% 正文
\end{
   document}

项目统计

\documentclass[10pt,UTF8]{
   article}
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码

\begin{
   document}	% 这里是正文声明
% 项目统计
	% 数字
	\begin{
   enumerate}\setcounter{
   enumi}{
   0}	%0开始
		\item
	\end{
   enumerate}
	% 蓝色三角箭头、圆圈
	\begin{
   itemize}
		\item
	\end{
   itemize}
\end{
   document}

图:
在这里插入图片描述
Tex页眉页脚及取消style下划线

\documentclass[10pt,UTF8]{
   article}
\usepackage{
   fancyhdr}	% 页眉 页脚
\pagestyle{
   fancy}		% 页眉 页脚样式
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
% 页眉/页脚
\fancyhead[RE,RO]{
   mik}
\lfoot{
   }
\cfoot{
    }			% 左 中 右
\rfoot{
   \thepage}	% 页数l c r
\renewcommand{
   \headrulewidth}{
   0pt} 		% 设置页眉下划线,0则取消显示
\renewcommand{
   \footrulewidth}{
   0.4pt}	% 设置页脚下划线,0则取消显示
\begin{
   document}
	I love you China
\end{
   document}

图:
在这里插入图片描述
在tex页面中设置超链接及颜色

\documentclass[10pt,UTF8]{
   article}
\usepackage[colorlinks,linkcolor=blue,urlcolor=blue]{
   hyperref}	% 链接,colorlinks表示允许链接为彩色,linkcolor=颜色,可以为超链接设置颜色
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码

% 在页面中添加超链接
\begin{
   document}
	\href{
   https://www.baidu.com}{
   百度一下}
	% 引用
	\section{
   一级标题}		% 默认是从1开始,如果不是请查看修改文档类型
	\subsection{
   二级标题}
	\label{
   one}I love you China		% \label{
   key}给需要引用的地方添加标签
	\newpage
	\ref{
   one}		 % \ref{
   key}在需要引用的地方进行引用标签
\end{
   document}

设置行间距

\documentclass[10pt,UTF8]{
   article}
\usepackage{
   setspace}	% 设置间距
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
	% 设置行间距
	\begin{
   spacing}{
   1}	%{
   } 表示设置比例
		~\\~~
		I love you China!\\
		me too
	\end{
   spacing}
\end{
   document}

居中

% 居中
\documentclass[10pt,UTF8]{
   artile}	% {
   文本类型},[属性],支持10pt,11pt,12pt字体大小
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
	\begin{
   center}
			% 居中内容
	\end{
   center}
\end{
   document}

生成目录

\documentclass[10pt,UTF8]{
   artile}	% {
   文本类型},[属性],支持10pt,11pt,12pt字体大小
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
	% 生成目录
	\tableofcontents	% 需要编译两遍
	
	% \section*{
   mik} 则不带有序号,不生成目录
	% 一级标题,根据文档类型会发生序列的转变
	\section{
   mik}
	% 二级标题,依此类推
	\subsection{
   mik}
	% 强制新页打开
	\newpage
\end{
   document}

插入视频

\documentclass[10pt,UTF8]{
   article}
\usepackage{
   movie15}	% 视频宏包
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
% 插入视频	
\begin{
   figure}[h!]
	\includemovie
	[text={
   \small{
   (页面显示视频名)}}
	]{
   3cm}{
   1cm}{
   video.mp4}	% 后面3{
   }参数宽、高、文件名(必须与编译文件在同一目录)
\end{
   figure}
\end{
   document}

首行缩进

% 首行缩进
\par

插入图片

\documentclass[10pt,UTF8]{
   article}
\usepackage{
   graphicx}	% 图片宏包
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
% 插入图片
\includegraphics[scale=0.28]{
   1.png}	% []显示比例,{
   }文件名必须在同一目录下
\end{
   document}

加粗、颜色、大小

\documentclass[10pt,UTF8]{
   article}
\usepackage{
   color}		% 颜色宏包
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\begin{
   document}
\textbf{
   I love you China!}\\	加粗
\textcolor{
   red}{
   China}	\\	红色字体
\emph{
   China}	\\	% 斜体
\underline{
   China}\\	% 加下划线
\huge{
   China} 	\\	% 最大字体
\end{
   document}

分页

\documentclass[twocolumn,10pt,UTF8]{
   article}	%添加twocolumn属性
\usepackage{
   color}		% 颜色宏包
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\usepackage[paperwidth=36.8cm,paperheight=26cm,top=2.5cm,bottom=2cm,right=2cm]{
   geometry}	% 处理页面的一个宏包,下面这个可以设置正文内容布局
% \usepackage[centering,paperwidth=180mm,paperheight= ,body={
   宽pt,高pt}]{
   geometry}
% 单页文本宽度,修改不做删除(好习惯)
\textwidth=10cm
\oddsidemargin=0.5cm   %奇数页页边距
\evensidemargin=0.5cm %偶数页页边距
\begin{
   document}
\huge{
   China} 	\\	% 最大字体
\end{
   document}

制作标题

\documentclass[10pt,UTF8]{
   article}	
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\title{
   China}
\author{
   one}
%\date{
   }			% 取消注释就不再显示时间
% 制作标题
\begin{
   document}
\maketitle			% 必须有,在正文中,才能生效,
\end{
   document}

幻灯片制作

\documentclass[10pt,UTF8]{
   beamer}	%ppt文档类型
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\title{
   我的新页}
\author{
   mik}
\date{
   \today}
\begin{
   document}
	% beamer里重要的概念,每一个frame为一张page
	\begin{
   frame}
	\titlepage	% 标题页
	\end{
   frame}
\end{
   document}

幻灯片模式下左右布局

\documentclass[10pt,UTF8]{
   beamer}	%ppt文档类型
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\title{
   我的新页}
\author{
   mik}
\date{
   \today}
\begin{
   document}
	% beamer里重要的概念,每一个frame为一张page
	\begin{
   frame}
	\titlepage	% 标题页
	\end{
   frame}
	\begin{
   frame}
	
		\begin{
   columns}[t]
			\begin{
   column}{
   0.5\textwidth} % 左边内容类型及所占比
			左页
			\end{
   column}
			\begin{
   column}{
   0.5\textwidth}
			右页
			\end{
   column}
		\end{
   columns}
		
	\end{
   frame}
\end{
   document}

tikz绘图

\documentclass[10pt,UTF8]{
   article}	
\usepackage{
   ctex}		% 加载中文宏包,需要在文件类型中设置UTF8编码
\usepackage{
   tikz}		% 绘图宏包
% tikz绘图
\begin{
   document}
	
	\begin{
   tikzpicture}
	\draw (0,0)--(10,5);	%00点到1010点画一条直线
	\draw [color=blue!50,->](0,0) node[left]{
   农村娃}-- node [color=red!70,pos=0.5,above,sloped]{
   学习}(3,10) node[right]{
   成就};
	% [],设置的是画图属性,color=blue!50 蓝色50%,!表示替代,%表示注释
	% ->表示线是一个箭头的样式,起点后面加node一个标示,pos=0.25表示标注位置在线的上方0.25%位置
	% node[above,sloped],above表示原来点上方,sloped倾斜
	% 每个\draw 结束都要加上分号;
	
	\end{
   tikzpicture}
	
\end{
   document}

在这里插入图片描述

% tex封面可以在网上搜索

不要走开精彩马上回来——数学模板如下,可直接copy编译


% !Mode::"TeX:UTF-8"
\documentclass[twocolumn,landscape,UTF8,12pt]{
   ctexart}
\usepackage{
   lastpage}
%\usepackage{
   times} %use the Times New Roman fonts
\usepackage{
   color}
%\usepackage{
   placeins}
\usepackage{
   ulem}
\usepackage{
   titlesec}
\usepackage{
   graphicx}
\usepackage{
   colortbl}
\usepackage{
   listings}
\usepackage{
   makecell}
\usepackage{
   indentfirst}
\usepackage{
   fancyhdr}
\usepackage{
   setspace} % 行间距
\usepackage{
   bm}%\boldsymbol 粗体
% 数学
\usepackage{
   amsmath,amsfonts,amsmath,amssymb,times}
\usepackage{
   txfonts}
\usepackage{
   enumerate}% 编号
\usepackage{
   tikz,pgfplots} %绘图
\usepackage{
   tkz-euclide,pgfplots}
\usetikzlibrary{
   automata,positioning}
%\usepackage[paperwidth=18.4cm,paperheight=26cm,top=1.5cm,bottom=2cm,right=2cm]{
   geometry} % 单页
\usepackage{
   blindtext} % 选项
\usepackage{
   tasks}     % 选项宏包,tasks环境

\settasks{
   
	label={
   \Alph*.},
	label-align = left,
	label-offset = {
   1em},
	label-width = 0.5em,
	item-indent = {
   1.5em}, % indent = label-width + label-offset
	column-sep = {
   1em},
	before-skip = {
   -1em},
	after-skip = {
   -1em},
	after-item-skip = 0em,	
}
\usepackage[paperwidth=36.8cm,paperheight=26cm,top=2.5cm,bottom=2cm,right=2cm]{
   geometry}
\lstset{
   language=C,keywordstyle=\color{
   red},showstringspaces=false,rulesepcolor=\color{
   green}}
\oddsidemargin=0.5cm   %奇数页页边距
\evensidemargin=0.5cm %偶数页页边距
%\textwidth=14.5cm        %文本的宽度 单页
\textwidth=30cm        %文本的宽度 单页

\newsavebox{
   \zdx}%装订线

\newcommand{
   \putzdx}{
   \marginpar{
   
		\parbox{
   1cm}{
   \vspace{
   -1.6cm}
			\rotatebox[origin=c]{
   90}{
   
				\usebox{
   \zdx}
		}}
}}

\newcommand{
   \blank}{
   \uline{
   \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}\ \textcolor{
   white}{
   a}}}

\newcommand{
   \me}{
   \mathrm{
   e}}  %定义 对数常数e,虚数符号i,j以及微分算子d为直立体。
\newcommand{
   \mi}{
   \mathrm{
   i}}
\newcommand{
   \mj}{
   \mathrm{
   j}}
\newcommand{
   \dif}{
   \mathrm{
   d}}
\newcommand{
   \bs}{
   \boldsymbol}%数学黑体
\newcommand{
   \ds}{
   \displaystyle}
%通常我们使用的分数线是系统自己定义的分数线,即分数线的长度的预设值是分子或分母所占的最大宽度,如何让分数线的长度变长成,我们%可以在分子分母添加间隔来实现。如中文分式的命令可以定义为:
%\newcommand{
   \chfrac[2]}{
   \cfrac{
   \;#1\;}{
   \;#2\;}}
%\frac{
   1}{
   2} \qquad \chfrac{
   1}{
   2}

%选择题
\newcommand{
   \fourch}[4]{
   \\\begin{
   tabular}{
   *{
   4}{
   @{
   }p{
   3.5cm}}}(A)~#1 & (B)~#2 & (C)~#3 & (D)~#4\end{
   tabular}} % 四行
\newcommand{
   \twoch}[4]{
   \\\begin{
   tabular}{
   *{
   2}{
   @{
   }p{
   7cm}}}(A)~#1 & (B)~#2\end{
   tabular}\\\begin{
   tabular}{
   *{
   2}{
   @{
   }p{
   7cm}}}(C)~#3 &
		(D)~#4\end{
   tabular}}  %两行
\newcommand{
   \onech}[4]{
   \\(A)~#1 \\ (B)~#2 \\ (C)~#3 \\ (D)~#4}  % 一行

\renewcommand{
   \headrulewidth}{
   0pt}
\pagestyle{
   fancy}
\begin{
   document} % 在begin前面加了一个空格以免出现显示错误,编译时应该去掉
\fancyhf{
   }
\fancyfoot[CO,CE]{
   \vspace*{
   1mm}第\,\thepage\,,~\pageref{
   LastPage}}
\sbox{
   \zdx}
{
   \parbox{
   27cm}{
   \centering
	%座位号~\underline{
   \makebox[34mm][c]{
   }}~ %~级\underline{
   \makebox[34mm][c]{
   }}~\CJKfamily{
   song} %~号\underline{
   \makebox[44mm][c]{
   }}~\CJKfamily{
   song} %~名\underline{
   \makebox[34mm][c]{
   }} ~\\
	\vspace{
   3mm}
% 请在所附答题纸上空出密封位置。并填写试卷序号、班级、学号和 姓名\\
% 答题时学号
\vspace{
   1mm}
\dotfill{
   } 密\dotfill{
   }封\dotfill{
   }线\dotfill{
   } \\
	}}
	\reversemarginpar
	
\begin{
   spacing}{
   1.5}
	\begin{
   center}
\begin{
   LARGE}
河南省2018年普通高等学校\\
选拔优秀专科毕业生进入本科阶段学习考试\\
高等数学\\
\end{
   LARGE}
% (闭卷笔试\ \ 90 分钟)\\
	\vspace{
   0.5cm}

\end{
   center}
\end{
   spacing}
\vspace{
   -0.5cm}
\setlength{
   \marginparsep}{
   1.7cm}
\putzdx %%装订线--奇页数
\vspace
  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值