
Eu gostaria de desenvolver uma tabela tabular como esta.
No entanto, quando uso o código de referência dehttps://www.overleaf.com/learn/latex/Tables#Creating_a_simple_table_in_LaTeX, com código:
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{0.8\textwidth} {
| >{\raggedright\arraybackslash}X
| >{\centering\arraybackslash}X
| >{\raggedleft\arraybackslash}X | }
\hline
Place/Transition & Explanation & Time \\
\hline
T_1 and T_(2(n+1)) & Robot operation which relates to loadlocks. Transition T_1indicates that wafer unloading from the loadlocks and T_(2(n+1)) means that the robot loads the wafer to the loadlocks. & w \\
\hline
item 31 & item 32 & item 33 \\
\hline
\end{tabularx}
\end{document}
O resultado é o seguinte.
Talvez alguém tenha alguma outra referência para criar uma tabela tabular que eu queira, por favor?
Quando eu substitui \begin{tabularx}{0.8\textwidth} por \noindent\begin{tabularx}{\linewidth} , aqui está o resultado:
Responder1
O problema é, conforme declarado nos comentários, que você omite a sintaxe necessária para o modo matemático. Por causa disso, o TeX irá, em algum momento, ler um _
que é apenas um caractere válido no modo matemático. Conseqüentemente, ele mudará para o modo matemático automaticamente, mas como não sabe onde o modo matemático deve terminar, ele continua a composição no modo matemático, o que resulta nesta saída estranha.
É muito fácil resolver este problema usando a sintaxe correta para o modo matemático. Como você não precisa de pragraphs nas colunas um e três, você também pode mudar para outra definição de coluna:
\documentclass{article}
\usepackage{tabularx}
\begin{document}
\begin{tabularx}{0.8\textwidth} { |
l |
>{\raggedright\arraybackslash}X |
c |
}
\hline
Place/Transition & Explanation & Time \\
\hline
$T_1$ and $T_{2(n+1)}$ & Robot operation which relates to loadlocks. Transition $T_1$ indicates that wafer unloading from the loadlocks and $T_{2(n+1)}$ means that the robot loads the wafer to the loadlocks. & w \\
\hline
item 31 & item 32 & item 33 \\
\hline
\end{tabularx}
\end{document}
Uma solução alternativa poderia ser criada com a ajuda do booktabs
pacote, que pode ajudar a reduzir a quantidade de bordas entre as células:
\documentclass{article}
\usepackage{tabularx}
\usepackage{booktabs}
\begin{document}
\renewcommand{\arraystretch}{1.25}
\begin{tabularx}{0.8\textwidth} {
l
>{\raggedright\arraybackslash}X
c
}
\toprule
Place/Transition & Explanation & Time \\
\midrule
$T_1$ and $T_{2(n+1)}$ & Robot operation which relates to loadlocks. Transition $T_1$ indicates that wafer unloading from the loadlocks and $T_{2(n+1)}$ means that the robot loads the wafer to the loadlocks. & w \\
item 31 & item 32 & item 33 \\
\bottomrule
\end{tabularx}
\end{document}
Observe que você pode querer substituir 0.8\textwidth
por \linewidth
se quiser estender a tabela até a largura de uma coluna de texto em um layout de duas colunas:
\documentclass[journal]{IEEEtran}
\usepackage{lipsum}
\usepackage{tabularx}
\begin{document}
\lipsum[1]
\noindent%
\begin{tabularx}{\linewidth} { |
l |
>{\raggedright\arraybackslash}X |
c |
}
\hline
Place/Transition & Explanation & Time \\
\hline
$T_1$ and $T_{2(n+1)}$ & Robot operation which relates to loadlocks. Transition $T_1$ indicates that wafer unloading from the loadlocks and $T_{2(n+1)}$ means that the robot loads the wafer to the loadlocks. & w \\
\hline
item 31 & item 32 & item 33 \\
\hline
\end{tabularx}
\newpage
Right column
\end{document}
Responder2
Aqui está uma ideia que complementa a segunda tabela emResposta de @JasperHabicht: elimine o preenchimento de espaços em branco em cada extremidade e permita quebras de linha na coluna 1.
\documentclass{article}
\usepackage{tabularx} % for 'tabularx' env. and 'X' column type
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{ragged2e} % for '\RaggedRight' macro
\newlength\mylen
\begin{document}
\begin{center}
\settowidth\mylen{Transition} % target width of column 1
\begin{tabularx}{0.8\textwidth} {@{}
>{\RaggedRight}p{\mylen} >{\RaggedRight}X c @{}}
\toprule
Place\slash Transition & Explanation & Time \\
\midrule
$T_1$ and $T_{2(n+1)}$ &
Robot operation which relates to loadlocks. Transition $T_1$ indicates that wafer unloading from the loadlocks, and $T_{2(n+1)}$ means that the robot loads the wafer to the loadlocks. &
$w$ \\
\addlinespace
item 31 & item 32 & item 33 \\
\bottomrule
\end{tabularx}
\end{center}
\end{document}