I'm having a lot of difficulty with the tabular environment. Granted, I'm trying to do a lot, including centering horizontally and vertically, using different fonts in different cells, and different font sizes in different cells.
Worst comes to worst, I can create the table as a picture file and then just embed it, but that puts a bad taste in my mouth because the end-user won't be able to text-search through it. Is there a different way to make tables other than the tabular environment? I want to experiment with other options. Other packages are fine of course.
If there's a way to start writing text at any coordinate on the page, that would be just fine. I could then use the drawing functions to draw lines making cells, then put text in there manually. It's not pretty, i mean it wouldn't automatically center or adjust to anything, but no big deal at this point.
For the record, I'm using Xelatex to compile on TexniCenter 2.02 64-bit with the MikTex distribution, on Windows 7 Pro 64 bit. Here's my current code for the table as it exists now. Sorry it's a bit of a mess.
\setlength{\parindent}{0ex}
\begin{tabular}[c]{| p{1.85cm} | p{1.85cm} | p{1.85cm} | p{1.85cm} | p{1.85cm} | p{1.85cm} | p{1.85cm} |}
\hline
& \vspace{3mm} \cl{addition} & \vspace{3mm} \cl{subtraction} & \vspace{3mm} \cl{multiplication} & \vspace{3mm} \cl{division} & \vspace{3mm} \cl{exponentiation} & \vspace{3mm} \cl{rootification} \\ \hline
\vspace{3mm} \cl{Vortigenu} & \vspace{3mm} \cl{\VTGN{+}} & \vspace{3mm} \cl{\VTGN{-}} & \vspace{3mm} \cl{\VTGN{*}} & \vspace{3mm} \cl{\VTGN{/}} & \vspace{3mm} \cl{\VTGN{\char"5E}} & \vspace{3mm} \cl{\VTGN{\char"40}} \\ \hline
\vspace{3mm} \cl{Earth} & \vspace{3mm} \cl{+} & \vspace{3mm} \cl{-} & \vspace{3mm} \cl{$\times$} & \vspace{3mm} \cl{$\div$} & \vspace{3mm} \cl{?} & \vspace{3mm} \cl{?} \\ \hline
\end{tabular}
\setlength{\parindent}{8ex}
The page is 28cm by 20 cm, with 2 cm margins on every side. Here are the 2 custom commands as defined in the top-level tex file.
\newcommand{\cl}[1]{\centerline{#1}}
\newcommand{\VTGN}[1]{\setmainfont{Vortigenu}{#1}\setmainfont{Times New Roman}}
Unfortunately, using \VTGN{}
seems to create an extra blank line in every cell, making them thicker than necessary. This extra blank vertical space becomes proportionally bigger when i try to scale the font (using \scalefont{2}
) of the vortigenu cells while keeping the other cells the same font size. BTW that only affects one cell, and all the others dont have bigger size even tho i never put in a \normalsize
anywhere.
\VTGN{}
command may have excess white space in it. See What is the use of percent signs (%) at the end of lines? for how you might fix that. TikZ may be the answer to your need to write texts at particular coordinates: see TeXample.net for ideas there.\centerline
in latex, just use>{\centering\arraybackslash}p{..}
You could use\begin{picture}
to position text by coordinates but a tabular is usually easier\matrixofnodes
could solve.