summaryrefslogtreecommitdiff
path: root/support/pdfrack/README
blob: 429bcbf3cc86adaf3ee360f794d54570b021c999 (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
**********************************************************************
	    pdfrack = a hack for using psfrag and pdflatex

			 By Marc Boyer-Gandon
		      (Marc.Boyer@onera.fr)
**********************************************************************


pdfrack is a  hack designed to  help  the psfrag  users to be  able to
compile their documents with  pdflatex.

It  should not be  considered as   a "solution"  for using  psfrag and
pdftex, but as a "hack" developed for my personal use that can save
your time also.

Please, register yourself by sending me an email with [pdfrack] in the
subject if you  use it. 

Do not hesitate to send me an email to ask for improvements or to
report bugs. I will fix it if I can (but I am not at all a (La)TeX
wizard).


			---------------------
			       Changes
			---------------------


Version: 1.0:
   - No new feature, but stable for month, and a better documentation.
Version: 0.5.1:
    - Better documentation of the -a option.
Version: 0.5:
    - Add of the auto (-a) option
Version: 0.4.1:
User Changes:     
   - More files in testFile directory
   - Removing some useless -xv at first line
   - Fixing the noclobber bug of bash
   - removing also .thm and .out files created by ntheorem
Version: 0.4:
User Changes:     
   - Add of the -M option, to handle \input, \include...
   - Better documentation
Version: 0.3.2.2:
User Changes:   
   - Better documentation
Version: 0.3.2.1:
Implementation changes:
   - respect of the recommandations from "LaTeX2e for class and package writers"
Version: 0.3.2:
User Changes:   
   - add of the 'header option'
Version: 0.3.1.1:
Bug fixed:
   - a minor bug in test "testDoubleImage.tex" fixed
Version: 0.3.1:
User Changes: 
   - Minor messages changes
   - automatic use of ps2eps if installed

Version: 0.2
User Changes: 
  - This version should allow you to put several pictures (with
    includegraphics) in a single figure environment.
  - Added the -p -e and -k options
Implementation changes:
  - Added a function "compileOneFigure()"
  - Use of mktemp (if possible)


			---------------------
			  Table of Contents
			---------------------

I. What does it do ?
II. How to use it ?
III. What is required ?
IV. Why this name ?
V. How to improve it ?
VI. Temporary files
VII. Bugs


I. What does it do ?
--------------------

The main idea of the script is to scan your source file to find the
figures included (with \includegraphics) and, for each figure, to make
a single latex file with only the figure and to generate a pdf figure
that takes into account the psfrag replacements.

Then, using pdflatex, you just include the pdf figure, with the psfrag
replacements.


II. How to use it ?
-------------------

They are two ways to use it: the lazy automatic one (option -a), where
all figures founds are converted, and the hand-made one, where you
have to select the figures to be converted with the script.

a) Installing it

Put the script pdfrack.sh in a directory included in your path, and
pdfrack.sty somewhere where TeX will find it.

b) Your latex source files

The pictures that you want to translate must be between two lines
\begin{figure}
\end{figure}
and included with command \includegraphics.

If you chose the lazy automatic option, do nothing.

If you chose to select the figures to be translated, just 
 i) include the package pdfrack.sty
 ii) replace \includegraphics by \pdfrackincludegraphics for all the
 figures you want to translate.

c) Running the script pdfrack.sh 

Then, you should run the script pdfrack.sh on your latex source
file. It will generates the figures in pdf format.

It sometimes fails :-( There could be two reasons:
  - the translation from dvi to pdf fails, you should try 
 to put options -p and/or -e, and options -m n, with n in
 0..3 ; but that is not my job :-)
  - the generated latex code is wrong, and this is my fault,
 you can fix the script or email me 

Note that the '%' is is general seen as a comment, even if prefixed
with \. So, avoid to use it.

If your LaTeX code is too complex (if your figures environments are in
included files for  example), then, pdfrack will ne  be able to handle
it. Then,  you should write a  simpler LaTeX file, with your figure(s)
and use this file to generate the pdf figures.

d) Running pdflatex

Then, you could run pdflatex on your file.


III. What is required ?
-----------------------

The pdfrack.sh script uses a lot of other scripts and software.
cut, dvips, epstopdf, grep, head, latex, ps2ps, ps2epsi, sort,
tail, and, first of all, a bourne shell...

Sorry for Win* users. They should install solutions like Cygwin,
or try a Linux distribution.

IV. Why this name ?
-------------------

I think a good solution for using pdflatex and psfrag should be named
"pdfrag" or "pdffrag". I do not think that my solution is good. It is
just a hack. Then pdfrack comes from:
    pdf
  + psfrag
  +    hack
  ---------
    pdfrack

V. How to improve it ?
----------------------

You  can change the   code for your  own purpose,  and email  me your
improvement if you think it could help someone else.

You can ask me some improvements, and I will try to do it.

VI. Why to use it ?
-------------------

They are several other solutions (see the full documentation). This
package tries to be simple. In run only on bash-based systems (Unix,
Linux, MacOS).

VII. Bugs
---------

It seems that there are troubles when using draftcopy and pdfdraftcopy...