[go: up one dir, main page]

Menu

[r11]: / docs / eqc-2.html  Maximize  Restore  History

Download this file

236 lines (202 with data), 11.8 kB

  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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.66">
<TITLE>The EQC Handbook: Installation</TITLE>
<LINK HREF="eqc-3.html" REL=next>
<LINK HREF="eqc-1.html" REL=previous>
<LINK HREF="eqc.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="eqc-3.html">Next</A>
<A HREF="eqc-1.html">Previous</A>
<A HREF="eqc.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2.</A> <A HREF="eqc.html#toc2">Installation</A></H2>
<P>EQC is hosted at
<A HREF="http://sourceforge.net/projects/eqc/">SourceForge</A>.</P>
<H2><A NAME="ss2.1">2.1</A> <A HREF="eqc.html#toc2.1">How to obtain EQC</A>
</H2>
<P>The
<A HREF="http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=eqc">CVS web interface</A>.
You can also download a source.tgz and binary packages from the
<A HREF="http://sourceforge.net/projects/eqc">EQC project page</A>.</P>
<H2><A NAME="ss2.2">2.2</A> <A HREF="eqc.html#toc2.2">Requirements</A>
</H2>
<P>To compile and use EQC, the GiNaC, CLN and GMP libraries are required, as well as the standard C++ development libraries, flex and bison. Information about these libraries can be found at the
<A HREF="http://www.ginac.de">GiNaC library homepage</A> and
<A HREF="http://clisp.cons.org/~haible/packages-cln.html">CLN library homepage</A>
Compilation has been tested with GiNaC 1.5 using g++-4.4. Older versions will most probably not work.
Of course, a Latex installation is necessary, and the SIunits.sty package should be present if you wish to use physical units in your equations.</P>
<H2><A NAME="ss2.3">2.3</A> <A HREF="eqc.html#toc2.3">Compilation and installation</A>
</H2>
<P>In order to compile and install EQC on your system, type the following in
the base directory of the EQC distribution:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
% ./configure
% make
% make install
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Since EQC uses <CODE>autoconf</CODE> you should have no trouble compiling it.
Should you run into problems please report them to the the
<A HREF="mailto:jrheinlaender@users.sourceforge.net">author</A>.</P>
<P>If all else fails, try executing <CODE>make -f Makefile.my</CODE> in the source directory. This compiles
EQC independent of all the autoconf stuff, but of course you may have to tweak the <CODE>Makefile.my</CODE>
to meet your local requirements.</P>
<P>If you want more debugging output, set the <CODE>msg_info</CODE> reporting level in <CODE>main.cpp</CODE> to higher, positive values. The default is -1 and 5 is the largest possible value (beware: This might produce a huge
amount of output!)</P>
<H2><A NAME="ss2.4">2.4</A> <A HREF="eqc.html#toc2.4">Using EQC with xemacs auctex mode</A>
</H2>
<P>In xemacs, choose Options-Advanced (Customize)-Group from the menu, and enter the group name auctex. Open the
Command group, and under List:, add the following entry:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
[INS] [DEL] Name: EQC
Command: eqc %t; %l "%(mode)\input{%s.eqc}"
How: [Value Menu] TeX-run-LaTeX
Create a process for NAME using COMMAND to format FILE with TeX.
Create a process for NAME using COMMAND to process FILE. *
Return the new process.
Prompt: [Toggle] off (nil)
Modes: [Value Menu] Set:
* Plain TeX
* LaTeX
* DocTeX
* ConTeXt
* Texinfo
* AmSTeX
Menu elements:
[INS] [DEL] Lisp expression: :help
[INS] [DEL] Lisp expression: "Run EQC, then LaTeX"
[INS]
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Choose save from the top of the buffer. To run EQC, followed by LaTeX, hit
Ctrl-C twice in the buffer, and when asked for the command to run, say eqc (just typing "e"
usually is sufficient)</P>
<H2><A NAME="ss2.5">2.5</A> <A HREF="eqc.html#toc2.5">Cross-compiling for Windows</A>
</H2>
<P>EQC can be cross-compiled for windows by installing the mingw32 package. The following steps
are necessary to build EQC for windows under Debian GNU Linux:
<UL>
<LI> Compile and install the CLN library (run configure with
<CODE>--host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --without-gmp</CODE>, then <CODE>make</CODE> and <CODE>make install</CODE>).
Maybe it needs to be patched (see
<A HREF="http://thep.physik.uni-mainz.de/pipermail/cln-list/2005-April/000116.html">http://thep.physik.uni-mainz.de/pipermail/cln-list/2005-April/000116.html</A>). </LI>
<LI> Compile and install the gmp library. (run configure with
<CODE>--host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc</CODE>, then <CODE>make</CODE> and <CODE>make install</CODE>).
On my system, this requires a patch to configure: Replace the statement
<CODE>BITS_PER_MP_LIMB=`expr 8 \* $ac_cv_sizeof_mp_limb_t`</CODE> with <CODE>BITS_PER_MP_LIMB=32</CODE> (or whatever value is
correct for your system. To find this out, insert an <CODE>echo $ac_cv_sizeof_mp_limb_t</CODE> and multiply by 8 manually).</LI>
<LI> Compile and install the ginac library (run configure with
<CODE>--host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc --with-cln-prefix=/usr/i586-mingw32msvc</CODE>, then <CODE>make</CODE> and
<CODE>make install</CODE>).. You can ignore the error about libreadline not being found, since we will not be needing ginsh.</LI>
<LI> If make reports an error while compiling input_lexer.cc, edit the file config.h created by configure, and at the end,
put <CODE>#define YYTEXT_POINTER 1</CODE>. If you don't want to rebuild all the files
compiled up to then, run <CODE>make -t</CODE>, remove all files with size 0, and re-run make.</LI>
<LI> Probably, linking of ginsh.exe and viewgar.exe will also fail, but since they are
not necessary, just run <CODE>make -t</CODE> in the subdirectories ginsh and tools.</LI>
<LI> Adapt the eqc search path in ltxfilelex.ll to your system (default:
"C:\texmf\tex\latex\eqc\"</LI>
<LI> Set the environment variable <CODE>CPPFLAGS</CODE> to <CODE>-DMINGW</CODE> (Not required any more since version 1.4.0)</LI>
<LI> Run 'make distclean' if necessary.</LI>
<LI> Run configure with <CODE>--host=i586-mingw32msvc --prefix=/usr/i586-mingw32msvc
--with-ginac-prefix=/usr/i586-mingw32msvc</CODE>. This might requiree a patch to
<CODE>/usr/i586-mingw32msvc/bin/ginac-config</CODE>: Replace the line saying
<CODE>echo $libdirs -lginac -L/usr/lib -lcln -lgmp</CODE> with
<CODE>echo ${exec_prefix}/lib/libginac.a ${exec_prefix}/lib/libcln.a ${exec_prefix}/lib/libgmp.a</CODE></LI>
<LI> Run <CODE>make CXXFLAGS=-O0</CODE>. Note that if you try to compile ltxfileparse.cc with optimization,
you might need huge amounts of memory, depending on your system and compiler version.</LI>
<LI> You might want to strip the eqc.exe binary: <CODE>i586-mingw32msvc-strip eqc.exe</CODE>. This will greatly
reduce the file size.</LI>
<LI> Install eqc.exe, eqc.sty, units.tex, substitutions.tex and mathconstants.tex into
your favourite locations (don't forget to run texhash afterwards).</LI>
<LI> Install the html documentation from the docs subdirectory in your favourite location.</LI>
<LI> Depending on your TeX distribution, you might also have to install the siunits and fp packages.
The first is mandatory, the second can be disabled if you comment out the makepspicture macros in
eqc.sty.</LI>
</UL>
</P>
<H2><A NAME="ss2.6">2.6</A> <A HREF="eqc.html#toc2.6">Compiling with Cygwin</A>
</H2>
<P>EQC can be compiled for windows using the Cygwin environment.The following steps
are necessary to build EQC for windows under Cygwin:
<UL>
<LI> Install Cygwin</LI>
<LI> Install the base system and at least the following packages:
<UL>
<LI> From Devel: autoconf automake bison flex gcc-g++ libncurses-devel make pkg-config readline</LI>
<LI> From Interpreters: m4</LI>
<LI> From Libs: libreadline6</LI>
<LI> From Math: gmp libgmp-devel libgmp3</LI>
<LI> From system: util-linux</LI>
<LI> From utils: diffutils</LI>
</UL>
</LI>
<LI> Get the cln source, run <CODE>configure --without-gmp</CODE>, <CODE>make</CODE>, and <CODE>make install</CODE></LI>
<LI> <CODE>cp cln.pc /usr/lib/pkgconfig</CODE> (or adjust the pkg-config path to <CODE>/usr/local/lib/pkgconfig</CODE> for the following steps).</LI>
<LI> Get the ginac source, configure, make, make install</LI>
<LI> <CODE>cp ginac.pc /usr/lib/pkgconfig</CODE></LI>
<LI> Get the autoconf-archive, for example, from
<A HREF="http://autoconf-archive.cryp.to/autoconf-archive-2008-05-16.tar.bz2">http://autoconf-archive.cryp.to/autoconf-archive-2008-05-16.tar.bz2</A>, configure, make install. </LI>
<LI> Get eqc source. Run <CODE> aclocal -I/usr/local/share/aclocal</CODE>, autoconf, automake, autoheader.</LI>
<LI> Adapt the eqc search path in ltxfilelex.ll to your system (default: <CODE>C:\texmf\tex\latex\eqc\</CODE></LI>
<LI> Run 'make distclean' if necessary.</LI>
<LI> Run <CODE>configure CPPFLAGS="-DMINGW"</CODE>, make. If compilation of <CODE>ltxfileparse.cc</CODE> takes forever, compile it manually with the setting <CODE>-O0</CODE>.
(Note: Setting CPPFlAGS is not required any more since 1.4.0)</LI>
<LI> You might want to strip the eqc.exe binary: <CODE>eqc.exe</CODE>. This will greatly reduce the file size.</LI>
<LI> Install eqc.exe, eqc.sty, units.tex, substitutions.tex and mathconstants.tex into
your favourite locations (don't forget to run texhash afterwards).</LI>
<LI> Install the html documentation from the docs subdirectory in your favourite location.</LI>
<LI> Depending on your TeX distribution, you might also have to install the siunits and fp packages.
The first is mandatory, the second can be disabled if you comment out the makepspicture macros in
eqc.sty.</LI>
</UL>
</P>
<H2><A NAME="ss2.7">2.7</A> <A HREF="eqc.html#toc2.7">Binary packages</A>
</H2>
<P>If all this is too complicated for you, RPM and Debian packages have been released on SourceFourge. They
are accessible on the
<A HREF="http://sourceforge.net/projects/eqc">EQC project page</A>.</P>
<H2><A NAME="ss2.8">2.8</A> <A HREF="eqc.html#toc2.8">Bugs</A>
</H2>
<H3>Known bugs</H3>
<P>
<UL>
<LI> The option <CODE>eqsplit</CODE> must be the last one in a list, for example:
<CODE>\eq[eqsplit=2; eqraw=true]{a + b = c}</CODE> will not work correctly, but
<CODE>\eq[eqraw=true; eqsplit=2]{a + b = c}</CODE> will. The reason for this is that <CODE>eqsplit</CODE> takes
an expression as an argument, and the definition of an expression allows for a list separated by semicolons.
Therefore, an ambiguity occurs.</LI>
<LI> The number <CODE>0.012345</CODE> is not rounded correctly to 4 digits (precision type fixed_digits),
rather the result ist <CODE>0.1234</CODE>. This appears to be a bug in the <CODE>cln::round1()</CODE> function
because <CODE>1234.5d0</CODE> is rounded to <CODE>1234</CODE>, but <CODE>1234.56d0</CODE> is rounded to <CODE>1235</CODE>!
Actually, it is not a bug, but a feature. The CLN documentation says (!)
<CODE>round(x)</CODE>: The integer nearest to x. If x is exactly halfway between two integers, choose the even one.</LI>
</UL>
</P>
<H3>Reporting bugs</H3>
<P>Please report all bugs to the
<A HREF="mailto://jrheinlaender@users.sourceforge.net">author</A>.
You should include the following information:</P>
<P>
<UL>
<LI> Version of eqc, how you obtained it (RPM, CVS, binary or source).</LI>
<LI> The input file that produces the errors.</LI>
<LI> The output produced by eqc (on screen and in the file <CODE>inputname.eqc</CODE>).</LI>
<LI> If you compiled eqc yourself, try setting DEBUG to larger values to get more debugging output.
This can be done in <CODE>main.cpp</CODE> by increasing the <CODE>msg_info</CODE> level to positive numbers.</LI>
</UL>
</P>
<HR>
<A HREF="eqc-3.html">Next</A>
<A HREF="eqc-1.html">Previous</A>
<A HREF="eqc.html#toc2">Contents</A>
</BODY>
</HTML>