Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to get right margin in parboxed header? Top, bottom and left margin are ok, but there is no margin at the right (top) side of 'Parameter' header.

\begin{table}[ht]\footnotesize
\centering
\begin{tabular}{|c|}
\hline
\begin{sideways}\parbox{2cm}{Parameter etc etc ....}\end{sideways} 
\end{tabular}

\caption{Summary}
\label{tab:summary}
\end{table}

No right margin

There are top,bottom and left margin, but there is no margin at right side of the header, as you can see at attached image.

share|improve this question
1  
Somehow the problem is not comprehensible for me. Perhaps a full but minimal example that reproduces the undesired behaviour can help to understand. –  Thorsten Donig Nov 14 '10 at 16:25

1 Answer 1

up vote 7 down vote accepted

\parbox supports optional arguments for specifying height and alignment. In your case, within a sideways environment, you could adjust the height of the parbox to get a wider header and thus a wider margin.

Further, if you wish to get space below or above the turned parbox, you could use \hspace* to insert some space within the sideways environment.

For example, within your code, write

\begin{sideways}
  \parbox[c][2cm][c]{2cm}{Parameter etc etc ....}
  \hspace*{1ex}
\end{sideways}

to get (with an additional \hline):

table

The syntax of \parbox is

\parbox[pos][height][inner-pos]{width}{text}

where pos means one of the usual alignment options t, b or c.

share|improve this answer
    
Ok, it works for top and bottom - but what about right margin? When you look at table you can see that there is no margin at the very top of it (looking normally -from top to bottom, not sideways) –  pixel Nov 14 '10 at 19:52
1  
The question seemed not so clear (what's been meant by right) and the code and the first column had whitespace at its top. Just insert some space after the parbox (\hspace*) - I'll edit my example. –  Stefan Kottwitz Nov 14 '10 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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