# Re: How to pass marginparwidth to includegraphics

Great. Thanks a lot for the quick reply.

------- Original Message -------
On Thursday, February 24th, 2022 at 11:25 PM, Paul A. Rubin via lyx-users
<lyx-users@lists.lyx.org> wrote:

> On 2/24/22 16:18, tush via lyx-users wrote:
>
>> I have some figures which I want to include in the marginal part of the
>> document.
>> The graphics to be included should be of width \marginparwidth​.
>> How can I pass this width to the include graphics tool (Insert->Graphics)
>> within the editor?
>>
>> In plain LaTeX I would have typed
>>
>> \begin{marginfigure}
>> \includegraphics[width=\marginparwidth]{file.png}
>> \end{marginfigure}
>>
>> (I created a customized marginfigure inset with a module file)
>>
>> So after inserting the graphics file, I don't see any way to specify the
>> above width.
>>
>> The only options I have are those in the attached picture, non of which is
>> marginparwidth.
>
> Click the "LaTeX and LyX options" tab and enter "width=\marginparwidth" in
> the "LaTeX options" box.
>
> Paul
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users