无需更改大量代码即可在表格环境中换行

无需更改大量代码即可在表格环境中换行

我使用了以下代码:

\begin{tabular}{|c|c|l|}
\hline
 Pin Number & Pin Name & Analog Function\\
\hline
\hline
 1& 4xOUTZ& Yaw-rate or Z-rate output voltage 4 times amplified ($\pm$ 100 °/sec) \\
\hline
 2& OUTZ& Yaw-rate or Z-rate output voltage ($\pm$ 400 °/sec) \\
\hline
 3& ST& Self-test (logic 0: normal mode; logic 1: self-test) for Yaw Gyroscope \\
\hline
 4& PD& Power-down(logic 0: normal mode; logic 1: Power-down mode) for Yaw Gyroscope \\ 
\hline
 5& HP& High pass filter reset(logic 0: normal mode; logic 1: external high pass filter is 
reset) for Yaw Gyroscope \\
\hline
 6& NC& Not connected \\
\hline
 7& GND& Supply Ground \\
\hline
 8& NC& Not connected \\
\hline
 9& NC& Not connected \\
\hline
 10& Vref& Vref output from the Yaw Gyroscope IC. (Leave unconnected) \\
\hline
 11& OUTY& Roll-Rate or Y-rate output voltage ($\pm$ 400 °/sec) \\
\hline
 12& 4xOUTY& Roll-rate or Y-rate output voltage 4 times amplified ($\pm$ 100 °/sec)\\
\hline
 13& 4xOUTX& Pitch-rate or X-rate output voltage 4 times amplified ($\pm$ 100 °/sec) \\
\hline
 14& OUTX& Pitch-rate or X-rate output voltage ($\pm$ 400 °/sec) \\
\hline
 15& ST& Self-test (logic 0: normal mode; logic 1: self-test) for Pitch and Roll Gyroscope \\
\hline
 16& PD& Power-down(logic 0: normal mode; logic 1: Power-down mode) Pitch and Roll Gyroscope \\
\hline
 17& HP& High pass filter reset(logic 0: normal mode; logic 1: external high pass filter is reset) Pitch and Roll Gyroscope \\
\hline
 18& Vdd& 3.3V supply voltage \\
\hline
 19& Vref& Vref output from the Pitch and Roll Gyroscope IC. (Leave unconnected) \\
\hline
 20& NC& Not connected \\
\hline
 21& NC& Not connected \\
\hline
 22& Vref& Vref output from the IC. (Leave unconnected) \\
\hline
 23& NC& Not connected \\
\hline
 24& NC& Not connected \\
\hline
\end{tabular}

准备如下表格:

图像

但是你可以看到我的问题是什么。有没有办法在不更改我已经编写的大量代码的情况下将文本换行到表格中?

答案1

尝试使用该tabularx包。再次查看示例的相关部分:

\usepackage{tabularx}

\begin{document}

\noindent
\begin{tabularx}{\linewidth}{|c|c|X|}

当然,您也可以使用不同于的表格宽度\linewidth

相关内容