summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/shapepar
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-14 18:28:24 +0000
committerKarl Berry <karl@freefriends.org>2006-08-14 18:28:24 +0000
commitfcb73a12b6a02f56d67959c643719fc60f32af13 (patch)
tree11b59db0b864eb1a12f2a759f710632a31e6fad9 /Master/texmf-dist/doc/generic/shapepar
parent2c98b1075f43a6811e5264ad94ccd112d1219a6f (diff)
shapepar, to get examples in doc a la tetex (found by gerben)
git-svn-id: svn://tug.org/texlive/trunk@1957 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/shapepar')
-rw-r--r--Master/texmf-dist/doc/generic/shapepar/Canflagshape.def33
-rw-r--r--Master/texmf-dist/doc/generic/shapepar/TeXshape.def37
-rw-r--r--Master/texmf-dist/doc/generic/shapepar/candleshape.def37
-rw-r--r--Master/texmf-dist/doc/generic/shapepar/proshap.py350
-rw-r--r--Master/texmf-dist/doc/generic/shapepar/shapepar.dvibin41976 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/generic/shapepar/shapepar.pdfbin0 -> 198422 bytes
6 files changed, 457 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/shapepar/Canflagshape.def b/Master/texmf-dist/doc/generic/shapepar/Canflagshape.def
new file mode 100644
index 00000000000..114014b60cc
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/shapepar/Canflagshape.def
@@ -0,0 +1,33 @@
+\def\Canflagshape{%
+{32.0}
+{0}b{0}\\
+{0}t{0}{16}\\
+{32}t{0}{16}\\
+{32}e{0}\\
+%
+{2.800} b{32.000}\\
+{6.250} b{27.000} t{30.160}{3.680} b{37.000}\\
+{7.300} t{27.217}{1.654} t{29.600}{4.800} t{35.128}{1.654}\\
+{7.400} t{27.238}{1.812} j t{29.050}{5.900} j t{34.950}{1.812}\\
+{10.450} b{24.500} t{27.869}{8.262} b{39.500}\\
+{11.800} b{19.900} t{23.984}{1.768} t{28.148}{7.703} t{38.248}{1.768} b{44.100}\\
+{12.150} t{20.005}{2.651} t{23.850}{2.227} t{28.221}{7.559} t{37.923}{2.227} t{41.344}{2.651}\\
+{12.200} t{20.021}{3.029} j t{23.050}{3.073} t{28.231}{7.538} t{37.877}{3.073} j t{40.950}{3.029}\\
+{13.500} t{20.412}{6.917} t{28.500}{7.000} t{36.671}{6.917}\\
+{13.900} t{20.533}{7.167} j t{27.700}{8.600} j t{36.300}{7.167}\\
+{15.450} t{21.000}{22.000}\\
+{16.000} t{21.000}{22.000}\\
+{17.000} t{19.550}{24.900}\\
+{22.050} t{25.900}{12.200}\\
+{22.600} t{25.900}{12.200}\\
+{23.550} t{25.489}{5.961} s t{31.450}{1.100} s t{32.550}{5.961}\\
+{24.000} t{25.295}{2.980} t{31.600}{0.800} t{35.725}{2.980}\\
+{24.450} e{25.100} t{31.593}{0.815} e{38.900}\\
+{30.000} t{31.500}{1.000}\\
+{30.000} e{32.0}\\
+%
+{0}b{48}\\
+{0}t{48}{16}\\
+{32}t{48}{16}\\
+{32}e{48}
+}
diff --git a/Master/texmf-dist/doc/generic/shapepar/TeXshape.def b/Master/texmf-dist/doc/generic/shapepar/TeXshape.def
new file mode 100644
index 00000000000..bf98bb8970c
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/shapepar/TeXshape.def
@@ -0,0 +1,37 @@
+\def\TeXshape{%
+{3.8}%
+ {0}b{0}\\%
+ {0}t{-6.35}{7.03}\\%
+ {2.5}t{-6.35}{7.03}\\%
+ {2.5}t{-4.1}{2.58}\\%
+{10.11}t{-4.1}{2.58}\\%
+{10.11}e{-5}\\%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ {4.03}b{0}\\%
+ {4.03}t{0}{6.39}\\%
+ {6.52}t{0}{6.39}\\%
+ {6.52}t{0}{2.48}\\%
+ {8.0}t{0}{2.48}\\%
+ {8.0}t{0}{5.27}\\%
+{10.23}t{0}{5.27}\\%
+{10.23}t{0}{2.48}\\%
+{11.69}t{0}{2.48}\\%
+{11.69}t{0}{6.4}\\%
+{14.19}t{0}{6.4}\\%
+{14.19}e{0}\\%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ {0}b{7}b{13}\\%
+ {0}t{6.68}{2.5}t{11.96}{2.58}\\%
+ {1.39}t{6.68}{2.5}t{11.96}{2.58}\\%
+ {2.5}t{6.68}{3.6}t{10.89}{3.65}\\%
+ {2.8}t{7}{3.6}jt{10.6}{3.65}\\%
+ {4.23}t{8.37}{4.44}\\%
+ {5.1}t{9.19}{2.8}\\%
+ {6.72}t{7.54}{6.12}\\%
+ {7.32}t{6.99}{3.65}st{10.64}{3.62}\\%
+ {7.64}t{6.68}{3.59}t{10.95}{3.6}\\%
+ {8.2}t{6.68}{3}t{11.48}{3.07}\\%
+ {8.68}t{6.68}{2.5}t{11.97}{2.58}\\%
+{10.11}t{6.68}{2.5}t{11.97}{2.58}\\%
+{10.11}e{7}e{13}%
+}
diff --git a/Master/texmf-dist/doc/generic/shapepar/candleshape.def b/Master/texmf-dist/doc/generic/shapepar/candleshape.def
new file mode 100644
index 00000000000..3fe8e60a41d
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/shapepar/candleshape.def
@@ -0,0 +1,37 @@
+% From: "Timothy C. Burt" <tcburt@comp.uark.edu>
+% ====- Definition of a candle shape -===========================
+\def\candle{%
+ {3.1}% Horizontal center
+ {0}b{3}\\% Tip of flame
+ {0.2}t{2.9}{0.1}\\%
+ {0.4}t{2.9}{0.2}\\%
+ {0.6}t{2.8}{0.4}\\%
+ {0.8}t{2.7}{0.6}\\%
+ {1.0}t{2.6}{0.8}\\%
+ {1.2}t{2.5}{1.0}\\%
+ {1.4}t{2.4}{1.3}\\%
+ {1.6}t{2.3}{1.5}\\%
+ {1.8}t{2.2}{1.6}\\%
+ {2.0}t{2.1}{1.8}\\%
+ {2.2}t{2.0}{2.0}\\%
+ {2.4}t{2.0}{2.1}\\%
+ {2.6}t{2.0}{2.1}\\%
+ {2.8}t{1.9}{2.1}\\%
+ {3.0}t{2.2}{1.8}\\%
+ {3.2}t{2.5}{1.4}\\%
+ {3.4}t{3.1}{0.3}\\% Bottom of flame
+ {3.6}t{3.3}{0.1}\\% Wick
+ {3.8}t{2.1}{2}\\% Top of candlestick
+ {9.6}t{2.1}{2}\\% Bottom of candlestick
+ {9.8}t{0.15}{6}\\% Top of candleholder
+ {10.0}t{0.05}{6.1}\\%
+ {10.2}t{0.00}{6.2}\\%
+ {10.4}t{0.00}{6.3}\\%
+ {10.6}t{0.05}{6.1}\\%
+ {10.8}t{0.15}{6.0}\\%
+ {11.0}t{0.30}{5.7}\\%
+ {11.2}t{0.50}{5.3}\\%
+ {11.4}t{1.00}{4.3}\\%
+ {11.4}e{3.1}% Bottom of the candleholder ended on the centerline
+}% End of candle definition.
+% ====- End candle -========================================
diff --git a/Master/texmf-dist/doc/generic/shapepar/proshap.py b/Master/texmf-dist/doc/generic/shapepar/proshap.py
new file mode 100644
index 00000000000..e91e65e0a55
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/shapepar/proshap.py
@@ -0,0 +1,350 @@
+"""
+proshap.py v. 1.1
+
+Desc:
+Rasterizer for producing shapes useful for the LaTeX package
+shapepar. It's a python script. www.python.org.
+
+
+Copyright Manuel Gutierrez Algaba January 2003
+All rights reserved.
+Released under GPL license.
+
+Contact: algaba@gmx.net
+
+Changes:
+1.1 : New {10}{0}b{5.6} command, automatic now.
+1.1 : New copyright notice
+
+known Bugs:
+
+ Watch when have two forks at the same line. Example:
+ --------------------------------------------
+ ----- --------------- --------
+
+Solution: Increase the resolution (number of lines and height) and
+don't put the two forks at the same line.
+
+It _may_ fail a 'bit'.
+
+"""
+
+import string
+
+test1 = """
+ 3333
+ 33333333333
+ 33333333333333
+ 3333333333333333
+ 333333
+ 333333
+ 3333333
+ 3333333
+ 3333333 3333
+ 3333333 33333333
+ 3333333 33333333333 3
+ 3333333 333333 33333 33
+ 333333 333333 33333 3333
+ 333333 333333 33333 3333
+ 33333333333333333 3333333333
+ 33333333333333 33333333
+"""
+
+test3 = """
+ 33333333333333333
+ 33333333333333333333333333333
+ 333333333333333333333333333333333
+ 33333333333333333333333333333333333
+ 3333333333333333333333333333333333333
+ 333333 3333333 333333
+ 33333 33333 33333
+ 333333 3333333 33333
+ 33333333333333333 33333333333333333
+ 333333333333333 333333333333333
+ 3333333333333 3333333333333
+ 333333333333333333333333333333
+ 3333333333333333333333333333
+ 33 333
+ 333333 333333333
+ 3333333333333333333333
+"""
+
+test4 = """
+ 33
+ 333333
+ 33333333
+ 3333333333
+ 333333333333
+ 33333333
+ 3333333333333333
+ 3333
+ 3333
+"""
+
+
+test5 = """
+
+ 333333333333333333333
+ 3333333333333333333333
+ 33333333333 3333
+ 3333333 333
+ 33333333
+ 33333333333
+ 3333333333333333333333333333333333333333333333
+ 3333333333333333333333333333333333333333333333
+ 3333333333333333333333333333333333333333333333
+ 3333333333333333333333333333333333333333333333
+ 3333333333333333333333333333333333333333333333
+ 33333 333333333 3333333
+ 333 3333333 33333
+ 33 33333333333 333
+ 3 3333333333333333 33
+
+"""
+
+test6 = """
+3
+333
+333333333
+ 333333333333
+ 33333333333333333
+ 33333333333333333
+ 33333333333333333
+ 33333333333333333
+ 333333333333333333
+ 3333333333333333333
+ 3333333333333333333
+ 33333333333333333333
+ 33333333333333333
+"""
+
+test7 = """
+
+ 3333 33333 333333 333 33
+ 333333333333 333 333 33 33 33
+ 333 333 333 333 33 333 333 3333
+3333 33333333 333333 33
+
+
+"""
+test8 = """
+
+ 33333333333333333333333333333333
+ 33333333333333333333333333
+ 33333 33333
+ 3333333 3333333
+ 333333333 333333333
+ 333333333 333333333
+ 3333333 3333333
+ 33333333333333333333333333
+"""
+
+test9 = """
+333333333333333333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333
+ 3333333333333333333333333333333333333333333333
+ 33333333333333333333333333333333333333
+ 33333333333333333333333333333333
+ 333333333333333333333
+ 33333333333333333
+ 33333333333333333
+ 33333333333333333
+ 333333333333333333333
+ 33333333333333333333333333333333
+ 333333333333333333333333333333333333333
+ 3333333333333333333333333333333333333333333333
+333333333333333333333333333333333333333333333333333333333333
+"""
+test10 = """
+ 3
+ 3
+ 3
+ 33333
+ 3333333
+ 333
+ 3
+ 3
+"""
+
+test11 = """
+
+ 3
+ 3333
+ 333
+33
+"""
+
+test12 = """
+3333 3333 3333 3333
+33333 333333 333333 33333
+3333333 333333333 3333333333 333333
+33333333333333333333333333333333333333333333333
+"""
+test = test3
+list_of_lines = string.split(test,"\n")
+
+def detect_start(line, index = 0):
+ """
+ line : not containing \n
+ """
+ c = index
+ for i in line:
+ if i!=" ":
+ return c
+ c = c +1
+ return None
+
+def detect_end(line, index):
+ """
+ line : not containing \n
+ """
+ c = index
+ for i in line:
+ if i==" " :
+ break
+ c = c + 1
+ return c
+
+def generate(current, last):
+ """
+ current, last : list of segments, perhaps requiring a
+ join or a split
+
+ """
+ for i in xrange(0,len(current)):
+ if i == len(current) -1:
+ break
+ for j in last:
+ if j.overlaps(current[i], current[i+1]):
+ j.make_joint()
+ #print "o"
+
+ for i in xrange(0,len(last)):
+ if i == len(last) -1:
+ break
+ for j in current:
+ if j.splits(last[i], last[i+1]):
+ #print "s"
+ j.make_split()
+
+class segment:
+ def __init__(self, start, end, number ):
+ self._start = start
+ self._end = end
+ self._split = 0
+ self._joint = 0
+ self._numberofline = number
+
+ def get_no_line(self):
+ return self._numberofline
+
+ def make_height(self, h):
+ self._height = h
+
+ def make_joint(self):
+ self._joint = self._joint + 1
+
+ def make_split(self):
+ self._split = self._split + 1
+
+ def overlaps(self, seg1, seg2):
+ """
+ This segment is the 'father' of seg1 , seg2 , See drawing:
+ -------------------- <-- seg this
+ --------- -------- <-- seg1 and seg2
+ """
+ return seg1._end > self._start and seg2._start < self._end
+
+ def splits(self, seg1, seg2):
+ """
+ This segment is the 'son' of seg1 , seg2 , See drawing:
+ --------- -------- <-- seg1 and seg2
+ -------------------- <-- seg this
+ """
+ return seg1._end > self._start and seg2._start < self._end
+
+ def generate_line(self, factor, heading = None):
+ dev = ""
+ if not heading is None :
+ dev = dev + "{"+ str(self._height)+ "}"
+ dev = dev +"t{"
+ l = self._end - self._start
+ l = l * factor
+ if self._split:
+ c = "j"
+ else:
+ c = "s"
+ if self._split or self._joint:
+ a = self._split + self._joint # one of them will be 0
+ div_f = a + 1.0
+ dev = dev + str(self._start* factor) + "}{" + str(l/div_f) + \
+ "}"
+ for i in xrange(0,a):
+ dev = dev + c+ "t{"+ \
+ str(self._start* factor + (i+1)*l/div_f)+ \
+ "}{" + str(l/div_f) +"}"
+ else:
+ dev = dev = dev + str(self._start* factor) + "}{" + str(l)+ "}"
+ return dev
+
+list_of_segments = []
+last_line_segments = []
+current_line_segments = []
+
+numberofline = 0
+for i in list_of_lines:
+ numberofline = numberofline + 1
+ s = detect_start(i)
+ if s is None:
+ continue
+ e = detect_end(line = i[s:], index = s)
+ while 1:
+ #print s,e
+ current_line_segments.append(segment(s,e, numberofline))
+ s = detect_start(line = i[e:], index = e)
+ if s is None:
+ break
+ e = detect_end(line = i[s:], index = s)
+
+ generate(current_line_segments, last_line_segments)
+ list_of_segments = list_of_segments + current_line_segments
+ last_line_segments = current_line_segments
+ current_line_segments =[]
+
+each_char = 0.4
+height = 0
+inc_height = 0.8
+numberofline = -1
+
+#{20}{0}b{1.6}
+result = ""
+max = -1
+for i in list_of_segments:
+ if i._end > max:
+ max = i._end
+ i.make_height(height)
+ height = height + inc_height
+ nl= i.get_no_line()
+ if nl != numberofline:
+ numberofline = nl
+ result = result + "\\\\"
+ result = result + i.generate_line(each_char,heading = 1) + "\n"
+ else:
+ result = result + i.generate_line(each_char) + "\n"
+
+height = height + inc_height
+
+# str(list_of_segments[0]._start)
+middle = str(each_char *max/2.0)
+
+result = "\\gdef\\bassshape{{"+ middle + \
+ "}{0}b{"+ middle +"}\n" + result
+
+
+result = result+ "\\\\{"+str(height) +"}e{"+ middle +"}" + "}\n"
+print result
+f = open("result.tex","w")
+f.write(result)
+f.close()
+
+
diff --git a/Master/texmf-dist/doc/generic/shapepar/shapepar.dvi b/Master/texmf-dist/doc/generic/shapepar/shapepar.dvi
deleted file mode 100644
index 1191e999b42..00000000000
--- a/Master/texmf-dist/doc/generic/shapepar/shapepar.dvi
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/shapepar/shapepar.pdf b/Master/texmf-dist/doc/generic/shapepar/shapepar.pdf
new file mode 100644
index 00000000000..9af7d855079
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/shapepar/shapepar.pdf
Binary files differ