Líneas verticales solo en ciertas columnas

Líneas verticales solo en ciertas columnas

Para una tabla en mi tesis, quiero mostrar una línea vertical que abarque solo 3 de 5 columnas.

Mi tabla actual es:

\begin{table}[h]
\centering
\captionsetup{singlelinecheck=false}
\caption[Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen]{\textbf{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}}
\label{t:praeppcrcycler}
\centering
\begin{tabular}{lll}
\midrule
Temperatur & Zeit & \\
\midrule
98 \si{\degreeCelsius} & 3 min &  \\
& & \\

98 \si{\degreeCelsius} & 30 s &    \\
58 \si{\degreeCelsius} & 20-30 s & 30-35x \\
72 \si{\degreeCelsius} & 20-60 s &  \\

& & \\
72 \si{\degreeCelsius} & 3 min & \\
4 \si{\degreeCelsius} & $\infty$ & \\
\end{tabular}
\end{table}

que me da esta tabla ingrese la descripción de la imagen aquí

Sin embargo, quiero agregar una línea vertical que abarque la columna 3, filas 3 a 5 como en esta imagen. ingrese la descripción de la imagen aquí

¡Cualquier ayuda es apreciada!

Respuesta1

Aquí lo tienes. Simplifiqué y mejoré ligeramente tu código:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{booktabs, caption, multirow, siunitx}

\begin{document}

\begin{table}[!htb]
  \captionsetup{singlelinecheck=false, justification=RaggedRight}
  \sisetup{range-phrase=--, range-units=single}
  \caption[Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen]{\textbf{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}}
  \label{t:praeppcrcycler}
  \centering
  \begin{tabular}{lll}
    \midrule
    Temperatur & Zeit & \\
    \midrule
    \SI {98}{\celsius} & \phantom{0}\SI{3}{min} & \\
                                     & & \\
    \SI{98}{\celsius} & \SI{30}{s} & \multicolumn{1}{|c}{} \\
    \SI{58}{\celsius} & \SIrange{20}{30}{s} & \multicolumn{1}|c}{30–35$\times$} \\
    \SI{72}{\celsius} & \SIrange{20}{60}{s} & \multicolumn{1}{|c}{} \\
                                     & & \\
    \SI{72}{\celsius}& \phantom{0}\SI{3}{min} & \\
    \phantom{0}\SI{4}{\celsius} & \phantom{0}$\infty$ & \\
    \midrule
  \end{tabular}
\end{table}

\end{document} 

ingrese la descripción de la imagen aquí

Respuesta2

Lo siguiente puede ser lo que estás buscando.

ingrese la descripción de la imagen aquí

\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel,booktabs,siunitx}
\usepackage[skip=0.333\baselineskip,textfont=bf,
            singlelinecheck=false]{caption}
\begin{document}

\begin{table}[h]
\centering
\caption{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}
\label{t:praeppcrcycler}
\centering
\begin{tabular}{@{}lll@{}}
\midrule
Temperatur & Zeit & \\
\midrule
\SI{98}{\degreeCelsius} & 3\,min &  \\[2ex]
\SI{98}{\degreeCelsius} & 30\,s  &  
  \smash{\begin{tabular}[t]{|l@{}} 
            \\ 30--35$\times$ \\ \\
         \end{tabular}} \\
\SI{58}{\degreeCelsius} & 20--30\,s & \\
\SI{72}{\degreeCelsius} & 20--60\,s & \\[2ex]
\SI{72}{\degreeCelsius} & 3\,min    & \\
\SI{4}{\degreeCelsius}  & $\infty$  & \\
\bottomrule
\end{tabular}
\end{table}

\end{document}

Respuesta3

Aquí hay una solución con {NiceTabular}of nicematrix. Ese entorno es similar al entorno clásico {tabular}(de array) pero crea nodos PGF/Tikz debajo de la fila, columnas y celdas. Por lo tanto, es posible usar Tikz para dibujar cualquier regla que desee después de la matriz principal colocando una instrucción en \CodeAfter( \tikz \draw (4-|3) -- (7-|3) ;).

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{booktabs, caption, siunitx}
\usepackage{nicematrix}
\usepackage{tikz}


\begin{document}

\begin{table}[!htb]
  \captionsetup{singlelinecheck=false, justification=RaggedRight}
  \sisetup{range-phrase=--, range-units=single}
  \caption[Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen]{\textbf{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}}
  \label{t:praeppcrcycler}
  \centering
  \begin{NiceTabular}{lll}
    \midrule
    Temperatur & Zeit & \\
    \midrule
    \qty{98}{\celsius} & \phantom{0}\qty{3}{min} \\
                                     & & \\
    \qty{98}{\celsius} & \qty{30}{s} \\
    \qty{58}{\celsius} & \qtyrange{20}{30}{s} & 30–35$\times$ \\
    \qty{72}{\celsius} & \qtyrange{20}{60}{s} \\
                                     & & \\
    \qty{72}{\celsius}& \phantom{0}\qty{3}{min} \\
    \phantom{0}\qty{4}{\celsius} & \phantom{0}$\infty$ \\
    \midrule
  \CodeAfter \tikz \draw (4-|3) -- (7-|3) ;
  \end{NiceTabular}
\end{table}

\end{document} 

Salida del código anterior

También es posible utilizar el comando \Block(integrado {NiceTabular}) y su clave borders.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{ragged2e}
\usepackage{booktabs, caption, siunitx}
\usepackage{nicematrix}
\usepackage{tikz}


\begin{document}

\begin{table}[!htb]
  \captionsetup{singlelinecheck=false, justification=RaggedRight}
  \sisetup{range-phrase=--, range-units=single}
  \caption[Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen]{\textbf{Temperatur-Zyklus-Konditionen für präperative PCR-Reaktionen}}
  \label{t:praeppcrcycler}
  \centering
  \begin{NiceTabular}{lll}
    \midrule
    Temperatur & Zeit & \\
    \midrule
    \qty{98}{\celsius} & \phantom{0}\qty{3}{min} \\
                                     & & \\
    \qty{98}{\celsius} & \Block[borders=right]{3-1}{} \qty{30}{s} \\
    \qty{58}{\celsius} & \qtyrange{20}{30}{s} & 30–35$\times$ \\
    \qty{72}{\celsius} & \qtyrange{20}{60}{s} \\
                                     & & \\
    \qty{72}{\celsius}& \phantom{0}\qty{3}{min} \\
    \phantom{0}\qty{4}{\celsius} & \phantom{0}$\infty$ \\
    \midrule
  \end{NiceTabular}
\end{table}

\end{document} 

La salida es la misma.

información relacionada