Latex Document的一些代码片段

分享并记录一些latex document的一些代码片段,方便了自己也方便了别人。。。代码的环境是与LaTeX beamer 一些常用的指令  中是一样的。

  • Latex document中文模板
\documentclass{article}
\usepackage{ctex}
\title{周总结-\today}
\author{作者\thanks{关于作者的脚注}}
\usepackage{tikz}
\usepackage{url}
\usepackage{cite}
\usepackage{xcolor}
\usepackage[unicode]{hyperref}
\usetikzlibrary{shapes,arrows,chains}
%  \title{}  
%  \thanks{}  
%  \footnotetext{}  
%  \author{}  
%  \date{}  
%  \maketitle  
%  \tableofcontents 
\renewcommand{\refname}{参考文献}
\begin{document}
	\maketitle
	\tableofcontents
	\section{大标题}
	% \subsection{小标题} %被注释掉的小标题
	%注释

      %被注释掉的参考文献
		%\bibliographystyle{unsrt}
	%\bibliography{20170217}
   
\end{document}
  • latex的表格代码
 \begin{table}
     \caption{问题解决对比实验}
	  	\begin{center}
	  		\begin{tabular}{||c|c||} \hline  
	  			\emph{模型来源} & \emph{导入结果} \\  \hline
	  			WareHouse分享的模型 & 正常 \\ \hline
	  			直接使用Sketch Up建模的模型并渲染 & 正常 \\ \hline
	  			将Match Photo后的模型分享到Warehouse上后下载 & 异常 \\ \hline
	  			将Match Photo建立的模型的一部分 & Sketch Up渲染的显示正常,   \\  
	  			Faces使用SketchUp的纹理进行渲染 & 直接从Photo 渲染的显示异常 \\ \hline
	  		\end{tabular}
	  	\end{center}
\end{table}

效果如下图:

  • 有时候在写latex document的时候,需要将相关的图片恰好放在latex 图片代码的位置,可以按照下面的方式来实现:
#在引言部分加入需要的宏包 float
\usepackage{float}

#在插入图片的位置处的\begin{figure}后面加[H],如下:


	\begin{figure}[H]
		\centering
		\includegraphics[width=1\linewidth]{img_name}
		\caption{caption}
		\label{fig:img_name}# label of the image,this is useful when you want to cite the image 
	\end{figure}
	
  • 在文章中进行引用的链接与反链接
\usepackage[pagebackref,colorlinks]{hyperref}

%其中pagebackref实现从参考文献列表反连接到文中引用该文献的位置
%colorlinks实现的是将引用链接用相应的颜色进行标记而不是矩形框进行标记
  • 在文章中并列排布多个子图
%在导言部分引入subfig package
\usepackage{subfig}

%在正文部分

\begin{figure}[thb]
	\centering
	\subfloat[subtitle]{
		\includegraphics[width=6cm,height=4cm]{figure_path}
	}
	\subfloat[subtitle]{
		\includegraphics[width=6cm,height=4cm]{figure_path}
	}
	\subfloat[subtitle]{
		\includegraphics[width=6cm,height=4cm]{figure_path}
	}
\caption{title of the figure }
\label{fig:label}
\end{figure}

171139_8Jur_579136.png

  • align 数学公式环境下:

不使用标号的情况可以直接 加 \notag 

自己需要重新标号 直接 \tag{编号}

 

以后会逐渐更新其他的一些代码片段...

转载于:https://my.oschina.net/zhangwenwen/blog/840963

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值