2

I am trying to recreate the following table

enter image description here

So far I have managed to create the following

enter image description here

What is missing is the blobs / stains covering parts of the table. I have no idea how to insert them, maybe tikz?

MWE

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{siunitx}

\begin{document}

\section{Introduction}

\begin{table}[]
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}c l r l r l r l r}
\midrule
  \textbf{År} &
  \multicolumn{2}{c}{\textbf{Avdrag}} &
  \multicolumn{2}{c}{\textbf{Renter}} &
  \multicolumn{2}{c}{\textbf{Terminbeløp}} &
  \multicolumn{2}{c}{\textbf{Restlån}} \\ 
\midrule
  2018 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{182554} \\
  2019 & kr & \num{17969} & kr & \num{5477} & kr & \num{23446} & kr & \num{164585}  \\
  2020 & kr & \num{18508} & kr & \num{6000} & kr & \num{23446} & kr & \num{146076}  \\
  2921 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{127012}  \\
  2022 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{107377}  \\
  2023 & kr &             & kr & \num{6000} & kr & \num{23446} & kr & \num{}  \\
  2024 & kr & \num{20953} & kr & \num{6000} & kr & \num{23446} & kr & \num{}  \\
  2025 & kr & \num{21}    & kr & \num{6000} & kr & \num{23446} & kr & \num{44864}  \\
\bottomrule
\end{tabular*}
\end{table}

\end{document}
5
  • Could you please give us the code of the stains? – user156344 May 23 '19 at 8:26
  • I dont have them? This is part of the problem. – N3buchadnezzar May 23 '19 at 8:27
  • So what is the question then? How to draw the stain or how to add them to the table (please do not ask two seperate questions in one question) – user156344 May 23 '19 at 8:32
  • 4
    print on A4 paper then place a coffee cup on the paper and shake the table. – David Carlisle May 23 '19 at 9:23
  • 2
    You can use coffee stains provided by coffee package and put on top with this solution: tex.stackexchange.com/a/375002/1952 – Ignasi May 23 '19 at 9:27
5

It seems the coffee package (olsak-misc) has been updated since the previous questions. They are now implemented as literal PDF inserts.

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{lipsum}
\input{fun-coffee}

\begin{document}

\noindent\rlap{\hspace*{-1.5in}\raisebox{-1in}[0pt][0pt]{\scalebox{0.8}{\coffeeA}}}% adjust position
\indent\lipsum[1-4]
\tikz[overlay, remember picture]{\path (current page.center)
  node[opacity=0.2,  inner sep=0pt] {\coffeeA};
  \draw[blue] (current page.center) ++(6.5,-4.4) circle[radius=4];}% trial and error

\newpage
\coffeeB
\lipsum[1-4]

\newpage
\coffeeC
\lipsum[1-4]

\newpage
\coffeeD
\lipsum[1-4]

\end{document}

demo

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{siunitx}

\input{fun-coffee}

\begin{document}

\section{Introduction}

\begin{table}[]
\coffeeA
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}c l r l r l r l r}
\midrule
  \textbf{År} &
  \multicolumn{2}{c}{\textbf{Avdrag}} &
  \multicolumn{2}{c}{\textbf{Renter}} &
  \multicolumn{2}{c}{\textbf{Terminbeløp}} &
  \multicolumn{2}{c}{\textbf{Restlån}} \\ 
\midrule
  2018 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{182554} \\
  2019 & kr & \num{17969} & kr & \num{5477} & kr & \num{23446} & kr & \num{164585}  \\
  2020 & kr & \num{18508} & kr & \num{6000} & kr & \num{23446} & kr & \num{146076}  \\
  2921 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{127012}  \\
  2022 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{107377}  \\
  2023 & kr &             & kr & \num{6000} & kr & \num{23446} & kr & \num{}  \\
  2024 & kr & \num{20953} & kr & \num{6000} & kr & \num{23446} & kr & \num{}  \\
  2025 & kr & \num{21}    & kr & \num{6000} & kr & \num{23446} & kr & \num{44864}  \\
\bottomrule
\end{tabular*}
\end{table}

\end{document}
1
  • Darn Table keeps wobbling with your current 2nd mwe values could be \coffeeB \raisebox{1in}\coffeeC \raisebox{2in}\coffeeA – user170109 May 23 '19 at 15:55
2

Try to implement a stain for yourself with some TikZ \path commands and some path operations. Then you can use tikzmark package. Here the "stain" is a filled circle.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{table}
\tikzmark{origin}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}c l r l r l r l r}
\midrule
  \textbf{År} &
  \multicolumn{2}{c}{\textbf{Avdrag}} &
  \multicolumn{2}{c}{\textbf{Renter}} &
  \multicolumn{2}{c}{\textbf{Terminbeløp}} &
  \multicolumn{2}{c}{\textbf{Restlån}} \\ 
\midrule
  2018 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{182554} \\
  2019 & kr & \num{17969} & kr & \num{5477} & kr & \num{23446} & kr & \num{164585}  \\
  2020 & kr & \num{18508} & kr & \num{6000} & kr & \num{23446} & kr & \num{146076}  \\
  2921 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{127012}  \\
  2022 & kr & \num{17446} & kr & \num{6000} & kr & \num{23446} & kr & \num{107377}  \\
  2023 & kr &             & kr & \num{6000} & kr & \num{23446} & kr & \num{}  \\
  2024 & kr & \num{20953} & kr & \num{6000} & kr & \num{23446} & kr & \num{}  \\
  2025 & kr & \num{21}    & kr & \num{6000} & kr & \num{23446} & kr & \num{44864}  \\
\bottomrule
\end{tabular*}
\end{table}
\begin{tikzpicture}[overlay,remember picture]
\filldraw[fill=yellow] (pic cs:origin)++(3,0) circle (1cm);
\end{tikzpicture}
\end{document}

enter image description here

Btw there is (probably) a typo: 2021 not 2921 I think.

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.