<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    [論文工具] LaTeX論文撰寫常見用法及實戰技巧歸納(持續更新)

    VSole2023-10-07 10:15:47

    基本論文結構

    什么是LaTeX

    LaTeX是一種基于ΤΕΧ的排版系統,由美國計算機學家萊斯利·蘭伯特在20世紀80年代初期開發,利用這種格式,即使使用者沒有排版和程序設計的知識也可以充分發揮由TeX所提供的強大功能,能在幾天、甚至幾小時內生成很多具有書籍質量的印刷品。對于生成復雜表格和數學公式,這一點表現得尤為突出。因此它非常適用于生成高印刷質量的科技和數學類文檔。

    LaTeX的工作方式類似網頁,它們都是由源文件(.tex or .html)經由引擎(TeX or browser)渲染產生最終效果,從而得到PDF文件或生成頁面。兩者極其神似,包括語法規則與工作方式。

    官方下載地址如下:

    • Tex Live下載地址:http://www.tug.org/texlive/
    • 清華大學鏡像地址:https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/
    • Tex studio下載地址:http://www.texstudio.org/

    強烈推薦大家直接下載LaTex模塊進行修改,這篇文章更多是告訴大家基本語法,安裝過程請大家下來去嘗試,希望對您有所幫助!


    基本結構

    LaTeX文檔分為導言區和正文區(文稿區),在導言區我們可以使用documentclass命令引入一個文檔類,也可以有book類、report類、letter類,其中百分號表示注釋,不參與文檔編譯且不作為輸出。在正文區用begin和end輸入一個環境,如下圖所示:

    接著將環境的名稱設置為document,一個LaTeX文件有且只能有一個document文件,添加正文內容再編譯文檔。

    導言區主要用于全局設置,比如文檔標題、作者、日期,再通過maketitle顯示標題。

    % 導言區\documentclass{article}
    \title{My First Document}\author{Eastmount}\date{\today}
    % 正文區\begin{document}  \maketitle  Hello World!\end{document}
    

    顯示如下圖所示:


    篇章結構

    學術論文通常包括兩種結構,如下圖所示,左邊表示理論型,右邊表示實驗型。

    在LaTeX中我們可以通過section定義小結,也可以用subsection定義子小結。同時更推薦大家下載IEEE結構進行修改,后面我也會講到。

    • \section{Section title}
    • \label{sec:mysection}
    • \subsection{title}
    • \subsubsection{title}
    • \section*{} unnumbered section
    • \appendix

    舉個示例:


    % 導言區\documentclass{article}\usepackage{ctex}
    \title{My First Document}\author{Eastmount}\date{\today}
    % 正文區\begin{document}  \maketitle    % 構建文章小結  \section{Introduction}  \section{Related Work}  \section{System Model}  \section{Mathematics and algorithms}  \section{Experiments}  \subsection{Datasets}  \subsubsection{實驗條件}  \subsubsection{評價指標}  \subsection{Results}  \section{Acknowledgment}  \end{document}
    

    輸出結果如下圖所示:


    算法

    通常采用兩種方法進行算法的編寫,包括:

    • 使用algorithm、algorithmic宏包
    • 使用algorithm2e宏包

    algorithm

    導入包:


    \usepackage{algorithm}\usepackage{algorithmic}
    

    算法代碼:


    \begin{algorithm}[!ht]  \caption{Feature extraction based on abstract syntax tree.}    \begin{algorithmic}[1]    \REQUIRE {$X=\left\{x_1,x_2,...,x_n\right\}$, where $x_i$ is the $i^{th}$ PowerShell script.}  \ENSURE {$V^{(ast)}=\left\{v_1,v_2,...,v_n\right\}$, where $v_i$ is the $i^{th}$ sequence vector generated by AST-based feature extraction method (i.e., AST2Vec).}  \STATE $V^{(ast)} \leftarrow \emptyset$ , $S \leftarrow \emptyset$, $F \leftarrow \emptyset$, $W \leftarrow \emptyset$     \FOR{$i \leftarrow 1$ {\bf to} $n$}    \STATE $t_i = ExtractAstSequences( x_i )$     \STATE $s_i = PostorderTraversal( t_i )$     \STATE $S.append( s_i )$  \ENDFOR  \STATE $F = BuildFeatureSetFromAst(S) $  \STATE $//$ Count all distinct features of AST sequences.  \FOR{each $f_k \in F$}    \STATE $w_k = CalculateWordVectors( f_k )$     \STATE $W.append( w_k )$  \ENDFOR  \STATE $//$ Calculate word vectors for each AST node.  \FOR{each $s_i \in S$}    \STATE $v_i = GenerateAstEmbedding( s_i )$     \STATE $V^{(ast)}.append( v_i )$  \ENDFOR  \STATE {\bf return} {$V^{(ast)}$}  \end{algorithmic}\label{algorithm1}\end{algorithm}
    

    運行結果如下圖所示:


    algorithm2e

    導入包:


    \usepackage{algorithm}\usepackage[algo2e]{algorithm2e}
    

    算法代碼:


    \begin{algorithm}[!ht]  \caption{Feature extraction based on abstract syntax tree.}  \label{algorithm1}  \SetAlgoLined  \SetKwInOut{Input}{Input}  \SetKwInOut{Output}{Output}    \Input{$X=\left\{x_1,x_2,...,x_n\right\}$, where $x_i$ is the $i^{th}$ PowerShell script.}  \Output{$V^{(ast)}=\left\{v_1,v_2,...,v_n\right\}$, where $v_i$ is the $i^{th}$ sequence vector generated by AST-based feature extraction method (i.e., AST2Vec).}    Initialization: $V^{(ast)} \leftarrow \emptyset$ , $S \leftarrow \emptyset$, $F \leftarrow \emptyset$, $W \leftarrow \emptyset$     \For{$i \leftarrow 1$ \KwTo $n$}{    $t_i = ExtractAstSequences( x_i )$     $s_i = PostorderTraversal( t_i )$     $S.append( s_i )$  }  $F = BuildFeatureSetFromAst(S) $  \tcc{Count all distinct features of AST sequences}  \For{$f_k \in F$}{    $w_k = CalculateWordVectors( f_k )$     $W.append( w_k )$  }  \tcc{Calculate word vectors for each AST node}  \For{$s_i \in S$}{    $v_i = GenerateAstEmbedding( s_i )$     $V^{(ast)}.append( v_i )$  }  \Return{$V^{(ast)}$}  \end{algorithm}
    

    運行結果如下圖所示:


    圖片

    基本用法

    在LaTeX中插入圖片的基本語法如下:

    • 導言區插入:\usepackage{graphicx}
    • 語法:\includegraphics[ < 選項 > ] { < 文件名 > }
    • 格式:EPS、PDF、PNG、JPEG、BMP

    下面舉例說明:


    % 導言區\documentclass{article}\usepackage{ctex}\usepackage{graphicx}
    % 指定圖片在當前目錄下figures目錄下\graphicspath{{figures/}}
    % 正文區\begin{document}  % 插入圖片  \includegraphics{fig1}  % 縮放比例  \includegraphics[scale=0.5]{fig1}  % 固定圖像高度  \includegraphics[height=2cm]{fig1.png}  % 固定圖像寬度  \includegraphics[width=2cm]{fig1.png}  % 圖像高度和寬度基于  \includegraphics[height=0.2\textheight]{fig1.png}  \includegraphics[width=0.2\textwidth]{fig1.png}  % 指定多個參數  \includegraphics[angle=-45,width=0.5\textwidth]{fig1.png}\end{document}
    

    顯示結果如下圖所示,scale=0.5是將圖片大小縮小為真實大小的一半,[width=0.2\textwidth] 將圖形縮放到文本的0.2倍。


    雙欄顯示

    注意,在論文中通常會遇到要橫跨兩欄的應用場景,此時我們需要這樣設置:

    • \begin{figure*}
    • \end{figure*}
    \usepackage{stfloats}\begin{figure*}[ht]  \centering  \includegraphics[width=0.8\textwidth]{4.eps}  \caption{BER performance of original OFDM system and different companding schemes over AWGN channel (QPSK).}  \label{fig8}\end{figure*}
    

    上面代碼中,figure* 表示跨雙欄,htbp表示的意思是latex會盡量滿足排在前面的浮動格式,就是h-t-b-p這個順序,讓排版的效果盡量好。其中,h-here表示在此處,t-top表示在頂部,b-bottom表示底部,p-page表示在本頁。為了防止跨頁圖片跑到最后一頁,我們需要在導言區加入stfloats包,然后設置\begin{figure*}[ht] 即可。


    h——放置在此處t——放置在頂部b——放置在底部p——浮動放置*——兩欄放置
    


    雙圖顯示

    第一種方式——調用minipage實現,也是最常見的方式。


    \begin{figure*}  \begin{minipage}[t]{0.48\linewidth}    \centering    \includegraphics[scale=0.30]{Figure-7.eps}    \caption{The loss curve of different models.}    \label{fig7}  \end{minipage}  \begin{minipage}[t]{0.48\linewidth}    \centering    \includegraphics[scale=0.30]{Figure-8.eps}    \caption{The accuracy curve of different models.}    \label{fig8}  \end{minipage}\end{figure*}
    

    顯示效果如下圖所示:

    第二種方式——調用subfigure實現。


    \usepackage{caption}\usepackage{subfigure}
    \begin{figure}[htbp]  \centering    %居中  \subfigure[name of the first figure] %第一張子圖  {    \begin{minipage}[t]{0.4\textwidth}      \centering      \includegraphics[scale=0.15]{fig2}    \end{minipage}  }  \subfigure[name of the second figure] %第二張子圖  {    \begin{minipage}[t]{0.4\textwidth}      \centering            \includegraphics[scale=0.2]{fig3}     \end{minipage}  }  \caption{name of the figure}        %大圖名稱  \label{fig-1}  %圖片引用標記\end{figure}
    

    顯示如下圖所示:

    第三種方法——調用宏包宏包subfig。使用subfig宏包提供的\subfloat命令,需要使用宏包\usepackage{graphicx}和\usepackage{subfig}。


    \begin{figure}[!hb]  \centering  \subfloat[\label{fig:arm1}$Q^{*}$ values for arm 1]{\includegraphics[width=.5\linewidth]{1.eps}}%  \subfloat[\label{fig:arm2}$Q^{*}$ values for arm 2]{\includegraphics[width=.5\linewidth]{1.eps}}\\  \subfloat[\label{fig:arm3}$Q^{*}$ values for arm 3]{\includegraphics[width=.8\linewidth]{1.eps}}  \caption{$Q^{*}$ values for different arms.}  \label{fig:arms}\end{figure}
    

    顯示如下圖所示:


    表格

    基本用法

    在LaTeX中使用tabular生成表格,插入時需要設置對齊方式(l-左對齊、c-居中對齊、r-右對齊),然后插入數據,其中&用于分割每列,\\用于換行。下面的代碼展示常見的三線表。


    \begin{table}  \caption{Symbol Table}  \centering  \begin{tabular}{lll}  \hline      Symbol & Definition & Unitis\\      \noalign{\global\arrayrulewidth1pt}\hline\noalign{\global\arrayrulewidth0.4pt}      \multicolumn{3}{c}{\textbf{Constants}}\\      $\lambda$ & Mean of Poisson distribution & unitless\\      $p_{slow}$ & Probability that a vehicle slows down randomly & unitless\\      \hline    \end{tabular}\end{table}
    

    顯示如下圖所示:

    含注釋的表格

    在IEEE的LaTex模板里希望添加表格的注釋,即說明表格字符的含義。具體流程如下:

    • 使用\usepackage{threeparttable}
    • \begin{tabular}后加上\begin{threeparttable},和\end{tabular}前加上\end{threeparttable}
    • 注釋加在\begin{tablenotes} 和 \end{tablenotes}之間

    導入擴展包如下所示:


    \usepackage{threeparttable}\usepackage{float}\usepackage{bbding}\usepackage{pifont}
    

    代碼如下:


    \begin{table*}[!ht]  \centering  \caption{Related work comparison.}  \begin{threeparttable}  \resizebox{\textwidth}{!}{    \begin{tabular}{ccccm{1.2cm}<{\centering}m{1.2cm}<{\centering}cc}\hline      Related work & Techniques & Focus & Deobfuscation &  AST & KG & Multi-modal & Transformer  \\\hline      Li et al. \cite{b3} & \makecell[c]{subtree-based deobfuscation \\ OOA mining algorithm} & deobfuscation & \Checkmark & \Checkmark & \XSolid & \XSolid  & \XSolid \\\hline      PSDEM \cite{b12} & \makecell[c]{two-layer deobfuscation \\  monitor process by dynamic analysis} & deobfuscation & \Checkmark & \XSolid & \XSolid & \XSolid & \XSolid \\\hline      PowerDrive \cite{b13} & \makecell[c]{multi-stage deobfuscator \\  static analysis by regex \\ dynamic analysis by cmdlet} & deobfuscation & \Checkmark & \XSolid & \XSolid & \XSolid & \XSolid \\\hline      PowerDecode \cite{b15} & \makecell[c]{syntax check and remove base64 encoding \\ deobfuscate by cmdlet overriding  \\ deobfuscate by regex} & deobfuscation & \Checkmark & \XSolid & \XSolid & \XSolid & \XSolid \\\hline      Hendler et al. \cite{b18} & \makecell[c]{character-level CNN \\ 4-layer CNN} & binary classification & \XSolid & \XSolid & \XSolid & \XSolid & \XSolid \\\hline      Fang et al. \cite{b19} & \makecell[c]{hybrid features \\ FastText \\ random forest} & binary classification & \Checkmark & \Checkmark & \XSolid & $\bigcirc$ & \XSolid \\\hline      Hendler et al. \cite{b2} & \makecell[c]{AMSI-based detection \\ contextual embeddings \\ Token-Char-FastText} & binary classification & \XSolid & \XSolid & \XSolid & \XSolid & \XSolid \\\hline      FC-PSDS \cite{b25} & \makecell[c]{ features combination \\ random forest and DNN} & binary classification & \Checkmark & \Checkmark & \XSolid & \XSolid & \XSolid \\\hline      Ruscak et al. \cite{b20} & \makecell[c]{abstract syntax tree \\ random forest} & multi-classification task & \XSolid & \Checkmark & \XSolid & \XSolid & \XSolid \\\hline      \makecell[c]{\textbf{Our method} \\ \textbf{PowerDetector}} & \makecell[c]{multi-modal embedding \\ Transformer-CNN-BiLSTM \\ multi-layer deobfuscation algorithm } & \makecell[c]{malicious family detection \\ multi-classification task} & \Checkmark & \Checkmark & \Checkmark & \Checkmark & \Checkmark \\\hline  \end{tabular}}    \begin{tablenotes}    \footnotesize    \item In this table, \Checkmark stands for fully cover, $\bigcirc$ stands for partial cover, \XSolid means cannot cover.  \end{tablenotes}  \end{threeparttable}  \label{tab1}\end{table*}
    

    運行結果如下圖所示:


    復雜表格合并multirow

    利用multirow宏包實現,multirow命令的基本語法格式如下:

    • \multirow{[行數]}{[寬度]}{[內容]}
    • \multirow{[行數]}*{[內容]}

    導入包:


    \usepackage{multirow}
    

    代碼如下:


    \begin{table*}[!ht]  \centering  \caption{Detailed performance comparison of single-modal and multi-modal.}  \resizebox{\textwidth}{!}{  \begin{tabular}{ccccccccccc}\hline    \multirow{3}{*}{Model} & \multicolumn{8}{c}{Single-modal} & \multicolumn{2}{c}{\multirow{2}{*}{Multi-modal}} \\    \cline{2-9}    & \multicolumn{2}{c}{Token-level} & \multicolumn{2}{c}{Character-level} & \multicolumn{2}{c}{AST-level} &     \multicolumn{2}{c}{KG-level} & \multicolumn{2}{c}{} \\    \cline{2-11}    & $F_1$ & Acc & $F_1$ & Acc & $F_1$ & Acc & $F_1$ & Acc & $F_1$ & Acc \\\hline    LR & 0.8727 & 0.8629 & 0.8496 & 0.8528 & 0.8661 & 0.8700 & 0.8646 & 0.8559 & 0.8895 & 0.8857 \\    RF & 0.8723 & \textbf{0.8676} & \textbf{0.8610} & \textbf{0.8567} & \textbf{0.8807} & \textbf{0.8786} & 0.8723 & 0.8676 & \textbf{0.9017} & \textbf{0.8943}  \\    SVM & 0.8764 & 0.8661 & 0.8527 & 0.8519 & 0.8755 & 0.8786 & \textbf{0.8771} & 0.8676 & 0.8934 & 0.8912  \\    KNN & 0.8706 & 0.8669 & 0.8554 & 0.8536 & 0.8644 & 0.8637 & 0.8741 & \textbf{0.8715} & 0.8804 & 0.8771 \\\hline    CNN & 0.9002 & 0.8974 & 0.8826 & 0.8808 & 0.9019 & 0.8998 & 0.9025 & 0.8998 & 0.9153 &  0.9115 \\    TextCNN & 0.9049 & 0.9013 & 0.9012 & 0.8966 & 0.9083 & 0.9076 & 0.9036 & 0.9005 & 0.9186 & 0.9178  \\    BiLSTM & 0.9076 & 0.9069 & 0.9037 & 0.9036 & 0.9126 & 0.9107 & 0.9054 & 0.9025 & 0.9226 & 0.9209  \\    BiGRU & 0.9041 & 0.9021 & 0.8989 & 0.8966 & 0.9092 & 0.9045 & 0.9046 & 0.9013 & 0.9205 & 0.9201  \\    Transformer & 0.9123 & 0.9107 & 0.9053 & 0.9029 & 0.9116 & 0.9092 & 0.9121 & 0.9115 & 0.9224 & 0.9178  \\    CNN-BiLSTM+ATT & \textbf{0.9142} & \textbf{0.9123} & \textbf{0.9081} & \textbf{0.9076} & \textbf{0.9144} & \textbf{0.9139} & \textbf{0.9139} & \textbf{0.9123} & \textbf{0.9262} & \textbf{0.9209} \\\hline    \textbf{Our Method} & \textbf{0.9236} & \textbf{0.9225} & \textbf{0.9170} & \textbf{0.9169} & \textbf{0.9248} & \textbf{0.9233} & \textbf{0.9204} & \textbf{0.9201} & \textbf{0.9374} &\textbf{0.9358}  \\\hline                                  \end{tabular}}  \label{tab5}\end{table*}
    

    運行結果如下圖所示:

    表格越界處理方法:


    解決自動換行

    采用taularx解決相關問題,參考下列這篇博客。

    • https://blog.csdn.net/wanjiac/article/details/107489700

    正常顯示會越界,如下圖所示:


    \begin{table*}[h]  \centering  \begin{tabular}{cc} \hline    Use Case Navn: & Opret Server \\\hline    Scenarie: & At oprette en server med bestemte regler som tillader folk at spille sammen.                         The nonlinear companding function introduce some nonlinear distortion to original OFDM signal,                         which can be eliminated theoretically by the decompanding function. \\\hline  \end{tabular}  \label{tab5}\end{table*}
    

    運行結果如下圖所示,顯然越界。

    導入包:


    \usepackage{tabularx}
    

    代碼如下:


    \begin{table*}[h]  \centering  \begin{tabularx}{\textwidth}{p{4cm} X} \hline    Use Case Navn: & Opret Server \\\hline    Scenarie: & At oprette en server med bestemte regler som tillader folk at spille sammen.                         The nonlinear companding function introduce some nonlinear distortion to original OFDM signal,                         which can be eliminated theoretically by the decompanding function. \\\hline  \end{tabularx}  \label{tab5}\end{table*}
    

    運行結果如下圖所示:


    公式

    LaTeX中的數學模式有兩種形式:inline 和 display。前者是指在正文插入行間數學公式,后者獨立排列,可以有或沒有編號。

    • 行內公式(inline): 用 $…$將公式括起來進行排版,也可以使用小括號和\begin{math}排版。
    • 行間公式(displayed): 用 $ $…$ $ 將公式括起來是無編號的形式,還有 \ [ … \ ]的無編號獨立公式形式,塊間元素默認是居中顯示的。
    • 上標使用^符號,下表使用_符號。
    • 常見數學函數包括 \log、\sin、\cos、\arcsin、\arccos、\ln、\sqrt等。
    • 分數建議使用\frac{3}{4}表示3/4。
    • 如果需要對公式進行自動編號,要在equation環境下進行排版,同時調用\ref直接引用。
    • 各類希臘字母編輯表,常見符號如下圖所示。

    如果您正在編寫包含許多復雜公式的科學文檔,則amsmath包引入了幾個新命令,這些命令比基本LaTeX提供的命令更強大,更靈活。

    • \usepackage {amsmath}
    • \usepackage {mathtools}

    Stone_Stan4d老師的文章“Latex的公式輸入”歸納總結了常見的符號,如下圖所示:

    接著給出一些示例:

    (1)矩陣公式:

    \begin{equation}\begin{aligned}  V^{(token)}=  \begin{bmatrix}    v_{11} & v_{12} & \cdots & v_{1m} \\    v_{21} & v_{22} & \cdots & v_{2m} \\    \vdots & \vdots & \ddots & \vdots \\    v_{n1} & v_{n2} & \cdots & v_{nm} \\  \end{bmatrix}\end{aligned}\label{eq1}\end{equation}
    

    顯示如下圖所示:

    (2)分段函數公式:

    \begin{equation}\begin{aligned}  TokenPairs[j][k] =   \begin{cases}  v_{jk} + 1 & \exists <f_j,f_k>  \\  v_{jk} + 0 & other  \\  \end{cases}.\end{aligned}\label{eq2}\end{equation}
    

    顯示如下圖所示:

    (3)分數函數:

    \begin{equation}\begin{aligned}  Attention(\textbf{Q},\textbf{K},\textbf{V}) = softmax \left( \frac{\textbf{Q}\textbf{K}^T}{\sqrt{d_k}} \right) \textbf{V}.\end{aligned}\label{eq5}\end{equation}
    

    顯示如下圖所示:

    (4)準確率公式:

    \begin{equation}\begin{aligned}  Accuracy = \sum_{i=1}^N Accuracy_i \times w_i .\end{aligned}\label{eq15}\end{equation}
    

    顯示如下圖所示:

    需要注意,不同于圖表使用“\ref{tab1}”的引用,公式使用“\eqref{eq1}”引用。區別是顯示是否帶有括號。

    詳細的公式使用文章推薦如下:

    • https://zhuanlan.zhihu.com/p/450465546

    特殊符號

    圓圈數字

    正常推薦使用pifont宏包。

    • https://zhuanlan.zhihu.com/p/615066252
    • https://milde.users.sourceforge.net/LUCR/Math/mathpackages/amssymb-symbols.pdf
    \usepackage{pifont}\ding{184}
    

    各種樣式如下:


    \ding{182}\ding{183}\ding{184}\ding{185}\ding{186}\ding{187}\ding{188}\ding{189}\ding{190}\ding{191}\\
    \ding{192}\ding{193}\ding{194}\ding{195}\ding{196}\ding{197}\ding{198}\ding{199}\ding{200}\ding{201}\\
    \ding{202}\ding{203}\ding{204}\ding{205}\ding{206}\ding{207}\ding{208}\ding{209}\ding{210}\ding{211}\\
    

    顯示效果如下圖所示:

    然后,有時候出版社的模板無法引用pifont宏包,則使用如下:


    $\textcircled{3}$
    

    但數字編號大的時候,數字會跑到圓圈外面。

    解決方法如下:


    \normalsize{\textcircled{\scriptsize{3}}}\normalsize\enspace
    


    半圓

    導入引用包和代碼:


    \usepackage{tikz}\newcommand*\emptycirc[1][1ex]{\tikz\draw (0,0) circle (#1);} \newcommand*\halfcirc[1][1ex]{%  \begin{tikzpicture}  \draw[fill] (0,0)-- (90:#1) arc (90:270:#1) -- cycle ;  \draw (0,0) circle (#1);  \end{tikzpicture}}\newcommand*\fullcirc[1][1ex]{\tikz\fill (0,0) circle (#1);}
    

    使用如下:


    \fullcirc\halfcirc\emptycirc
    

    勾叉

    導入引用包和代碼:


    \usepackage{pifont}       % \ding{xx}\usepackage{bbding}       % \Checkmark,\XSolid,... (需要和pifont宏包共同使用)
    

    使用如下:


    \checkmark\Checkmark\CheckmarkBold\XSolid\XSolidBold\XSolidBrush
    

    其它參見的符號參考Xovee老師的文章,詳見參考文獻。

    參考文獻:
    • https://blog.csdn.net/hyk_1996/article/details/124486173
    • https://blog.csdn.net/xovee/article/details/122179352

    紙牌

    引用代碼如下:


    $\clubsuit$$\spadesuit$$\heartsuit$$\diamondsuit$
    

    其它常見的符號推薦如下所示的博客。

    • https://blog.csdn.net/ying_xu/article/details/51240291
    • https://blog.csdn.net/YEN_CSDN/article/details/79966985


    參考文獻

    LaTeX插入參考文獻,可以使用BibTex,也可以不使用BibTex。


    \begin{thebibliography}{99}  \bibitem{ref1}Zheng L, Wang S, Tian L, et al., Query-adaptive late fusion for image search and person re-identification, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2015: 1741-1750.  \bibitem{ref2}Arandjelovi? R, Zisserman A, Three things everyone should know to improve object retrieval, Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, IEEE, 2012: 2911-2918.  \bibitem{ref3}Lowe D G. Distinctive image features from scale-invariant keypoints, International journal of computer vision, 2004, 60(2): 91-110.  \bibitem{ref4}Philbin J, Chum O, Isard M, et al. Lost in quantization: Improving particular object retrieval in large scale image databases, Computer Vision and Pattern Recognition, 2008. CVPR 2008, IEEE Conference on, IEEE, 2008: 1-8.  \end{thebibliography}
    

    上面列出了5個參考文獻,{thebibliography}的選項99指的是參考文獻的個數最大為99,可以設置為別的數。在正文中引用參考文獻的方法是:\cite{ref1}、\cite{ref1, ref5}。

    BibTeX 是一種格式和一個程序,用于協調LaTeX的參考文獻處理。

    在Texlive中,通常有兩種格式的引用參考文獻。

    (1)第一種方式直接在main.tex文件中撰寫,以thebibliography的形式。


    \begin{thebibliography}{49}
    \bibitem{b1} Microsoft, ``What is PowerShell? - PowerShell | Microsoft Docs,''     Website: https://docs.microsoft.com/en-us/powershell/scripting/overview, 2022.
    \bibitem{b2} D. Hendler, S. Kels, et al., ``AMSI-Based Detection of Malicious PowerShell     Code Using Contextual Embeddings,'' in 15th ACM Asia Conference on Computer and     Communications Security (AsiaCCS). ACM, 2020, pp. 679-693.
    \bibitem{b49} M. Ring, D. Schlor, et al., ``Malware detection on windows audit logs using   LSTMs,'' Computers \& Security, vol.109, 2021, p. 102389. 
    \end{thebibliography}
    


    (2)第二種方式將參考文獻寫在myref.bib,以 \bibliography{myref} 的形式添加。


    @misc{b1,  title = {What is PowerShell? - PowerShell | Microsoft Docs},  url = {https://docs.microsoft.com/en-us/powershell/scripting/overview},  author = {Microsoft},  year = {2022}}
    @inproceedings{b2,  title={Amsi-based detection of malicious powershell code using contextual embeddings},  author={Hendler, Danny and Kels, Shay and Rubin, Amir},  booktitle={Proceedings of the 15th ACM Asia Conference on Computer and Communications Security (AsiaCCS)},  pages={679--693},  year={2020},  organization = {ACM}}
    @article{b49,  title={Malware detection on windows audit logs using LSTMs},  author={Ring, Markus and Schl{\"o}r, Daniel and Wunderlich, Sarah and Landes, Dieter and Hotho, Andreas},  journal={Computers \& Security},  volume={109},  pages={102389},  year={2021},  publisher={Elsevier}}
    


    參考文獻BIB格式可以通過谷歌學術下載。同樣,ChatGPT能夠修改對應的格式,如百度的文心一言。參考文獻格式推薦:

    • https://www.jianshu.com/p/f335e75487cb

    顯示如下圖所示:


    序號

    (1) 無序序列

    \begin{itemize}  \item Every sentence should make sense.  \item There is a lot to be said.  \item Eschew the highfalutin.\end{itemize}
    

    (2) 有序序列

    \begin{enumerate}  \item Every sentence should make sense.  \item There is a lot to be said.  \item Eschew the highfalutin.\end{enumerate}
    

    (3) 自定義序列

    \begin{description}  \item[Rule 1.] Every sentence should make sense.  \item[Rule 2.] There is a lot to be said.  \item[Rule 3.] Eschew the highfalutin.\end{description}
    

    序列同樣可以嵌套,代碼如下所示:


    總結

    寫到這里,希望這篇文章對您有所幫助,后續也將繼續更新內容

    tablelatex
    本作品采用《CC 協議》,轉載必須注明作者和本文鏈接
    LaTeX是一種基于ΤΕΧ的排版系統,由美國計算機學家萊斯利·蘭伯特在20世紀80年代初期開發,利用這種格式,即使使用者沒有排版和程序設計的知識也可以充分發揮由TeX所提供的強大功能,能在幾天、甚至幾小時內生成很多具有書籍質量的印刷品。對于生成復雜表格和數學公式,這一點表現得尤為突出。因此它非常適用于生成高印刷質量的科技和數學類文檔。
    匯總項目實施過程中可能出現的故障及解決方法。
    數據庫注入提權總結
    2022-08-09 16:49:49
    select * from test where id=1 and ;布爾盲注常見的布爾盲注場景有兩種,一是返回值只有True或False的類型,二是Order by盲注。查詢結果正確,則延遲3秒,錯誤則無延時。笛卡爾積延時大約也是3秒HTTP頭注入注入手法和上述相差不多,就是注入點發生了變化HTTP分割注入常見場景,登錄處SQL語句如下
    Dolt 是一個 SQL 數據庫,您可以像 git 存儲庫一樣分叉、克隆、分支、合并、推送和拉取。像任何 MySQL 數據庫一樣連接到 Dolt 以使用 SQL 命令運行查詢或更新數據,使用 Golang 語言編寫。它與 MySQL 關系型數據庫一樣,具有表、視圖等概念,支持數據的增刪改查等操作。
    攻擊者通過獲取域控的DSRM密碼,就可以使用帳戶通過網絡登錄到域控服務器,從而達到權限維持的目的。域內權限維持的方式有很多,每增加一條安全檢測規則,就多一層安全保障。
    簡介在2023年4月24日晚接到gitlab升級通知后,例行升級惹出的大問題。本文記錄了修復gitlab的全過程及中間放下的錯。由于中間部分操作未能及時記錄截圖,所以在這使用中間備份的一些場景進行復現。此時為第一個錯誤,沒有對虛擬機進行快照就對內部應用進行升級。由于通過docker部署gitlab已經超過5年了,每次更新都是這么進行的,這次也沒有太多要注意的意識。
    幾乎所有Win32程序都會加載ntdll.dll和kernel32.dll這兩個基礎的動態鏈接庫。64位系統首先通過選擇字GS在內存中找到當前存放著指向當前線程環境塊TEB。進程環境塊中偏移位置為0x18的地方存放著指向PEB_LDR_DATA結構體的指針,其中,存放著已經被進程裝載的動態鏈接庫的信息。模塊初始化鏈表 InInitializationOrderModuleList中按順序存放著 PE 裝入運行時初始化模塊的信息,第一個鏈表結點是 ntdll.dll,第二個鏈表結點就是 kernel32.dll。從kernel32.dll的加載基址算起,偏移0x3C的地方就是其PE頭。
    如何調包Win32API函數?其實就是HookPE文件自己的IAT表。
    假設Mysql中canal_test庫下有一張表policy_cred,需要統計實時統計policy_status狀態為1的mor_rate的的變化趨勢,并標注比率的風險預警等級。?本次安裝的canal版本為1.1.2,Canal版本最后在1.1.1之后。server端采用MQ模式,MQ選用Kafka。服務器系統為Centos
    使用Redshift COPY命令訪問敏感數據的幾種方式
    VSole
    網絡安全專家
      亚洲 欧美 自拍 唯美 另类