本文總體上關于文字排版軟體latex的入門使用,順便記錄一下自己不算糟糕的科研生活,再順便自己下此用到的時候友善檢視.
注釋2:文采太差,小時候寫日記我爸就說我記流水賬,現在仍然學不會花哨的叙事方式,就按照時間線走吧。
階段一:“可以投了”
2020年10月末,熬了大半年的論文終于獲得了老闆的準許,可以投稿了:

OS:删了老師的兩個大牛同行署名後,我對自己的作品更加沒有信心了【狗頭】,不過署名少的文章,應該更容易中吧,強行安慰自己一波。
階段二:投哪裡好呢
其實我自己最清楚這篇文章的品質水準,但是作為自己的第一次投稿,我不自覺的認真對待。剛開始選擇了《管理工程學報》,後又結合學院推薦期刊選擇了《系統工程學報》,如願得到了一次使用latex排版的機會。
加之近期有一個會議,如過運氣好的話還可以走推薦路線,會節省很多時間,與師兄簡單交流過後決定整它。
階段三:Latex入門使用
在上述報刊的官網上下載下傳了一衆檔案,各種格式,各種看不懂,各種頭疼,都是關于模闆的使用的。其中看的最明白的就是:latex網址參考.txt了,打開一看:
- Latex軟體首頁網址:科技排版系統:CTEX
- 下載下傳網址:首頁上的“下載下傳中心”:下載下傳中心:CTEX 最好下載下傳完整版。
- 使用手冊:首頁上的“幫助文檔”:可以逐一打開,内容非常詳細。
- Latex使用說明亦可參考:LaTeX 文檔:CTEX
進入下載下傳網址,選擇穩定版中的完整版,整體大小大概1.3個G吧,1.3個G~吧,别下簡版,感覺缺的包比較多,不适合初學者。
步驟2:按照要求一步一步安裝,最終用的軟體為
WinEdt這個東西。其中最關鍵的又是這兩個按鍵:
打開從期刊官網下載下傳下來的壓縮包的JSE Template-to author.tex檔案,其實這個檔案就是模闆,如果軟體沒問題+編譯成功的話會輸出一個PDF,沒錯就是壓縮包裡那個。
步驟4:編譯,編譯的方式有很多,上圖的左邊小紅框就是編譯按鈕,相當于jupyter notebook裡的運作鍵。不同的是這個軟體編譯方式有很多種,而我們需要用到的是
CCT & LaTeX,如何切換成這種編譯方式呢,先點選工具框的Tex~選擇CTeX Tools~然後選擇CCT & LaTeX,即可!
步驟五:如果報錯的話不用慌,如果報錯是:file 'xxx.sty' not found,這個報錯是缺包的意思,這個問題我沒遇到,自行百度。如果報錯bibname undefined,這個錯誤是由于系統裡面GB.cpx檔案是亂碼的,是以需要另外下載下傳GB檔案放在目前目錄或者替換掉系統的檔案即可。(把gb.cpx 覆寫到安裝路徑下,即放到 C:CTEXMiKTeXtexlatexcjkGB),複制下面這個東西,複制粘貼到文本編輯器中,儲存為GB.cpx,替換了原來那個那個就行。
% This is the file GB.cap of the CJK package
% for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e
%
% created by aloft <[email protected]> for Standard LaTeX document class.
%
% Version 4.5.2 (18-May-2003)
%
% $Id: GB.cpx,v 1.7 2003/05/20 15:51:14 aloft Exp $
%
deffileversion{4.5.2}
deffiledate{2003/05/18}
ProvidesFile{GB.cap}[filedatespacefileversion
for Standard LaTeX document class]
% Chinese captions
%
% character set: GB 2312-80
% encoding: EUC
renewcommandcontentsname{目錄}
renewcommandlistfigurename{插圖}
renewcommandlisttablename{表格}
@ifundefined{chapter}
{renewcommandrefname{參考文獻}}
{renewcommandbibname{參考文獻}}
renewcommandindexname{索引}
renewcommandfigurename{Fig}
newcommandcodename{代碼}
renewcommandtablename{表}
newcommandCJKprepartname{第}
newcommandCJKpartname{部分}
newcommandCJKthepart{CJKnumber{@[email protected]}}
@ifundefined{chapter}{}{
newcommandCJKprechaptername{第}
newcommandCJKchaptername{章}
newcommandCJKthechapter{CJKnumber{@[email protected]}}}
renewcommandappendixname{附錄[email protected]@chapter}
@ifundefined{mainmatter}
{renewcommandabstractname{摘要}}{}
% renewcommandccname{} % ?
% renewcommandenclname{附件}
% newcommandprepagename{} % ?
% newcommandpostpagename{} % ?
% renewcommandheadtoname{} % ?
% renewcommandseename{} % ?
[email protected]=today
[email protected]{~theyear~年~themonth~月~theday~日}
[email protected]{CJKdigits{theyear}年CJKnumber{themonth}月CJKnumber{theday}日}
[email protected]{[email protected]}
renewcommandtoday{[email protected]}
newcommandCJKtoday[1][1]{%
ifcase#[email protected]{[email protected]}
[email protected]{[email protected]}
[email protected]{[email protected]}
fi}
%
% modify the definitions of Standard LaTeX document class
%
@ifundefined{chapter}{
[email protected][#1]#2{%
ifnum [email protected] >[email protected]
refstepcounter{part}%
% addcontentsline{toc}{part}{theparthspace{1em}#1}%
addcontentsline{toc}{part}{CJKprepartnameexpandafternoexpandCJKthepartCJKpartnamehspace{1em}#1}%
else
addcontentsline{toc}{part}{#1}%
fi
{parindent [email protected] raggedright
interlinepenalty @M
normalfont
ifnum [email protected] >[email protected]
% Largebfseries partnamenobreakspacethepart
Largebfseries CJKprepartnameCJKthepartCJKpartname
parnobreak
fi
huge bfseries #2%
markboth{}{}par}%
nobreak
vskip 3ex
@afterheading}
}{
[email protected][#1]#2{%
ifnum [email protected] >-2relax
refstepcounter{part}%
% addcontentsline{toc}{part}{theparthspace{1em}#1}%
addcontentsline{toc}{part}{CJKprepartnameexpandafternoexpandCJKthepartCJKpartnamehspace{1em}#1}%
else
addcontentsline{toc}{part}{#1}%
fi
markboth{}{}%
{centering
interlinepenalty @M
normalfont
ifnum [email protected] >-2relax
% hugebfseries partnamenobreakspacethepart
hugebfseries CJKprepartnameCJKthepartCJKpartname
par
vskip [email protected]
fi
Huge bfseries #2par}%
@endpart}
[email protected]
defchaptermark#1{%
markboth {MakeUppercase{%
ifnum [email protected] >[email protected]
[email protected]
% @chapapp thechapter. %
CJKprechapternameCJKthechapterCJKchaptername %
fi
fi
#1}}{}}%
defsectionmark#1{%
markright {MakeUppercase{%
ifnum [email protected] >[email protected]
% thesection. %
thesection %
fi
#1}}}
else
defchaptermark#1{%
markright {MakeUppercase{%
ifnum [email protected] >[email protected]
[email protected]
% @chapapp thechapter. %
CJKprechapternameCJKthechapterCJKchaptername %
fi
fi
#1}}}
fi
[email protected][#1]#2{ifnum [email protected] >[email protected]
[email protected]
refstepcounter{chapter}%
% typeout{@chapappspacethechapter.}%
typeout{CJKprechapternameCJKthechapterCJKchaptername}%
addcontentsline{toc}{chapter}%
% {protectnumberline{thechapter}#1}%
{protectnumberline{}CJKprechaptername%
expandafternoexpandCJKthechapterCJKchapternamehspace{0.8em}#1}%
else
addcontentsline{toc}{chapter}{#1}%
fi
else
addcontentsline{toc}{chapter}{#1}%
fi
chaptermark{#1}%
addtocontents{lof}{protectaddvspace{[email protected]}}%
addtocontents{lot}{protectaddvspace{[email protected]}}%
[email protected]
@topnewpage[@makechapterhead{#2}]%
else
@makechapterhead{#2}%
@afterheading
fi}
[email protected]#1{%
vspace*{[email protected]}%
{parindent [email protected] raggedright normalfont
ifnum [email protected] >[email protected]
[email protected]
% hugebfseries @chapappspace thechapter
hugebfseries CJKprechapternameCJKthechapterCJKchaptername
parnobreak
vskip [email protected]
fi
fi
[email protected]
Huge bfseries #1parnobreak
vskip [email protected]
}}
renewcommand*[email protected][2]{%
ifnum [email protected] >[email protected]
addpenalty{[email protected]}%
vskip 1.0em @[email protected]
% [email protected]{1.5em}%
[email protected]{0em}%
begingroup
parindent [email protected] rightskip @pnumwidth
parfillskip [email protected]
leavevmode bfseries
[email protected]
hskip -leftskip
#1nobreakhfil [email protected]@@pnumwidth{hss #2}par
[email protected]
endgroup
fi}
[email protected]
renewcommandappendix{@appendix%
defCJKprechaptername{relax}%
defCJKthechapter{relax}%
defCJKchaptername{appendixname}}
} %end of @ifundefined{chapter}
defnumberline#1{[email protected]>0pt%
[email protected]{#1space}%
[email protected]<@tempdimb%
@[email protected]%
fi%
[email protected]@@tempdima{#1hfil}%
fi}
endinput
然後在依次點選上圖中的框内的左右兩個小按鈕,就會彈出你要的PDF檔案了。
階段四:碼上文字,插公式
文字部分:先把題目,作者資訊寫上,該換的換了,整體架構别動,上面一級二級标題也很明顯,對照模闆生成的PDF的對應位置來,學會複制模闆中的代碼,照葫蘆畫瓢。其中注意哈,仿佛這個期刊預設
中英文摘要隻能有一頁,是以還是精簡一下自己的摘要吧。
公式部分:模闆給定了幾種公式的表達方式,但是如果編輯的話太麻煩,推薦使用mathtype編輯,先設定mathtype:進入mathtype~偏好~剪切和複制偏好設定~設定成這個樣子:
然後再mathtype裡編輯公式,直接複制到Winedt,然後把前後的[ 和 ]删除就行了,還會自動編号,如果在文字中插入公式要加上¥,不好意思,是美元$,就可以了。
階段五:整上表格
整理表格也是一件照葫蘆畫瓢的事情,其中兩點值得注意。
第一點:複制word上表格到這裡可以生成其Latex模闆。
Create LaTeX tables onlinewww.tablesgenerator.com
第二點:下面代碼中的幾個參數值得注意,0.8是整個表格所占紙面的寬度,0.8看起來是比較舒适的;6代表6列,這個值必須要與列數對應上?好像是吧;0.14是每一列的寬度,這個不停的調整,直到表格好看。
setlengthtempl{0.14textwidth} addtolengthtempl{-2tabcolsep}%%% 每一列所占長度
noindentbegin{tabular*}{0.8textwidth}{*{6}{p{templ}}} toprule%%%表格的總長度
階段六:貼上圖檔
圖檔的話必須要是eps格式,這種格式使用Origin可以直接生成的。
如果是其他格式的話,比如png,可以轉化成eps,有以下步驟:
步驟一:将你的png檔案放入一個檔案夾,檔案夾放在左面上。
步驟二:Win+R 打開運作視窗,然後輸入cmd,打開cmd終端,輸入cd,然後把檔案夾往裡拖。按enter。
步驟三:輸入dir
步驟四:然後再輸入最下面框内的字元,注意把圖檔的名稱對應上。然後就好了
把你的eps檔案放到你打開的tex檔案的同一個檔案夾裡(路徑一緻),這樣就可以照葫蘆畫瓢貼上圖了。注意下面的參數0.4是縮放比例,幾個參數自己調以下會發現是啥意思。
begin{center}
includegraphics [scale=0.4,trim=0 0 0 0]{tu3.eps}
label{Fig3}
{footnotesize {CJKfamily{hei} 圖~3 ~~ **********}
Fig.~3 ~~ ********** }
end{center}
階段七:參考文獻
看了一下用bibtex貼參考文獻的教程,太難了,于是乎我全手寫上了,其實也不麻煩,百度學術,谷歌學術都可以用哈,如:
直接複制這個就行了。注意以下中英文,中文文獻的英文名字在其摘要裡找,期刊的英文名字文章裡也會有,一般是文章頁眉有。
階段八:一些小細節
就是注意逗号,句号要用英文輸入,文字中的數字,英文後面空一格,大數字最好這樣表示34000,表示為34 000。可能明天或者就投會議了,過不了的話就老老實實投期刊系統,願大家的論文都有一個好結果。