LyX ⇒ problem with formula in rotatebox
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
problem with formula in rotatebox
in LyX, I have a very large formula, and I'm trying to rotate is using "rotatebox". I get an error/warning as in "warning.jpg", but strangely enough, the pdf-output looks rather OK.
Also the Lyx-file in attachment, the rotatebox is near to the end of the document.
Any help appreciated a lot,
Stef
- Attachments
-
- cursus hyperstatica.lyx
- (57.19 KiB) Downloaded 555 times
-
- warning.JPG (71.72 KiB) Viewed 7456 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
problem with formula in rotatebox
There is an error in the code, and LyX seems to hide it. Perhaps post also the pdfLaTeX export here, as attachment, as I don't have LyX here, then I could easily see the cause.
Stefan
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
problem with formula in rotatebox
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
problem with formula in rotatebox
I also tried with a scalebox (included in the example also), resulting into similar behaviour: I get similar errormessages, while the pdf-output looks rather OK to me.
I also exported from LyX a LaTeX (pdflatex) and a pdf (pdflatex) file, I hope these are the exprts that you wanted to see?
Please let me know if my info should be in another format, I really use LyX without knowing very much of LaTeX (but you allready guessed that ...)
Thanks,
Stef
- Attachments
-
- minimal example rotatebox or scalebox formula.pdf
- (86.85 KiB) Downloaded 370 times
-
- minimal example rotatebox or scalebox formula.tex
- (3.25 KiB) Downloaded 517 times
-
- minimal example rotatebox or scalebox formula.lyx
- (4.88 KiB) Downloaded 428 times
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
problem with formula in rotatebox
A solution would be, to rotate a box that has a width, such as a parbox or minipage. That can contain the equation. Such as, said in LaTeX code:
Code: Select all
\rotatebox{90}{\parbox{\textheight}{
\begin{equation}
...
\end{equation}
}}
Stefan
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
problem with formula in rotatebox
(Should this be considered as a bug in LyX?)
Stef
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
problem with formula in rotatebox
\rotatebox
uses the width of the inner object (for placement), equation
uses the width of the outer object (to center within). One of them needs to have a width, so putting a box of a defined width between them fixes it.Stefan
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
problem with formula in rotatebox
Is there an easy way to avoid this?
Stef
- Attachments
-
- minimal example rotatebox or scalebox formula.pdf
- (85.21 KiB) Downloaded 412 times
-
- minimal example rotatebox or scalebox formula.tex
- (2.02 KiB) Downloaded 561 times
-
- minimal example rotatebox or scalebox formula.lyx
- (3.69 KiB) Downloaded 501 times
- Stefan Kottwitz
- Site Admin
- Posts: 10348
- Joined: Mon Mar 10, 2008 9:44 pm
problem with formula in rotatebox

The equation number is place below if the equation is very wide. That happens inside the box, the resizing comes later, outside, via \scalebox. So, a way to get working is
- making the minipage big enough (the LyX box),
- compensate by scaling a bit smaller then.
Code: Select all
\scalebox{0.66}{%
\noindent\begin{minipage}[t]{1.4\textwidth}%
\begin{equation}
Stefan
-
- Posts: 51
- Joined: Sat Oct 22, 2016 3:43 pm
problem with formula in rotatebox
Stef