summaryrefslogtreecommitdiff
path: root/graphics/tktexcad/doc/tkTeXCADen.txt
blob: 2a1c6933d7bad0f10358bca62362210400122540 (plain)
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
  TkTeXCAD -- Short description
  Hilmar Straube, hilmstr@web.de
  Aug 16, 2001

  Short description for TkTeXCAD, a Python/Tkinter-Script to interac-
  tively create LaTeX picture environments.
  ______________________________________________________________________

  Table of Contents


  1. Introduction

  2. (Not-)Features

     2.1 Saved picture parts
     2.2 Inclusion of EPS pictures

  3. Notes on the user interface

     3.1 The display menu
     3.2 The menu picture parts

  4. The file menu



  ______________________________________________________________________

  11..  IInnttrroodduuccttiioonn

  TkTeXCAD means to make creation of standard LaTeX picture environments
  easy.  It knows about LaTeX' limitations and attempts to preview the
  dvi output.  It is able to save and load pictures in its own format
  (realized using the module pickle provided with Python), but only
  exports LaTeX source.  Special focus is laid on processing reusable
  picture parts.


  22..  ((NNoott--))FFeeaattuurreess

  The program uses the unit pt and the picture environment without
  additional extension packages (except graphicx for .eps inclusion).

  So, the program only generates these: \circle (empty circle; stepped
  up to 40 pt), \circle* (filled, only up to 15 pt), lines and vectors
  (limited elevations; a very bold version is used to implement filled
  rectangles), various text boxes, the \qbezier splines,
  \includegraphics (requieres \usepackage{graphicx} in the preamble) and
  of course commands to insert saved picture parts.

  Moreover, it is possible to show the same object several times by
  using \multiput.


  22..11..  SSaavveedd ppiiccttuurree ppaarrttss

  The program makes a difference between classes of pictures and
  instances of these picture classes. A picture class contains some
  objects with their individual properties.  An instance of a picture
  class can then be an object inside other picture classes where it
  appears as a special, user-defined objects. Whenever the inner picture
  class changes, all instances of this class will be changed as well.

  The object "instance of a picture class" can be scaled (\unitlength).
  This may cause the diameters of the arcs of \oval and the circles to
  change un-proportional, but the program will (hopefully) preview that.

  So a picture for TkTeXCAD consists of several picture classes. There
  is a main picture, that will be inserted directly into the LaTeX
  source. All other classes will be referenced to (possibly indirectly)
  from the main picture. When exporting, the program creates a file for
  every exported picture class _w_i_t_h _e_x_a_c_t_l_y _t_h_e _s_a_m_e _n_a_m_e_; _s_o _y_o_u _h_a_v_e
  _t_o _t_a_k_e _c_a_r_e _t_h_a_t _t_h_i_s _n_a_m_e _w_i_l_l _b_e _l_e_g_a_l _o_n _y_o_u_r _s_y_s_t_e_m_.


  22..22..  IInncclluussiioonn ooff EEPPSS ppiiccttuurreess

  As noted above, the program is able to include EPS files. It will
  preview their contents, but will need the help of the Python Imaging
  Library (PIL).  This library then uses Ghostscript to render the
  pictures, but only on UNIX derivates with Ghostscript installed.  If
  you have already installed the PIL on another platform, append some
  letters to the line "import Image" in tktc.py.  This will raise an
  "ImportError" exception and thus tell the programm that there is no
  EPS support on your system.

  With no EPS support, every EPS picture will appear as a striked out
  rectangle whose aspect ratio is unknown.  The programm will assume 1/1
  which is probably wrong.

  The EPSs will not be saved, neiter in the .pic files of tkTeXCad nor
  in the exported files.  So, you should copy them with your whole LaTeX
  document.  (The exported files contain absolute paths to the files.)


  33..  NNootteess oonn tthhee uusseerr iinntteerrffaaccee

  33..11..  TThhee ddiissppllaayy mmeennuu

  Every click into the canvas will be transformed into LaTeX
  coordinates.  Additionally it will be placed onto the nearest point in
  the grid.  This grid can be hidden, but this does not change that
  behavior.  If you don't want it, just make the grid spacing small
  enough.

  To change the coordinate system, the data in the upper field of the
  menu is used.  It denotes the number of points on the screen that will
  be one TeX pt.


  33..22..  TThhee mmeennuu ppiiccttuurree ppaarrttss

  To create a new picture class, select the objects you want to transfer
  into (elements/... mark) and select "create new picture class". These
  objects will be deleted in the picture class you are just editing and
  pasted into the newly created class.  Then, the program places the
  first instance of this newly created picture class exactly to where it
  took the objects from.

  The next menu items are the picture classes that you have already
  created.  Some of them may be grayed to make it impossible to insert
  them into classes whose instances they contain (to avoid circular
  references).

  The last menu item gives access to editing all classes.

  This does not really fit in here, but probably needs some explanation:
  Objects that are \multiputted can be changed into several stand-alone
  objects by selecting "create count simple objects".  The same thing
  can be done with an instance of a picture class.  This detaches it
  from its picture class; changes to the picture class will not affect
  the newly created objects any more.


  44..  TThhee ffiillee mmeennuu

  Load, save and import refer to the files created by TkTeXCAD and
  pickle.  Import will only work, if the imported file does not contain
  any picture classes whose names are ambiguous with those already in
  memory.  The imported classes can then be selected in the menu picture
  classes.

  Exporting creates for every picture class a .tex file with the same
  name.  These refer to one another and can be placed into your LaTeX
  source using \import{_n_a_m_e>