\TestPackage{csquotes}
\TestPackage{drs}
\TestPackage[koi8-r.def]{cyrillic}
-\TestPackage{dvipost}
\TestPackage{endnotes}
\TestPackage{enotez}
\TestPackage{enumitem}
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:
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
#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
\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
\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"
\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
\family default
needs te\SpecialChar TeX
version 2 or newer.
+\change_unchanged
+
\end_layout
\begin_layout Subsection
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."));
}
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."));
}
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");
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
column++;
}
if (oldChange.type == Change::DELETED
- && !runparams.wasDisplayMath && !dvipost)
+ && !runparams.wasDisplayMath)
--runparams.inulemcmd;
}
macro_beg = from_ascii("\\lyxudisplayobjdeleted");
else {
macro_beg = from_ascii("\\lyxdeleted");
- if (!runparams.inDisplayMath && !dvipost)
+ if (!runparams.inDisplayMath)
++runparams.inulemcmd;
}
}
"%% 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"
"float",
"wrapfig",
"booktabs",
- "dvipost",
"fancybox",
"calc",
"units",
// 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)
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);
+ 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");
}
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) {
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
preamble.registerAutomaticallyLoadedPackage("pdfcolmk");
}
} else {
- if (dvipost) {
- preamble.registerAutomaticallyLoadedPackage("dvipost");
- } else if (xcolorulem) {
+ if (xcolorulem) {
preamble.registerAutomaticallyLoadedPackage("ulem");
preamble.registerAutomaticallyLoadedPackage("xcolor");
}