這里有詳細的學位論文寫作之word和Latex攻略視頻教程,喜歡用哪個隨便選
如何將word表格轉(zhuǎn)為格式
迫于無奈從剛開始學習計算機就上了某軟這條賊船,不少情況下厅缺,將表格寫為了word文件。如果要重新把這些表格再敲一遍也未免太累了點,本人是個懶癌患者甸陌,能不親自動手就讓計算機幫我做。最方便的就是用萬能的文本轉(zhuǎn)換工具pandoc盐股,只有你想不到的钱豁,沒有它做不到的。一般都集成在anaconda發(fā)型版里遂庄,作者用的是3.6版本寥院。如果沒有,則用pip install pandoc
安裝即可涛目,非常方便秸谢。雖然整個word文檔的轉(zhuǎn)換結(jié)果不會很完美,但是大體內(nèi)容都在了霹肝,只需要根據(jù)自己需要做一些小調(diào)整即可估蹄。
- word
pandoc my.docx -o my.tex
比如我的一個word表格,內(nèi)容挺多沫换,要是一個一個往里面敲臭蚁,還是需要費點功夫的。最左邊這一列里面有mathtype寫的公式,pandoc不識別垮兑,會當成空格處理冷尉。
- Pandoc轉(zhuǎn)換結(jié)果
因為word轉(zhuǎn)別的格式本來就很復雜,它有自己的一套格式體系系枪。對于復雜的word文檔雀哨,如果想一步到位轉(zhuǎn)換為格式,估計不太現(xiàn)實私爷。但是總體還不錯雾棺,在轉(zhuǎn)換結(jié)果上稍微修一修調(diào)一調(diào)即可。比如上面的word中的表格轉(zhuǎn)換為的結(jié)果為:
\begin{longtable}[]{@{}lll@{}}
\toprule
Symbol & Definition & Value/Units\tabularnewline
\midrule
\endhead
& permeability &\tabularnewline
& initial permeability &\tabularnewline
& Darcy velocity &\tabularnewline
\emph{p} & pressure & Pa\tabularnewline
& gravitational acceleration vector & 9.81\tabularnewline
& specific heat capacity of fluid &\tabularnewline
& specific heat capacity of rock & 880\tabularnewline
& thermal conductivity of rock & 1.5\tabularnewline
& concentration (mass fraction) of irons &\tabularnewline
& chemical diffusivity &\tabularnewline
& apparent solubility product &\tabularnewline
& effective solubility product &\tabularnewline
& saturation &\tabularnewline
\emph{M} & mass & \emph{kg}\tabularnewline
& mass fraction &\tabularnewline
& \emph{Greek Symbols}\tabularnewline
& fluid's dynamic viscosity &\tabularnewline
& fluid density &\tabularnewline
& porosity of the rock & 0.1\tabularnewline
& fluid's expansivity &\tabularnewline
& fluid's compressibility &\tabularnewline
& \emph{Subscripts} &\tabularnewline
\emph{f} & fluid &\tabularnewline
\emph{r} & rock &\tabularnewline
\emph{a} & anhydrite &\tabularnewline
\emph{p} & pyrite &\tabularnewline
\emph{fap} & fluid, anhydrite and pyrite &\tabularnewline
\bottomrule
\end{longtable}
可以看到\begin
區(qū)域跟前面講的簡單表格不一樣了(需要添加相應(yīng)的庫包)衬浑,雖然這也是個相對簡單的表格而已捌浩。為簡單起見,所以我們只需要稍微做一點小修改即可:把表格內(nèi)容復制粘貼簡單表格框架內(nèi)工秩,見在線代碼尸饺。編譯結(jié)果如下圖所示,
接下來只需要將mathtype公式補全即可拓诸,最擅長的就是寫公式侵佃,補全他五分鐘之內(nèi)絕對沒問題。
如果此文對您有啟發(fā)奠支,感謝您支持原創(chuàng): 有錢的動手打個賞馋辈,沒錢的動手點個贊
您的鼓勵就是我原創(chuàng)的動力。個人水平有限倍谜,若有問題迈螟,可在下方留言討論。