Let's have this in trunk for testing. The real difference maker
when it comes to color is whether we use dvipng or ghostscript.
For dvipng:
- The color info is passed as command-line arguments.
- The tightpage option is not necessary, and since it adds
ps specials to the output, we shouldn't use it.
For ghostscript:
- The color info needs to be in the latex file.
- The foreground color is set for each preview inset.
- The background color is set by \pagecolor in the preamble,
which is understood by pdflatex, but ignored in dvips mode.
Thus dvips is handled with a ps special.
- The tightpage option is necessary to crop the images.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39797 a592a061-630c-0410-9148-cb99ea01b6c8
- Break up steps 1, 2 and 3 from the legacy preview mechanism.
These are really separate steps.
1) Add color info, run latex
2) Run dvips
3) Run ghostscript
- In the case of pdf output, skip step 2 and go directly to step 3.
- Make sure that we fall back to the legacy conversion whenever we can.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39661 a592a061-630c-0410-9148-cb99ea01b6c8
Introduce --debug and --verbose flags to control output. Also, use the
python subprocess module to capture stderr from external commands, thus
bumping the python requirement to version 2.4 or later.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39660 a592a061-630c-0410-9148-cb99ea01b6c8
Move some common variables to lyxpreview_tools. Otherwise,
add a few variable names, making it easier to track things.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39656 a592a061-630c-0410-9148-cb99ea01b6c8
Whitespace and line endings only, in preparation for some serious work.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39655 a592a061-630c-0410-9148-cb99ea01b6c8
when latex fails with a preview. Fixes bug #7303 (IP fails with hyperref).
Patch by Ale with suggestions from Enrico
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38243 a592a061-630c-0410-9148-cb99ea01b6c8
* src/PreviewLoader.cpp:
- add conditions for preview with pdf output
* lib/scripts/legacy_lyxpreview2ppm.py:
- if no dvi preview file is available, check for a PDF file
and process that, if found
- also produce png output, if requested.
* lib/scripts/lyxpreview2bitmap.py:
- if no dvi preview file is available, check for a PDF file
and process that, if found
* lib/scripts/lyxpreview_tools.py:
- move some common functions here
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25419 a592a061-630c-0410-9148-cb99ea01b6c8
* src/support/os.[Ch]
(python): new function, return the python command
* lib/lyx2lyx/lyx_1_5.py
(revert_font_settings): replace tabs with spaces
The rest is simply s/python/python -tt/ and
s/"python"/lyx::support::os::python()/ where appropriate.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14270 a592a061-630c-0410-9148-cb99ea01b6c8
Implementation is as similar as possible to the well-tested code in the
1.3.x tree.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8878 a592a061-630c-0410-9148-cb99ea01b6c8