1

I have a tabular which I fill with "+" signs for some reasons.

This is what happens:

enter image description here

As you can see, for some reason there is space added on top of the row, making it higher. If I remove all the plus signs, the row's height is correct:

enter image description here

I though that might be a problem related to the size of the "+" sign, so I did a couple of tests, one with "x" and one with a random letter, in this case "i". Here are the results:

enter image description here

enter image description here

So it really seems like it depends on the character I use. Now, is there a way to use the plus sign without having such ugly whitespace on the top?

Thanks.

4
  • 3
    Without seeing the code that produces the weird behavior, it's impossible to help.
    – egreg
    Jun 15, 2016 at 14:34
  • Look, the code is a huge mess, as the table - as you may have noticed - is huge. If you could tell me which part you are interested into, I can edit the post and paste it. Otherwise it really makes not sense to paste it as a whole because it's really immense.
    – Masiar
    Jun 15, 2016 at 18:36
  • 1
    to make a minimal example, start with an "empty" document -- just the document class, packages only if they're needed, and `\begin{document} ... \end{document}. then copy in just the lines that define the table and one or two rows that show the problem "in action". that will allow potential helpers to experiment and figure out what is actually happening. Jun 15, 2016 at 20:29
  • 1
    You don't need to post a huge document just make a document with just a one-line table that shows the issue. Jun 15, 2016 at 22:46

1 Answer 1

2

I would guess you have something like this where the specified column width is narrower than | +| and you have something (a space here) in the column specification that allows a line break, so i fits on one line but + requires a line break with the space on the first line and the + on the second.

enter image description here

\documentclass{article}
\usepackage{array}
\begin{document}

\begin{tabular}{|*2{>{{\noindent} }p{10pt}|}}
\hline
 & \\
\hline
+&+\\
\hline
i&i\\
\hline
\end{tabular}

\end{document}
3
  • 1
    @Masiar please next time post a complete test document as above, to save us having to use a crystal ball! Jun 16, 2016 at 8:02
  • @Masiar what were you adding at the start of the entry? (whatever it was it's the wrong thing to add!) Jun 16, 2016 at 8:03
  • I was actually adding nothing, the "+" sign was simply too big and for some weird reason it was behaving like that. I am putting a line break after the +&, that is legitimate for the code readability but shouldn't influence the output. I just {\tiny +} all my "+" signs and the problem disappeared (but the "+" signs are now small!).
    – Masiar
    Jun 16, 2016 at 9:19

You must log in to answer this question.

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