llew@wpi.WPI.EDU (Lew Yan Voon) (04/10/91)
o.k., i got a couple of requests for the soln. of the eqn. no. problem. Disclaimer: i'm no latexpert so the soln. might not be the best universal soln. but all replies i got pointed to it and so does the latex book (1986, p.85-7). and it DOES work! i'll give 2 examples, since they involve diff. soln. 1) say we want to label an equation by [13] on the right margin instead of the latex defined format (13) the eqn. # 13 is set by command \theequation (see below). the command which actually prints out (13) is defined within either the definition of the e.g. 'equation' environment in file latex.tex or within the particular style file you're using (i.e., e.g. rep10.sty if you have typed \documentstyle[10]{report} ). imp: you can't redefine the numbering format within your text *.tex file by the \renewcommand. what you have to do is to look up the definition of the appropriate command (which in this ex. is \@eqnnum). on my ultrix system, it is in the file latex.tex in dir /usr/local/lib/tex/inputs. for this ex., you'll see % \def\@eqnnum{ {\rm (\theequation)} } \def is the tex command similar to \newcommand in latex (i think). you don't need to know tex. the final step is to just create a new style file (say, sqeqno.sty) and redefine \@eqnno to do the job: \def\@eqnnum{ {\rm [\theequation]} } ^ ^ note the sq. brackets this can be the single line in the file or you can have more if you want to redefine some other latex formats. finally, you have to ask latex to read this new file and you do it as a style option: \documentstyle[10pt,sqeqno]{report} the sqeqno.sty file can be in the working dir or /usr/local/lib/tex/inputs. similarly, for sq. brackets numbering on the LHS, the new definition is \def\@eqnnum{\hbox to .01pt{}\rlap{\rm\hskip -\displaywidth [\theequation] } } in my case, the old defn. is in leqno.sty. ----------- 2) a simpler example: say i want eqn numbering in an appendix to be [A.IV] instead of the default format [A.4] (n.b. i haven't actually checked that that's the actual default!) this you can do within latex via renewcommand (ref: ditto, p.91-93); just type the foll. anywhere in your *.tex file BUT highly recommended to be in the preamble (i.e. after \docum... but b/f \begin{docum...} ): \renewcommand{\theequation} {A.\Roman{equation}} ----------- thanks to all those who helped me out. lok.