如何将table向左移动或者不超过右边距?
How to move table to the left or not exceed the right margin?
我正在使用 Overleaf 在我的 类 中做笔记,但我 运行 遇到了我试图创建的表格列的问题。我的代码如下:
\begin{center}
\begin{tabular}{|c|c|}
\hline
Crystalline Solids & Non-Crsytalline Solids \
\hline
i. Atoms and molecules are periodic in space & i. Atoms and molecules are not periodic in space \
\hline
ii. Some crystalline solids are anisotopic \
i.e the magnitudes of the physical properties like \
refractive index, electrical conductivity are \
different along difference directions \ & ii. Physical properties are isotropic \
\hline
iii. Have sharp melting points & iii. Do not have sharp boiling points - a range is present \
\hline
iv. Breaks are observed in the cooling curve & iv. No breaks in cooling curve \
\hline
v. Breaks along sharp edges i.e breaks \
along specific "crystallographic planes" & v. Broken surfaces are irregular because there are no crystal planes \
\hline
\end{tabular}
\end{center}
问题是现在我的 table 看起来像这样。 https://imgur.com/ZrWFNSS
我已经尝试使用 \begin{table}
环境和 \begin{figure}
环境,但即使在使用 [h]
或 [ht]
等限定符之后,table 在文本中的位置也会发生变化, 对齐仍然关闭。我如何更正它以使其适合页面?
c
、l
和 r
列不换行它们的内容。您必须为 tabular
使用固定宽度的 p{<len>}
列,或者考虑使用 tabularx
.
这是一个带有 p
段落样式列规范的选项:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{center}
\begin{tabular}{ l p{.45\linewidth} p{.45\linewidth} }
\toprule
& \multicolumn{1}{c}{Crystalline Solids} &
\multicolumn{1}{c}{Non-Crystalline Solids} \
\midrule
i. & Atoms and molecules are periodic in space &
Atoms and molecules are not periodic in space \
ii. & Some crystalline solids are anisotopic \textit{i.e.}~the magnitudes of the physical properties
like refractive index, electrical conductivity are different along difference directions &
Physical properties are isotropic \
iii. & Have sharp melting points &
Do not have sharp boiling points --- a range is present \
iv. & Breaks are observed in the cooling curve &
No breaks in cooling curve \
v. & Breaks along sharp edges i.e breaks along specific ``crystallographic planes'' &
Broken surfaces are irregular because there are no crystal planes \
\bottomrule
\end{tabular}
\end{center}
\end{document}
这是一个使用 tabularx
的类似选项:
\documentclass{article}
\usepackage{tabularx,booktabs}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{ l X X }
\toprule
& \multicolumn{1}{c}{Crystalline Solids} &
\multicolumn{1}{c}{Non-Crystalline Solids} \
\midrule
i. & Atoms and molecules are periodic in space &
Atoms and molecules are not periodic in space \
ii. & Some crystalline solids are anisotopic \textit{i.e.}~the magnitudes of the physical properties
like refractive index, electrical conductivity are different along difference directions &
Physical properties are isotropic \
iii. & Have sharp melting points &
Do not have sharp boiling points~--- a range is present \
iv. & Breaks are observed in the cooling curve &
No breaks in cooling curve \
v. & Breaks along sharp edges i.e breaks along specific ``crystallographic planes'' &
Broken surfaces are irregular because there are no crystal planes \
\bottomrule
\end{tabularx}
\end{document}
我正在使用 Overleaf 在我的 类 中做笔记,但我 运行 遇到了我试图创建的表格列的问题。我的代码如下:
\begin{center}
\begin{tabular}{|c|c|}
\hline
Crystalline Solids & Non-Crsytalline Solids \
\hline
i. Atoms and molecules are periodic in space & i. Atoms and molecules are not periodic in space \
\hline
ii. Some crystalline solids are anisotopic \
i.e the magnitudes of the physical properties like \
refractive index, electrical conductivity are \
different along difference directions \ & ii. Physical properties are isotropic \
\hline
iii. Have sharp melting points & iii. Do not have sharp boiling points - a range is present \
\hline
iv. Breaks are observed in the cooling curve & iv. No breaks in cooling curve \
\hline
v. Breaks along sharp edges i.e breaks \
along specific "crystallographic planes" & v. Broken surfaces are irregular because there are no crystal planes \
\hline
\end{tabular}
\end{center}
问题是现在我的 table 看起来像这样。 https://imgur.com/ZrWFNSS
我已经尝试使用 \begin{table}
环境和 \begin{figure}
环境,但即使在使用 [h]
或 [ht]
等限定符之后,table 在文本中的位置也会发生变化, 对齐仍然关闭。我如何更正它以使其适合页面?
c
、l
和 r
列不换行它们的内容。您必须为 tabular
使用固定宽度的 p{<len>}
列,或者考虑使用 tabularx
.
这是一个带有 p
段落样式列规范的选项:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{center}
\begin{tabular}{ l p{.45\linewidth} p{.45\linewidth} }
\toprule
& \multicolumn{1}{c}{Crystalline Solids} &
\multicolumn{1}{c}{Non-Crystalline Solids} \
\midrule
i. & Atoms and molecules are periodic in space &
Atoms and molecules are not periodic in space \
ii. & Some crystalline solids are anisotopic \textit{i.e.}~the magnitudes of the physical properties
like refractive index, electrical conductivity are different along difference directions &
Physical properties are isotropic \
iii. & Have sharp melting points &
Do not have sharp boiling points --- a range is present \
iv. & Breaks are observed in the cooling curve &
No breaks in cooling curve \
v. & Breaks along sharp edges i.e breaks along specific ``crystallographic planes'' &
Broken surfaces are irregular because there are no crystal planes \
\bottomrule
\end{tabular}
\end{center}
\end{document}
这是一个使用 tabularx
的类似选项:
\documentclass{article}
\usepackage{tabularx,booktabs}
\begin{document}
\noindent
\begin{tabularx}{\linewidth}{ l X X }
\toprule
& \multicolumn{1}{c}{Crystalline Solids} &
\multicolumn{1}{c}{Non-Crystalline Solids} \
\midrule
i. & Atoms and molecules are periodic in space &
Atoms and molecules are not periodic in space \
ii. & Some crystalline solids are anisotopic \textit{i.e.}~the magnitudes of the physical properties
like refractive index, electrical conductivity are different along difference directions &
Physical properties are isotropic \
iii. & Have sharp melting points &
Do not have sharp boiling points~--- a range is present \
iv. & Breaks are observed in the cooling curve &
No breaks in cooling curve \
v. & Breaks along sharp edges i.e breaks along specific ``crystallographic planes'' &
Broken surfaces are irregular because there are no crystal planes \
\bottomrule
\end{tabularx}
\end{document}