表格列入第二栏的两栏文件

Christopher G 05/07/2018. 3 answers, 0 views
tables two-column article

我目前有这个问题,表格侵入第二列,我无法弄清楚我做错了什么...

表侵入第二列

\documentclass[twoside,twocolumn]{article}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry} 
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} 
\usepackage[utf8]{inputenc}
\setlength{\arrayrulewidth}{0.25mm}
\setlength{\tabcolsep}{9pt}
\renewcommand{\arraystretch}{1.5}
\begin{document}
\begin{table}[ht]
\begin{tabular}{ p{5cm} p{5.3cm} } 
\hline 
Parameter & Condition \\
\hline
Flow Rate & $4.5 \frac{\text{mL}}{\text{min}}$ \\
Carrier gas & Nitrogen \\
Column type & HP-$5$  \\
Column dimensions & \SI{10}{m} long $\times$ \SI{0.53}{mm} ID  \\
Injection port temperature & \SI{140}{\celsius}  \\
Oven temperature & \SI{40}{\celsius} \\
Attenuation & Automatically done by computer \\
Sample size & $\num{3.00000e-1}\frac{\text{ng}}{\text{ul}}$ \\
Number of products & $2$  \\ 
Types of products & Butenes \\  [1ex] % [1ex] adds vertical space[1ex]
\hline %inserts single line
\end{tabular}
\caption{GC parameters on}
\label{table:nonlin} % is used to refer this table in the text
\end{table}
\end{document} 

3 Answers


Fran 03/04/2018.

兆瓦

\documentclass[twoside,twocolumn]{article}
\usepackage{amsmath,siunitx,booktabs,lipsum}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry} 
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} 
\usepackage[utf8]{inputenc}
\setlength{\arrayrulewidth}{0.25mm}
\setlength{\tabcolsep}{9pt}
\renewcommand{\arraystretch}{1.5}

\begin{document}

\begin{table}[ht]
\setlength{\tabcolsep}{9pt}
\begin{tabular*}{\linewidth}{@{}p{\dimexpr.5\linewidth-\tabcolsep}p{\dimexpr.5\linewidth-\tabcolsep}@{}} 
\toprule 
Parameter & Condition \\
\midrule
Flow Rate & $4.5 \frac{\text{mL}}{\text{min}}$ \\
Carrier gas & Nitrogen \\
Column type & HP-$5$  \\
Column dimensions & \SI{10}{m} long $\times$ \SI{0.53}{mm} ID  \\
Injection port temperature & \SI{140}{\celsius}  \\
Oven temperature & \SI{40}{\celsius} \\
Attenuation & Automatically done by computer \\
Sample size & $\num{3.00000e-1}\frac{\text{ng}}{\text{ul}}$ \\
Number of products & $2$  \\ 
Types of products & Butenes \\  [1ex] % [1ex] adds vertical space[1ex]
\bottomrule %inserts single line
\end{tabular*}
\caption{GC parameters on}
\label{table:nonlin} % is used to refer this table in the text
\end{table}

\lipsum[1-10]
\end{document} 

编辑:为了让一个表取两列,但不使用table*环境以避免跳转到下一页,可以使用cutedcapt-of包:

enter image description here

\documentclass[twoside,twocolumn]{article}
\usepackage{amsmath,siunitx,booktabs,lipsum,cuted,capt-of}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry} 
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} 
\usepackage[utf8]{inputenc}
\setlength{\arrayrulewidth}{0.25mm}
\setlength{\tabcolsep}{9pt}
\renewcommand{\arraystretch}{1.5}

\begin{document}
\section{Nulla malesuada} 
\lipsum[3]
\begin{strip}
\begin{tabular*}{\linewidth}{@{}p{\dimexpr.5\linewidth-\tabcolsep}p{\dimexpr.5\linewidth-\tabcolsep}@{}} 
\toprule 
Parameter & Condition \\
\midrule
Flow Rate & $4.5 \frac{\text{mL}}{\text{min}}$ \\
Carrier gas & Nitrogen \\
Column type & HP-$5$  \\
Column dimensions & \SI{10}{m} long $\times$ \SI{0.53}{mm} ID  \\
Injection port temperature & \SI{140}{\celsius}  \\
Oven temperature & \SI{40}{\celsius} \\
Attenuation & Automatically done by computer \\
Sample size & $\num{3.00000e-1}\frac{\text{ng}}{\text{ul}}$ \\
Number of products & $2$  \\ 
Types of products & Butenes \\  
\bottomrule 
\end{tabular*}
\captionof{table}{GC parameters on}
\end{strip}
\lipsum[1]
\section{Nam dui ligula}
\lipsum[2]
\end{document} 

Kurt 03/04/2018.

你可以使用环境table*来获取一个表格经过两列...

以下MWE(用<====== )标记的重要代码变化

\documentclass[twoside,twocolumn]{article}

\usepackage[utf8]{inputenc}

\usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry} 
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} 

\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{blindtext} % <======= dummy text ===========================

\setlength{\arrayrulewidth}{0.25mm}
\setlength{\tabcolsep}{9pt}
\renewcommand{\arraystretch}{1.5}


\begin{document}
\Blindtext Code for the table
\begin{table*}[ht] % <==================================================
\centering
\begin{tabular}{ p{5cm} p{5.3cm} } 
\hline 
Parameter & Condition \\
\hline
Flow Rate & $4.5 \frac{\text{mL}}{\text{min}}$ \\
Carrier gas & Nitrogen \\
Column type & HP-$5$  \\
Column dimensions & \SI{10}{m} long $\times$ \SI{0.53}{mm} ID  \\
Injection port temperature & \SI{140}{\celsius}  \\
Oven temperature & \SI{40}{\celsius} \\
Attenuation & Automatically done by computer \\
Sample size & $\num{3.00000e-1}\frac{\text{ng}}{\text{ul}}$ \\
Number of products & $2$  \\ 
Types of products & Butenes \\  [1ex] % [1ex] adds vertical space[1ex]
\hline %inserts single line
\end{tabular}
\caption{GC parameters on}
\label{table:nonlin} % is used to refer this table in the text
\end{table*} % <========================================================
\Blindtext
\end{document} 

和结果第二页:

第二页


Zarko 03/03/2018.

替代:

\documentclass[twoside,twocolumn]{article}
\usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry}
\usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption}
\usepackage[utf8]{inputenc}

\usepackage{amsmath}
\usepackage{siunitx}
\setlength{\arrayrulewidth}{0.25mm}
\renewcommand{\arraystretch}{1.5}

\usepackage{lipsum}

\begin{document}
\lipsum[1]
\begin{table}[ht]
    \setlength{\tabcolsep}{3pt}
    \small
\begin{tabular}{@{}l >{\raggedright\arraybackslash}p{3.5cm}@{}}
\hline
Parameter & Condition \\
\hline
Flow Rate & $4.5 \frac{\text{mL}}{\text{min}}$ \\
Carrier gas & Nitrogen \\
Column type & HP-$5$  \\
Column dimensions & \SI{10}{m} long $\times$ \SI{0.53}{mm} ID  \\
Injection port temperature & \SI{140}{\celsius}  \\
Oven temperature & \SI{40}{\celsius} \\
Attenuation & Automatically done by computer \\
Sample size & $\num{3.00000e-1}\frac{\text{ng}}{\text{ul}}$ \\
Number of products & $2$  \\
Types of products & Butenes \\  [1ex] % [1ex] adds vertical space[1ex]
\hline %inserts single line
\end{tabular}
\caption{GC parameters on}
\label{table:nonlin} % is used to refer this table in the text
\end{table}
\lipsum
\end{document} 

在这里输入图像描述


HighResolutionMusic.com - Download Hi-Res Songs

1 Alan Walker

Diamond Heart flac

Alan Walker. 2018. Writer: Alan Walker;Sophia Somajo;Mood Melodies;James Njie;Thomas Troelsen;Kristoffer Haugan;Edvard Normann;Anders Froen;Gunnar Greve;Yann Bargain;Victor Verpillat;Fredrik Borch Olsen.
2 Sia

I'm Still Here flac

Sia. 2018. Writer: Sia.
3 Blinders

Breach (Walk Alone) flac

Blinders. 2018. Writer: Dewain Whitmore;Ilsey Juber;Blinders;Martin Garrix.
4 Halsey

Without Me flac

Halsey. 2018. Writer: Halsey;Delacey;Louis Bell;Amy Allen;Justin Timberlake;Timbaland;Scott Storch.
5 Cardi B

Taki Taki flac

Cardi B. 2018. Writer: Bava;Juan Vasquez;Vicente Saavedra;Jordan Thorpe;DJ Snake;Ozuna;Cardi B;Selena Gomez.
6 Bradley Cooper

Shallow flac

Bradley Cooper. 2018. Writer: Andrew Wyatt;Anthony Rossomando;Mark Ronson;Lady Gaga.
7 Martin Garrix

Yottabyte flac

Martin Garrix. 2018. Writer: Martin Garrix.
8 Little Mix

Woman Like Me flac

Little Mix. 2018. Writer: Nicki Minaj;Steve Mac;Ed Sheeran;Jess Glynne.
9 Lady Gaga

I'll Never Love Again flac

Lady Gaga. 2018. Writer: Benjamin Rice;Lady Gaga.
10 Kelsea Ballerini

This Feeling flac

Kelsea Ballerini. 2018. Writer: Andrew Taggart;Alex Pall;Emily Warren.
11 Mako

Rise flac

Mako. 2018. Writer: Riot Music Team;Mako;Justin Tranter.
12 Bradley Cooper

Always Remember Us This Way flac

Bradley Cooper. 2018. Writer: Lady Gaga;Dave Cobb.
13 Dewain Whitmore

Burn Out flac

Dewain Whitmore. 2018. Writer: Dewain Whitmore;Ilsey Juber;Emilio Behr;Martijn Garritsen.
14 Charli XCX

1999 flac

Charli XCX. 2018. Writer: Charli XCX;Troye Sivan;Leland;Oscar Holter;Noonie Bao.
15 Deep Chills

Run Free flac

Deep Chills. 2018.
16 Rita Ora

Let You Love Me flac

Rita Ora. 2018. Writer: Rita Ora.
17 Avril Lavigne

Head Above Water flac

Avril Lavigne. 2018. Writer: Stephan Moccio;Travis Clark;Avril Lavigne.
18 Khalid

Better flac

Khalid. 2018. Writer: Charlie Handsome;Jamil Chammas;Denis Kosiak;Tor Erik Hermansen;Mikkel Stoleer Eriksen;Khalid.
19 Diplo

Electricity flac

Diplo. 2018. Writer: Diplo;Mark Ronson;Picard Brothers;Wynter Gordon;Romy Madley Croft;Florence Welch.
20 Julia Michaels

There's No Way flac

Julia Michaels. 2018. Writer: Ian Kirkpatrick;Justin Tranter;Julia Michaels;Lauv.

Language

Popular Tags