~tex-sx/tex-sx/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
2011-06-20  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* matrixcells.dtx (section{Lines in Matrices}): Added the \hline
	capability to put horizontal lines in matrices.  Also fixed a bug
	where the nodes were being placed twice (switched to using
	\pgfnode instead of \node).

2011-06-13  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.dtx: Fixed a bug with specifying pen names, and
	added some stuff so that unknown options are tested first for pen
	names and colours before being passed on to TikZ.

	Defined a couple of decorations as drop in replacements for the
	brace decoration.

	Also done a bit more on the documentation so that it matches the
	current state of affairs.

2011-06-11  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.dtx: Finished conversion.  Just need to figure out
	how to define and process a pen in one definition.

2011-06-08  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.dtx: Started converting to the new spath setup.
	Converted path filling and stroking parts (normal and copperplate
	nibs).  Still to do annotations and make sure that all styles get
	applied at the right time.

2011-06-07  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* spath.dtx: This is an object-oriented interface to the soft path
	system.  Using the pgf Object-Oriented module, it sets up a class
	for a soft path (abreviated to spath) together with various
	attributes and methods.  The available methods are geared towards
	the calligraphy package, which needs adapting to use it, but
	should be useable more widely.

	TODO: Closepath and rectangle tokens are poorly supported in some
	operations (notably path reversal).

2011-06-03  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* matrixcells.dtx: Converted the code to a dtx and written
	rudimentary documentation (not that there's a lot to document for
	this one).

	* calligraphy.dtx: Modified relocation of annotation routine to
	use \tikz@scan@one@point.

	* braids.dtx: Modified relocation routine to use
	\tikz@scan@one@point.

	* tqft.dtx: Made it so that any text is centred at the centre.  We
	don't expect any text, but just in case we now know how to deal
	with it.
	Fixed the bug reported by Sam Lisi.  The anchors for the path from
	incoming to outgoing (and vice versa) were bounded below, but not
	above.  They are now bounded above by the midpoint.

2011-05-30  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* tqft.dtx: Added the "outer sep" and backported code from
	boundary circle to main tqft shape.  Cleaned up a fair bit of code
	(but possibly more to do).  Stole the code from "regular polygon"
	to cope with varying numbers of boundary components.  Defined lots
	of anchors.

	Bug (reported by Sam Lisi): if the boundary separation is too small
	for the circle width then something strange happens.  Probably the
	answer is "don't do this" but maybe a check should be made.

2011-05-29  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* tqft.dtx: Added a boundary circle shape with anchors.  This gets
	placed by the main node at each of the boundary circles to enable
	all their anchors (sort of a subshape).  Certain bits are always
	drawn so we have to turn that off if called from within a node.

	Also simplified the transformation code a little for the boundary
	circle (by remembering the transformation in a savedmacro)
	although there is a little issue with ensuring enough \noexpands
	around the place as savedmacros get expanded (technically,
	edefed).  Need to backport this code to the main tqft shape.

	Also need to add an "outer sep" which shifts the anchors of the
	main shape by some (vertical) offset.  And add more anchors to the
	main node.

2011-05-19  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.dtx: Converted to a dtx file and added rudimentary
	documentation.  Needs modifying to more traditional syntax.

2011-05-19  Andrew Edgell Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.sty: Implemented path splitting for tapering, also
	included facility to change style according to component of the
	path being stroked (mainly to change the tapering style
	accordingly, but can be used for other changes).  Split off macros
	in to a style file for eventual input to a dtx.

2011-05-18  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.tex: Added functionality to taper paths.  We take
	the first and last components and replace them by a filled path
	which tapers to a point.  At the moment, this needs at least two
	components on the path so we need to be able to split a single
	path in to two (preferably three, actually).  Also, it would be
	nice to be able to switch this off if requested.

2011-05-16  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* calligraphy.tex: This is a library that takes a path and
	"strokes" it with a pen.  It does this by forming the cartesian
	product (sort of) of the stroke with the pen and filling it.
	Singleton points in the pen are stroked instead of filled.  There
	are options to change the nibs, ink, and to annotate the lines
	(useful, maybe, for making "how to draw it" diagrams).  Currently
	working on a way to taper the thin lines to get a more accurate
	feel for the copperplate-type nibs.

	Part of the code includes a set of macros that manipulate soft
	paths (see the PGF manual).  These probably aren't ideal, but for
	short paths they seem to function okay.  The core functionality is
	provided by a generic macro that "walks" along the soft path,
	changing it as it goes.

2011-05-09  Andrew Edgell Stacey  <andrew.stacey@math.ntnu.no>

	* braids.dtx: Added documentation on the floor features (for some
	reason they don't render in the documentation, but they work fine
	in the test file).  Added the ability to "name" the braid and to
	"locate" it at some coordinate.  Also a little cleaning up of the
	code.

2011-05-08  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* braids.dtx: Added method of drawing and rendering floors.  There
	are keys to specify a "floor command", which draws the floor given
	the coordinates of the rectange, and keys to style them.  There is
	a key to set default styles, and individual floors can also be
	styled.  The syntax is that a vertical line specifies that the
	next floor should be rendered.

	Also added the ability to group terms on the same level.  The
	syntax for this is to insert a dash, "-", between the elements in
	the braid group.  No check is done that the elements can be drawn
	this way.

	Fixed a minor bug that made the rendering look horrible on my PDF
	viewer at certain magnifications.  Seemed to be caused by a lineto
	with zero length.  So I made it not zero length but a small length.

2011-05-07  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* braids.dtx: Migrated to dtx format and added basic documentation.

	* braids.sty: Fixed the path indexing, the path crossing, and
	styling of individual strands (and global styles).  Split the
	style stuff in to a style file.  Also fixed a problem whereby
	strands that were never used in a crossing weren't rendered.

	(Note: the correct method of scoping PGF/TikZ options is to use
	pgfsys@beginscope, this should be used in the TQFT file)

	* braids.tex: This draws a braid, given a word in the braid
	group.  It steps along the word, looking for elements.  It
	constructs paths corresponding to each strand, so at each element
	certain paths are extended and crossed.  The paths spring into
	life when they are needed for a crossing.  At the end of the braid
	word, the paths are stroked.

	TODO:

	1. The paths aren't indexed quite right yet; they need to be
	doubly indexed: by their starting number and their current
	number.  At some point, I think I use the wrong one.

	2. The paths just cross at the moment, the under/over crossing bit
	hasn't been implemented.

	3. One reason for doing it this way is to allow styling of
	individual strands.  This needs to be implemented.

	4. The syntax could be extended to allow for several crossings on
	the same level, and for styling of fragments (floors?).

2011-05-06  Andrew Edgell Stacey  <andrew.stacey@math.ntnu.no>

	* tqft.dtx: Rewrote it so that there's only one basic shape which
	has arbitrary number of incoming and outgoing boundary components,
	then the others are aliases of this with particular numbers.  Also
	wrote the documentation. Also implemented the styling of the
	various components.  For ideas on what to do next, see the
	documentation.

2011-05-03  Andrew Edgell Stacey  <andrew.stacey@math.ntnu.no>

	* tqft.sty: This is a style file for drawing the components of
	TQFT diagrams.  It defines new node shapes corresponding to the
	basic shapes.  The nodes are quite complicated due to two things:
	being able to style the different parts of a cobordism, and
	having an internal transformation applied to the node shape
	(rather than a per-node transformation via keys).

	TODO: The code could be cleaner, I expect.  More customisation
	could come from being able to style incoming and outgoing boundary
	components separately.

2011-04-23  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* matrixcolours.tex: Figured out a way around the irritation.
	Basically, we hook in to all of the 'matrix', 'name' (and 'inner
	sep'), and 'label cells' keys to ensure that only if all three are
	called do we save the name (and other details) for later use.  In
	particular, by using the command \iftikz@is@matrix, we can protect
	against being called by accident within the matrix.

2011-04-22  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* matrixcolours.tex: Using the "append after command", we can make
	the cell labelling command execute automatically after the matrix
	is rendered.  We still need global memory slots for the name and
	the inner sep keys, though, which means that we have to be careful
	how this information is gleaned.

	The user interface is now simply to put "label cells" as a key to
	the matrix, with an optional argument specifying the prefix.  The
	only catch is that the order matters regarding the "label cells"
	key and the inner sep since "label cells" resets our global memory
	slots.

	We can get around this for the "name" key since a matrix has to
	have a name, thus when "label cells" is called, we set our global
	name parameter to the current name, which might be empty.  If
	later we set the name then we test to see if the name is empty
	first.  This is a crude, but reasonable, way to test if we are
	inside or outside the matrix.  This doesn't work with the inner
	sep since that might not be set at all on the matrix, but might be
	set on the inner nodes.

	TODO: figure out a way around this irritation.

	* tikzeqnos.tex: Added key to select right-hand margin, can we
	make this dependent on a style setting in LaTeX?

	Added a 'label last point' key to put on a path.  It works by
	adding a "postaction" so that it occurs after the last point on
	the path was positioned.

	Reorganised the code a little to put a couple of things in more
	sensible places: resetting the label array happens at the start of
	the picture, and the loop doesn't repeat stuff that isn't
	necessary.

	TODO: How robust is our method of finding the left-hand margin?

2011-04-21  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* tikzeqnos.tex: Refactored code in to a series of keys and
	commands.

	We have a key "numbered equations" that needs to be put
	on the surrounding tikzpicture environment that installs some code
	run at the end of the picture.  Within the picture, we have a key
	"label equation=<label>" which saves the y-coordinate of the last
	point as the height of a label (so "\path (a) [label equation];"
	works but "\path[label equation] (a);" doesn't).

	The y-coordinate and label get saved in an array which is parsed
	at the end of the picture.  We look at the "current page" node to
	get our absolute position on the page and then (try) to compute
	the left-hand margin to see where to put the label.  When saving a
	y-coordinate, it is inserted in to the list so that at the end,
	they appear in height order from top to bottom.  That way, the
	numbers properly increase down the page.

	There are also a couple of keys that control the style of the
	label: "number equations/label style" and "number equations/label
	format".  The former can be given a list of node options which are
	passed to the node containing the equation number.  The latter is
	a code block which is executed to produce the label text; it takes
	one argument which is the equation number.

	TODO:
	Handle putting the labels on the right-hand margin.
	Can we get "\path[label equation] (a);" to do something sensible?

2011-04-19  Andrew Stacey  <andrew.stacey@math.ntnu.no>

	* tikzeqnos.tex: This is the answer that adds equation numbers to
	positions within a tikz picture environment.

	* tikzcolourpath.tex: This is the answer that changes the colour
	of a path using a clip command to get the overlap correct.

	* matrixcolours.tex: This is the answer that puts a family of
	nodes in the background of a matrix so that they tile the matrix.