2

How can I create a table such as the following using LaTeX? enter image description here

I have little LaTeX experience, and I am looking for either a template for something similar, or some guidance.

Any help is really appreciated.

4

An classic LaTeX approach, considering @Alenanno comments and own experiences in table coding ...

With slightly reformatted second column head table can be fit in standard (portrait) paper orientation:

enter image description here

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,
            makecell, % <-- new
            multirow,
            tabularx} % <-- new
\renewcommand\theadfont{\bfseries\small}
\usepackage{siunitx}  % <-- new  
\usepackage[margin=20mm,showframe]{geometry}% <-- added only to show page layout

    \begin{document}
\begin{table}
\setlength\tabcolsep{4pt}
    \begin{tabularx}{\textwidth}{@{}l X c *{3}{S[table-format=2.1]}@{}}
    \toprule
\thead[b]{Admission requirements \\ for Mathematics (MSc)}
    &   \thead[bl]{Courses completed/\\ to be completed \\ before study start}
        &   \thead[b]{Date of \\ completion}
            &   {\thead[b]{Credits$^*$}}
                &   {\thead[b]{ECTS}}
                    &   {\thead[b]{ECTS \\ in all}}                             \\
    \midrule
Mathematical Analysis (30 ECTS)
    & Mathematical Analysis 1 & 22.04.2014 &  5 &  7.5 & \multirowcell{3}{34.5} \\
    & Mathematical Analysis 2 & 15.02.2013 &  8 & 12   &                        \\
    & Complex Analysis        & 01.07.2015 & 10 & 15   &                        \\ \midrule
Algebra/Linear algebra (22.5 ECTS)
    & Advanced Algebra        & 17.02.2013 &  6 &  9   & \multirowcell{2}{22.5} \\
    & Abstract Algebra        & 01.06.2015 &  9 & 13.5 &                        \\
    \midrule
Geometry/Topology (15 ECTS)
    & Topology                & 01.11.2014 &  7 & 10.5 & \multirowcell{3}{18}   \\
    & Vector Analysis         & 15.06.2015 &  3 &  4.5 &                        \\
    & Differential Geometry   & 15.02.2013 &  2 &  3   &                        \\
    \bottomrule
    \end{tabularx}
\end{table}
    \end{document}

Of course it also can be landscape orientation with bigger fonts, for example with memoir package:

enter image description here

In this case the MWE preamble is:

\documentclass[14pt,landscape]{memoir}
\usepackage[utf8]{inputenc}
\usepackage{booktabs,
            makecell, % <-- new
            multirow,
            tabularx} % <-- new
\renewcommand\theadfont{\bfseries\small}
\usepackage{siunitx}  % <-- new  
\usepackage[margin=30mm,showframe]{geometry}% <-- added only to show page 
3

If you really want to save time as a novice, you might want to fill this table online using the Table Editor by Peder Skeidsvoll.

  1. It looks like your table had been created in MS Word. There are many converters that work upon copied tables, but the way MS Word treats copied text is incompatible with them. Luckily, the copy function in MS Excel or OO/LO Calc works fine, so copy the table in Word and paste it into Excel/Calc.
  2. In Excel/Calc, make necessary edits (but do not merge the rows yet!), select and copy your table with Ctrl + C.
  3. In the Table Editor, click (on the right) File — Import.
  4. In the import window, set the Import type to Comma separated values and Import options to Tab (becaule Excel and Calc use \t as a column separator when copying).
  5. Paste (Ctrl + V) and click Import.
  6. Below the table, you will have a copiable LaTeX output. Select it and copy it.
  7. Open your TeX document, and paste it.
  8. To get multiple-row cells, try \usepackage{multirow} and use this example as a reference.
  9. If you see any \hlines or vertical rows in the table, consider tidying it up according to this example that requires the \usepackage{booktabs} in the preamble.
  10. To make the whole table fit on the A4 paper, use (1) landscape class option and (2) fixed-width columns (p{2cm} in the column specification or, allowing finer control over the width, \parbox[t]{5cm}{Firstline \\ Secondline} within a cell).

Your example.

\documentclass[landscape, 11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[textwidth=25cm]{geometry}
\usepackage{array, booktabs, multirow}

\begin{document}
\begin{table}
    \begin{tabular}{lllrrr} \toprule
     \parbox[t]{5cm}{\textbf{Admission requirements \\ for Mathematics (MSc)}}  & \parbox[t]{7cm}{\textbf{Courses completed/to be completed \\ before study start}} & \parbox[t]{2.5cm}{\textbf{Date of \\ completion}} & \textbf{Credits$^*$} & \textbf{ECTS} & \parbox[t]{1.2cm}{\textbf{ECTS \\ in all}} \\ \midrule
    Mathematical Analysis (30 ECTS)               & Mathematical Analysis 1                              & 22.04.2014         & 5         & 7.5  & \multirow{3}{*}{34.5}        \\
    ~                                             & Mathematical Analysis 2                              & 15.02.2013         & 8         & 12   & ~           \\
    ~                                             & Complex Analysis                                     & 01.07.2015              & 10        & 15   & ~           \\ \midrule
    Algebra/Linear algebra (22.5 ECTS)            & Advanced Algebra                                     & 17.02.2013         & 6         & 9    & \multirow{2}{*}{22.5}        \\
    ~                                             & Abstract Algebra                                     & 01.06.2015              & 9         & 13.5 & ~           \\ \midrule
    Geometry/Topology (15 ECTS)                   & Topology                                             & 01.11.2014         & 7         & 10.5 & \multirow{3}{*}{18}          \\ 
    ~                                             & Vector Analysis                                      & 15.06.2015         & 3         & 4.5  & ~           \\
    ~                                             & Differential Geometry                                & 15.02.2013         & 2         & 3    & ~           \\ \bottomrule
    \end{tabular}
\end{table}
\end{document}

Classroom table

This might not be the most beautiful solution, but at least it is not overly complicated. Yes, I know, those column width specifiers and “make the whole row bold” can be done with special packages, but let’s not crush flies with a steamroller...

Remark. As of 2016-01-24, this converter has two bugs. (1) It always adds an empty line at the end of the table. Remove it. (2) It might ask you about losing data when importing. Reply No if asked.

  • 1
    This table might benefit from the siunitx package for aligning the numbers along the decimal separator. – Alenanno Jan 24 '16 at 17:17
0

If you are new to LaTeX, on this site you can make a table very easy:

http://www.tablesgenerator.com

  • 2
    However, if OP like to learn LaTeX, it should try to type table directly in LaTeX. Slower at star, but long term more fruitful :-) – Zarko May 14 '16 at 16:09
  • I agree 99%,, But (now comes the 1% :-) ) if you have to make large tables with calculations, it is easier to copy somethings of Excel. On the second hand, you can learn from the code.. – Arne Timperman May 14 '16 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.