The full width of the text area is \textwidth
not \columnwidth
so as shown in the first example below you could specify that to tabular*
personally I think that makes the table look rather spaced out and it is better to set it to its natural width using tabular
and then centre the result, as shown in the second table.
\documentclass[twocolumn]{article}
\usepackage{booktabs}
\def\a{One two three four. }
\def\b{Red Yellow Green Blue. }
\def\c{\a\a\b\b\par\b\a\b\a\b\b\a\par}
\begin{document}
\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c
\begin{table*}
\centering
\begin{tabular*}{\textwidth}{@{\extracolsep{\stretch{1}}}*{7}{r}@{}}
\toprule
& $z_{6}$ & $z_{8}$ & $z_{9}$ & $z_{11}$ & $z_{13}$ & $z_{14}$ \\
\midrule
fileA & 0.00 & 0.00 & 0.00 & 0.08 & 0.79 & 0.08 \\
fileB & 0.01 & 0.00 & 0.13 & 0.00 & 0.84 & 0.00 \\
fileC & 0.00 & 0.39 & 0.02 & 0.49 & 0.00 & 0.00 \\
fileD & 0.75 & 0.08 & 0.00 & 0.00 & 0.00 & 0.00 \\
\bottomrule
\end{tabular*}
\caption{tabular*}
\end{table*}
\begin{table*}
\centering
\begin{tabular}{*{7}{r}}
\toprule
& $z_{6}$ & $z_{8}$ & $z_{9}$ & $z_{11}$ & $z_{13}$ & $z_{14}$ \\
\midrule
fileA & 0.00 & 0.00 & 0.00 & 0.08 & 0.79 & 0.08 \\
fileB & 0.01 & 0.00 & 0.13 & 0.00 & 0.84 & 0.00 \\
fileC & 0.00 & 0.39 & 0.02 & 0.49 & 0.00 & 0.00 \\
fileD & 0.75 & 0.08 & 0.00 & 0.00 & 0.00 & 0.00 \\
\bottomrule
\end{tabular}
\caption{tabular}
\end{table*}
\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c\c
\end{document}
Don't engage in so much visual formatting. Instead, define some pertinent table parameters -- such as centering the column contents, the heights of the rows, etc -- beforehand, and then create a lean and reasonably easy to read table.
In the example below, I've created a dummy definition of your \VTGN
macro to make the code compilable. You'll notice a complete absence of \vspace{3mm}
and \cl
directives in the code. Observe the use of \bigstrut
to size the heights of the rows: it's an object with a depth of 4ex
below the text baseline and a height of 6ex
above the baseline. (The strut's total height is thus 10pt
.) Adjust these parameters as needed to get the desired spacing. The strut's width is 0pt
; hence it's not visible. One \bigstrut
per row suffices.
\documentclass{article}
\usepackage[paperheight=28cm, paperwidth=20cm, margin=2cm]{geometry}
\newcommand\VTGN[1]{#1} %% just so that this example compiles
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\newcommand\bigstrut{\rule[-4ex]{0pt}{10ex}}
\begin{document}
\noindent
\begingroup
\setlength\tabcolsep{0.1pt} % default: 6pt
\begin{tabularx}{\textwidth}{ | *{7}{Y|} }
\hline
\bigstrut & addition & subtraction & multiplication & division & exponentiation & rootification \\
\hline
Vortigenu \bigstrut & \VTGN{+} & \VTGN{-} & \VTGN{*} & \VTGN{/} & \VTGN{\char"5E} & \VTGN{\char"40} \\
\hline
Earth \bigstrut & + & $-$ & $\times$ & $\div$ & ? & ? \\
\hline
\end{tabularx}
\endgroup
\end{document}
Addendum: I just noticed that you posted the following definition of the \VTGN
macro:
\newcommand{\VTGN}[1]{\setmainfont{Vortigenu}{#1}\setmainfont{Times New Roman}}
Using \setmainfont
in this manner is rather inefficient as well as quite complex; see Section 5 of the user guide of the fontspec package for a more in-depth explanation of this claim. I suggest you provide the following commands in the preamble:
\newfontfamily\vtgn{Vortigenu}
\newcommand\VTGN[1]{{\vtgn #1}} % Note the double curly braces
This definition of \VTGN
makes it unnecessary to execute \setmainfont
twice. Moreover, it works without having to know what the main document font happens to be.
Best Answer
I propose two solutions: exchanging rows and co, so it can fit in a column width, ore use the
strip
environment, from thecuted
package (shipunov
bundle), which allows full width objects in two-column documents. Of course, these do not float, a have to replace\caption
with the\captionof
command.I took the liberty to improve the table to my taste, removing all vertical lines, and using the rule commands from
booktabs
: