latex首次使用遇到的问题

这篇博客记录了作者在Ubuntu环境中初次使用LaTeX写作论文时遇到的权限问题,以及如何解决不能保存编译的问题。此外,还分享了LaTeX中取消首行缩进、箭头上加文字和插入伪代码的语法技巧。

这是第一次用latex写论文时用到的一些语法结构,仅是部分,会不断更新至写完论文奋斗

ubuntu环境下使用了texmaker,一开始保存编译latex时显示没有写权限,可能是双系统的问题,需要去win下改权限,linux下无法改。

latex使用语法:

取消首航缩进:

\noindent


有时候语法两边需要加$ $(宏包问题)

箭头上面加文字:

\xleftarrow[下方公式]{上方公式}  % 注意加上宏包\usepackage{amsmath}

插入伪代码:

\usepackage{algorithm}  
\usepackage{algpseudocode}  
\usepackage{amsmath}  
\renewcommand{\algorithmicrequire}{\textbf{Input:}}  % Use Input in the format of Algorithm  
\renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm 
需要先加入以上宏包

\begin{algorithm}  
        \caption{Temporal Conflict Detection}  
        \begin{algorithmic}[1] %每行显示行号 
          \Require input  
          \Ensure output
          \State $a \gets 0$
          \State $b \gets 0 $  %初始化ab为0
        \end{algorithmic}  
\end{algorithm}  




评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值