<div dir="ltr"><div class="gmail-post-text">

<p>Hello,</p><p>I am trying to setup LyX to export directly to the reStructuredText format. I adapted <a href="https://lemmster.de/lyx-export-to-markdown.html" rel="nofollow noreferrer">these instructions</a> just replacing markdown with rst. </p>

<p>Unfortunately LyX changes the path of every image.</p>

<p>e.g. this figure </p>

<pre class="gmail-lang-tex gmail-prettyprint gmail-prettyprinted"><code><span class="gmail-pln">.. figure:: 0_home_muzzle_Nextcloud_Stuff_Stuff_documentation_source_img_pressure.jpg
   :alt: Pressure
   :width: 80.0</span><span class="gmail-com">%</span><span class="gmail-pln">

   Pressure</span></code></pre>

<p>should be </p>

<pre class="gmail-lang-tex gmail-prettyprint gmail-prettyprinted"><code><span class="gmail-pln">.. figure:: img/pressure.jpg
   :alt: Pressure
   :width: 80.0</span><span class="gmail-com">%</span><span class="gmail-pln">

   Pressure</span></code></pre>

<p>I think LyX is replacing the image path with that of a copy of the image 
created to allow the converter to do its job. This is the correct 
behavior if the output format will somehow embed the image in the 
document, but that is not the case for reStructuredText (or for 
markdown, for that matter). </p>

<p>If I export the lyx file as latex from the GUI, and then convert it to reStructuredText using the command</p>

<pre class="gmail-lang-tex gmail-prettyprint gmail-prettyprinted"><code><span class="gmail-pln">pandoc --wrap</span><span class="gmail-pun">=</span><span class="gmail-pln">none -f latex -t rst -o file.rst file.tex</span></code></pre>

<p>the image path is correct, is there a way to obtain the same effect from the UI conversion and export system?</p>

<p>Best,</p><p>Emme<br></p>
    </div></div>