\begin{table}[htbp]
\centering
\small
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
Wavelength & Model & Package & Emmitter type & Manufacturer & Power (mW) & Iop (mA) & Ith (mA) & Vop (V)\\
\hline
405 & DL-7386-101HG & TO-56 & single & sanyo & 50-70 & 70 & 35 & 4.8\\
\hline
450 & PL 450 & TO-38 & single & osram & 50-90 & 120 & 30 & 5.5\\
\hline
638 & ML520G54 & TO-56 & single & mitsubishi & 90-100 & 150 & 50 & 2.7\\
\hline
655 & DL-5147-242 & TO-56 & single & sanyo & 30-50 & 80 & 40 & 3.8\\
\hline
\end{tabular}
\caption{Laser specifications}
\label{tab:Laser_Specs}
\end{table}
以上是我创建表格的代码,编译后超出了文本宽度。如何在不改变字体大小的情况下解决这个问题?
答案1
请随时发帖完全的例如文档中的文本宽度在这里很重要,但在片段中看不到。
\documentclass[a4paper]{article}
\usepackage{array}
\setlength\extrarowheight{2pt}
\begin{document}
\begin{table}[htbp]
\centering
\small
\setlength\tabcolsep{2pt}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
Wave- & & & Emmitter & Manu- & Power & Iop & Ith & Vop \\[-3pt]% compensate for extrarowheight
length& Model & Package & type & facturer & (mW) & (mA) & (mA) & (V)\\
\hline
405 & DL-7386-101HG & TO-56 & single & sanyo & 50--70 & 70 & 35 & 4.8\\
\hline
450 & PL 450 & TO-38 & single & osram & 50--90 & 120 & 30 & 5.5\\
\hline
638 & ML520G54 & TO-56 & single & mitsubishi & 90--100 & 150 & 50 & 2.7\\
\hline
655 & DL-5147-242 & TO-56 & single & sanyo & 30--50 & 80 & 40 & 3.8\\
\hline
\end{tabular}
\caption{Laser specifications}
\label{tab:Laser_Specs}
\end{table}
\noindent X\dotfill X
\end{document}