Remove trailing whitespace; fix minor warnings

This commit is contained in:
Paul van Tilburg 2019-03-30 20:23:07 +01:00
parent 11cd5be441
commit 15727a2f92
1 changed files with 14 additions and 14 deletions

View File

@ -13,19 +13,19 @@
# the result of the LaTeX compilation and forces it to reload every time
# rubberin has recompiled the LaTeX file.
#
# 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 the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WAR RANTY; without even the implied warranty of
# 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 the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WAR RANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this p rogram; if not, write to the Free Software Foundation, Inc.,
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this p rogram; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
require 'getoptlong'
@ -63,12 +63,12 @@ end
# Compile the input file using the right options based on the mode.
def compile(infile, mode)
mode_opt = {:pdf => "--pdf",
:ps => "--ps",
:ps => "--ps",
:pspdf => "--ps --pdf"}[mode]
params = ARGV.join(' ')
err_file = infile.with_extname('err')
ret = system "rubber --inplace #{mode_opt} #{params} #{infile} 2> #{err_file}"
_ret = system "rubber --inplace #{mode_opt} #{params} #{infile} 2> #{err_file}"
File.open(err_file) { |file| puts file.read }
# Remove the output save file if compile was succesful.
#clean(infile) if ret
@ -78,7 +78,7 @@ end
def view(infile, mode)
case mode
when :dvi
exec "xdvi.bin", "-watchfile", "1",
exec "xdvi.bin", "-watchfile", "1",
"-name", "xdvi", infile.with_extname('dvi').to_s
when :ps
exec "evince", infile.with_extname('ps').to_s