I have this macro \code that produces a box. And I want to create a tabular "environment" that acts like enumerate except it puts the items into a grid.





  \multirow{2}{*}{\code{x = 0; \\ while (x >= 0) \{ \\ \ \ \ \ x++; \\ \}}} & bIt \\
      & cIt \\
  dIt & eIt \\

what I expected was a grid of (a) (b) \\ (c) \\ (d) (e). That works, except for some reason the cell that contains \code appears to have height 0pt and thus the code overlaps with the empty cell and the d cell. I know that all I am doing is hackish but can I somehow fix the behaviour to avoid the overlap?

  • Why don't you make a complete example instead of posting all this snippets? – Ulrike Fischer Sep 23 '15 at 9:11
  • With \newcounter and \newbox in the definition of \twocolenum you're looking for disgrace. What do you need a new box register for? – egreg Sep 23 '15 at 9:14
  • I know, this is just first attempt, but I am currently facing a completely different problem. the box is for saving the contents of the cell and analyzing them before shipping them out. – user88326 Sep 23 '15 at 9:16
  • \multirow sets the dimension of its content to 0pt (so that it doesn't push the rows apart). – Ulrike Fischer Sep 23 '15 at 9:32
  • Yes, any way to overcome that and make it still make sense? – user88326 Sep 23 '15 at 9:33

Your Answer

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