[go: up one dir, main page]

Menu

[r12]: / docs / eqc-6.html  Maximize  Restore  History

Download this file

166 lines (131 with data), 7.7 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
<!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: Questions and Answers</TITLE>
<LINK HREF="eqc-7.html" REL=next>
<LINK HREF="eqc-5.html" REL=previous>
<LINK HREF="eqc.html#toc6" REL=contents>
</HEAD>
<BODY>
<A HREF="eqc-7.html">Next</A>
<A HREF="eqc-5.html">Previous</A>
<A HREF="eqc.html#toc6">Contents</A>
<HR>
<H2><A NAME="s6">6.</A> <A HREF="eqc.html#toc6">Questions and Answers</A></H2>
<H2><A NAME="ss6.1">6.1</A> <A HREF="eqc.html#toc6.1">Why is the spacing between numbers and units ugly?</A>
</H2>
<P>You can control your spacing in the <CODE>SIunits.cfg</CODE> file. EQC simply uses the <CODE>\unit</CODE> macro
to display physical quantities.</P>
<H2><A NAME="ss6.2">6.2</A> <A HREF="eqc.html#toc6.2">Why is the spacing between units ugly?</A>
</H2>
<P>See above</P>
<H2><A NAME="ss6.3">6.3</A> <A HREF="eqc.html#toc6.3">Why doesn't substitution of <CODE>x^2 = y</CODE> work in <CODE>1/x^2</CODE>?</A>
</H2>
<P>This is a problem with GiNaC's canonical format of expressions. Your equation will be represented
as <CODE>x^(-2)</CODE>, so you need to substitute <CODE>x^(-2) = 1/y</CODE>. This is perhaps more of
a bug than a feature, but difficult to solve without manipulating GiNaC's internals.</P>
<H2><A NAME="ss6.4">6.4</A> <A HREF="eqc.html#toc6.4">How do I get EQC to accept a variable name like <CODE>\varphi'</CODE>?</A>
</H2>
<P>This is not possible at the moment, but you can circumvent the problem by defining a new macro, e.g.
<CODE>\newcommand{\varphis}{\varphi'}</CODE>.</P>
<H2><A NAME="ss6.5">6.5</A> <A HREF="eqc.html#toc6.5">EQC complains about a wrong number of arguments for a self-defined function</A>
</H2>
<P>Probably you did something like: <CODE>\function{x}{y; z} $\eq{a = x b + c}$</CODE>. Because
functions have precedence over multiplication, EQC parsed this as <CODE>a = x(b; </CODE> and
then complained about the missing second argument. EQC does not require function arguments
to be enclosed in brackets, so you can write <CODE>\cos\alpha</CODE> instead of
<CODE>\cos{\alpha}</CODE>. There are several ways to solve your problem:
<UL>
<LI> Provide a multiplication symbol: <CODE>x \cdot b</CODE></LI>
<LI> Use brackets: <CODE>{x} b</CODE></LI>
<LI> Provide function arguments <CODE>x(y;z) b</CODE></LI>
</UL>
</P>
<H2><A NAME="ss6.6">6.6</A> <A HREF="eqc.html#toc6.6">EQC does not use my library functions for finding variable values</A>
</H2>
<P>This is not a bug, but a feature: Library functions are assumed to be generic and must be adapted
to the special purpose you have in mind. For details, see the HTML documentation. Basically, you
need to 'activate' the equation with either <CODE>\eq{"lib:myeq"}</CODE> or something like
<CODE>\eqsubst{"lib:myeq"}{x = x_1; y = y_1}</CODE>.</P>
<H2><A NAME="ss6.7">6.7</A> <A HREF="eqc.html#toc6.7">How do I use bibtex with EQC?</A>
</H2>
<P>Just run bibtex on the original TeX file, not on the .eqc file.</P>
<H2><A NAME="ss6.8">6.8</A> <A HREF="eqc.html#toc6.8">Why do my equations look ugly?</A>
</H2>
<P>EQC's formatting algorithm is far from perfect. In fact, it will never become perfect because different people
have different ideas about what a properly formatted equation should look like. You can alleviate this problem
by using the <CODE>\raw</CODE> statement. This means that the contents of your <CODE>\eq</CODE> statements retain the
original formatting. Of course, this option does not work with equations obtained by <CODE>\eqadd</CODE> etc. as
there is no original formatting. After all, EQC is designed to save you the work of typing all these equations
yourself!</P>
<H2><A NAME="ss6.9">6.9</A> <A HREF="eqc.html#toc6.9">AMS math complains about multiple labels</A>
</H2>
<P>AMS math puts out an error message like <CODE>Error: Multiple \label's: label '...' will be lost</CODE>.
This error occurs (for example, inside an <CODE>align</CODE> environment) if you use <CODE>\notag</CODE>
with an equation that has a label, e.g.: <CODE>\eqadd[eq:1]{x = 3}{4}\notag</CODE>. EQC will automatically
add a <CODE>\label{eq:1}</CODE> when it processes the equation, and AMS math now complains that the
equation has a label but should not be tagged at the same time! You can use <CODE>\tag*{}</CODE> to
circumvent the problem.</P>
<P>Note that the standard <CODE>eqnarray</CODE> environment does not produce this error.</P>
<P>This error occurs (for example, inside an <CODE>align</CODE> environment) if you use <CODE>\notag</CODE>
with an equation that has a label, e.g.: <CODE>\eqadd[eq:1]{x = 3}{4}\notag</CODE>. EQC will automatically
add a <CODE>\label{eq:1}</CODE> when it processes the equation, and AMS math now complains that the
equation has a label but should not be tagged at the same time! You can use <CODE>\tag*{}</CODE> to
circumvent the problem.</P>
<P>Note that the standard <CODE>eqnarray</CODE> environment does not produce this error.</P>
<H2><A NAME="ss6.10">6.10</A> <A HREF="eqc.html#toc6.10">Why does my self-compiled EQC crash immediately?</A>
</H2>
<P>There appears to be a problem with different versions of libginac, libgmp, libcln. Not all versions of these
libraries work with EQC. If you have such a problem, try using one of the binary packages. These contain
statically linked versions of the libraries See also the bugs section.</P>
<H2><A NAME="ss6.11">6.11</A> <A HREF="eqc.html#toc6.11">When I try to build the package, the command <CODE>ccache</CODE> is not found</A>
</H2>
<P>I use <CODE>ccache</CODE> because my machine is so slow... Edit eqc/Makefile.am and remove it.</P>
<H2><A NAME="ss6.12">6.12</A> <A HREF="eqc.html#toc6.12">The program does not build.</A>
</H2>
<P>Check that you are using <CODE>g++-3.0</CODE>. The program will not work with g++-2.95 or earlier
(due to the GiNaC library). You can force the program to compile with g++-3.0 by setting the
environment variable <CODE>CXX</CODE> to <CODE>g++-3.0</CODE> (and <CODE>CC</CODE> to <CODE>gcc-3.0</CODE>
if necessary).</P>
<H2><A NAME="ss6.13">6.13</A> <A HREF="eqc.html#toc6.13">Autoconf says that the GiNaC library is not present or has a wrong version, but that's not true.</A>
</H2>
<P>The autoconf macro <CODE>AM_PATH_GINAC</CODE> might not work correctly on your system, because
it tries to run a program using <CODE>ginac/versions.h</CODE> with gcc instead of g++. I had
to patch ginac.m4 with <CODE>AC_LANG_SAVE</CODE>, <CODE>AC_LANG_CPLUSPLUS</CODE> and
<CODE>AC_LANG_RESTORE</CODE>.
<BLOCKQUOTE><CODE>
<PRE>
if test "x$enable_ginactest" = "xyes" ; then
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS $GINACLIB_CPPFLAGS"
LIBS="$LIBS $GINACLIB_LIBS"
rm -f conf.ginactest
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
include &lt;stdio.h>
include &lt;string.h>
include &lt;ginac/version.h>
... some more code ...
return 0;
,, no_ginac=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
AC_LANG_RESTORE
CPPFLAGS="$ac_save_CPPFLAGS"
LIBS="$ac_save_LIBS"
fi
</PRE>
</CODE></BLOCKQUOTE>
Note that you have to re-run automake/autoconf for this change to take
effect.</P>
<H2><A NAME="ss6.14">6.14</A> <A HREF="eqc.html#toc6.14">KDevelop throws a fit after I run dpkg-buildpackage or do a configure by hand</A>
</H2>
<P>Close KDevelop, remove the target directory (for example, debug). Run make -f Makefile.cvs and configure and
then make distclean and then hope for the best...</P>
<HR>
<A HREF="eqc-7.html">Next</A>
<A HREF="eqc-5.html">Previous</A>
<A HREF="eqc.html#toc6">Contents</A>
</BODY>
</HTML>