
Estou desenhando uma longa tabela com uma única coluna. Desenhei a tabela, mas o tamanho da célula é muito grande. Como posso reduzir o tamanho da célula? E eu queria manter a linha continuando na próxima página, no canto direito da página, em vez de no canto esquerdo. Como eu posso fazer isso. Meu código é o seguinte. Anexei uma imagem do erro.
\begingroup
\setcellgapes{3pt}
\makegapedcells
\begin{xltabular}{\linewidth}{ |l||*{1}{>{\hskip 1em}X|} }
%\begin{xltabular}{ |p{3 cm}||p{3.8cm}| }
\caption{Simulation data of overall system}
\label{tab:overalldata}\\
\Xhline{1pt}
\makecell[t]{System parameters}
& \mcx{Simulation data}\\
\Xhline{0.6pt}
\endfirsthead
%\caption[]{Data comparison of steady state and transient simulation} \\
\Xhline{1pt}
\makecell{System parameters}
& \mcx{Simulation data}\\
\Xhline{0.6pt}
\endhead
\Xhline{0.6pt}
\multicolumn{4}{r}{\small\textit{Continue on the next page}}
\endfoot
\Xhline{1pt}
\endlastfoot
Pel\_Boiler (\si{KW}) &92.572\\
N\_STEAM\_RECY (\si{mol/s}) &1.686\\
Pel\_SH (\si{KW}) &66.869 \\
T\_AC\_OUT (\si{K}) &945.732\\
T\_CC\_OUT (\si{K}) &885.8513695\\
\hline
\end{xltabular}
\endgroup
Responder1
Eu acho que você está procurando algo assim:
Na tabela acima são usados longtable
e siunitx
pacotes. xparse
é usado para definição de novos comandos usando em vez de \multicolumn{...}{...}{<content>}
. O resultado mostrado precisa de (pelo menos) quatro compilações do seguinte MWE:
\documentclass{article}
\usepackage[skip=1ex]{caption}
\usepackage{cellspace, longtable}
\setlength\cellspacetoplimit{3pt}
\setlength\cellspacebottomlimit{3pt}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\usepackage{xparse}
\NewExpandableDocumentCommand\mcc{O{|Cc|}m}
{\multicolumn{2}{#1}{#2}}
\NewExpandableDocumentCommand\mcl{O{c}m}
{\multicolumn{1}{#1}{#2}}
\begin{document}
\begin{longtable}{| Cr s[table-unit-alignment = left]
| S[zero-decimal-to-integer,
round-mode=places,
round-precision=3]
|}
\caption{Simulation data of overall system.}
\label{tab:s:align} \\
\hline
\mcc{System parameters} & {value} \\
\hline
\endfirsthead
\caption[]{Simulation data of overall system.} \\
\hline
\mcc{System parameters} & {value} \\
\hline
\endhead
\hline
\mcl{} & \mcc[r]{\footnotesize{Continue on the next page}}
\endfoot
\hline
\endlastfoot
% table body
Pel\_Boiler & \kilo\watt & 92.572 \\
N\_STEAM\_RECY & \mol\per\second & 1.686 \\
Pel\_SH & \kilo\watt & 66.869 \\
T\_AC\_OUT & \kelvin & 945.732 \\
T\_CC\_OUT & \kelvin & 885.8513695 \\
\end{longtable}
\end{document}
Editar:
Devido à incompatibilidade entre makegapedcells
a macro definida na makecell
formatação s
e S
as colunas no aditem MWE o makecell
pacote é substituído por cellspace
para adicionar espaço vertical nas células.
Agora também foi adicionada a opção de arredondamento à S
coluna.