]> git.lyx.org Git - features.git/commitdiff
Rest in peace, dvipost!
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 13 Jan 2020 07:59:26 +0000 (08:59 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 13 Jan 2020 07:59:26 +0000 (08:59 +0100)
lib/chkconfig.ltx
lib/configure.py
lib/doc/LaTeXConfig.lyx
src/Buffer.cpp
src/BufferParams.cpp
src/Changes.cpp
src/LaTeXFeatures.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathNest.cpp
src/tex2lyx/text.cpp

index b8f90f920f4f4f1e7273edcfb4d8ee46dbb10643..4d647c6148c139a47dad72400fbc8e18da149902 100644 (file)
 \TestPackage{csquotes}
 \TestPackage{drs}
 \TestPackage[koi8-r.def]{cyrillic}
-\TestPackage{dvipost}
 \TestPackage{endnotes}
 \TestPackage{enotez}
 \TestPackage{enumitem}
index 701a90327a7fa2551cd1fed2f65d53d658b18eec..9b2fceb4379ed749fb23de9972a91fa82392f869 100644 (file)
@@ -542,7 +542,6 @@ def checkInkscape():
 def checkLatex(dtl_tools):
     ''' Check latex, return lyx_check_config '''
     path, LATEX = checkProg('a Latex2e program', ['latex $$i', 'latex2e $$i'])
-    path, PPLATEX = checkProg('a DVI postprocessing program', ['pplatex $$i'])
     #-----------------------------------------------------------------
     path, PLATEX = checkProg('pLaTeX, the Japanese LaTeX', ['platex $$i'])
     if PLATEX:
@@ -556,15 +555,12 @@ def checkLatex(dtl_tools):
             PLATEX = ''
             removeFiles(['chklatex.ltx', 'chklatex.log'])
     #-----------------------------------------------------------------
-    # use LATEX to convert from latex to dvi if PPLATEX is not available
-    if PPLATEX == '':
-        PPLATEX = LATEX
     if dtl_tools:
         # Windows only: DraftDVI
         addToRC(r'''\converter latex      dvi2       "%s"      "latex,hyperref-driver=dvips"
-\converter dvi2       dvi        "python -tt $$s/scripts/clean_dvi.py $$i $$o" ""''' % PPLATEX)
+\converter dvi2       dvi        "python -tt $$s/scripts/clean_dvi.py $$i $$o" ""''' % LATEX)
     else:
-        addToRC(r'\converter latex      dvi        "%s"        "latex,hyperref-driver=dvips"' % PPLATEX)
+        addToRC(r'\converter latex      dvi        "%s"        "latex,hyperref-driver=dvips"' % LATEX)
     # no latex
     if LATEX:
         # Check if latex is usable
index f98488fae9d33e3d484800202f3cd782c8fa6e4c..6a0905a23e200a931b4d574e3f4073883a7218df 100644 (file)
@@ -1,5 +1,5 @@
 #LyX 2.4 created this file. For more info see https://www.lyx.org/
-\lyxformat 588
+\lyxformat 592
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -74,6 +74,8 @@
 \tablestyle default
 \tracking_changes true
 \output_changes false
+\change_bars false
+\postpone_fragile_content false
 \html_math_output 0
 \html_css_as_file 0
 \html_be_strict true
@@ -7904,10 +7906,14 @@ CJKutf8
 \end_layout
 
 \begin_layout Subsection
+
+\change_deleted -712698321 1578757015
 dvipost
 \end_layout
 
 \begin_layout Description
+
+\change_deleted -712698321 1578757015
 Found: 
 \begin_inset Info
 type  "package"
@@ -7918,12 +7924,16 @@ arg   "dvipost"
 \end_layout
 
 \begin_layout Description
+
+\change_deleted -712698321 1578757015
 URL: 
 \family typewriter
 http://freshmeat.net/projects/dvipost/
 \end_layout
 
 \begin_layout Description
+
+\change_deleted -712698321 1578757015
 Notes: 
 \family sans
 dvipost
@@ -7940,6 +7950,8 @@ dvipost
 \family default
  needs te\SpecialChar TeX
  version 2 or newer.
+\change_unchanged
+
 \end_layout
 
 \begin_layout Subsection
index ffdd9b8f67b86c83d3f8b1d28457327ba976de6f..eabb2181b9ffffe687c9fd938c61ba0e447c1db9 100644 (file)
@@ -1028,20 +1028,13 @@ bool Buffer::readDocument(Lexer & lex)
        readHeader(lex);
 
        if (params().output_changes) {
-               bool dvipost    = LaTeXFeatures::isAvailable("dvipost");
                bool xcolorulem = LaTeXFeatures::isAvailable("ulem") &&
                                  LaTeXFeatures::isAvailable("xcolor");
 
-               if (!dvipost && !xcolorulem) {
+               if (!xcolorulem) {
                        Alert::warning(_("Changes not shown in LaTeX output"),
                                       _("Changes will not be highlighted in LaTeX output, "
-                                        "because neither dvipost nor xcolor/ulem are installed.\n"
-                                        "Please install these packages or redefine "
-                                        "\\lyxadded and \\lyxdeleted in the LaTeX preamble."));
-               } else if (!xcolorulem) {
-                       Alert::warning(_("Changes not shown in LaTeX output"),
-                                      _("Changes will not be highlighted in LaTeX output "
-                                        "when using pdflatex, because xcolor and ulem are not installed.\n"
+                                        "because xcolor and ulem are not installed.\n"
                                         "Please install both packages or redefine "
                                         "\\lyxadded and \\lyxdeleted in the LaTeX preamble."));
                }
@@ -3035,20 +3028,13 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
                        undo().recordUndoBufferParams(CursorData());
                params().output_changes = !params().output_changes;
                if (params().output_changes) {
-                       bool dvipost    = LaTeXFeatures::isAvailable("dvipost");
                        bool xcolorulem = LaTeXFeatures::isAvailable("ulem") &&
                                          LaTeXFeatures::isAvailable("xcolor");
 
-                       if (!dvipost && !xcolorulem) {
+                       if (!xcolorulem) {
                                Alert::warning(_("Changes not shown in LaTeX output"),
                                               _("Changes will not be highlighted in LaTeX output, "
-                                                "because neither dvipost nor xcolor/ulem are installed.\n"
-                                                "Please install these packages or redefine "
-                                                "\\lyxadded and \\lyxdeleted in the LaTeX preamble."));
-                       } else if (!xcolorulem) {
-                               Alert::warning(_("Changes not shown in LaTeX output"),
-                                              _("Changes will not be highlighted in LaTeX output "
-                                                "when using pdflatex, because xcolor and ulem are not installed.\n"
+                                                "because xcolor and ulem are not installed.\n"
                                                 "Please install both packages or redefine "
                                                 "\\lyxadded and \\lyxdeleted in the LaTeX preamble."));
                        }
index b1cedda6fa5b29682e64946ab7b52f7b35e0ce5c..200d695f60b305c8b72a62f4f40816f1c2892306 100644 (file)
@@ -1503,17 +1503,13 @@ void BufferParams::validate(LaTeXFeatures & features) const
                features.require("rtloutputdblcol");
 
        if (output_changes) {
-               bool dvipost    = LaTeXFeatures::isAvailable("dvipost");
                bool xcolorulem = LaTeXFeatures::isAvailable("ulem") &&
                                  LaTeXFeatures::isAvailable("xcolor");
 
                switch (features.runparams().flavor) {
                case OutputParams::LATEX:
                case OutputParams::DVILUATEX:
-                       if (dvipost) {
-                               features.require("ct-dvipost");
-                               features.require("dvipost");
-                       } else if (xcolorulem) {
+                       if (xcolorulem) {
                                features.require("ct-xcolor-ulem");
                                features.require("ulem");
                                features.require("xcolor");
index 52e69da200b5a386700281efecb678c287b6ac19..a579144a7a1f875b8e6fb60bfb22043017d8d582 100644 (file)
@@ -429,10 +429,6 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
 
        int column = 0;
 
-       bool const dvipost = LaTeXFeatures::isAvailable("dvipost") &&
-                       (runparams.flavor == OutputParams::LATEX
-                        || runparams.flavor == OutputParams::DVILUATEX);
-
        if (oldChange.type != Change::UNCHANGED) {
                if (oldChange.type != Change::DELETED || runparams.ctObject != OutputParams::CT_OMITOBJECT) {
                        // close \lyxadded or \lyxdeleted
@@ -440,7 +436,7 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
                        column++;
                }
                if (oldChange.type == Change::DELETED
-                   && !runparams.wasDisplayMath && !dvipost)
+                   && !runparams.wasDisplayMath)
                        --runparams.inulemcmd;
        }
 
@@ -461,7 +457,7 @@ int Changes::latexMarkChange(otexstream & os, BufferParams const & bparams,
                        macro_beg = from_ascii("\\lyxudisplayobjdeleted");
                else {
                        macro_beg = from_ascii("\\lyxdeleted");
-                       if (!runparams.inDisplayMath && !dvipost)
+                       if (!runparams.inDisplayMath)
                                ++runparams.inulemcmd;
                }
        }
index c1e259748b974dc3258fd4155252887d5eec81e1..fd16b2803554c3406dd1a20341fd7749e9440d7d 100644 (file)
@@ -235,29 +235,6 @@ static docstring const lyxdot_def = from_ascii(
        "%% A simple dot to overcome graphicx limitations\n"
        "\\newcommand{\\lyxdot}{.}\n");
 
-static docstring const changetracking_dvipost_def = from_ascii(
-       "%% Change tracking with dvipost\n"
-       "\\dvipostlayout\n"
-       "\\dvipost{osstart color push Red}\n"
-       "\\dvipost{osend color pop}\n"
-       "\\dvipost{cbstart color push Blue}\n"
-       "\\dvipost{cbrule 0pt}\n"
-       "\\dvipost{cbend color pop}\n"
-       "\\DeclareRobustCommand{\\lyxadded}[4][]{\\changestart#4\\changeend}\n"
-       "\\DeclareRobustCommand{\\lyxdeleted}[4][]{%\n"
-       "\\changestart\\overstrikeon#4\\overstrikeoff\\changeend}\n");
-
-static docstring const changetracking_dvipost_cb_def = from_ascii(
-       "%% Change tracking with dvipost\n"
-       "\\dvipostlayout\n"
-       "\\dvipost{osstart color push Red}\n"
-       "\\dvipost{osend color pop}\n"
-       "\\dvipost{cbstart color push Blue}\n"
-       "\\dvipost{cbend color pop}\n"
-       "\\DeclareRobustCommand{\\lyxadded}[4][]{\\changestart#4\\changeend}\n"
-       "\\DeclareRobustCommand{\\lyxdeleted}[4][]{%\n"
-       "\\changestart\\overstrikeon#4\\overstrikeoff\\changeend}\n");
-
 static docstring const changetracking_xcolor_ulem_base_def = from_ascii(
        "%% Change tracking with ulem and xcolor: base macros\n"
        "\\DeclareRobustCommand{\\mklyxadded}[1]{\\bgroup\\color{lyxadded}{}#1\\egroup}\n"
@@ -1131,7 +1108,6 @@ char const * simplefeatures[] = {
        "float",
        "wrapfig",
        "booktabs",
-       "dvipost",
        "fancybox",
        "calc",
        "units",
@@ -1306,7 +1282,7 @@ string const LaTeXFeatures::getPackages() const
        // The rest of these packages are somewhat more complicated
        // than those above.
 
-       if (mustProvide("changebar") && !mustProvide("ct-dvipost")) {
+       if (mustProvide("changebar")) {
                packages << "\\usepackage";
                if (runparams_.flavor == OutputParams::LATEX
                    || runparams_.flavor == OutputParams::DVILUATEX)
@@ -1753,13 +1729,6 @@ TexString LaTeXFeatures::getMacros() const
                macros << lyxref_def << '\n';
 
        // change tracking
-       if (mustProvide("ct-dvipost")) {
-               if (isRequired("changebar"))
-                       macros << changetracking_dvipost_cb_def;
-               else
-                       macros << changetracking_dvipost_def;
-       }
-
        if (mustProvide("ct-xcolor-ulem")) {
                streamsize const prec = macros.os().precision(2);
 
index 75e0a41f9ce83490856787b9d4dccb867f782819..2413af3e86ca9d58a911aaf65d960d6ad4e0d5bf 100644 (file)
@@ -1101,8 +1101,7 @@ void InsetMathHull::validate(LaTeXFeatures & features) const
                                + bgcol + "}{\\ensuremath{\\mathtt{#1}}}}");
                        features.addPreambleSnippet(
                                from_ascii("\\newcommand{\\endregexp}{}"));
-               } else if (outerDisplay() && features.inDeletedInset()
-                          && !features.mustProvide("ct-dvipost")) {
+               } else if (outerDisplay() && features.inDeletedInset()) {
                                features.require("tikz");
                                features.require("ct-tikz-object-sout");
                }
index 66e900ad52441be1be5c857890172c72268d4cbe..62c04f439e458c8074c8dcb7d93b01ba351e0dfb 100644 (file)
@@ -357,10 +357,7 @@ void InsetMathNest::latex(otexstream & os, OutputParams const & runparams) const
        WriteStream wi(os, runparams.moving_arg, true,
                        runparams.dryrun ? WriteStream::wsDryrun : WriteStream::wsDefault,
                        runparams.encoding);
-       wi.strikeoutMath(runparams.inDeletedInset
-                        && (!LaTeXFeatures::isAvailable("dvipost")
-                               || (runparams.flavor != OutputParams::LATEX
-                                   && runparams.flavor != OutputParams::DVILUATEX)));
+       wi.strikeoutMath(runparams.inDeletedInset);
        if (runparams.inulemcmd) {
                wi.ulemCmd(WriteStream::UNDERLINE);
                if (runparams.local_font) {
index 8c0d73e8c037e0de9b5dc06132d14e53cfc8347c..0972599057b0c487fdf24540f058ba1ab73b42c1 100644 (file)
@@ -4076,7 +4076,6 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                os << "\n\\change_deleted ";
                        os << author.bufferId() << ' ' << ptime << '\n';
                        parse_text_snippet(p, os, FLAG_ITEM, outer, context);
-                       bool dvipost    = LaTeXPackages::isAvailable("dvipost");
                        bool xcolorulem = LaTeXPackages::isAvailable("ulem") &&
                                          LaTeXPackages::isAvailable("xcolor");
                        // No need to test for luatex, since luatex comes in
@@ -4089,9 +4088,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                        preamble.registerAutomaticallyLoadedPackage("pdfcolmk");
                                }
                        } else {
-                               if (dvipost) {
-                                       preamble.registerAutomaticallyLoadedPackage("dvipost");
-                               } else if (xcolorulem) {
+                               if (xcolorulem) {
                                        preamble.registerAutomaticallyLoadedPackage("ulem");
                                        preamble.registerAutomaticallyLoadedPackage("xcolor");
                                }