HELP SYSTEM FOR TEX PICTURES OVERVIEW Tex Pictures is a program to create easy drawings to include in latex documents in both Unix and MS Windows. It is possible also to save them as postscript. Some of the most interesting features are: -Download and execute. -Requirements. -Advantages/Disadvantages. -Interactive help. -Working modes. -Snap to point/line. -Cut, Copy and Paste. -Add image. -View DVI. -Customizing. -Emacs users. -Author. -Changes. DOWNLOAD AND EXECUTE Current version is 1.2 Download tar.gz format (UNIX): TexPict.tar.gz. Download zip format (Windows): TexPict.zip. TexPict oficial web page is: http://gatxan.cimne.upc.es/texpict. The .tar.gz version should be untarred with something like: gunzip -c TexPict.tar.gz | tar xvf - To execute the program: - Unix Check the first few lines of the executable file to see if the command: 'exec wish8.0 ...' points to your wish. Check the permissions 'chmod ugo+x TexPict.tcl' and execute. - Windows If you have Tcl-Tk properly installed, there are several methods: Click twice on it; drop it over the wish icon; create a link to the file and modify the link execution path to 'c:...wish8.0 c:...TexPict.tcl'. Enjoy! REQUIREMENTS To run TexPrict properly it is necessary: - Tcl-Tk It has been tested with Tcl-Tk v8.0 To obtain it check: http://www.tcltk.com - gs -the postscript displayer- (only for Unix). It is necessary only if EPS are to be displayed in the program. - epic.sty eepic.sty eepicemu.sty These latex style files are not necessary but if used, the quality of the final drawing improves and there are less geometric restrictions. - xdvi (Unix) SWP (Windows) Only necessary if previews of the drawings after running latex are needed. CAUTION: xdvi is called with option -allowshell. Old version may not support this option. In this case, erase the option from the code. It is only necessary for gzziped images. Contact author for more information. For any question or suggestion mail to: ramsan@cimne.upc.es. ADVANTAGES AND DISADVANTAGES Next lines try to define why use or not use TextPict. ADVANTAGES - Easy. Very easy to use. - Useful. Specially useful for UNIX where there are not many nice utilities. - Annotate images. Useful to annotate one EPS or GIF image and include the figure and the annotations inside the latex document. - One latex file. Pictures are included inside the latex document. They are VERY small and avoid too many files. - Later edition. You can edit later the figure that you have pasted in your latex document. Just select it, and paste inside TexPict. In this way, one drawing from 3 month ago can be edited. With a EPS or GIF file it would be no possible. - Customization. You can modify the Tcl-Tk source code to adapt the program to your requirements. DISADVANTAGES - Previous installations. You need to have Tcl-Tk installed on your system. - Very complex drawings TexPict is not powerful enough to make very complex drawings. - PS and images. When writing postscript files,the background image will not be included in the ps file. It cannot include either the 'Text box'. - Latex limitations. Latex mode have some geometric limitations. eepic mode needs the style files and a good DVI driver. - Latex knowledge. User should have a little bit of latex knowledge. CONCLUSIONS The typical scientific document or PhD thesis, have 80% of the drawings that are easy schemes. They can be created with TexPict and avoid disk usage and many files. Some other images are made with another program and need to be annotated. It can be made with TexPict. Finally, a few, very few images should be made with another program. TexPict works properly with latex or with Scientific Workplace. INTERACTIVE HELP It is possible to obtain some help about any button by pressing mouse button 2 or 3 over that button or label. WORKING MODES There are 3 working modes: -Latex mode When copying and pasting the drawing, a picture environment is created fully compatible with any latex installation. It has many geometric restrictions like: a finite number of slopes for lines and vectors; small radius for circles. -eepic mode To make it work with latex it is necessary to have the epic and the eepic packages installed. This means to have the files epic.sty, eepic.sty and eepicemu.sty in the working directory or in the latex installation. It is also necessary to include the packages in the following way: 'usepackage{epic,eepic}'. With this mode, the geometric restrictions are much better. If working with Scientific Workplace, that line is inserted in: 'File DocumentInfo Preamble'. Note that probably you will have to use: 'usepackage{epic,eepicemu}' that is a emulation for drivers that do not support the style 'eepic'. -Any mode It has no geometric restrictions but the resulting drawing cannot be pasted in a latex document. It can be useful when writing postscript files. SNAP TO POINT If this option is set, when creating entities or moving circles, if the mouse is close to the end point of one existing entity, the cursor changes and one circle-like cursor appears. It means that the exact end point of the existing entity will be chosen. If the cursor is over one straight line, it changes to one angle and one point over the line is chosen. To change the snap option in the middle of one operation, use 'Ctrl-t'. CUT, COPY AND PASTE Commands 'Cut' and 'Copy', copy to the clipboard or X-selection, the latex commands necessary to recreate the figure. Please, remember the eepic problem. The usual way of working is to draw the painting, copy to clipboard and finally, paste to your latex document. If working with Scientific Workplace, the Paste must be done inside a 'Insert field TeX' Command 'Paste', can read again the information written with the other commands. So, After doing 'Cut' 'Paste', the drawing shouldn't change. Commands to select before pasting inside TexPict go from: setlength... ... end{picture} Latex commands should not be changed too much to make everything work. Note: Remember the line to write at the beginning of the file if you are in eepic mode. The size of the picture environment copied from TexPict will be equal to the size of TexPict window (only for zoom=1). So it is better to resize the window when the zoom is set to 1. When adjusting the image in the latex document, if the size is not correct, it can be changed in the command: setlength{unitlength}{1cm} For example, to make the picture smaller set: setlength{unitlength}{.7cm} ADD FIGURE It is possible to add one image read from a file. In Unix, the format must be EPS (encapsulated postscript) and in Windows it can be gif. Note: To be able to read EPS in Unix, it is necessary to have the 'gs' program installed. This image will be included in the latex file. Note: when including files in Unix, the psfig package is used, so it is necessary one line at the beginning of the latex file of the form: 'usepackage{psfig}'. Option 'Write Postscript file' cannot print this image. Note for TeXperts: It is possible to use gzziped EPS files in UNIX. To do so, xdvi must be a new version (option -allowshell), and style file 'psfig.sty' must be modified a little bit. Contact author to obtain the modified 'psfig.sty' file. VIEW DVI This option runs latex on the current drawing and opens a DVI previewer (xdvi for Unix and SWP for Windows). The drawing will appear in the DVI previewer. Please, remember the eepic problem. Especially, in 'eepic' mode, the files 'epic.sty' and others must be installed in the latex distribution or must be copied in the temporal directory. CUSTOMIZING You can change the source Tcl-Tk to fit your needs. You should not redistribute your changes. At least, if you do, write clearly everywhere the changes you have made. If the changes are valuable, please send a copy to the mantainer. The easiest thing to change is to set the preferences to your needs. To do so, just modify the function 'SetPreferences' at the beginning of the file. A useful key when doing changes is F2. With this key, the TCL source file and the TCL library files are reloaded. So, it is possible to check one change in the TCL code without leaving the program. EMACS USERS If you add the following to your .emacs file: (fset 'insert-new-picture [?C-r ?\ ?b ?e ?g ?i ?n ?{ ?f ?i ?g ?u ?r ?e ?} down down down ?C-y ?C- ?C-s ?\ ?c ?a ?p ?t ?i ?o ?n ?C-a ?C-w] ) (fset 'copy-picture [?C-r ?\ ?s ?e ?t ?l ?e ?n ?g ?t ?h ?{ ?\ ?u ?n ?i ?t ?l ?e ?n ?g ?t ?h ?C-a ?C- ?C-s ?\ ?e ?n ?d ?{ ?p ?i ?c ?t ?u ?r ?e ?} ?M-w] ) (global-set-key "C-cC-y" 'insert-new-picture) (global-set-key "C-cM-w" 'copy-picture) You will have two new useful options. Having the cursor in the middle of an existing picture, after doing 'copy' in TexPict, the first function will paste the new picture and remove the old one at the same time. The second function, selects the region around the existing picture in emacs and copy it to the X-selection. Later, you can do a 'paste' inside TexPict. AUTHOR Ramon Ribó (I programmed it to be able to write my PhD thesis.). web page: http://gatxan.cimne.upc.es/ramsan mail: ramsan@cimne.upc.es If I have been able to do most of my PhD drawings with TexPict, you also can... CHANGES FROM 1.0 TO 1.2 -. Text is exported better positioned. -. Small gap between cursor and drawn line corrected. -. Implemented entering a circle by radius. -. Bitmap submenus without the subsubmenu arrow. -. Option -allowshell is controlled by checking xdvi version.