让我的桌子看起来更好

让我的桌子看起来更好

这是我的代码:

\textbf{Table 1. Key DAQmx VIs}
            \begin{center}
            \begin{tabular}{\linewidth}{|c|c|c|}
            \hline
                \textbf{Name} & \textbf{Icon} & \textbf{Description}\\ \hline
                 Create Channel & \includegraphics[width=2in]{createchannel.png} & This VI will create virtual channels and adds them to a task. An example of inputs can be \textbf{physical channels} for analog input/output. For the analog input/output a max and min value inputs are used to optimize measurements as it restricts the input readings to the expected values. In our case, the VI is used to take the analog voltage input from analog input 0 (as seen on the front panel in Figure 5, 6, or 7) and the task is sent out.\\ \hline
                Timing & \includegraphics[width=2in]{timing.png} & \\ \hline
                Read & \includegraphics[width=2in]{read.png} & \\ \hline
                Write & \includegraphics[width=2in]{write.png} & \\ \hline
            \end{tabular}
            \end{center}

这是我的输出:

在此处输入图片描述

答案1

如果你需要分页符,那么加载包ltablex并执行不是 环境table。请参阅文档。

\documentclass{article}
\usepackage[font=bf,labelsep=period,justification=raggedright,
       singlelinecheck=false]{caption}
\usepackage{tabularx}
\usepackage[demo]{graphicx}
\newcommand\Includegraphics[2][]{\raisebox{\dimexpr0.75\normalbaselineskip-\height}{%
        \includegraphics[#1]{#2}}}
\begin{document}

\begin{table}[!htb]
\caption{Key DAQmx VIs}\centering
\begin{tabularx}{\linewidth}{|c|c|X|}\hline
\textbf{Name} & \textbf{Icon} & \textbf{Description}\\ \hline
Create Channel & \Includegraphics[width=2in]{createchannel.png} 
         & This VI will 
create virtual channels and adds them to a task. An example of inputs can be 
    \textbf{physical channels} for analog input/output. For the analog 
            input/output a max and min value inputs are used to optimize measurements as 
            it restricts the input readings to the expected values. In our case, the VI is 
            used to take the analog voltage input from analog input 0 (as seen on the 
            front panel in Figure 5, 6, or 7) and the task is sent out.\\ \hline
Timing & \Includegraphics[width=2in]{timing.png} & \\ \hline
Read & \Includegraphics[width=2in]{read.png} & \\ \hline
Write & \Includegraphics[width=2in]{write.png} & \\ \hline
\end{tabularx}
\end{table} 
\end{document}

在此处输入图片描述

答案2

类似于赫伯特答案,但使用adjustbox和选择不同的列类型并选择它们的宽度之间的比率:

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage[export]{adjustbox}
\usepackage{tabularx}
\newcommand\insertimage[1]{%
    \includegraphics[width=\linewidth, margin=0pt 3pt 0pt 3pt,valign=t]{#1}
                           }

\begin{document}
\textbf{Table 1. Key DAQmx VIs}
    \begin{center}
    \begin{tabularx}{\linewidth}{|>{\raggedright\hsize=0.5\hsize}X
                                 |p{50mm}
                                 |>{\hsize=1.5\hsize}X|}
    \hline
\textbf{Name} & \textbf{Icon} & \textbf{Description}\\ \hline
Create Channel
    &   \insertimage{createchannel.png}
        &   This VI will create virtual channels and adds them to a task. 
            An example of inputs can be \textbf{physical channels} for 
            analog input/output. For the analog input/output a max and min 
            value inputs are used to optimize measurements as it restricts 
            the input readings to the expected values. In our case, the VI 
            is used to take the analog voltage input from analog input 0 (as 
            seen on the front panel in Figure 5, 6, or 7) and the task is 
            sent out.\\ \hline
Timing
    &   \insertimage{timing.png}
        &       \\ \hline
Read
    &   \insertimage{read.png}
        &       \\ \hline
Write
    &   \insertimage{write.png}
        &       \\ \hline
    \end{tabularx}
    \end{center}
\end{document}

在此处输入图片描述

相关内容