I am trying to make a simple math homework template (as a student) to answer questions from a book. So far it has gone alright but I have hit a roadblock: I cant seem to get the tables right. Table problem

Fig. 1: A snippet from the pdfLaTeX-produced document which shows the problem.

        \textbf{A} & \textbf{B} & \textbf{C} \\
a & a & a \\

The math columntypes.

\rtable{l}{L}   \rtable{c}{C}   \rtable{r}{R}

And im using this to create the L C R math versions of the regular l c r column types. If you have better ways to do this without using tables or some more specific package please do let me know.

NOTE: If you yourself are also trying to do this I used this piece of code to match the math books numbering system; thanks to this piece of code I do not need to manually set the numbers every time


And this to set the starting point because often I will seperate it to different .pdf files

\subsection{Stök og Venn-myndir}

enter image description here

Fig 2: Image of almost perfect outcome

Here is another try where I used simple minipages with 0.333\textwidth and they work very well with \flushleft, \centerline, and \flushright respectively.

HOWEVER: The problem with this is that, you might notice, its not using a math environment, and I was never able to get math-mode inside of the minipages, the text was really weird, huge margins and all kinds of really weird stuff so I gave up. This image should illustrate what the perfect outcome should be (only the math mode is missing)

  • NOTE: I tried using minipages first for this but it quickly became extremely ugly and didnt format correctly with math-mode.
    – user224041
    Commented Sep 7, 2020 at 14:57
  • 1
    Why not use array instead of tabular?
    – leandriis
    Commented Sep 7, 2020 at 15:31
  • I dont know, I havent tried it? Im going to right now.
    – user224041
    Commented Sep 7, 2020 at 15:33
  • I dont really see array working for this, I have been trying to get somwhere but I dont see any future in this.
    – user224041
    Commented Sep 7, 2020 at 15:45
  • Having had another closer look at your question, I must admit I don't really undestand what exactly you would like to achive. Probably some background infromation or a sketch of the desired output would be helpful. Do you want three columns that will always have the same width regardless of their contents or something else? How would some examples of the actual contents of such a table look like? Simple numbers, equations or something entirely different?
    – leandriis
    Commented Sep 7, 2020 at 17:59

1 Answer 1


So, I have managed to hack this together with the following code using tabularx:

        \hspace{-1.9mm}\textbf{#1} & $\centerline{\textbf{#3}} $ & \rightline{\textbf{#5}}\\
        #2$ & $#4$& \rightline{$#6$} \\

The \hline's (and corresponding |'s) are only for reference while im working on this. The big downside to this solution is that it does not allow for any kind of linebreaks which ideally I should be able to use when writing longer equations etc.

Any help would be immensely helpful, I never thought this would be a weeks long dreadful project. I am desperate at this point.


The redefined columns to allow for this hack.

This template work has been seriously draining my mental health, so I'm very sorry if I might answer in a passive-agressive tone.

  • if you are reading this send help.
    – user224041
    Commented Sep 9, 2020 at 12:30
  • How is your mental health two years later? I hope you are doing well.
    – gildux
    Commented Jan 27, 2023 at 23:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .