[latexila] Remove support of Rubber
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Remove support of Rubber
- Date: Sat, 22 Dec 2012 13:20:53 +0000 (UTC)
commit 8135d9a99440aca553c837457beda8e1a314dac2
Author: SÃbastien Wilmet <swilmet gnome org>
Date: Sat Dec 22 14:12:51 2012 +0100
Remove support of Rubber
Latexmk is better, there is no reasons to use Rubber anymore.
README.in | 1 -
data/build_tools/build_tools.pot | 28 +++++++-------
data/build_tools/build_tools.xml | 26 --------------
help/C/build_tools.page | 43 ++--------------------
src/build_job_runner.vala | 4 --
src/build_tools.vala | 4 +--
src/post_processors.vala | 72 --------------------------------------
7 files changed, 19 insertions(+), 159 deletions(-)
---
diff --git a/README.in b/README.in
index 00e0fc5..8069edf 100644
--- a/README.in
+++ b/README.in
@@ -23,7 +23,6 @@ gettext
gsettings-desktop-schemas
enchant
Latexmk >= 4.31 (optional, but strongly recommended)
-Rubber (optional, Latexmk is better)
And for building the sources:
Vala >= @VALA_REQUIRED_VERSION@ (may be optional)
diff --git a/data/build_tools/build_tools.pot b/data/build_tools/build_tools.pot
index 0d728a8..124c407 100644
--- a/data/build_tools/build_tools.pot
+++ b/data/build_tools/build_tools.pot
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2012-09-04 00:42+0200\n"
+"POT-Creation-Date: 2012-12-22 13:59+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL ADDRESS>\n"
"Language-Team: LANGUAGE <LL li org>\n"
@@ -9,55 +9,55 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-#: build_tools.xml:45(tool/label)
+#: build_tools.xml:43(tool/label)
msgid "View PDF"
msgstr ""
-#: build_tools.xml:46(tool/description)
+#: build_tools.xml:44(tool/description)
msgid "View the PDF file"
msgstr ""
-#: build_tools.xml:51(tool/label)
+#: build_tools.xml:49(tool/label)
msgid "View DVI"
msgstr ""
-#: build_tools.xml:52(tool/description)
+#: build_tools.xml:50(tool/description)
msgid "View the DVI file"
msgstr ""
-#: build_tools.xml:57(tool/label)
+#: build_tools.xml:55(tool/label)
msgid "View PS"
msgstr ""
-#: build_tools.xml:58(tool/description)
+#: build_tools.xml:56(tool/description)
msgid "View the PostScript file"
msgstr ""
-#: build_tools.xml:92(tool/description)
+#: build_tools.xml:64(tool/description)
msgid "Create a PDF file from LaTeX sources with the \"pdflatex\" command"
msgstr ""
-#: build_tools.xml:98(tool/description)
+#: build_tools.xml:70(tool/description)
msgid "Create a DVI file from LaTeX sources with the \"latex\" command"
msgstr ""
-#: build_tools.xml:106(tool/description)
+#: build_tools.xml:78(tool/description)
msgid "Run BibTeX (bibliography)"
msgstr ""
-#: build_tools.xml:112(tool/description)
+#: build_tools.xml:84(tool/description)
msgid "Run MakeIndex"
msgstr ""
-#: build_tools.xml:120(tool/description)
+#: build_tools.xml:92(tool/description)
msgid "Convert the DVI document to the PDF format"
msgstr ""
-#: build_tools.xml:126(tool/description)
+#: build_tools.xml:98(tool/description)
msgid "Convert the DVI document to the PostScript format"
msgstr ""
-#: build_tools.xml:132(tool/description)
+#: build_tools.xml:104(tool/description)
msgid "Convert the PostScript document to the PDF format"
msgstr ""
diff --git a/data/build_tools/build_tools.xml b/data/build_tools/build_tools.xml
index c30488a..7271b30 100644
--- a/data/build_tools/build_tools.xml
+++ b/data/build_tools/build_tools.xml
@@ -57,32 +57,6 @@
<open>$shortname.ps</open>
</tool>
- <!-- Rubber -->
-
- <tool id="9" show="false" extensions=".tex" icon="compile_pdf">
- <label its:translate="no">LaTeX â PDF (Rubber)</label>
- <job postProcessor="rubber">
- rubber --maxerr -1 --short --force --warn all --pdf $filename
- </job>
- <open>$shortname.pdf</open>
- </tool>
-
- <tool id="10" show="false" extensions=".tex" icon="compile_dvi">
- <label its:translate="no">LaTeX â DVI (Rubber)</label>
- <job postProcessor="rubber">
- rubber --maxerr -1 --short --force --warn all $filename
- </job>
- <open>$shortname.dvi</open>
- </tool>
-
- <tool id="11" show="false" extensions=".tex" icon="compile_ps">
- <label its:translate="no">LaTeX â DVI â PS (Rubber)</label>
- <job postProcessor="rubber">
- rubber --maxerr -1 --short --force --warn all --ps $filename
- </job>
- <open>$shortname.ps</open>
- </tool>
-
<!-- latex, pdflatex -->
<tool id="12" show="false" extensions=".tex" icon="compile_pdf">
diff --git a/help/C/build_tools.page b/help/C/build_tools.page
index 1ce3d9a..4570542 100644
--- a/help/C/build_tools.page
+++ b/help/C/build_tools.page
@@ -20,7 +20,7 @@
<title>Introduction</title>
<p>Several different tools can be used for a document compilation. There are some
- low-level commands, and two higher-level tools: Latexmk and Rubber.</p>
+ low-level commands, and one higher-level tool: Latexmk.</p>
<table rules="rowgroups">
<title>Low-level commands</title>
@@ -75,41 +75,13 @@ $ latex document.tex
$ dvips -t a4 document.dvi
$ ps2pdf document.ps</screen>
- <p>Using a higher-level tool such as Latexmk or Rubber simplify a lot all this process,
- since only one command is required. Indeed, these tools can detect how many times the
+ <p>Using a higher-level tool such as Latexmk simplify a lot all this process,
+ since only one command is required. Indeed, Latexmk can detect how many times the
<cmd>latex</cmd> or <cmd>pdflatex</cmd> command must be called, and whether
<cmd>bibtex</cmd> or <cmd>makeindex</cmd> is required. By default, LaTeXila uses
Latexmk.</p>
</section>
-<section id="latexmk-rubber">
- <title>Differences Between Latexmk and Rubber</title>
- <p><link href="http://www.phys.psu.edu/~collins/software/latexmk-jcc/">Latexmk</link>
- and <link href="https://launchpad.net/rubber/">Rubber</link> have the same purpose:
- simplify the compilation process of a LaTeX document. Latexmk is written in Perl, while
- Rubber is written in Python.</p>
-
- <p>The output of Latexmk contains more information: which commands are executed, how
- many times, their output, and the reasons why Latexmk executes (or doesn't execute)
- these commands. The output of Rubber, on the other hand, doesn't contain a lot of
- information. When an error occurs, it can be more difficult to diagnose.</p>
-
- <p>Also, Rubber filter the output of the <cmd>latex</cmd> or <cmd>pdflatex</cmd>
- command. As a consequence, when Rubber prints an error, it's more difficult to know
- which type of error it is. If you use Latexmk, errors are categorized into three types:
- critical errors, simple warnings and bad boxes (for example when a word exceed the
- margin). With Rubber, there is no distinction between critical errors and simple
- warnings. See <link xref="#post-processors" /> for more information.</p>
-
- <p>Latexmk is more flexible. Each low-level command can be customized, for example for
- adding a parameter, or use a completely other tool. This can be done both from the
- command line and in configuration files (see the <cmd>-e</cmd> and <cmd>-r</cmd>
- options). Rubber is also configurable, but less than Latexmk.</p>
-
- <p>Last, but not least: Rubber seems to have more bugs and is less actively maintained
- than Latexmk.</p>
-</section>
-
<section id="execute">
<title>Execute a Build Tool</title>
@@ -171,7 +143,7 @@ $ ps2pdf document.ps</screen>
<section id="post-processors">
<title>Post Processors</title>
<p>The purpose of a post processor is to filter the command output and extract
- the useful information. Five post processors are available:</p>
+ the useful information. Four post processors are available:</p>
<terms>
<item>
@@ -194,13 +166,6 @@ $ ps2pdf document.ps</screen>
<p>Used for the <cmd>latexmk</cmd> command. Internally, this post processor uses
other ones: <em>latex</em> and <em>all-output</em>.</p>
</item>
- <item>
- <title its:translate="no">rubber</title>
- <p>This is the post-processor used for the <cmd>rubber</cmd> command. The errors are
- categorized into two types: bad boxes, and the others. So, unlike the <em>latex</em>
- post processor, there is no distinction between critical errors and simple
- warnings.</p>
- </item>
</terms>
</section>
</page>
diff --git a/src/build_job_runner.vala b/src/build_job_runner.vala
index a717107..259321c 100644
--- a/src/build_job_runner.vala
+++ b/src/build_job_runner.vala
@@ -182,10 +182,6 @@ public class BuildJobRunner : GLib.Object
_post_processor = new NoOutputPostProcessor ();
break;
- case PostProcessorType.RUBBER:
- _post_processor = new RubberPostProcessor ();
- break;
-
default:
warning ("Unknown post processor. Use no-output.");
_post_processor = new NoOutputPostProcessor ();
diff --git a/src/build_tools.vala b/src/build_tools.vala
index 26c1eba..a634a0b 100644
--- a/src/build_tools.vala
+++ b/src/build_tools.vala
@@ -25,7 +25,6 @@ public enum PostProcessorType
LATEX,
LATEXMK,
NO_OUTPUT,
- RUBBER,
N_POST_PROCESSORS
}
@@ -88,8 +87,7 @@ public abstract class BuildTools : GLib.Object
"all-output",
"latex",
"latexmk",
- "no-output",
- "rubber"
+ "no-output"
};
protected Gee.LinkedList<BuildTool?> _build_tools;
diff --git a/src/post_processors.vala b/src/post_processors.vala
index 7dff234..799cc8a 100644
--- a/src/post_processors.vala
+++ b/src/post_processors.vala
@@ -82,78 +82,6 @@ private class AllOutputPostProcessor : PostProcessor
}
}
-private class RubberPostProcessor : PostProcessor
-{
- private static Regex? _pattern = null;
-
- public RubberPostProcessor ()
- {
- if (_pattern != null)
- return;
-
- try
- {
- _pattern = new Regex (
- "(?P<file>[^:\n]+)(:(?P<line>[\\d\\-]+))?:(?P<text>.+)$",
- RegexCompileFlags.MULTILINE | RegexCompileFlags.OPTIMIZE);
- }
- catch (RegexError e)
- {
- warning ("RubberPostProcessor: %s", e.message);
- }
- }
-
- public override void process (File file, string output)
- {
- return_if_fail (_pattern != null);
-
- string parent_path = file.get_parent ().get_parse_name ();
-
- MatchInfo match_info;
- _pattern.match (output, 0, out match_info);
- while (match_info.matches ())
- {
- BuildMsg message = BuildMsg ();
- message.text = match_info.fetch_named ("text");
-
- // message type
- message.type = BuildMsgType.ERROR;
- if (message.text.contains ("Underfull") ||
- message.text.contains ("Overfull"))
- {
- message.type = BuildMsgType.BADBOX;
- }
-
- // line
- string? line = match_info.fetch_named ("line");
- if (line != null && 0 < line.length)
- {
- string[] parts = line.split ("-");
- message.start_line = int.parse (parts[0]);
- if (1 < parts.length && parts[1] != null && 0 < parts[1].length)
- message.end_line = int.parse (parts[1]);
- }
-
- // filename
- message.filename = match_info.fetch_named ("file");
- if (message.filename[0] != '/')
- message.filename = "%s/%s".printf (parent_path, message.filename);
-
- _all_messages.add (message);
-
- try
- {
- match_info.next ();
- }
- catch (RegexError e)
- {
- warning ("RubberPostProcessor: %s", e.message);
- break;
- }
- }
- }
-}
-
private class LatexmkPostProcessor : PostProcessor
{
private static Regex? _reg_rule = null;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]