use same cmd for build and preview#3978
Conversation
also for magic comments
muzimuzhi
left a comment
There was a problem hiding this comment.
Minor spelling and wording improvements.
src/buildmanager.h
Outdated
| QStringList deprecatedUserToolCommands, deprecatedUserToolNames; | ||
| QStringList userToolOrder, userToolDisplayNames; | ||
| enum Dvi2PngMode { DPM_DVIPNG, DPM_DVIPNG_FOLLOW, DPM_DVIPS_GHOSTSCRIPT, DPM_EMBEDDED_PDF, DPM_LUA_EMBEDDED_PDF, DPM_XE_EMBEDDED_PDF}; | ||
| // following Dvi2PngModes add tight page modifications for to the document preamble preview |
There was a problem hiding this comment.
| // following Dvi2PngModes add tight page modifications for to the document preamble preview | |
| // following Dvi2PngModes add tight page modifications for the document preamble preview |
There was a problem hiding this comment.
@muzimuzhi I think I ment 'add ... to the document preamble for preview''. Ok?
There was a problem hiding this comment.
Sure. It's "for to" that confused me. So you meant
| // following Dvi2PngModes add tight page modifications for to the document preamble preview | |
| // following Dvi2PngModes add tight page modifications to the document preamble preview | |
There was a problem hiding this comment.
I suggest following Dvi2PngModes add tight page modifications to the document preamble used for preview
src/configdialog.ui
Outdated
| <string notr="true">Prefer Preview with Build Compiler</string> | ||
| </property> | ||
| <property name="toolTip"> | ||
| <string>The option applies when the build compiler is pdflatex, lualatex, xelatex, or latex.</string> |
There was a problem hiding this comment.
Would "is one of ..." be better? I'm not native speaker.
| <string>The option applies when the build compiler is pdflatex, lualatex, xelatex, or latex.</string> | |
| <string>The option applies when the build compiler is one of pdflatex, lualatex, xelatex, or latex.</string> |
There was a problem hiding this comment.
I'll wait for suggestions from sunderme
0c95a22 to
6d3b93c
Compare
|
I would suggest to simplify the design. Just add a "Autoselect preview command" (or similar) in the combobox and set it as default. |
|
This was my first try. I added it at top of the list, but this is not sensible because it shifts current user setting to the previous item. Another advantage of the checkbox would have been that we can force this option as default for anyone (not jsut for new installations). I'm going to change it to your solution. |
d0f2317 to
11331b9
Compare
src/configmanager.cpp
Outdated
| int l = confDlg->ui.comboBoxDvi2PngMode->count(); | ||
| for (int index=l-1; index>=0; index--) { | ||
| if (buildManager->modifyHeader.contains(buildManager->dvi2PngMode(index))) | ||
| if (buildManager->dvi2PngMode(index)>=BuildManager::DPM_EMBEDDED_PDF) |
There was a problem hiding this comment.
this will also remove the new option dpm_build_compiler
There was a problem hiding this comment.
there is not much choice if no pdf can be processed.


A new selection available in the Command combobox (s. Config/Preview and images below) tells the build system that the compiler used for previews should be the one used for builds. This includes the Default Compiler setup in Config/Build or given in a magic comment in the document. For this the build system tries to figure out which dvi2pngMode (i.e. one of the other selections available in the combobox) should be used internally. If this is not possible then a default selection from the combobox list is used (Preview with dvipng).
This PR closes #3851.
Note: Comment updated