On Thu, May 17, 2007 at 11:32:54PM +0100, José Matos wrote: > On Monday 07 May 2007 11:02:29 pm Micha Feigin wrote: > > Sorry, got it wrong, missed the special == "none" in the lyx file and the > > not is binary instead of logical (too many programing languages in parallel > > ... ) > > > > Anyway this is supposed to be the correct patch (I hope I got the > > indentation according to the coding convention). > > Martin, what do you have to say about this? > > It is proposed as a fix for bug 3242.
If it works... Does this mean that a height value of 0 is now taken as a request for default height? I suppose it is safe as it is a physically unrealistic value. - Martin > > Index: src/insets/InsetBox.cpp > > =================================================================== > > --- src/insets/InsetBox.cpp (revision 18229) > > +++ src/insets/InsetBox.cpp (working copy) > > @@ -340,16 +340,18 @@ > > os << "\\begin{minipage}"; > > > > os << "[" << params_.pos << "]"; > > - if (params_.height_special == "none") { > > - // FIXME UNICODE > > - os << '[' << from_ascii(params_.height.asLatexString()) > > - << ']'; > > - } else { > > - // Special heights > > - // FIXME UNICODE > > - os << "[" << params_.height.value() > > - << '\\' << from_utf8(params_.height_special) > > - << ']'; > > + if (!params_.height.zero()) { > > + if (params_.height_special == "none") { > > + // FIXME UNICODE > > + os << '[' << > > from_ascii(params_.height.asLatexString()) > > + << ']'; > > + } else { > > + // Special heights > > + // FIXME UNICODE > > + os << "[" << params_.height.value() > > + << '\\' << from_utf8(params_.height_special) > > + << ']'; > > + } > > } > > if (params_.inner_pos != params_.pos) > > os << "[" << params_.inner_pos << "]"; > > > > > > On Mon, 07 May 2007 22:47:06 +0200 > > > > Uwe Stöhr <[EMAIL PROTECTED]> wrote: > > > Here's a ptch from Macha Feigin: > > > > > > Ok, I made a patch, hope that it is the correct solution, if so then it's > > > a one liner > > > Didn't know where to send it to > > > > > > Index: src/insets/InsetBox.cpp > > > =================================================================== > > > --- src/insets/InsetBox.cpp (revision 18217) > > > +++ src/insets/InsetBox.cpp (working copy) > > > @@ -344,7 +344,7 @@ > > > // FIXME UNICODE > > > os << '[' << > > > from_ascii(params_.height.asLatexString()) << ']'; > > > - } else { > > > + } else if (~params_.height.zero()) { > > > // Special heights > > > // FIXME UNICODE > > > os << "[" << params_.height.value() > > > > > > > > > On Mon, 7 May 2007 02:32:57 +0300 > > > > > > Micha Feigin <[EMAIL PROTECTED]> wrote: > > > > I seem to be having a problem with some tex code imported into lyx 1.5 > > > > It contains an image and only width originally, but lyx insists on > > > > inserting height zero which completely messes up the rendering. (image > > > > is interleaved with text) > > > > > > > > i.e, the following > > > > > > > > \parbox{0.24\textwidth}{ > > > > \begin{center} > > > > \includegraphics[width=0.22\textwidth, height=0.33\textwidth] > > > > {eigvec_-0_0009.jpg}\\ > > > > $\lambda = -0.0009$ > > > > \end{center} > > > > } > > > > > > > > is imported as > > > > > > > > \parbox[c][0pt]{0.24\textwidth}{% > > > > > > > > > > > > \begin{center} > > > > \includegraphics[width=0.22\textwidth,height=0.33\textwidth]{images/eig > > > >vec_-0_0009}\\ $\lambda=-0.0009$ > > > > \par\end{center}% > > > > }% > > > > > > > > Am I doing something wrong or is this a bug? > > > > > > > > Thanks > > -- > José Abílio