發表文章

目前顯示的是有「Latex」標籤的文章

BMP/JPG/PNG圖檔轉換成EPS圖檔

圖片
下面不管哪個情況都會需要安裝Adobe Acrobat, Adobe Acrobat是要付費的版本,跟免費安裝使用的Adobe Reader功能上有很大的不同。 任意圖檔轉換成EPS圖檔 可以用Adobe Acrobat打開圖檔,然後另存成EPS圖檔 我最後是用了Matlab來做處理,因為Matlab可以開很多種圖檔,下面附上轉換程式碼,請安裝Matlab後服用,謝謝。 [file, path] = uigetfile( ...        {'*.jpg;*.bmp;*.png;*.tif', 'All Image Files (*.jpg;*.bmp;*.png;*.tif)'; ...         '*.*',                   'All Files (*.*)'}, ...         'Select image files for process', 'MultiSelect', 'on'); if isequal(file, 0) || isequal(path, 0)     disp('User pressed cancel');     return; end if iscell(file)     file_num = size(file,2); else     file_num = 1; end for i=1:file_num     if iscell(file)         imgfname = file{i};     else         imgfname = file;     end     imgpat...

Latex雙欄圖片放置範例

我以前寫圖片大小都是設定scale參數(例如scale=0.1)不過若是要排版雙欄的測試影像,調整就很麻煩。 改由只設定圖片寬度,讓Latex自動設定高度就方便許多! (width=5cm) \begin{figure} \centering \begin{tabular}{cc}   \includegraphics[width=5cm]{06.eps}       & \includegraphics[width=5cm]{P05.eps} \\   \scriptsize{(a) Test image $1$ with $\#FG/N=11.03\%$.} & \scriptsize{(f) Test image $6$ with $\#FG/N=14.63\%$.} \\   \\   \includegraphics[width=5cm]{14.eps}       & \includegraphics[width=5cm]{P04.eps} \\   \scriptsize{(b) Test image $2$ with $\#FG/N=3.74\%$.}  & \scriptsize{(g) Test image $7$ with $\#FG/N=\%$.} \\   \\   \includegraphics[width=5cm]{IMG_0539_roi.eps} & \includegraphics[width=5cm]{H01.eps} \\   \scriptsize{(c) Test image $3$ with $\#FG/N=13.12\%$.} & \scriptsize{(h) Test image $8$ with $\#FG/N=10.69\%$.} \\   \\   \includegraphics[width=5cm]{pic03_roi.eps} & \includegraphics[width=5cm]{H02.eps} \\ ...

Latex表格範例

表格一般都是將Caption放在上方,這點與圖片的配置相反。 table的參數[p!t]表示放在強制開新一頁(p=page;!=force)並且放在整頁的上方(t=top) 置中表格的時候用到的是\begin{center}和\end{center},這點與圖片的置中有些不一樣。 \hline是用來畫表格橫線的, 如果表格要畫直線,則是要設定tabular的參數,例如在1,2欄之間加上表格線就是寫\begin{tabular}{c|ccccc} \begin{table}[p!t] \caption{The performance comparison of test image $1$.}\label{tbl:img1} \begin{center} \begin{tabular}{cccccc} \hline       Method       & PR & SP & RC & AC & FM \\ \hline        \cite{N01} & 0.5761 & 0.9372 & 0.6886 & 0.9098 & 0.6274 \\        \cite{S02} & 0.6969 & 0.9577 & 0.7841 & 0.9386 & 0.7379 \\        \cite{Z03}  & 0.7487 & 0.9865 & 0.5734 & 0.9290 & 0.6495 \\        \cite{G04} & 0.7567 & 0.9740 & 0.6518 & 0.9385 & 0.7003 \\        \cite{K05} & 0.5892 & 0.9245 ...

Latex改字型大小

我知道的是兩種寫法: 第一種是 \tiny{改字型大小的文字} 第二種是 {\tiny 改字型大小的文字 } 一般若是要調小字,建議用\scriptsize或是\tiny比較有效果 \tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge