Hi,
I have a Lyx file that holds many pictures, all of the same size (same picture resulotions). I use Scale graphics for all of them, to the same size. Is there a way to define a variable or parameter and insert it to all fields?
Thanks,
Yaron
LyX ⇒ User defined variables in Lyx?
NEW: TikZ book now 40% off at Amazon.com for a short time.

User defined variables in Lyx?
Define a new macro in the preamble, like so:
Then in the graphics settings, don't check any "Output Size" options, but go to the "LaTeX and LyX options" and type the following in the "LaTeX options" field:
Code: Select all
\newcommand{\pageScale}{0.71} % 71 percent
Code: Select all
scale=\pageScale
Last edited by bbogart on Tue Jun 03, 2014 2:37 am, edited 1 time in total.
-
- Posts: 89
- Joined: Fri Jan 24, 2014 12:42 am
Re: User defined variables in Lyx?
So let me make sure I understand... you're using the Insert>Graphics GUI and checking Scale and typing the percent each time and you want that scaling to happen automatically instead?
You need to set a Graphics Group. For the next image you want, enter your scale as normal, then on the third (LaTeX and LyX options) tab of the GUI, click the button that says Open New Group and assign a name (such as Scaled). Then click OK. The next time you insert a graphic, instead of entering all your configurations again, just go straight to the third tab and, in the pulldown list under Graphics Group, assign it to the group Scaled.
You need to set a Graphics Group. For the next image you want, enter your scale as normal, then on the third (LaTeX and LyX options) tab of the GUI, click the button that says Open New Group and assign a name (such as Scaled). Then click OK. The next time you insert a graphic, instead of entering all your configurations again, just go straight to the third tab and, in the pulldown list under Graphics Group, assign it to the group Scaled.