Am Mon, 6 Mar 2023 13:54:22 +0100
schrieb Pavel Sanda <sa...@lyx.org>:

> On Mon, Mar 06, 2023 at 11:38:22AM +0100, Pavel Sanda wrote:
> > On Wed, Feb 22, 2023 at 10:52:14AM +0100, Jean-Pierre Chrétien wrote:  
> > > Dear developers
> > > 
> > > When I open the original UserGuide with 2.4.0dev, I see this in the 
> > > calling
> > > command window:
> > > 
> > > Warning: dvipng failed to generate images from lyxpreviewOuMJqr.dvi...
> > > fallback to legacy method
> > > Warning: epstopdf failed on page 1, file lyxpreviewOuMJqr.001
> > > Warning: epstopdf failed on page 2, file lyxpreviewOuMJqr.002
> > > [...] snip
> > > Warning: epstopdf failed on page 109, file lyxpreviewOuMJqr.109
> > > Warning: epstopdf failed on page 110, file lyxpreviewOuMJqr.110
> > > Warning: Now trying to obtain failed previews through pdflatex
> > > Warning: Failed to produce 1 preview snippet(s)
> > > 
> > > When I open the French version, I get only the last line.
> > > 
> > > Any clue ?  
> > 
> > Ghostscript chokes on our dvi.
> > If passed debug option to it via e.g. epstopdf --debug --gsopt=-dDEBUG
> > lyxpreviewjGIxTU.ps one gets:
> > Error: /typecheck in --div--
> > 
> > It seems related to hyperref, this page wrt preview+hyperref seems related
> > https://github.com/latex3/hyperref/issues/213
> > https://lists.gnu.org/archive/html/bug-auctex/2020-11/msg00000.html
> > 
> > I have no clue what 'latex shipout code' is and did not inspect further.  
> 
> Apart from trying to figure out what's wrong with latex-preview I looked at
> our sources and figured out that
> 1) although we see this error on console, the preview is still produced
>    OK via backup pdf route
> 2) this issue is not new to 2.4. It is present in 2.3 as well - the only 
> difference
>    triggering this problem in UG is:
> 
> -\default_output_format pdf2
> +\default_output_format default
>    
>    which was changed during 2.4 lifetime.
> 
> Given that the underlying problem is likely in latex-preview whose
> maintainer is not interested in fixing (probably this) problem I would
> leave the issue dormant.
> 
> Pavel

Or using the attached for preview.
(Using this without problems for some time now)

        Kornel
diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp
index f6ca607e46..a09b561b82 100644
--- a/src/graphics/PreviewLoader.cpp
+++ b/src/graphics/PreviewLoader.cpp
@@ -625,11 +625,11 @@ void PreviewLoader::Impl::startLoading(bool wait)
 			&& buffer_.params().default_output_format != "default";
 	// Use LATEX flavor if the document does not specify a specific
 	// output format (see bug 9371).
 	Flavor flavor = docformat
 					? buffer_.params().getOutputFlavor()
-					: Flavor::LaTeX;
+					: Flavor::PdfLaTeX;
 	if (buffer_.params().encoding().package() == Encoding::japanese) {
 		latexparam = " --latex=platex";
 		flavor = Flavor::LaTeX;
 	}
 	else if (buffer_.params().useNonTeXFonts) {

Attachment: pgpctSj18rZ60.pgp
Description: Digitale Signatur von OpenPGP

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to