1. ホーム
  2. その他

LaTeXの共通フォーム

2022-02-26 02:37:47

表内の自動改行

\begin{table}  
\Large  
\caption{auto line feed}  
\begin{center}  
\begin{tabular}{|l|l|l|l| p{5cm}|}  
\hline  
Item & Name & Gender & Habit & Self-introduction \\\hline  
1 & Jimmy & Male & Badminton & Hi, everyone,my name is Jimmy,  
My topic is about how to use p{width} command \\\\ \hline  
2 & Jimmy & Male & Badminton & Hi, everyone,my name is Jimmy,  
My topic is about how to use p{width} command \\\\  
\hline  
\end{tabular}  
\end{center}  
\end{table}

\Ÿbegin{tabular}{|l|l|l|p{5cm}|} は最後の列を最大5cmに設定し、それを超えると改行が必要です。

テーブルの列の幅を設定する

\begin{table}  
\caption{set width}  
\begin{tabularx}{12cm}{lXl}  
\hline  
Start & End & Character Block Name \\  
\hline  
3400 & 4DB5 & CJK Unified Ideographs Extension A \\\  
4E00 & 9FFF & CJK Unified Ideographs \\\  
\hline  
\end{tabularx}  
\end{table}

パッケージを紹介します。\⑷パッケージの紹介

どちらかのカラム幅を設定する

\begin{table}[h] % start a table environment, the position of the table is h,here.
\caption{change table any column width} % show the title of the table
\begin{tabular}{p{3.5cm}|p{2cm}|p{5cm}} % sets the width of each column, forcing the conversion.
\hline
\hline
Format & Extension & Description \\\ % use & to separate the contents of a cell \\\ to go to the next line
\hline %Draw a horizontal line, the following will be the same, there are 4 lines of content here
Bitmap & .bmp & Bitmap images are recommended because they offer the most control over the exact image and colors.\\\
\hline
Graphics Interchange Format (GIF) & .gif & Compressed image format used for Web pages. Animated GIFs are supported.\\\
\hline
Joint Photographic Experts Group (JPEG) & .jpeg, .jpg & Compressed image format used for Web pages.\\\
\hline
Portable Network Graphics (PNG) & .png & Compressed image format used for Web pages.\\\
\hline
\hline
\end{tabular}
\end{table}


<イグ

水平方向の中央揃え表示

\renewcommand{\arraystretch}{1.5} %¿ØÖƱí¸ñÐиߵÄËõ-űÈÀý
\begin{table}[tp]
 
  \centering
  \fontsize{6.5}{8}\selectfont
  \caption{Demographic Prediction performance comparison by three evaluation metrics.}
  \label{tab:performance_comparison}
    \begin{tabular}{|c|c|c|c|c|c|c|}
    \hline
    \multirow{2}{*}{Method}&
    \multicolumn{3}{c|}{C}&\multicolumn{3}{c|}{ D}\cr\cline{2-7}
    &Precision&Recall&F1-Measure&Precision&Recall&F1-Measure\cr
    \hline
    \hline
    A&0.7324&0.7388&0.7301&0.6371&0.6462&0.6568\cr\hline
   B&0.7321&0.7385&0.7323&0.6363&0.6462&0.6559\cr\hline
    C&0.7321&0.7222&0.7311&0.6243&0.6227&0.6570\cr\hline
    D&0.7654&0.7716&0.7699&0.6695&0.6684&0.6642\cr\hline
    E&0.7435&0.7317&0.7343&0.6386&0.6488&0.6435\cr\hline
    F&0.7667&0.7644&0.7646&0.6609&0.6687&0.6574\cr\hline
    G&{\bf 0.8189}&{\bf 0.8139}&{\bf 0.8146}&{\bf 0.6971}&{\bf 0.6904}&{\bf 0.6935}\cr
    \hline
    \end{tabular}
\end{table}


<イグ

トリリニア方式。

\usepackage{booktabs}
\usepackage{threeparttable}
 
\renewcommand{\arraystretch}{1.5} % control row height
\begin{table}[tp]
 
  \centering
  \fontsize{6.5}{8} \selectfont
  \begin{threeparttable}
  \caption{Demographic Prediction performance comparison by three evaluation metrics.}
  \label{tab:performance_comparison}
    \begin{tabular}{ccccccc}
    \toprule
    \multirow{2}{*}{Method}&
    \multicolumn{3}{c}{ G}&\multicolumn{3}{c}{ G}\cr
    \cmidrule(lr){2-4} \cmidrule(lr){5-7}
    &Precision&Recall&F1-Measure&Precision&Recall&F1-Measure\cr
    \midrule
    kNN&0.7324&0.7388&0.7301&0.6371&0.6462&0.6568\cr
    F&0.7321&0.7385&0.7323&0.6363&0.6462&0.6559\cr
    E&0.7321&0.7222&0.7311&0.6243&0.6227&0.6570\cr
    D&0.7654&0.7716&0.7699&0.6695&0.6684&0.6642\cr
    C&0.7435&0.7317&0.7343&0.6386&0.6488&0.6435\cr
    B&0.7667&0.7644&0.7646&0.6609&0.6687&0.6574\cr
    A&{\bf 0.8189}&{\bf 0.8139}&{\bf 0.8146}&{\bf 0.6971}&{\bf 0.6904}&{\bf 0.6935}\cr
    \bottomrule
    \end{tabular}
    \end{threeparttable}
\end{table}



<イグ

フォーム生成のURLです。 http://www.tablesgenerator.com