If I understand correctly, you are looking for something like this:
![enter image description here](https://i.stack.imgur.com/Q9nOA.png)
\documentclass{article}
\newcommand{\itab}[1]{\hspace{0em}\rlap{#1}}
\newcommand{\tab}[1]{\hspace{.2\textwidth}\rlap{#1}}
\begin{document}
\begin{enumerate}
\item \itab{Format:} \tab{$math$ formula}
\tab{is} \tab{(the real number)}
\item \itab{Example:} \tab{$\pi$}
\tab{is (first digits)} \tab{3.141593}
\item \itab{Ome more:} \tab{$log_{10}(\pi)$}
\tab{is} \tab{1.14473}
\end{enumerate}
\end{document}
Update
A simpler approach is put the text in a \makebox
so we need only one command. In the example, when the text is wider than 25% of the line width, the text turns red (for demostration purposes) and the length of the \makebox
is doubled automatically:
\documentclass{article}
\usepackage{ifthen,xcolor}
\newlength{\tabcont}
\newcommand{\tab}[1]{%
\settowidth{\tabcont}{#1}%
\ifthenelse{\lengthtest{\tabcont < .25\linewidth}}%
{\makebox[.25\linewidth][l]{#1}\ignorespaces}%
{\makebox[.5\linewidth][l]{\color{red} #1}\ignorespaces}%
}%
\begin{document}
\begin{enumerate}
\item \tab{Format:}
\tab{$math$ formula}
\tab{is}
\tab{(the real number)}
\item \tab{Example:}
\tab{$\pi$}
\tab{is (first digits)}
\tab{3.141593}
\item \tab{Example:}
\tab{$\pi$}
\tab{is (more digits)}
\tab{3.141592653589793238}
\item \tab{One more example:}
\tab{$log_{10}(\pi)$}
\tab{is}
\tab{1.14473}
\end{enumerate}
\end{document}
Update
But there is no need to reinvent the wheel! It could be worth look the tabto package:
\documentclass{article}
\usepackage{tabto}
\begin{document}
\begin{enumerate}
\NumTabs{6}
\item Format:
\tab{$math$ formula}
\tab{is}
\tab{(the real number)}
\item Example:
\tab{$\pi$}
\tab{is (first digits)}
\tab{3.141593}
\item Example:
\tab{$\pi$}
\tab{is (more digits)}
\tab{3.141592653589793238}
\item One more example:
\tab{$log_{10}(\pi)$}
\tab{is}
\tab{1.14473}
\end{enumerate}
\end{document}
The result is the same as above (without color).
A cell always start with a strut, precisely \@arstrut
, which is meant to help in alignment. The \Huge
letters in the first column are higher than this strut, so they are set touching the upper margin. This doesn't happen for the second column cells. A trick can be to provide a fake first line and then backing up by its height, which we know precisely to be the height of the strut. Then we insert no interline glue.
However this won't work with a nested tabular
.
\documentclass[paper=a4,fontsize=11pt]{scrartcl} % KOMA-article class
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel} % English language/hyphenation
\usepackage[showframe]{geometry}
\usepackage{array,tabularx}
\usepackage{lipsum}
\pagestyle{empty} % No pagenumbers/headers/footers
\makeatletter
\newcolumntype{A}[1]{>{\kern-\ht\@arstrutbox\hrule height 0pt}p{#1}}
\newcolumntype{V}{%
>{\csname par\endcsname\kern-\ht\@arstrutbox\nointerlineskip\hrule height0pt
\mbox{}\csname par\endcsname\kern-\ht\@arstrutbox\nointerlineskip
\vrule height\fontcharht\font`A width0pt\relax}X}
\makeatother
\begin{document}
\noindent\begin{tabularx}{\textwidth}{
@{}
A{3em}
V
@{}} % @{} is used to remove the margins from cells
\Huge\bfseries A
&
Lorem ipsum \hfill right-aligned\newline
sem.\newline
Lorem\newline
ipsum \\
\Huge\bfseries B & a \\
\Huge\bfseries C & \lipsum*[1] \\
\end{tabularx}
\end{document}
![enter image description here](https://i.stack.imgur.com/EDn9W.png)
As far as the interrow spacing is concerned, I'm afraid that it's outside the tabular
model of LaTeX.
Here's a different implementation, where the big letters are shifted down:
\documentclass[paper=a4,fontsize=11pt]{scrartcl} % KOMA-article class
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel} % English language/hyphenation
\usepackage[showframe]{geometry}
\usepackage{array,tabularx,adjustbox}
\usepackage{lipsum}
\pagestyle{empty} % No pagenumbers/headers/footers
\newcommand{\bigletter}[1]{%
\raisebox{\dimexpr-\height+\fontcharht\font`A\relax}{\Huge\bfseries #1}%
}
\makeatletter
\makeatother
\begin{document}
\noindent\begin{tabularx}{\textwidth}{
@{}
p{3em}
X
@{}} % @{} is used to remove the margins from cells
\bigletter{A}
&
Lorem ipsum \hfill right-aligned\newline
sem.\newline
Lorem\newline
ipsum \\
\bigletter{B} & a \\
\bigletter{C} & \lipsum*[1] \\
\end{tabularx}
\end{document}
Best Answer
The command
\tab
exists, but it produces quite a large space. It also requires the use of the packagetabto
.Alternative options are
\quad
and\qquad
; the space produced is probably more what you are looking to create. These commands do not require extra packages and can be stacked (e.g.Stuff Over Here \quad \quad \quad More Stuff Over Here
) if needed.You might also want to try using either
$\>$
or$\-$
. Neither command requires any extra packages, but both must be in math mode. Although neither command by itself gives a large space like\tab
does, the space produced is small. However, you can stack the commands in order to get the spacing you want.Hope this helps.