On Thu, Nov 06, 2003 at 09:14:01PM +0100, Kornel Benko spake thusly:
> -----BEGIN PGP SIGNED MESSAGE-----
>
> On Donnerstag, 6. November 2003 20:45, Martin Vermeer wrote:
> ...
> > Oops. Long time no see.
> >
> > Yes, the default is
> >
> > height value = 1
> > "non-special" height unit = inches
> > "special" height unit = \totalheight.
> >
> > If height_special == none, the non-special height unit is implied.
> > That is not the case here: thus we have 1\totalheight, which
> > should produce the same effect as the absence of the [height] option
> > in LaTeX. (Yes, convoluted isn't it. Would it be better to put in
> > special code to suppress [height] altogether in this case?)
> >
> > See code (insetbox.C):
> >
> > 285 if (params_.height_special == "none") {
>
> How about
> - ----------
> if (params_.height.value() > 0) {
> s << "[" << params_.height.asLatexString() << "]";
> }
> - -----------
>
> > 287 } else {
> > 288 // Special heights
> > 289 os << "[" << params_.height.value()
> > 290 << "\\" << params_.height_special << "]";
>
> IMHO, there is no need to output the height.
> then lyx2lyx may output lyx-1.3-minipages as
> - ------
> height "0pt"
> height_special "none"
> - ------
>
> Kornel
Ehh, there is a snag. The syntax of parbox is
\parbox [<pos>] [<height>] [<inner-pos>] {<width>} {<text>}
and of minipage
\begin{minipage} [<pos>] [<height>] [<inner-pos>] {<width>}
<text>
\end{minipage}
As you see, you cannot just remove the [<height>] parameter from
in-between, as then the [<inner-pos>] parameter will remain hanging in
mid-air...
You _can_ do it in the case that also the inner-pos parameter is to be
omitted as being default (i.e. the same as pos). So the test should be
> - ----------
> // Suppress [<height>] optional parameter if 0, but ONLY if
> // also [<inner_pos>] optional parameter will be suppressed!
> if (params_.height.value() > 0
> || params_.inner_pos != params_.pos) {
> s << "[" << params_.height.asLatexString() << "]";
> }
> - -----------
which should be OK, see a few lines lower.
Good luck implementing and testing ;-)
- Martin
pgp00000.pgp
Description: PGP signature
