1

In LyX, the "Insert > Graphics" dialog is the standard way for including graphics and, usefully, provides an inline-preview of the graphic in question.

LaTeX's \includegraphics command allows to select pages from multi-page images, such as TIFF files or PDF documents, e.g.

\includegraphics[page=2]{mydoc.pdf}

In LyX the correct final output can be achieved by adding this option manually. However, when previewed inside LyX, these options are ignored.

Example document: Input and output screenshot.

Is there any possibility to get the correct preview for both graphics?

I already tried wrapping the graphics in "Insert > Preview" boxes, but it doesn't change anything.

Motivation

Libreoffice Draw allows grouping related images into a single file, and allows to export the document as a multi-page pdf. For fast edit->export->preview cycles, this is the most efficient option, as there is no other support for exporting all pages at once.

Similarly, it can sometimes be less messy to group multiple plots from plotting software (matplotlib, gnuplot, ...) into a single PDF.

When used from within LaTeX, the page=... option works fine, but the lack of correct preview in LyX makes it inconvenient to use.

Related topics

Based on the comments, the issue is known. It remains unclear, if a workaround is currently available, though the explanations make it seem unlikely.

  • 2
    There is an open feature request in LyX's issue tracker about this: lyx.org/trac/ticket/9039 – Torbjørn T. Jan 14 at 20:08
  • 1
    @TorbjørnT. Agreed. Unless kdb has something different in mind, I would propose to make your comment the answer. It's unfortunate this issue has been there for so long. I think a lot of people have come across this. – scottkosty Jan 14 at 23:10
  • @scottkosty Do I understand correctly, that there is also no possible workaround at this time? – kdb Jan 15 at 9:42
  • @kdb I believe you would have to hardcode the page number globally. i.e., if you want to have the 2nd page of every PDF previewed, we might be able to make that work. But I doubt that is the case: usually you would want page 1 for one PDF, page 22 for a separate one, etc. – scottkosty Jan 15 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.