Latex学习

小图标

https://fontawesome.dashgame.com/

\documentclass[11pt]{article}%文件类说明

\usepackage{ctex}  %使用宏包(为了能够显示汉字)
\usepackage{geometry}
\geometry{left=1.5cm,right=1.5cm,top=1.6cm,bottom=0.5cm}


% Load fonts
\RequirePackage[fixed]{fontawesome5}


\begin{document}


\raisebox{-2pt} {\faIcon[solid]{github}}

with a \verb|solid| style: \faIcon[solid]{folder-open}

with a \verb|solid| style: \faIcon[regular]{folder-open}

\end{document}

在这里插入图片描述

行间距

\documentclass[UTF8]{article}
\usepackage{setspace}

\begin{document}

%%双倍行间距
\begin{spacing}{2.0}
段落内容。

\begin{abstract}
This is a simple paragraph at the beginning of the
document. A brief introduction about the main subject.
\end{abstract}
\end{spacing}

%%单倍行间距
\begin{spacing}{1.0}
\begin{abstract}
This is a simple paragraph at the beginning of the
document. A brief introduction about the main subject.
\end{abstract}
\end{spacing}

\end{document}

表格每行设置不同字体

表格的每个单元格都设置在一个框中,因此字体样式(或其他)的更改仅持续到单元格的末尾。如果你有一个多单元格的表格,或者一个需要强调很多行的长表格,在每个单元格中放置一个字体样式更改命令将是不可能的乏味。

使用 array 包,您可以定义列修饰符,这将更改整个列的字体样式。但是,稍微巧妙一点,可以使此类修饰符影响行而不是列。因此,我们通过以下方式进行设置:

现在,我们将“$”放在第一个列说明符之前;我们将“^”放在后续修饰符之前。然后,我们在要修改的每一行的开头使用 \rowstyle:

array 包与来自其他包(例如 longtable)的其他几个类似表格的环境一起使用,但不幸的是,这个技巧并不总是有效。

\documentclass{article} %article 文档
\usepackage{graphicx} %需要使用的宏包
\usepackage{array}
\newcolumntype{$}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
  #1\ignorespaces
}
% 设置图片文件存放路径
\graphicspath{{./}}


\begin{document}

\begin{tabular}{|$l|^l|^l|}   \hline
  \rowstyle{\bfseries}
  Heading & Big and & Bold \\ \hline
  Meek & mild & entry      \\
  Meek & mild & entry      \\
  \rowstyle{\itshape}
  Strange & and & italic   \\
  Meek & mild & entry      \\ \hline
\end{tabular}

\vspace{3em}

\tiny
\begin{tabular}{lll}
\hline
\multicolumn{2}{c}{Item} \\
\cline{1-3}
Animal    & Description & Price (\$) \\
\hline
Gnat      & per gram    & 13.65      \\
          & each        & 0.01       \\
Gnu       & stuffed     & 92.50      \\
Emu       & stuffed     & 33.33      \\
Armadillo & frozen      & 8.99       \\
\hline
\end{tabular}

\end{document}

图片

% 设置图片文件存放路径
\graphicspath{{./}}			%当前目录路径

参考文献

foo.bib

@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}

在这里插入图片描述

在正文中引用时方法如下:

\usepackage{cite}
\begin{document}

\cite{name1}"The geometric definition of dot product is coordinate independent, ..."\cite{latexcompanion,knuthwebsite}

\medskip

%% IEEEtran是参考文献显示格式
\bibliographystyle{IEEEtran}
%% foo is the bib file name
\bibliography{foo} 
 
\end{document} 

无法编译

19
Undefined control sequence.
l.19 \abx@aux@refcontext
                        {nty/global//global/global}

删除.aux文件。
https://tex.stackexchange.com/questions/488661/problem-with-biblatex-latex-does-not-compile-the-pdf

链接

https://blog.csdn.net/weixin_41194129/article/details/105401834

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值