Commit 933a6573 authored by Atsuhito Kohda's avatar Atsuhito Kohda

Imported Debian patch 0.3~svn741-1

parents 8f606086 e3f6d233
......@@ -48,7 +48,7 @@
<key>CFBundleIconFile</key>
<string>TeXworks.icns</string>
<key>CFBundleGetInfoString</key>
<string>TeXworks version 0.3 (r.1)&#xA;(c) 2007-2010 Jonathan Kew&#xA;Released under GPL v2.0</string>
<string>TeXworks version 0.3 (r.1)&#xA;(C) 2007-2011 Jonathan Kew, Stefan L&#xF6;ffler&#xA;Released under GPL v2.0</string>
<key>CFBundleExecutable</key>
<string>TeXworks</string>
<key>CFBundleIdentifier</key>
......
License
=======
TeXworks is copyright (c) 2007-09 by Jonathan Kew.
TeXworks is copyright (C) 2007-2011 by Jonathan Kew and Stefan Löffler.
Distributed under the terms of the GNU General Public License, version 2 or (at your option) any later version.
See the file COPYING for details.
......
......@@ -48,7 +48,7 @@
<key>CFBundleIconFile</key>
<string>TeXworks.icns</string>
<key>CFBundleGetInfoString</key>
<string>TeXworks version 0.3 (r.1)&#xA;(c) 2007-2010 Jonathan Kew&#xA;Released under GPL v2.0</string>
<string>TeXworks version 0.3 (r.1)&#xA;(C) 2007-2011 Jonathan Kew, Stefan L&#xF6;ffler&#xA;Released under GPL v2.0</string>
<key>CFBundleExecutable</key>
<string>TeXworks</string>
<key>CFBundleIdentifier</key>
......
......@@ -48,7 +48,7 @@
<key>CFBundleIconFile</key>
<string>TeXworks.icns</string>
<key>CFBundleGetInfoString</key>
<string>TeXworks version @VER@ (r.@REV@)&#xA;(c) 2007-2010 Jonathan Kew&#xA;Released under GPL v2.0</string>
<string>TeXworks version @VER@ (r.@REV@)&#xA;(C) 2007-2011 Jonathan Kew, Stefan L&#xF6;ffler&#xA;Released under GPL v2.0</string>
<key>CFBundleExecutable</key>
<string>TeXworks</string>
<key>CFBundleIdentifier</key>
......
# This is part of TeXworks, an environment for working with TeX documents
# Copyright (C) 2007-09 Jonathan Kew
# Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -163,7 +163,9 @@ HEADERS += src/TWApp.h \
src/TWVersion.h \
src/SvnRev.h \
src/synctex_parser.h \
src/synctex_parser_utils.h
src/synctex_parser_utils.h \
src/ConfigurableApp.h \
src/TWSystemCmd.h
FORMS += src/TeXDocument.ui \
src/PDFDocument.ui \
......
......@@ -14,7 +14,4 @@ Stefan Löffler <st.loeffler@gmail.com> in texworks-0.1.0~svn335~jaunty1
and I modified them a bit for Debian, especially, texworks.xpm
was converted from texworks.png
2. I enabled to print PDF directly with a patch in
http://code.google.com/p/texworks/issues/detail?id=78
-- Atsuhito KOHDA <kohda@debian.org> Sun, 11 Oct 2009 15:25:52 +0900
texworks (0.3~svn741-1) unstable; urgency=low
* New Upstream Release. (Rev. 741)
* Removed printing support. Now it will offer to open the document
in the system's default viewer.
-- Atsuhito KOHDA <kohda@debian.org> Tue, 21 Dec 2010 21:17:41 +0900
texworks (0.3~svn671-2) unstable; urgency=low
* Uploaded to unstable.
......
?package(texworks):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
title="texworks" command="/usr/bin/texworks"
--- texworks-0.3/src/TWApp.cpp.orig 2010-02-22 13:19:33.000000000 +0900
+++ texworks-0.3/src/TWApp.cpp 2010-02-22 13:20:27.000000000 +0900
@@ -816,6 +816,8 @@
@@ -841,6 +841,8 @@
<< Engine("pdfLaTeX", "pdflatex" EXE, QStringList("$synctexoption") << "$fullname", true)
<< Engine("XeTeX", "xetex" EXE, QStringList("$synctexoption") << "$fullname", true)
<< Engine("XeLaTeX", "xelatex" EXE, QStringList("$synctexoption") << "$fullname", true)
......
--- texworks-0.3~svn569.orig/TeXworks.pro
+++ texworks-0.3~svn569/TeXworks.pro
@@ -31,7 +31,7 @@
# packagers should override this to identify the source of the particular TeXworks build;
# avoid spaces or other chars that would need quoting on the command line
-QMAKE_CXXFLAGS += -DTW_BUILD_ID=personal
+QMAKE_CXXFLAGS += -DTW_BUILD_ID=Debian
# comment this out if poppler's xpdf headers are not available on the build system
QMAKE_CXXFLAGS += -DHAVE_POPPLER_XPDF_HEADERS
@@ -95,8 +95,8 @@
# Enclose the path in \\\" (which later gets expanded to \", which in turn
......
--- texworks-0.0.1~svn337.orig/src/TeXDocument.h
+++ texworks-0.0.1~svn337/src/TeXDocument.h
@@ -133,6 +133,7 @@
@@ -135,6 +135,7 @@
public slots:
void typeset();
void interrupt();
......@@ -291,7 +291,7 @@
connect(actionRemove_Aux_Files, SIGNAL(triggered()), this, SLOT(removeAuxFiles()));
@@ -2844,3 +2847,26 @@
@@ -2907,3 +2910,26 @@
pdfDoc = NULL;
}
}
......@@ -329,18 +329,12 @@
</rect>
</property>
<widget class="QMenu" name="menuHelp">
@@ -43,6 +43,7 @@
<addaction name="actionNew_from_Template"/>
<addaction name="actionOpen"/>
<addaction name="actionOpen_Recent"/>
+ <addaction name="actionPrintPDF"/>
<addaction name="separator"/>
<addaction name="actionClose"/>
<addaction name="separator"/>
@@ -729,6 +730,18 @@
<enum>QAction::NoRole</enum>
@@ -736,6 +736,18 @@
</property>
</action>
<property name="shortcut">
<string>Ctrl+P</string>
+ </property>
+ </action>
+ <action name="actionPrintPDF">
+ <property name="icon">
+ <iconset resource="../res/resources.qrc">
......@@ -351,14 +345,12 @@
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+P</string>
+ </property>
+ </action>
</property>
</action>
</widget>
<resources>
<include location="../res/resources.qrc"/>
--- texworks-0.0.1~svn337.orig/src/PDFDocument.h
+++ texworks-0.0.1~svn337/src/PDFDocument.h
@@ -251,6 +251,7 @@
@@ -252,6 +252,7 @@
public slots:
void texClosed(QObject *obj);
void reload();
......
#!/bin/sh
# postinst script for texworks
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# postrm script for texworks
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# preinst script for texworks
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
#!/bin/sh
# prerm script for texworks
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
......@@ -17,12 +17,12 @@ configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
patch -p1 < ./debian/patch-print
uudecode debian/document-print.png.enc
mv document-print.png res/tango/
# patch -p1 < ./debian/patch-print
# uudecode debian/document-print.png.enc
# mv document-print.png res/tango/
patch -p1 < ./debian/patch-plugin
patch -p1 < ./debian/patch-luatex
qmake-qt4
# qmake-qt4
touch configure-stamp
......@@ -33,11 +33,11 @@ build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
$(MAKE)
# Lua plugin
cd $(PLIDIR) && qmake-qt4 -after 'target.path = /usr/lib/texworks' && $(MAKE)
# Python plugin
cd $(PLIPYT) && qmake-qt4 -after 'target.path = /usr/lib/texworks' && $(MAKE)
qmake-qt4 && $(MAKE)
#docbook-to-man debian/texworks.sgml > texworks.1
touch $@
......@@ -65,10 +65,10 @@ clean:
if [ -d $(PLIPYT)/rcc ]; then rmdir $(PLIPYT)/rcc; fi
if [ -d $(PLIPYT)/ui ]; then rmdir $(PLIPYT)/ui; fi
patch -NRp1 < ./debian/patch-luatex || true
patch -NRp1 < ./debian/patch-print || true
# patch -NRp1 < ./debian/patch-print || true
patch -NRp1 < ./debian/patch-plugin || true
rm -f document-print.png res/tango/document-print.png
# rm -f document-print.png res/tango/document-print.png
rm -f $(PLIDIR)/libTWLuaPlugin.so $(PLIDIR)/Makefile
rm -f $(PLIPYT)/libTWPythonPlugin.so $(PLIPYT)/Makefile
......
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-09 Stefan Löffler & Jonathan Kew
Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -88,7 +88,7 @@ bool LuaScript::execute(TWScriptAPI *tw) const
}
/*static*/
int LuaScript::pushQObject(lua_State * L, QObject * obj, const bool throwError /*= true*/)
int LuaScript::pushQObject(lua_State * L, QObject * obj, const bool throwError /* = true */)
{
Q_UNUSED(throwError)
......@@ -122,7 +122,7 @@ int LuaScript::pushQObject(lua_State * L, QObject * obj, const bool throwError /
}
/*static*/
int LuaScript::pushVariant(lua_State * L, const QVariant & v, const bool throwError /*= true*/)
int LuaScript::pushVariant(lua_State * L, const QVariant & v, const bool throwError /* = true */)
{
int i;
QVariantList::const_iterator iList;
......@@ -317,7 +317,7 @@ int LuaScript::setProperty(lua_State * L)
}
/*static*/
QVariant LuaScript::getLuaStackValue(lua_State * L, int idx, const bool throwError /*= true*/)
QVariant LuaScript::getLuaStackValue(lua_State * L, int idx, const bool throwError /* = true */)
{
bool isArray = true, isMap = true, isQObject = false;
QVariantList vl;
......
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-09 Stefan Löffler & Jonathan Kew
Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
# This is part of TeXworks, an environment for working with TeX documents
# Copyright (C) 2007-09 Stefan Löffler and Jonathan Kew
# Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -63,7 +63,9 @@ win32 { # paths here are specific to my setup
# Input
HEADERS += TWLuaPlugin.h \
../../src/TWScript.h \
../../src/TWScriptAPI.h
../../src/TWScriptAPI.h \
../../src/ConfigurableApp.h \
../../src/TWSystemCmd.h
SOURCES += TWLuaPlugin.cpp \
../../src/TWScript.cpp \
......
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-09 Stefan Löffler & Jonathan Kew
Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
/*
This is part of TeXworks, an environment for working with TeX documents
Copyright (C) 2007-09 Stefan Löffler & Jonathan Kew
Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -89,7 +89,7 @@ public:
*
* Does nothing
*/
PythonScript(TWScriptLanguageInterface *interface, const QString& fileName)
PythonScript(TWPythonPlugin * interface, const QString& fileName)
: TWScript(interface, fileName) { }
/** \brief Parse the script header
......
# This is part of TeXworks, an environment for working with TeX documents
# Copyright (C) 2007-09 Stefan Löffler and Jonathan Kew
# Copyright (C) 2007-2011 Jonathan Kew, Stefan Löffler
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -71,7 +71,9 @@ win32 { # paths here are specific to my setup
# Input
HEADERS += TWPythonPlugin.h \
../../src/TWScript.h \
../../src/TWScriptAPI.h
../../src/TWScriptAPI.h \
../../src/ConfigurableApp.h \
../../src/TWSystemCmd.h
SOURCES += TWPythonPlugin.cpp \
../../src/TWScript.cpp \
......
......@@ -22,7 +22,7 @@ BEGIN
VALUE "FileDescription", "TeXworks editor & previewer"
VALUE "FileVersion", TEXWORKS_VERSION ".r" SVN_REVISION_STR
VALUE "InternalName", "TeXworks"
VALUE "LegalCopyright", "Copyright (c) 2007-2009 Jonathan Kew"
VALUE "LegalCopyright", "Copyright (C) 2007-2011 Jonathan Kew, Stefan Lffler"
VALUE "OriginalFilename", "TeXworks.exe"
VALUE "ProductName", "TeXworks"
VALUE "ProductVersion", "TeXworks " TEXWORKS_VERSION
......
......@@ -27,16 +27,22 @@
<file>resfiles/templates/More LaTeX classes/KOMA-letter.tex</file>
<file>resfiles/templates/More LaTeX classes/memoir.tex</file>
<file>resfiles/templates/XeLaTeX documents/article-fontspec.tex</file>
<file>resfiles/translations/qt_ar.qm</file>
<file>resfiles/translations/qt_de.qm</file>
<file>resfiles/translations/qt_es.qm</file>
<file>resfiles/translations/qt_fr.qm</file>
<file>resfiles/translations/qt_ja.qm</file>
<file>resfiles/translations/qt_ko.qm</file>
<file>resfiles/translations/qt_nl.qm</file>
<file>resfiles/translations/qt_pl.qm</file>
<file>resfiles/translations/qt_ru.qm</file>
<file>resfiles/translations/qt_zh_CN.qm</file>
<file alias="resfiles/translations/qt_ar.qm">../trans/qt/qt_ar.qm</file>
<file alias="resfiles/translations/qt_ca.qm">../trans/qt/qt_ca.qm</file>
<file alias="resfiles/translations/qt_cs.qm">../trans/qt/qt_cs.qm</file>
<file alias="resfiles/translations/qt_de.qm">../trans/qt/qt_de.qm</file>
<file alias="resfiles/translations/qt_es.qm">../trans/qt/qt_es.qm</file>
<file alias="resfiles/translations/qt_fr.qm">../trans/qt/qt_fr.qm</file>
<file alias="resfiles/translations/qt_it.qm">../trans/qt/qt_it.qm</file>
<file alias="resfiles/translations/qt_ja.qm">../trans/qt/qt_ja.qm</file>
<file alias="resfiles/translations/qt_ko.qm">../trans/qt/qt_ko.qm</file>
<file alias="resfiles/translations/qt_nl.qm">../trans/qt/qt_nl.qm</file>
<file alias="resfiles/translations/qt_pl.qm">../trans/qt/qt_pl.qm</file>
<file alias="resfiles/translations/qt_pt_BR.qm">../trans/qt/qt_pt_BR.qm</file>
<file alias="resfiles/translations/qt_ru.qm">../trans/qt/qt_ru.qm</file>
<file alias="resfiles/translations/qt_sl.qm">../trans/qt/qt_sl.qm</file>
<file alias="resfiles/translations/qt_tr.qm">../trans/qt/qt_tr.qm</file>
<file alias="resfiles/translations/qt_zh_CN.qm">../trans/qt/qt_zh_CN.qm</file>
<file alias="resfiles/translations/TeXworks_af.qm">../trans/TeXworks_af.qm</file>
<file alias="resfiles/translations/TeXworks_ar.qm">../trans/TeXworks_ar.qm</file>
<file alias="resfiles/translations/TeXworks_ca.qm">../trans/TeXworks_ca.qm</file>
......
......@@ -33,7 +33,6 @@ bf:=\textbf{#INS#}
bfd:=\bfseries
bfig:=\begin{figure}#RET##INS##RET#\end{figure}•
bfigo:=\begin{figure}[#INS#]#RET#•#RET#\end{figure}•
bmult:=\begin{multline}#RET##INS##RET#\end{multline}•
bflalig:=\begin{flalign}#RET##INS##RET#\end{flalign}•
bflaligs:=\begin{flalign*}#RET##INS##RET#\end{flalign*}•
bfll:=\begin{flushleft}#RET##INS##RET#\end{flushleft}•
......@@ -100,7 +99,6 @@ dxio:=\(\iota\)
dxl:=\(\lambda\)
dxcl:=\(\Lambda\)
dxm:=\(\mu\)
dxm:=\(\mu\)
dxn:=\(\nu\)
dxo:=\(\omega\)
dxco:=\(\Omega\)
......
......@@ -14,7 +14,9 @@
# The color fields <fgcolor> and <bgcolor> are either:
# *) a color name from the list defined in the SVG standard;
# see http://www.w3.org/TR/SVG/types.html#ColorKeywords
# *) a hexadecimal color value of the form #rrggbb
# *) a hexadecimal color value of the form #rrggbb; note that if this is used at
# the beginning of a line, a space " " must be added in front of it so the
# line is not interpreted as a comment (e.g., " #aabbcc" instead of "#aabbcc")
#
# The <fontflags> field is a combination of the letters
# B (bold)
......
......@@ -2,8 +2,8 @@
// Title: LaTeX errors
// Description: Looks for errors in the LaTeX terminal output
// Author: Jonathan Kew & Stefan Löffler
// Version: 0.3
// Date: 2010-01-09
// Version: 0.4
// Date: 2010-11-02
// Script-Type: hook
// Hook: AfterTypeset
......@@ -11,12 +11,25 @@
// Switching the engines to use the FILE:LINE-style error messages could help a lot.
parenRE = new RegExp("[()]");
newFileRE = new RegExp("^\\(([\\./][^ )]+)");
// Should catch filenames of the following forms:
// * ./abc, "./abc"
// * /abc, "/abc"
// * .\abc, ".\abc"
// * C:\abc, "C:\abc"
// * \\server\abc, "\\server\abc"
// Caveats: filenames with escaped " or space in the filename don't work (correctly)
newFileRE = new RegExp("^\\(\"?((?:\\./|/|.\\\\|[a-zA-Z]:\\\\|\\\\\\\\[^\\\" )]+\\\\)[^\" )]+)");
lineNumRE = new RegExp("^l\\.(\\d+)");
badLineRE = new RegExp("^(?:Over|Under)full \\\\hbox.*at lines (\\d+)");
warnLineRE = new RegExp("^(?:LaTeX|Package (?:.*)) Warning: .*");
warnLineNumRE = new RegExp("on input line (\\d+).");
result = [];
errors = [];
warnings = [];
infos = [];
function trim (zeichenkette) {
return zeichenkette.replace (/^\s+/, '').replace (/\s+$/, '');
}
// get the text from the standard console output
txt = TW.target.consoleOutput;
......@@ -40,13 +53,13 @@ for (i = 0; i < lines.length; ++i) {
error[1] = 0;
while (++i < lines.length) {
line = lines[i];
if(trim(line) == '') break;
matched = lineNumRE.exec(line);
if (matched) {
if (matched)
error[1] = matched[1];
break;
}
error[2] += "\n" + line;
}
result.push(error);
errors.push(error);
continue;
}
......@@ -57,7 +70,7 @@ for (i = 0; i < lines.length; ++i) {
error[0] = curFile;
error[1] = matched[1];
error[2] = line;
result.push(error);
infos.push(error);
continue;
}
......@@ -67,16 +80,17 @@ for (i = 0; i < lines.length; ++i) {
var error = [];
error[0] = curFile;
error[1] = "?";
matched = warnLineNumRE.exec(line);
if (matched)
error[1] = matched[1];
error[2] = "";
while (line != "" && i < lines.length) {
error[2] += line;
i++;
error[2] = line;
while (++i < lines.length) {
line = lines[i];
if(line == '') break;
error[2] += "\n" + line;
}
result.push(error);
matched = warnLineNumRE.exec(error[2].replace(/\n/, ""));
if (matched)
error[1] = matched[1];
warnings.push(error);
continue;
}
......@@ -113,7 +127,44 @@ for (i = 0; i < lines.length; ++i) {
}
}
function htmlize(str) {
var html = str;
html = html.replace(/&/g, "&amp;");
html = html.replace(/</g, "&lt;");
html = html.replace(/>/g, "&gt;");
html = html.replace(/\n /g, "\n&nbsp;");
html = html.replace(/ /g, "&nbsp;&nbsp;");
html = html.replace(/&nbsp; /g, "&nbsp;&nbsp;");
return html.replace(/\n/g, "<br />\n");
}
function makeResultRow(data, color) {
var html = '';
var url = 'texworks:' + data[0] + (data[1] != '?' && data[1] != 0 ? '#' + data[1] : '');
html += '<tr>';
html += '<td width="10" style="background-color: ' + color + '"></td>';
html += '<td valign="top"><a href="' + url + '">' + data[0] + '</a></td>';
html += '<td valign="top">' + data[1] + '</td>';
html += '<td valign="top" style="font-family: monospace;">' + htmlize(data[2]) + '</td>';
html += '</tr>';
return html;
}
// finally, return our result (if any)
if (result.length > 0) {
TW.result = result;
if (errors.length > 0 || warnings.length > 0 || infos.length > 0) {
html = '<html><body>';
html += '<table border="1" cellspacing="0" cellpadding="4">';
for(i = 0; i < errors.length; ++i)
html += makeResultRow(errors[i], 'red');
for(i = 0; i < warnings.length; ++i)
html += makeResultRow(warnings[i], 'yellow');
for(i = 0; i < infos.length; ++i)
html += makeResultRow(infos[i], '#8080ff');
html += "</table>";
html += "</body></html>";
TW.result = html;
}
undefined;
......@@ -7,4 +7,4 @@
// Script-Type: standalone
// Context: PDFDocument
TW.app.launchFile(TW.target.fileName);
TW.launchFile(TW.target.fileName);
......@@ -9,8 +9,11 @@
var cmd = TW.target.selection;
if (cmd != "") {
var result = TW.app.system(cmd);
if (result != null) {
TW.target.insertText(result);
var result = TW.system(cmd);
if (result.status == 0) {
TW.target.insertText(result.output);