diff --git a/src/texstudio.cpp b/src/texstudio.cpp index 0851a6d397..82da1fbd27 100644 --- a/src/texstudio.cpp +++ b/src/texstudio.cpp @@ -8856,7 +8856,7 @@ QStringList Texstudio::makePreviewHeader(const LatexDocument *rootDoc) } } if ((buildManager.dvi2pngMode == BuildManager::DPM_EMBEDDED_PDF || buildManager.dvi2pngMode == BuildManager::DPM_LUA_EMBEDDED_PDF) - && configManager.previewMode != ConfigManager::PM_EMBEDDED) { + && configManager.previewMode != ConfigManager::PM_EMBEDDED && configManager.previewMode != ConfigManager::PM_PANEL) { header << "\\usepackage[active,tightpage]{preview}" << "\\usepackage{varwidth}" << "\\AtBeginDocument{\\begin{preview}\\begin{varwidth}{\\linewidth}}"