LyXLaTex picture commands not compatible with lyx

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
hooman
Posts: 41
Joined: Tue Jul 06, 2010 3:03 pm

LaTex picture commands not compatible with lyx

Post by hooman »

Hi,

I have a .tex file in which s diagram has been plotted using laTex commands. When I enter this into lyx it gives a smaller diagram with all the lines kind of tangled and squeezed in a smaller area. Does anyone know why this happens. Are the units of dimensions different in lyx?

For example something like this:
\begin{picture}(6,6)
{\linethickness{1pt}\put(6.2,5){\textcolor{black}{\vector(0,1){1}}}}
{\linethickness{2pt}\put(3.2,2){\line(1,0){4}}}
\end{picture}


Thanks,
Last edited by hooman on Thu Jun 30, 2011 5:19 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

LaTex picture commands not compatible with lyx

Post by torbjorn t. »

No, but you've forgotten to copy the definition of \unitlength. The default unit length in the picture environment is 1pt, which is about 0.35 mm. This can be changed with

Code: Select all

\setlength{\unitlength}{1cm}
somewhere before the picture-environment (not within). If you look in your .tex-file you'll find a line like this.
hooman
Posts: 41
Joined: Tue Jul 06, 2010 3:03 pm

Re: LaTex picture commands not compatible with lyx

Post by hooman »

Thanks alot! :) It works now :D
Post Reply