Latex 注意事項總結

這次終於要用LaTeX了。之前一直覺得麻煩沒用,這次破釜沉舟給學一下,

記錄一下

換行 \\ 

如果文中有 _ & 等字符,前面應該加上\ 相當於編程中的轉義字符

輸入羅馬字體

大寫羅馬字體2  \uppercase\expandafter{\romannumeral2}

大寫羅馬字體3  \uppercase\expandafter{\romannumeral3}

大寫羅馬字體4  \uppercase\expandafter{\romannumeral4}

對於初學者來說比較麻煩的是,對於公式,表,圖的處理。

對於公式的話,大部分複雜的公式都可以依賴於Mathpix 工具來進行處理。首先從官網安裝mathpix,這個好像對於個人用戶免費,這個軟件的強大之處 就是具有賬號,能進行同步,對於幾臺電腦同時編輯的工作來說的確夠給力。

對於表的編輯來說,有一個網站http://www.tablesgenerator.com/latex_tables 可以用來快速的對錶格進行編碼。

步驟1:首先在Word 中打好表格,然後將其複製到Excel中,隨後再複製到網頁中

即可,對於比較規整的表格來說比較好處理。有一些特殊情況需要額外關注一下:

\begin{table}[htbp] % 開始表的編排
\caption{Comparison results of using different refocusing method} % 表名稱,注意有caption 這個選項之後,才能開始進行編號。
\begin{tabular}{c|c|c} %開始設置表格式,c代表列,|代表豎線

\hline %代表橫線,一般是一行畫一個

\diagbox{Testset}{Method} % 繪製斜線雙表頭

其餘的按照規定進行處理即可。

下面記錄一下圖的編排格式,這裏我們的需求是一個表,然後兩個子表,兩個子表豎排

\begin{figure}
\centering
\subfigure[]{ % subfigure  開始子表,    [] 裏面如果小標題的標註
\begin{minipage}[b]{0.5\textwidth}
\includegraphics[width=\textwidth]{analyze/fig7(a).pdf}
\end{minipage}
%\begin{minipage}[a]{0.2\textwidth}
%
%\includegraphics[width=\textwidth]{analyze/fig7(b).pdf}
%\end{minipage}
}\\
\subfigure[]{
\begin{minipage}[b]{0.5\textwidth}
\includegraphics[width=\textwidth]{analyze/fig7(b).pdf}
\end{minipage}
}
\caption{Analysis of the confidence score of same positions of different refocused images. (a) detection results focusing on region 9. (b) detection results focusing on region 11}
\end{figure}
1)subfigure本身不支持內部圖片換行,所以結合minipage使用
2)minipage可以在每一個includegraphics後跟雙斜槓“\”表示換行,也可以像上面代碼中寫的使用”\vspace{4.pt}”來控制垂直間距,但是需要注意的是”\vspace{4.pt}”必須緊跟在對應的includegraphics,不然得不到想要的結果。
3)使用figure和subfigure必須引相應的包”\usepackage{graphicx}”和”\usepackage{subfigure}

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章