2

I tried

\begin{align*}
&\textbf{\small{Denomination}} \quad &\textbf{\small{Scope in weeks}} \quad &\textbf{\small{Grade}}\\
&\text{Native language, literature} &7 &3
\end{align*}

But numbers do not align properly.

What would be fastest way to produce similar table ?

table

leandriis
  • 62,593
flowian
  • 163
  • 3
    align is a math display you want tabular here, with \begin{tabular}{lr;} for the three columns, – David Carlisle May 04 '19 at 08:09
  • 1
    If your table is longer than one page, you might also want to use the longtable package. – leandriis May 04 '19 at 08:21
  • @DavidCarlisle I get error

    Extra alignment tab has been changed to \cr. [&\textbf{\small{Denomination}} \quad &]

    – flowian May 04 '19 at 08:51
  • 1
    @flowian: Remove the first & sign. A MWE: `\documentclass{article} \begin{document}

    \begin{tabular}{lrl} \textbf{\small{Denomination}} &\textbf{\small{Scope in weeks}} &\textbf{\small{Grade}}\ Native language, literature &7 &3

    \end{tabular} \end{document}`

    – leandriis May 04 '19 at 08:57
  • 5
    also the ; in my first comment was supposed to be an l sorry. – David Carlisle May 04 '19 at 08:58
  • @DavidCarlisle Haha! I read the first comment and thought »I've never seen this in all these years!« and really wondered what »;« could stand for. – Keks Dose May 04 '19 at 09:39
  • @leandriis thanks, worked like a charm. – flowian May 04 '19 at 10:09
  • @leandriis Would you like to add an answer? – CarLaTeX May 04 '19 at 18:42

2 Answers2

4

an alternative option, slightly more "sophisticated":

\documentclass{article}
\usepackage{longtable,  % for case if table is longer than one page
            makecell}   % for columns headers
\renewcommand\theadfont{\normalsize\bfseries}  % column header font definition
\usepackage{siunitx}    % for S column type, numbers are aligned at decimal point

\begin{document}
\begin{center}
\begin{tabular}{lS[table-format=1.1]l}
\thead{Denomination}        & {\thead{Scope\\ in weeks}} &\thead{Grade} \\
Native language, literature & 7     & 3 (rahuldav)                      \\
some topic                  & 0.5   & 3 (rahuldav)                      \\
Microprocessor engineering  & 2.5   & 5 (viga hea)
\end{tabular}
\end{center}

in case if you need \verb+longtable+:

\begin{longtable}{lS[table-format=1.1]l}
\thead{Denomination}        & {\thead{Scope\\ in weeks}} &\thead{Grade} \\
Native language, literature & 7     & 3 (rahuldav)                      \\
some topic                  & 0.5   & 3 (rahuldav)                      \\
Microprocessor engineering  & 2.5   & 5 (viga hea)
\end{longtable}
\end{document}

enter image description here

addendum: some people prefer if the column header are vertically aligned at theirs bottoms:

enter image description here

this cab be done with use of the \thead[b]{...} instead of \thead{...} in the first tables rows in above mwe (minimal working example):

\thead[b]{Denomination} & {\thead[b]{Scope\\ in weeks}} &\thead[b]{Grade} \\
Zarko
  • 296,517
2

The following small example should give you an idea how to start:

\documentclass{article} 
\begin{document} 
\begin{tabular}{lrl} 
\textbf{\small Denomination} &\textbf{\small Scope in weeks} &\textbf{\small Grade}\\ Native language, literature &7 &3 
\end{tabular} 
\end{document}

enter image description here

If the contents in the first column are too long and the table no longer fits into the textwidth, you might want to use tabularx. If the whole table is longer than a single page, the longtable environment might be useful.

leandriis
  • 62,593
  • Please note that the font size switches don’t take an argument thus \small{text} must be {\small text} if you want to fence the effect of the change. In your example it doesn’t matter, since the table cell is a group already and the font change is only active in the cell. See also “Font switch vs. Text command” in https://tex.stackexchange.com/a/139592/4918. – Tobi May 04 '19 at 22:03