<div dir="ltr"><div dir="ltr"><div class="gmail-content">Hello everyone, <br></div><div class="gmail-content">I have partially solved my previous issue <a href="https://tex.stackexchange.com/questions/524505/image-path-when-exporting-from-lyx/552722#552722" class="gmail-postlink">https://tex.stackexchange.com/questions/524505/image-path-when-exporting-from-lyx/552722#552722</a>. <br><br>The
 one problem I have left is that lyx  removes the image extension when 
exporting to latex (when using the "nice" flag); this forces me to specify the image extension in the
 pandoc command which is not very flexible. Do you have any idea how to get lyx to output the image file name including the extension?</div></div><div><br></div><div>Best,</div><div><br></div><div>Emme<br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 21, 2020 at 9:43 PM Scott Kostyshak <<a href="mailto:skostysh@lyx.org" target="_blank">skostysh@lyx.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jan 21, 2020 at 04:40:06PM +0100, muzzle wrote:<br>
> Hello,<br>
> <br>
> I am trying to setup LyX to export directly to the reStructuredText format.<br>
> I adapted these instructions<br>
> <<a href="https://lemmster.de/lyx-export-to-markdown.html" rel="noreferrer" target="_blank">https://lemmster.de/lyx-export-to-markdown.html</a>> just replacing markdown<br>
> with rst.<br>
> <br>
> Unfortunately LyX changes the path of every image.<br>
> <br>
> e.g. this figure<br>
> <br>
> .. figure:: 0_home_muzzle_Nextcloud_Stuff_Stuff_documentation_source_img_pressure.jpg<br>
>    :alt: Pressure<br>
>    :width: 80.0%<br>
> <br>
>    Pressure<br>
> <br>
> should be<br>
> <br>
> .. figure:: img/pressure.jpg<br>
>    :alt: Pressure<br>
>    :width: 80.0%<br>
> <br>
>    Pressure<br>
> <br>
> I think LyX is replacing the image path with that of a copy of the image<br>
> created to allow the converter to do its job. This is the correct behavior<br>
> if the output format will somehow embed the image in the document, but that<br>
> is not the case for reStructuredText (or for markdown, for that matter).<br>
> <br>
> If I export the lyx file as latex from the GUI, and then convert it to<br>
> reStructuredText using the command<br>
> <br>
> pandoc --wrap=none -f latex -t rst -o file.rst file.tex<br>
> <br>
> the image path is correct, is there a way to obtain the same effect from<br>
> the UI conversion and export system?<br>
> <br>
> Best,<br>
> <br>
> Emme<br>
<br>
Hi Emme,<br>
<br>
It's helpful to always cross-reference your posts. That way, if someone<br>
solves your question on one list, others with the same problem who find<br>
your other post can follow the link and see the solution. Here's your<br>
other post:<br>
<br>
  <a href="https://tex.stackexchange.com/questions/524505/image-path-when-exporting-from-lyx" rel="noreferrer" target="_blank">https://tex.stackexchange.com/questions/524505/image-path-when-exporting-from-lyx</a><br>
<br>
I don't know the answer to you question but I hope someone else does!<br>
<br>
Best of luck,<br>
<br>
Scott<br></blockquote><div><br></div><div>Thanks Scott,</div><div>In the maean while <br></div><div><br></div><div><br></div></div></div>