summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/ctable
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-12-20 22:01:53 +0000
committerKarl Berry <karl@freefriends.org>2013-12-20 22:01:53 +0000
commit1bacfc6b28763adb12f6a9aadc573c6012a5c14c (patch)
treee1b4697057f209cd9afb03fe78505e67c84406ce /Master/texmf-dist/doc/latex/ctable
parent3a829135ea9d1afa97670c399f06685f842d6e61 (diff)
ctable (20dec13)
git-svn-id: svn://tug.org/texlive/trunk@32456 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/ctable')
-rw-r--r--Master/texmf-dist/doc/latex/ctable/01a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/01b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/02k1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/02l1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/02m1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/03a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/03b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/04a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/04b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/05a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/05b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/05c1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/06a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/06b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/07a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/07b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/08a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/08b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/09b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/10a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/10b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/12a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/12b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/13a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/13b1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/13c1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/14a1
-rw-r--r--Master/texmf-dist/doc/latex/ctable/README5
-rw-r--r--Master/texmf-dist/doc/latex/ctable/ctable.pdfbin823265 -> 830679 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ctable/doit106
-rwxr-xr-xMaster/texmf-dist/doc/latex/ctable/inst222
31 files changed, 144 insertions, 216 deletions
diff --git a/Master/texmf-dist/doc/latex/ctable/01a b/Master/texmf-dist/doc/latex/ctable/01a
index 20d45b2af8f..0e80db425ca 100644
--- a/Master/texmf-dist/doc/latex/ctable/01a
+++ b/Master/texmf-dist/doc/latex/ctable/01a
@@ -1,3 +1,2 @@
\ctable[caption = a table]{c}{
}{\FL Table's first row\LL}
-$Id: 01a,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/01b b/Master/texmf-dist/doc/latex/ctable/01b
index 7bc0415c6fb..798f9514130 100644
--- a/Master/texmf-dist/doc/latex/ctable/01b
+++ b/Master/texmf-dist/doc/latex/ctable/01b
@@ -9,4 +9,3 @@
]{H{.4}H{.6}}{}{\FL
\F{penguin}& \F{lion}\LL
}
-$Id: 01b,v 1.3 2009/12/18 16:49:34 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/02k b/Master/texmf-dist/doc/latex/ctable/02k
index 9485fed627c..056aba4b8b9 100644
--- a/Master/texmf-dist/doc/latex/ctable/02k
+++ b/Master/texmf-dist/doc/latex/ctable/02k
@@ -1,4 +1,3 @@
\ctable[
caption = Centered,
]{c}{}{\FL Table's first row\LL}
-$Id: 02k,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/02l b/Master/texmf-dist/doc/latex/ctable/02l
index 20392e5d819..33d9df6fe69 100644
--- a/Master/texmf-dist/doc/latex/ctable/02l
+++ b/Master/texmf-dist/doc/latex/ctable/02l
@@ -2,4 +2,3 @@
caption = Left,
left
]{c}{}{\FL Table's first row\LL}
-$Id: 02l,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/02m b/Master/texmf-dist/doc/latex/ctable/02m
index e5636888b9a..d5beb91b4d6 100644
--- a/Master/texmf-dist/doc/latex/ctable/02m
+++ b/Master/texmf-dist/doc/latex/ctable/02m
@@ -2,4 +2,3 @@
caption = Right,
right
]{c}{}{\FL Table's first row\LL}
-$Id: 02m,v 1.2 2011-04-15 20:23:33 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/03a b/Master/texmf-dist/doc/latex/ctable/03a
index cd9b62bc128..4b3fb783405 100644
--- a/Master/texmf-dist/doc/latex/ctable/03a
+++ b/Master/texmf-dist/doc/latex/ctable/03a
@@ -1,4 +1,3 @@
\ctable[
caption = Caption,
]{c}{}{\FL Table's first row\LL}
-$Id: 03a,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/03b b/Master/texmf-dist/doc/latex/ctable/03b
index a30589c35bb..f374419a3fb 100644
--- a/Master/texmf-dist/doc/latex/ctable/03b
+++ b/Master/texmf-dist/doc/latex/ctable/03b
@@ -2,4 +2,3 @@
caption = Caption,
captionskip = 1ex,
]{c}{}{\FL Table's first row\LL}
-$Id: 03b,v 1.2 2007-08-13 11:02:10 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/04a b/Master/texmf-dist/doc/latex/ctable/04a
index ff469bf90a8..08cdac9a4ad 100644
--- a/Master/texmf-dist/doc/latex/ctable/04a
+++ b/Master/texmf-dist/doc/latex/ctable/04a
@@ -2,4 +2,3 @@
caption = Caption,
botcap
]{c}{}{\FL Table's first row\LL}
-$Id: 04a,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/04b b/Master/texmf-dist/doc/latex/ctable/04b
index 504df015245..13139d781b7 100644
--- a/Master/texmf-dist/doc/latex/ctable/04b
+++ b/Master/texmf-dist/doc/latex/ctable/04b
@@ -3,4 +3,3 @@
captionskip = -2ex,
botcap
]{c}{}{\FL Table's first row\LL}
-$Id: 04b,v 1.2 2007-08-13 11:02:10 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/05a b/Master/texmf-dist/doc/latex/ctable/05a
index e246b4a53f5..525352a3d1f 100644
--- a/Master/texmf-dist/doc/latex/ctable/05a
+++ b/Master/texmf-dist/doc/latex/ctable/05a
@@ -1,4 +1,3 @@
\ctable[
caption = a lengthy caption
]{c}{}{\FL row1\LL}
-$Id: 05a,v 1.2 2007-08-18 12:10:22 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/05b b/Master/texmf-dist/doc/latex/ctable/05b
index 5607169e239..9d39045b5f2 100644
--- a/Master/texmf-dist/doc/latex/ctable/05b
+++ b/Master/texmf-dist/doc/latex/ctable/05b
@@ -3,4 +3,3 @@
caption = a lengthy caption
]{c}{\tnote{this is a footnote}}
{\FL row1\tmark\LL}
-$Id: 05b,v 1.4 2011-04-15 20:33:54 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/05c b/Master/texmf-dist/doc/latex/ctable/05c
index 41bcf0f6864..494bd3593a7 100644
--- a/Master/texmf-dist/doc/latex/ctable/05c
+++ b/Master/texmf-dist/doc/latex/ctable/05c
@@ -4,4 +4,3 @@
caption = a lengthy caption
]{c}{\tnote{footnote}}
{\FL row1\tmark\LL}
-$Id: 05c,v 1.1 2012/05/28 12:54:25 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/06a b/Master/texmf-dist/doc/latex/ctable/06a
index fcc6c0459fd..53b78d2a755 100644
--- a/Master/texmf-dist/doc/latex/ctable/06a
+++ b/Master/texmf-dist/doc/latex/ctable/06a
@@ -1,4 +1,3 @@
\ctable[framerule=.1pt, maxwidth=3cm
]{lX}{}{\FL 1 & first row\LL}
-$Id: 06a,v 1.2 2011-08-24 14:03:08 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/06b b/Master/texmf-dist/doc/latex/ctable/06b
index 44697a9180f..e3332284015 100644
--- a/Master/texmf-dist/doc/latex/ctable/06b
+++ b/Master/texmf-dist/doc/latex/ctable/06b
@@ -1,4 +1,3 @@
\ctable[framerule=.1pt, maxwidth=3cm
]{lX}{}{\FL 1 & test\LL}
-$Id: 06b,v 1.2 2011-08-24 14:03:14 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/07a b/Master/texmf-dist/doc/latex/ctable/07a
index f67b87975eb..d0e5e9d9ca9 100644
--- a/Master/texmf-dist/doc/latex/ctable/07a
+++ b/Master/texmf-dist/doc/latex/ctable/07a
@@ -3,4 +3,3 @@
\tnote[b]{Second footnote}
}{\FL Table's\tmark\ first\tmark[b]\ row\LL}
-$Id: 07a,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/07b b/Master/texmf-dist/doc/latex/ctable/07b
index 62fea0b8e53..4adcd368459 100644
--- a/Master/texmf-dist/doc/latex/ctable/07b
+++ b/Master/texmf-dist/doc/latex/ctable/07b
@@ -3,4 +3,3 @@
\tnote[b.]{Second footnote}
}{\FL Table's\tmark\ first\tmark[b]\ row\LL}
-$Id: 07b,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/08a b/Master/texmf-dist/doc/latex/ctable/08a
index 408b966d0c5..e79af4a90f8 100644
--- a/Master/texmf-dist/doc/latex/ctable/08a
+++ b/Master/texmf-dist/doc/latex/ctable/08a
@@ -1,4 +1,3 @@
\ctable[
caption = Frame,
]{c}{}{\FL Table's first row\LL}
-$Id: 08a,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/08b b/Master/texmf-dist/doc/latex/ctable/08b
index 4520e1d5d6a..10e78f42d09 100644
--- a/Master/texmf-dist/doc/latex/ctable/08b
+++ b/Master/texmf-dist/doc/latex/ctable/08b
@@ -3,4 +3,3 @@
framerule = 2pt,
framefg = .8 0 0
]{c}{}{\FL Table's first row\LL}
-$Id: 08b,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/09b b/Master/texmf-dist/doc/latex/ctable/09b
index 0ea2cc41f90..80270e12ea8 100644
--- a/Master/texmf-dist/doc/latex/ctable/09b
+++ b/Master/texmf-dist/doc/latex/ctable/09b
@@ -5,4 +5,3 @@
framesep=10pt
]{c}{}{\FL Table's first row\LL}
-$Id: 09b,v 1.1 2007/07/22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/10a b/Master/texmf-dist/doc/latex/ctable/10a
index 81b41c0c7f0..e9b244cb77a 100644
--- a/Master/texmf-dist/doc/latex/ctable/10a
+++ b/Master/texmf-dist/doc/latex/ctable/10a
@@ -3,4 +3,3 @@
framebg = 1 1 0,
framesep=10pt
]{c}{}{\FL Table's first row\LL}
-$Id: 10a,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/10b b/Master/texmf-dist/doc/latex/ctable/10b
index e097ba1bc53..386b009a938 100644
--- a/Master/texmf-dist/doc/latex/ctable/10b
+++ b/Master/texmf-dist/doc/latex/ctable/10b
@@ -6,4 +6,3 @@
framefg = 1 0 0,
framesep=10pt
]{c}{}{\FL Table's first row\LL}
-$Id: 10b,v 1.1 2007-07-22 15:30:56 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/12a b/Master/texmf-dist/doc/latex/ctable/12a
index 0e52e8d8707..5ea66010736 100644
--- a/Master/texmf-dist/doc/latex/ctable/12a
+++ b/Master/texmf-dist/doc/latex/ctable/12a
@@ -5,4 +5,3 @@
}{\FL Table's\tmark\ first\tmark[b]\ row
with footnotes\tmark[c]\LL}
-$Id: 12a,v 1.2 2008-04-12 15:33:16 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/12b b/Master/texmf-dist/doc/latex/ctable/12b
index 5c18fa1d18d..a1e2fd49a52 100644
--- a/Master/texmf-dist/doc/latex/ctable/12b
+++ b/Master/texmf-dist/doc/latex/ctable/12b
@@ -9,4 +9,3 @@
}{\FL Table's\tmark\ first\tmark[b]\ row
with footnotes\tmark[c]\LL}
-$Id: 12b,v 1.3 2010-06-26 21:09:14 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/13a b/Master/texmf-dist/doc/latex/ctable/13a
index c4cf1ced46d..accb3b37bb5 100644
--- a/Master/texmf-dist/doc/latex/ctable/13a
+++ b/Master/texmf-dist/doc/latex/ctable/13a
@@ -2,4 +2,3 @@
caption = Caption,
mincapwidth = 50mm,
]{c}{}{\FL Table's first row\LL}
-$Id: 13a,v 1.1 2008-04-30 13:13:16 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/13b b/Master/texmf-dist/doc/latex/ctable/13b
index f216518e0a2..d57b0659cb1 100644
--- a/Master/texmf-dist/doc/latex/ctable/13b
+++ b/Master/texmf-dist/doc/latex/ctable/13b
@@ -4,4 +4,3 @@
mincapwidth = 50mm,
continued
]{c}{}{\FL Table's first row\LL}
-$Id: 13b,v 1.1 2008-04-30 13:13:16 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/13c b/Master/texmf-dist/doc/latex/ctable/13c
index 36e65931433..71feba3cb64 100644
--- a/Master/texmf-dist/doc/latex/ctable/13c
+++ b/Master/texmf-dist/doc/latex/ctable/13c
@@ -4,4 +4,3 @@
mincapwidth = 50mm,
continued = \textit{(contd)}
]{c}{}{\FL Table's first row\LL}
-$Id: 13c,v 1.1 2008-04-30 13:13:16 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/14a b/Master/texmf-dist/doc/latex/ctable/14a
index 10febdbe5d3..15745b30c9e 100644
--- a/Master/texmf-dist/doc/latex/ctable/14a
+++ b/Master/texmf-dist/doc/latex/ctable/14a
@@ -6,4 +6,3 @@
set at script size \LL
}
-$Id: 14a,v 1.1 2011-08-24 14:02:37 wybo Exp $
diff --git a/Master/texmf-dist/doc/latex/ctable/README b/Master/texmf-dist/doc/latex/ctable/README
index c59511fcb35..8c1e4ff5b74 100644
--- a/Master/texmf-dist/doc/latex/ctable/README
+++ b/Master/texmf-dist/doc/latex/ctable/README
@@ -16,5 +16,6 @@ offering a route for future extensions.
Installation:
Execute the inst script with the --help option for more information.
-Changes in version 1.26:
- footerwidth option was inactive when notespar option was active
+Changes in version 1.27:
+ label option did not work with side caption
+ disable transparency with warning if tikz package loaded
diff --git a/Master/texmf-dist/doc/latex/ctable/ctable.pdf b/Master/texmf-dist/doc/latex/ctable/ctable.pdf
index 6feca72a6be..0be3b373c3a 100644
--- a/Master/texmf-dist/doc/latex/ctable/ctable.pdf
+++ b/Master/texmf-dist/doc/latex/ctable/ctable.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/ctable/doit b/Master/texmf-dist/doc/latex/ctable/doit
index 341824cb629..ddf387dcf65 100644
--- a/Master/texmf-dist/doc/latex/ctable/doit
+++ b/Master/texmf-dist/doc/latex/ctable/doit
@@ -1,6 +1,4 @@
-#!/usr/bin/env ruby
-require 'erb'
-require 'scriptingutils'
+#!/bin/bash
# doit - make all or some example picture sets.
@@ -12,73 +10,41 @@ require 'scriptingutils'
# for each nn[a-z] two pdfs are generated:
# nn[a-z].pdf for the ctable picture
# and snn[a-z].pdf for the source code verbatim.
-# The number of digits (nn) is set with DIGS
# The prefix (s) for source verbatims and (empty) for result files is set by PRE
# Windows users should replace NULL with perhaps "c:/temp/null"
+set=${1:-[0-9][0-9][a-z]}
+for j in $set; do
+ # source verbatim
+ { cat <<-'EOD'
+ \documentclass{article}
+ \usepackage[a4paper,margin=20mm,noheadfoot]{geometry}
+ \pagestyle{empty}
+ \begin{document}\ttfamily
+ \fontsize{10}{12 pt}\selectfont
+ \begin{verbatim}
+ EOD
+ grep -v "remove from source" $j
+ cat <<-'EOD'
+ \end{verbatim}
+ \end{document}
+ EOD
+ } >s$j.tex
- DIGS = 2
- ALL = Dir["[0-9]"*DIGS+"[a-z]"].sort
- PRE = ['s','']
-
-# clean up directory
-# all = false: keep pdf's
-# all = true: remove pdf's, too
-def clean(all=false)
- ALL.map{|x| PRE.map{|y| y+x }}.flatten.each do |f|
- exts = %w{aux tex log chk fls out}
- exts << 'pdf' if all
- exts.each do |e|
- fe = "#{f}.#{e}"
- File.delete(fe) if File.exist?(fe)
- end
- end
- exit(0)
-end
-
-@quiet = false
-def handle_options
- ARGV.options do |opt|
- opt.banner = "Create example images\n"
- opt.banner << "No arguments: create them all\n"
- opt.banner << "Example: ./#{MYNAME} 03? # creates 03a.pdf, 03b.pdf, s03a.pdf, and s03b.pdf"
- opt.separator ""
- opt.on('-h','--help','print this help and exit') do puts opt.help; exit end
- opt.on("-c","--clean","Clean up, but keep pdf files") do clean end
- opt.on("-C","--Clean","Clean up, including pdf files") do clean(true) end
- opt.on("-q","--quiet","Be silent") do @quiet = true end
- opt.parse!
- end
-end
-init(nil,:handle_options)
-set = ARGV.empty? ? ALL : ARGV
-tex = DATA.readlines("\n\n") # tex[0] -> source verbatim, tex[1] -> result
-set.each do |j|
- puts j unless @quiet
- 0.upto(1) do |i|
- f = "#{PRE[i]}#{j}"
- open(f+'.tex','w') do |o| o.print ERB.new(tex[i]).result(binding) end
- sys("pdflatex --interaction=nonstopmode #{f}")
- sys("pdfcrop #{f}.pdf #{f}.pdf")
- end
-end
-# $Id: doit,v 1.9 2012/08/17 18:03:20 wybo Exp $
-__END__
-\documentclass{article}
-\usepackage[a4paper,margin=20mm,noheadfoot]{geometry}
-\pagestyle{empty}
-\begin{document}\ttfamily
-\fontsize{10}{12 pt}\selectfont
-\begin{verbatim}<%= open(j).readlines.delete_if {|x| x =~ /\$Id|remove for source/ }.join %>\end{verbatim}
-\end{document}
-
-\documentclass[twoside]{article}
-<% if j =~ /[k-z]$/ %>
-\usepackage[papersize={65mm,40mm},showframe,margin=1mm,noheadfoot]{geometry}
-<% end %>
-\usepackage{ctable}
-\usepackage{txfonts}
-\pagestyle{empty}
-\parindent0pt
-\begin{document}
-<%= open(j).readlines.delete_if {|x| x =~ /\$Id/ }.join %>
-\end{document}
+ pdflatex --interaction=nonstopmode s$j.tex >& /dev/null || die "error compiling s$j.tex"
+ pdfcrop s$j.pdf s$j.pdf >& /dev/null
+ # result
+ { echo '\documentclass[twoside]{article}'
+ [[ $j =~ [k-z] ]] && echo '\usepackage[papersize={65mm,40mm},showframe,margin=1mm,noheadfoot]{geometry}'
+ cat <<-'EOD'
+ \usepackage{ctable}
+ \usepackage{txfonts}
+ \pagestyle{empty}
+ \parindent0pt
+ \begin{document}
+ EOD
+ cat $j
+ echo '\end{document}'
+ } > $j.tex
+ pdflatex --interaction=nonstopmode $j.tex >& /dev/null || die "error compiling $j.tex"
+ pdfcrop $j.pdf $j.pdf >& /dev/null
+done
diff --git a/Master/texmf-dist/doc/latex/ctable/inst b/Master/texmf-dist/doc/latex/ctable/inst
index afdd96cd19b..968e73b1827 100755
--- a/Master/texmf-dist/doc/latex/ctable/inst
+++ b/Master/texmf-dist/doc/latex/ctable/inst
@@ -1,148 +1,137 @@
#!/bin/bash
-NAME=ctable
-LOCAL=`kpsewhich --expand-var '$TEXMFLOCAL'`/tex/latex/$NAME
+ NAME=ctable
+ DOCTYPE=package
+ EXT=sty
+ VERSION=`grep " v[0-9.]\+[a-z]\{,1\} $NAME $DOCTYPE" $NAME.dtx |sed 's/.* v\([0-9.]\+[a-z]\{,1\}\) .*/\1/' `
+EXECUTABLES=(zip getopt)
-# this script generates NAME's documentation into NAME.pdf
-# and then installs (unless the environment variable NOINSTALL is not empty)
-# NAME in TEXMFLOCAL
-# This is not a make-like process. If you changed any files, then first run
-# inst with the --Clean option, then run inst without options.
-
-function die {
+die() {
echo -e "$*"
exit 1
}
-function help {
+help() {
cat <<-EOD
- Usage: inst [option]
+ This is inst - install the $NAME LaTeX $DOCTYPE
Options:
- -h, --help Print this help
- -c, --clean Clean up, but keep $NAME.{sty,pdf} and README
- -C, --Clean Clean up all files that can be regenerated
- -z, --zip Create zip for CTAN (developer only)
+ -h, --help print this help
+ -c, --clean remove all files created by the installation, except the zip file
+ -z, --zip Create zip for CTAN (no install, developer only)
+
+ Without any options, inst installs $NAME in the first writable
+ TEXMFMAIN, TEXMFLOCAL or TEXMFHOME tree.
EOD
exit
}
-function clean {
- rm -f {$NAME,doc/*}.{aux,idx,ilg,chk,fls,ind,log,glo,gls,out,tex}
- rm -f doc/*.pdf
+setdir() { # create installation directory
+ for i in MAIN LOCAL HOME; do
+ TREE=$(kpsewhich --expand-var \$TEXMF$i)
+ test -w $TREE && break
+ TREE=
+ done
+ test "$TREE" = "" && die "Could not find a writable TeX tree"
+ INSTTEX=${TREE}/tex/latex/$NAME
+ INSTSRC=$TREE/source/latex/$NAME
+ INSTDOC=$TREE/doc/latex/$NAME
+ mkdir -p $INSTTEX || die could not create $INSTTEX
+ mkdir -p $INSTSRC || die could not create $INSTSRC
+ mkdir -p $INSTDOC || die could not create $INSTDOC
+}
+
+testexecs() { # test presence of executables
+ for i in ${EXECUTABLES[*]}; do
+ type $i &> /dev/null || die executable $i not found
+ done
+}
+
+readme() { # generate the README file
+sed -n '/^%<\*readme>/,/^%<\/readme>/p
+ /\\changes{v'$VERSION'}/,/^% }/p' $NAME.dtx |
+sed 's/^%//;s/\\\\$//
+ /<.readme>/d
+ /^ }/d
+ s/ \\changes.*/Changes in version '$VERSION':/
+ s/$\\Rightarrow\$/=>/g
+ s/\\textbackslash/\\/g
+ s/\\text\(sl\|it\){\([^}]\+\)}/\/\2\//g # \textsl{...} -> /.../
+ s/{\([^}]*\)}/\1/g # keep last, removes all {...}
+ ' >README
}
-function Clean {
+
+clean() { # clean but keep what goes in the zip
+ rm -f $NAME.{aux,fls,glo,gls,idx,ilg,ind,log,out,toc,$EXT}
+ rm -f doc/{$NAME.$EXT,*.{pdf,aux,log,out}}
+ rm -f doc/{s,}[0-9][0-9][a-z].*
+}
+
+Clean() {
clean
- rm -f {$NAME,doc/*}.{sty,cls,pdf} README
+ rm -f $NAME.pdf README
}
-function makeall {
+makeall() {
echo y |tex $NAME.ins >/dev/null
- ( # recompile example graphics if any is missing:
- cd doc
- ln -sf ../$NAME.sty || exit 1 # use the $NAME.sty version to be installed
- for i in [0-9][0-9]?; do
- if [ ! -f $i.pdf -o ! -f s$i.pdf ]; then
- echo Creating example graphics
- ./doit || exit 1
- ./doit -c
- break
- fi
- done
- rm $NAME.sty
- cd ..
-
- echo Creating documentation
- pdflatex --recorder --interaction=batchmode $NAME.dtx || die "`texlog_extract $NAME.log`"
- if [ -f $NAME.glo ]; then
- makeindex -q -s gglo.ist -o $NAME.gls $NAME.glo || echo makeindex-error
- fi
- if [ -f $NAME.idx ]; then
- makeindex -q -s gind.ist -o $NAME.ind $NAME.idx || exit 1
- fi
- pdflatex --recorder --interaction=nonstopmode $NAME.dtx > /dev/null || exit 1
-
- # set environment variable NOINSTALL to skip installation in your textree
- if [ "$NOINSTALL" = "" ]; then
- echo Installing $NAME.{dtx,sty,pdf}
- rm -rf $LOCAL
- mkdir -p $LOCAL
- cp $NAME.{dtx,sty,pdf} $LOCAL || exit 1
- fi
- sudo -i mktexlsr $LOCAL
- exit 0
- )
- if [ $? != 0 ]; then
- echo errors detected, see $NAME.log
- else
- echo $NAME successfully installed
- fi
- texlog_extract $NAME
+ # install any .ttf files
+ mkdir -p ~/.fonts
+ find doc -name '*.ttf' -exec cp {} ~/.fonts \;
+ fc-cache ~/.fonts
+
+ # create the README file
readme
-}
-function readme { # generate the README file
- sed -n "/^%<\*readme>/,/^%<\/readme>/p;/\\\\changes{v$version}/,/^% }/p" $NAME.dtx |
- sed "s/^%//;s/\\\\\\\\$//;/<.readme>/d;/^ }/d;s/ \\\\changes.*/Changes in version $version:/" >README
+ # compile all examples
+ cd doc
+ ln -sf ../$NAME.sty || exit 1 # use the version to be installed
+ for i in [0-9][0-9]?; do
+ if [ ! -f $i.pdf -o ! -f s$i.pdf ]; then
+ ./doit || exit 1
+ break
+ fi
+ done
+ cd ..
+ # make $NAME.pdf
+ pdflatex --recorder --interaction=batchmode $NAME.dtx >/dev/null ||
+ die "`texlog_extract $NAME.log`"
+ test -f $NAME.glo && makeindex -q -s gglo.ist -o $NAME.gls $NAME.glo
+ test -f $NAME.idx && makeindex -q -s gind.ist -o $NAME.ind $NAME.idx
+ pdflatex --interaction=batchmode $NAME.dtx > /dev/null
+ pdflatex --interaction=batchmode $NAME.dtx > /dev/null
}
+installall() {
+ # install and cleanup
+ echo installing in $TREE
-function mkzip {
- # is cvs up to date?
- cvs -Q status 2>&1 |grep Status:|grep -v Up-to-date
- if [ $? -eq 0 ]; then
- echo -n 'Still go on (y/N) '
- read yn
- if [[ ! $yn =~ ^[yY] ]]; then echo Quitting...; exit 1; fi
- fi
-
- # create sty and pdf if need so:
- NOINSTALL=true ./inst || echo die Problems creating sty and pdf files
-
- files=( $NAME/{README,inst} $NAME/$NAME.{dtx,ins,sty,pdf} $NAME/doc/{[0-9][0-9][a-z],doit,lion.png,penguin.jpg})
- cd ..
- for i in ${files[@]}; do
- test -e $i || die File $i does not exist
- done
- cd ctable
-
- # check for equal dates and warn if different:
- dateexp='[0-9][0-9][0-9][0-9]\/[0-9][0-9]\/[0-9][0-9]'
- versexp='[0-9]\+\.[0-9]\+[a-z]*'
- read packdate version cvsdate <<<`sed -n "
- s/.Id: .*\($dateexp\).*/\1/p
- s/.*\($dateexp\) v\($versexp\).*/\1 \2/p
- " $NAME.dtx`
- cat <<-EOD
- packagedate: $packdate
- version: $version
- cvs-date: $cvsdate
- EOD
+ rm -rf $INSTTEX/* $INSTSRC/* $INSTDOC/*
+ cp -f $NAME.$EXT $INSTTEX
+ cp -a $NAME.{ins,dtx} $INSTSRC
+ cp -a README inst $NAME.pdf $INSTDOC
+ mktexlsr $TREE 2>/dev/null
+ clean
+}
- # normally packdate and cvsdate are equal, because I make the zip right after updating CVS:
- if [ $packdate != $cvsdate ]; then
- echo package and cvs dates differ
- echo -n 'Still go on (y/N) '
- read yn
- if [[ ! $yn =~ ^[yY] ]]; then echo Quitting...; exit 1; fi
- fi
-
- # make the zip
+mkzip() {
+ clean
cd ..
- zip=$NAME-$version.zip
- zip -Dqr $NAME/$zip ${files[@]}
- echo " created: $zip"
-
+ zipfile=$NAME/$NAME-$VERSION.zip
+ rm -f $zipfile
+ zip -Drq $zipfile $NAME/* -x $NAME/test/*
+ cd $NAME
+ Clean
}
-version=`grep " v[0-9.]\+ $NAME package" $NAME.dtx |sed 's/.* v\([0-9.]\+\) .*/\1/' `
-if ! options=$(getopt -o hcCz \
- -l help,clean,Clean,zip -- "$@"); then exit 1; fi
+testexecs
+setdir
+
+if ! options=$(getopt -o hcz \
+ -l help,clean,zip -- "$@"); then exit 1; fi
eval set -- "$options"
while [ $# -gt 0 ]; do
case $1 in
- -c|--clean) clean; exit;;
- -C|--Clean) Clean; exit;;
+ -c|--clean) Clean; exit;;
-z|--zip) makeall; mkzip; exit;;
-h|--help) help;;
(--) shift; break;;
@@ -150,8 +139,7 @@ while [ $# -gt 0 ]; do
esac
shift
done
+test "$1" = "" || die No arguments expected
makeall
-
-# $Id: inst,v 1.33 2013/06/14 21:12:34 wybo Exp $
-
+installall