Skip to content

Instantly share code, notes, and snippets.

@peterlynch
Created November 6, 2016 12:00
Show Gist options
  • Save peterlynch/bacf208b864dc6112d291eab7a7ce5c6 to your computer and use it in GitHub Desktop.
Save peterlynch/bacf208b864dc6112d291eab7a7ce5c6 to your computer and use it in GitHub Desktop.
Homebrew dblatex.rb formulae for dblatex 0.3.9 patched suitable for building Sonatype Books
require 'formula'
# BEFORE INSTALLING THIS FORMULA:
# 1.) Install BasicTex from https://www.tug.org/mactex/
# 2.) Make yourself the owner of the tex installation directory:
# $ sudo chown -R "$(id -un):$(id -gn)" /usr/local/texlive
# 3.) Update tlmgr and install required packages
# $ tlmgr update --self
# $ tlmgr install appendix changebar footmisc multirow overpic stmaryrd subfigure titlesec wasysym
#
# SONATYPE BOOKS SPECIFIC
# $ tlmgr install symbol eepic rsfs helvetic courier
#
class Dblatex < Formula
env :userpaths
url 'http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-0.3.9/dblatex-0.3.9.tar.bz2'
homepage 'http://dblatex.sourceforge.net'
sha256 '06e039f841bc9f163555da2fdeeaba65e45fd4aa0d621c54ff9c7b990bfbb15d'
def install
system "python", "setup.py", "install", "--prefix=#{prefix}", "--install-scripts=#{bin}"
end
def patches
DATA
end
end
__END__
Author: BenoÓt Guillon <[email protected]>, Andreas Hoenen <[email protected]>
Description: patch for BTS report #840189:
Drop references to multirow package as superfluous and as crashing with
texlive-latex-extra >= 2016.20161008-1 (due to the change of the \@xmultirow
macro signature).
--- a/latex/style/dbk_table.sty
+++ b/latex/style/dbk_table.sty
@@ -9,7 +9,6 @@
\usepackage{longtable}
\usepackage{lscape}
\usepackage{colortbl}
-\usepackage{multirow}
\usepackage{calc}
\usepackage{hhline}
@@ -21,16 +20,6 @@
\expandafter[\expandafter3\expandafter]\expandafter{%
\multicolumn{#1}{#2}{#3}}
-% Make \@xmultirow long
-\expandafter\long\expandafter\def%
-\expandafter\@xmultirow%
-\expandafter#\expandafter1%
-\expandafter[\expandafter#\expandafter2\expandafter]%
-\expandafter#\expandafter3%
-\expandafter[\expandafter#\expandafter4\expandafter]%
-\expandafter#\expandafter5%
-\expandafter{\@xmultirow{#1}[#2]{#3}[#4]{#5}}
-
% For the newtbl code
\newdimen\newtblstarfactor%
\newdimen\newtblsparewidth%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment