Graphics, Figures & TablesRemove Table Indentation

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Remove Table Indentation

Post by ghostanime2001 »

How can I remove the indentation of the tabular environment in this example.

Code: Select all

\documentclass[fleqn]{article}
\usepackage{fullpage}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}   
\usepackage{pifont}
\usepackage{amssymb}
\usepackage{enumitem} 
\usepackage{cancel} 
\usepackage{siunitx}
\usepackage{mathtools} 
\usepackage[version=3]{mhchem}
\setlength{\parindent}{0in}
\setlength{\mathindent}{0in}
\everymath{\displaystyle}
\pagestyle{empty}
\begin{document}
\hfill Molar Mass and Molecular Formula of a Gas\hfill\llap{Wed, June 6th, 2007}
\begin{enumerate}[leftmargin=0in,nosep]
\item Assume 100g of sample of gas \\[\baselineskip]
\begin{tabular}{cccl} 
Element & mass(g) & moles(mol) & ratio \\ 
\ce{C} & \text{80 g} & \text{6.67 mol} & $\mathrm{1\times2=2}$ \\ 
\ce{H2} & \text{20 g} & \text{10 mol} & $\mathrm{1.5\times2=3}$ \\ 
\end{tabular}
\end{enumerate}
\end{document}
Last edited by ghostanime2001 on Sun Sep 04, 2011 9:43 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Remove Table Indentation

Post by localghost »

You can remove the (column separating) space on the left (and possibly on the right) side with a slight modification of the table head.

Code: Select all

\begin{tabular}{@{}cccl@{}}
  Element & mass (\si{\g}) & moles (\si{\mole}) & ratio \\
  \ce{C} & \SI{80}{\g} & \SI{6.67}{\mole} & $1\times2=2$ \\
  \ce{H2} & \SI{20}{\g} & \SI{10}{\mole} & $1.5\times2=3$ \\
\end{tabular}
And next time please provide a true minimal example.


Thorsten
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

Re: Remove Table Indentation

Post by ghostanime2001 »

Thankx
Post Reply