## miktex-users

 [MiKTeX] problem with writing math expressions From: Riccardo Lattanzi - 2004-06-28 17:38:26 Hi, I'm new to Latex and I really want to learn it. I'm trying to write a report containing some mathematical expression... so far it doesn't compile and I can't understand why. Can anybody help me with this? I'm pasting the code lines below. Thanks, Riccardo \documentclass[letterpaper,12pt]{article} \usepackage{amsfonts} \usepackage{amsmath} \author{Riccardo Lattanzi} \title{Analytical expression for the noise covariance matrix for different sample geometry} \begin{document} \maketitle \tableofcontents \section{General expression} \begin{displaymath} \Psi _{ \mathscr{ll}'}=\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l }(\mathbf r) \cdot {\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d^3 \mathbf r$\end{displaymath} \begin{displaymath} \mathcal{E} _{\mathscr l }(\mathbf r) = \sum _{\mathscr l } \, \mathcal{E} _{\mathscr l }^{^{+,-}} e^{i {\mathbf k} _{\mathscr l } \cdot \, \mathbf r - \, i \omega t }$ \end{displaymath} \section{Filled cylinder: length 2*l, radius a} \label{eq:sgnl} \begin{align} \Psi _{ \mathscr{ll}'}& =\sigma \mathcal{E}_{\mathscr l} \cdot {\mathcal{E}_{\mathscr l'}}^* \int _{\mathscr -l }^{\mathscr l } e^{i ( k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) z}dz \, \int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} e^{i [( k _{{\mathscr l} x} - \, k _{{\mathscr {l'}} x}^*) \cos{\theta} + ( k _{{\mathscr l} y} - \, k _{{\mathscr {l'}} y}^*) \sin{\theta}]r}d{\theta} \\ \frac{2\sin{(k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) l}{(k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*)} \end{align} \end{document} 
 Re: [MiKTeX] problem with writing math expressions From: Stephan Klumpp - 2004-06-28 18:05:21 Attachments: Message as HTML Hi Riccardo, 1.) My Compiler didn't know the command \mathscr, so either a package is=20 missing or I need that font. But don't mind, I have deleted that=20 command for testing. For me it doesn't have to look good ;-) >\Psi _{ \mathscr{ll}'}=3D\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l >}(\mathbf r) \cdot >{\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d^3 \mathbf r$> =20 > 2.) Delete$! You are in math mode and is for changing between text=20 and math in normal text (for example) And you have to close the { before \mathcal{E} somewhere >\mathcal{E} _{\mathscr l }^{^{+,-}} > =20 > 3.) I'm not sure if two superscripts will work. I would avoid it. >\begin{align} > > =20 > 4.) You have to declare how your rows should behave, eg,=20 \begin{align}{cc} for two rows with centered contents 5.) Do not use empty lines between align, tabular, etc. LaTeX don't then=20 and will produce a error message >\end{align} > =20 > 6.) Well, and align won't work in equation at all. In this case use=20 eqnarray instead of equation. This is an equation environment with three centered rows. Try: \begin{eqnarray} \label{eq:sgnl} \Psi _ll'& =3D&\sigma \mathcal{E}_{ l} \cdot {\mathcal{E}_{ l'}}^* \int _{ -l }^l e^{i ( k _{{ l} z} - \, k _{{l'} z}^*) z}dz \, \int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} e^{i [( k _{{l} x} - \, k _{{l'} x}^*) \cos{\theta} + ( k _{{l} y} - \, k _{{l'} y}^*) \sin{\theta}]r}d{\theta} \\ &&\frac{2\sin{(k _{{ l} z} - \, k _{{l'}} z}^*) l}{(k _{{ l} z} - \, k _{{{l'}} z}^*)} \end{eqnarray} NOTE: I have deleted \mathscr. See (1) Hope this will help you! Stephan *__________________________________________________________________* *Dipl.-Phys. Stephan Klumpp * *Fachbereich Physik * *Technische Universit=E4t Kaiserslautern * *Erwin-Schr=F6dinger-Stra=DFe* *D-67663 Kaiserslautern * =20 *Tel.: +49 (0631) 205 2325 * *Fax: +49 (0631) 205 2394 * =20 *mailto: klumpp@... * * * *Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik:* * * *http://3beam.physik.uni-kl.de/* * *__________________________________________________________________* *   Re: [MiKTeX] problem with writing math expressions From: Riccardo Lattanzi - 2004-06-28 19:04:57 Thanks a lot for your help, the outcome looks good now! I have just another quick question. In the output file the expression: e^{i [( k _{lx} - \, k _{{l'} x}^*)=20 is displayed with the subscript letters not aligned (at different levels). So the first "k" has the subscript "lx" at a higher position than the subscript "l'x" pf the second "k". Is that solvable, or it has to do with the fact that the second "k" as also the superscript "*" and Latex automatically moves down the subscript? Thanks again. Regards, Riccardo ----- Original Message ----- From: Stephan Klumpp Date: Mon, 28 Jun 2004 20:07:23 +0200 Subject: Re: [MiKTeX] problem with writing math expressions To: miktex-users@... Hi Riccardo, 1.) My Compiler didn't know the command \mathscr, so either a package is missing or I need that font. But don't mind, I have deleted that command for testing. For me it doesn't have to look good ;-) \Psi _{ \mathscr{ll}'}=3D\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l }(\mathbf r) \cdot {\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d^3 \mathbf r 2.) Delete $! You are in math mode and$ is for changing between text and math in normal text (for example) And you have to close the { before \mathcal{E} somewhere \mathcal{E} _{\mathscr l }^{^{+,-}} 3.) I'm not sure if two superscripts will work. I would avoid it. \begin{align} 4.) You have to declare how your rows should behave, eg, \begin{align}{cc} for two rows with centered contents 5.) Do not use empty lines between align, tabular, etc. LaTeX don't then and will produce a error message \end{align} 6.) Well, and align won't work in equation at all. In this case use eqnarray instead of equation. This is an equation environment with three centered rows. Try: \begin{eqnarray} \label{eq:sgnl} \Psi _ll'& =3D&\sigma \mathcal{E}_{ l} \cdot=20 {\mathcal{E}_{ l'}}^* \int _{ -l }^l e^{i ( k _{{ l} z} - \, k _{{l'} z}^*) z}dz \, \int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} e^{i [( k _{{l} x} - \, k _{{l'} x}^*) \cos{\theta} +=20 ( k _{{l} y} - \, k _{{l'} y}^*) \sin{\theta}]r}d{\theta} \\ &&\frac{2\sin{(k _{{ l} z} - \, k _{{l'}} z}^*) l}{(k _{{ l} z} - \, k _{{{l'}} z}^*)} \end{eqnarray} NOTE: I have deleted \mathscr. See (1) Hope this will help you! Stephan __________________________________________________________________ Dipl.-Phys. Stephan Klumpp=20 Fachbereich Physik=20 Technische Universit=E4t Kaiserslautern=20 Erwin-Schr=F6dinger-Stra=DFe D-67663 Kaiserslautern=20 Tel.: +49 (0631) 205 2325=20 Fax: +49 (0631) 205 2394=20 mailto: klumpp@... =20 Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik: =20 http://3beam.physik.uni-kl.de/ __________________________________________________________________ 
 Re: [MiKTeX] problem with writing math expressions From: Stephan Klumpp - 2004-06-28 19:33:20 Hi Riccardo, >I have just another quick question. In the output file >the expression: > >e^{i [( k _{lx} - \, k _{{l'} x}^*)=20 > >is displayed with the subscript letters not aligned (at different >levels). So the first >"k" has the subscript "lx" at a higher position than the subscript "l'x" >pf the second "k". >Is that solvable, or it has to do with the fact that the second "k" as >also the superscript "*" and Latex automatically moves down the >subscript? > =20 > Well you are right, but you have two problems instead one: the ' and the = *. But unfortunately I don't know how to solve it properly. Stephan=20 *__________________________________________________________________* *Dipl.-Phys. Stephan Klumpp * *Fachbereich Physik * *Technische Universit=E4t Kaiserslautern * *Erwin-Schr=F6dinger-Stra=DFe* *D-67663 Kaiserslautern * =20 *Tel.: +49 (0631) 205 2325 * *Fax: +49 (0631) 205 2394 * =20 *mailto: klumpp@... * * * *Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik:* * * *http://3beam.physik.uni-kl.de/* * *__________________________________________________________________* * 
 Re: [MiKTeX] problem with writing math expressions From: Cornelius C. Noack - 2004-06-28 21:27:56 Attachments: lattanzi.tex On Mon, 28 Jun 2004, Riccardo Lattanzi wrote: > Thanks a lot for your help, the outcome looks good now! > I have just another quick question. In the output file > the expression: > > e^{i [( k _{lx} - \, k _{{l'} x}^*) > > is displayed with the subscript letters not aligned (at different > levels). So the first > "k" has the subscript "lx" at a higher position than the subscript "l'x" > pf the second "k". > Is that solvable, or it has to do with the fact that the second "k" as > also the superscript "*" and Latex automatically moves down the > subscript? > The extra pair of brackets around the WHOLE construct that is to get an exponent is easy to do (cf. the attachment) and solves 80% of your problem --- it is generally good LaTeX practice. You can still see a difference: this is due to the prime on the l; if you want to adjust that, you could do it by adding an invisible strut (\rule} after the first l; but that's real fudgy! If the manuscript is for professional publishing, better leave that to the printer! ccn. -- ................................................................. Prof.Dr. Cornelius C. Noack Phones: Inst. f. Theor. Physik FB 1 office : +49 (421) 218-2427 Universit"at Bremen secretary: -2422 Otto-Hahn-Allee Fax : -4869 D - 28334 Bremen home : +49 (421) 34 22 36 Fax: 346 7872 E-mail: noack at physik.uni-bremen.de or ccnoack at mailaps.org WWW-page: http://www.itp.uni-bremen.de/~noack .................................................................
 Re: [MiKTeX] problem with writing math expressions From: - 2004-06-29 17:08:41 a little better e^{i [( k _{lx}^{} - \, k _{{l'} x}^*)]} Riccardo Lattanzi wrote: >Thanks a lot for your help, the outcome looks good now! >I have just another quick question. In the output file >the expression: > >e^{i [( k _{lx} - \, k _{{l'} x}^*)=20 > >is displayed with the subscript letters not aligned (at different >levels). So the first >"k" has the subscript "lx" at a higher position than the subscript "l'x" >pf the second "k". >Is that solvable, or it has to do with the fact that the second "k" as >also the superscript "*" and Latex automatically moves down the >subscript? > >Thanks again. >Regards, > >Riccardo > > > >----- Original Message ----- >From: Stephan Klumpp >Date: Mon, 28 Jun 2004 20:07:23 +0200 >Subject: Re: [MiKTeX] problem with writing math expressions >To: miktex-users@... > > >Hi Riccardo, > >1.) My Compiler didn't know the command \mathscr, so either a package >is missing or I need that font. But don't mind, I have deleted that >command for testing. For me it doesn't have to look good ;-) > > >\Psi _{ \mathscr{ll}'}=3D\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l >}(\mathbf r) \cdot >{\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d^3 \mathbf r$> 2.) Delete$! You are in math mode and is for changing between >text and math in normal text (for example) > And you have to close the { before \mathcal{E} somewhere > >\mathcal{E} _{\mathscr l }^{^{+,-}} > 3.) I'm not sure if two superscripts will work. I would avoid it. > >\begin{align} > > 4.) You have to declare how your rows should behave, eg, >\begin{align}{cc} for two rows with centered contents >5.) Do not use empty lines between align, tabular, etc. LaTeX don't >then and will produce a error message > >\end{align} > 6.) Well, and align won't work in equation at all. In this case use >eqnarray instead of equation. >This is an equation environment with three centered rows. Try: > >\begin{eqnarray} \label{eq:sgnl} >\Psi _ll'& =3D&\sigma \mathcal{E}_{ l} \cdot=20 >{\mathcal{E}_{ l'}}^* \int _{ -l }^l >e^{i ( k _{{ l} z} - \, k _{{l'} z}^*) z}dz \, >\int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} >e^{i [( k _{{l} x} - \, k _{{l'} x}^*) \cos{\theta} +=20 >( k _{{l} y} - \, k _{{l'} y}^*) \sin{\theta}]r}d{\theta} \\ >&&\frac{2\sin{(k _{{ l} z} - \, k _{{l'}} z}^*) l}{(k >_{{ l} z} - \, k _{{{l'}} z}^*)} >\end{eqnarray} > >NOTE: I have deleted \mathscr. See (1) > >Hope this will help you! > > >Stephan >__________________________________________________________________ >Dipl.-Phys. Stephan Klumpp=20 >Fachbereich Physik=20 >Technische Universit=E4t Kaiserslautern=20 >Erwin-Schr=F6dinger-Stra=DFe >D-67663 Kaiserslautern=20 > Tel.: +49 (0631) 205 2325=20 >Fax: +49 (0631) 205 2394=20 > mailto: klumpp@... >=20 >Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik: >=20 >http://3beam.physik.uni-kl.de/ >__________________________________________________________________ > > >------------------------------------------------------- >This SF.Net email sponsored by Black Hat Briefings & Training. >Attend Black Hat Briefings & Training, Las Vegas July 24-29 -=20 >digital self defense, top technical experts, no vendor pitches,=20 >unmatched networking opportunities. Visit http://www.blackhat.com >_______________________________________________ >MiKTeX-Users mailing list >MiKTeX-Users@... >https://lists.sourceforge.net/lists/listinfo/miktex-users > =20 >   [MiKTeX] unsubscribe From: Bataa - 2004-07-02 05:44:10 Attachments: text/plain * * * * * * * * * * * * * * * AntiVir NOTICE * * * * * * * * * * * * * * * This version of AntiVir is a DEMO version and not full featured. AntiVir has processed a mail addressed to you, which contained no known potential malicious software. In case you notice abnormal behavior of your software after opening the mail or one of its attachments, please forward the complete mail to H+BEDV Datentechnik GmbH so it can be checked for unknown new potential malicious software. -- AntiVir for UNIX Copyright (c) 1994-2004 by H+BEDV Datentechnik GmbH. All rights reserved. For more information see http://www.antivir.de/ or http://www.hbedv.com/.   Re: [MiKTeX] problem with writing math expressions From: Luis A. Payan R. - 2004-06-28 18:18:20 Hi Riccardo In the original script I found some mistakes, for instance the package mathrsfs is not included and the subscript of some expressions are not correctly defined. Next I have put a corrected version of your TeX document, try it and compare it against the original. \documentclass[letterpaper,12pt]{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{mathrsfs} \author{Riccardo Lattanzi} \title{Analytical expression for the noise covariance matrix for different sample geometry} \begin{document} \maketitle \tableofcontents \section{General expression} \begin{displaymath} \Psi_{ \mathscr{ll}'}=\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l }(\mathbf r) \cdot {\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d3 \mathbf r \end{displaymath} \begin{displaymath} \mathcal{E}_{\mathscr l }(\mathbf r) = \sum _{\mathscr l } \, \mathcal{E}_{\mathscr l }^{^{+,-}} e^{i {\mathbf k}_{\mathscr l } \cdot \, \mathbf r - \, i \omega t } \end{displaymath} \section{Filled cylinder: length 2*l, radius a} {\setlength\arraycolsep{2pt} \begin{eqnarray} \Psi_{\mathscr{ll}'}&=&\sigma \mathcal{E}_{\mathscr l} \cdot {\mathcal{E}_{\mathscr l'}}^*\int_{\mathscr{-l} }^{\mathscr{l}} e^{i ( k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) z}dz \, \int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} e^{i [( k _{{\mathscr l} x} - \, k _{{\mathscr {l'}} x}^*) \cos{\theta} + ( k _{{\mathscr l} y} - \, k _{{\mathscr {l'}} y}^*) \sin{\theta}]r}d{\theta}\nonumber\\&{}& \frac{2\sin{(k _{{\mathscr l} z} - \, k_{{\mathscr {l'}} z}^*) l}}{(k_{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*)} \end{eqnarray}} \end{document} Best regards Riccardo Lattanzi wrote: >Hi, > >I'm new to Latex and I really want to learn it. >I'm trying to write a report containing some mathematical expression... >so far it doesn't compile and I can't understand why. >Can anybody help me with this? >I'm pasting the code lines below. >Thanks, >Riccardo > > -- Luis Alfredo Payan Rodriguez ____________________________ listas@... http://www.alpanet.org   Re: [MiKTeX] problem with writing math expressions From: - 2004-06-28 18:56:13 On Mon, 28 Jun 2004 13:38:25 -0400, Riccardo Lattanzi =20 wrote: > Hi, > > I'm new to Latex and I really want to learn it. > I'm trying to write a report containing some mathematical expressio= n... > so far it doesn't compile and I can't understand why. > Can anybody help me with this? > I'm pasting the code lines below. > Thanks, > Riccardo Here follows the same document, only made user friendly. If you have = =20 expressions such as \mathbf{r} all over the place when denoting vecto= rs, =20 then define a shorthand for them as I have done below. That way it is= =20 clearer to you what you write, and if you have to change the appearan= ce =20 later on you just have to change one line. If I were you I'd sit down and read the advice given at =20 ;. Beware not to use eqn= array =20 as someone told you to: It is fundamentally deficient and the amsmath= =20 environments are superior anyway. \documentclass[letterpaper,12pt]{article} \usepackage{amsfonts} \usepackage{amsmath} \usepackage{mathrsfs} \newcommand*\LL{\ensuremath{\mathscr{L}}} \newcommand*\EE{\ensuremath{\mathcal{E}}} \newcommand*\vect[1]{\mathbf{#1}} \author{Riccardo Lattanzi} \title{Analytical expression for the noise covariance matrix for different sample geometry} \begin{document} \maketitle \tableofcontents \section{General expression} $\Psi_{\LL'} =3D \sigma \int_{V_S} \EE_{\LL} (\vect{r}) \cdot \EE_{\LL'}^* (\vect{r} )\, d3 \vect{r}$ $\EE_{\LL} (\vect{r}) =3D \sum _{\LL} \EE_{\LL}^{+,-} e^{i \vect{k}_{\LL} \cdot \vect{r} - i \omega t }$ \section{Filled cylinder: length 2*l, radius a} \begin{aligned}[b] \Psi_{\LL'} &=3D \sigma \EE_{\LL} \cdot \EE_{\LL'}^* \int_{-\LL}^{\LL } e^{i (k _{\LL z} - k_{\LL z}^*) z}\, dz \int _0 ^{r_c}\, rdr \times \\ & \qquad \int _0 ^{2 \pi} e^{ i [( k _{\LL x} - k_{\LL' x}^*) \cos{\theta} + ( k_{\LL y} - k _{\LL' y}^*) \sin{\theta}]r }% end of exp \, d\theta \times \\ & \qquad \frac{ 2 \sin{(k _{\LL z} - k_{\LL' z}^*) l} } { (k_{\LL z} - k _{\LL' z}^*)} \end{aligned} \end{document} --=20 Morten H=F8gholm   Re: [MiKTeX] problem with writing math expressions From: Stephan Klumpp - 2004-06-28 19:43:23 Hi Morten H=F8gholm, > If I were you I'd sit down and read the advice given at =20 > ;. Beware not to use=20 > eqnarray as someone told you to: It is fundamentally deficient and=20 > the amsmath environments are superior anyway. I didn't know about that. What is wrong with it? I'm just curious,=20 because it is the first time I hear that. Thanks! Stephan *__________________________________________________________________* *Dipl.-Phys. Stephan Klumpp * *Fachbereich Physik * *Technische Universit=E4t Kaiserslautern * *Erwin-Schr=F6dinger-Stra=DFe* *D-67663 Kaiserslautern * =20 *Tel.: +49 (0631) 205 2325 * *Fax: +49 (0631) 205 2394 * =20 *mailto: klumpp@... * * * *Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik:* * * *http://3beam.physik.uni-kl.de/* * *__________________________________________________________________* *   Re: [MiKTeX] problem with writing math expressions From: - 2004-06-28 19:50:57 On Mon, 28 Jun 2004 21:45:26 +0200, Stephan Klumpp =20 wrote: > Hi Morten H=F8gholm, > >> If I were you I'd sit down and read the advice given at =20 >> ;. Beware not to use = =20 >> eqnarray as someone told you to: It is fundamentally deficient an= d the =20 >> amsmath environments are superior anyway. > > I didn't know about that. What is wrong with it? I'm just curious, = =20 > because it is the first time I hear that. ; explains = it. Try running this document: \documentclass{article} \begin{document} $$a=3Db$$ \begin{eqnarray} a&=3D&b \end{eqnarray} \end{document} It beats me how this was ever thought of as an acceptabel solution in= =20 LaTeX. --=20 Morten H=F8gholm   Re: [MiKTeX] problem with writing math expressions From: Stephan Klumpp - 2004-06-28 20:19:51 Hi Morten H=F8gholm, > It beats me how this was ever thought of as an acceptabel solution in =20 > LaTeX. Thank you for your answer! You are right. Stephan *__________________________________________________________________* *Dipl.-Phys. Stephan Klumpp * *Fachbereich Physik * *Technische Universit=E4t Kaiserslautern * *Erwin-Schr=F6dinger-Stra=DFe* *D-67663 Kaiserslautern * =20 *Tel.: +49 (0631) 205 2325 * *Fax: +49 (0631) 205 2394 * =20 *mailto: klumpp@... * * * *Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik:* * * *http://3beam.physik.uni-kl.de/* * *__________________________________________________________________* *   Re: [MiKTeX] problem with writing math expressions From: Luis A. Payan R. - 2004-06-28 20:35:55 Hi all: > > Try running this document: > > \documentclass{article} > \begin{document} > $$> a=b >$$ > \begin{eqnarray} > a&=&b > \end{eqnarray} > \end{document} > > It beats me how this was ever thought of as an acceptabel solution in > LaTeX. Eqnarray could work as good as align environmet, just it is necessary correct the space around equal symbol, try the next document: \documentclass{article} \begin{document} $$a=b$$ {\setlength\arraycolsep{1pt}% 1 or 2 pt are acceptable \begin{eqnarray} a&=&b \end{eqnarray}} \end{document} Best regards -- Luis Alfredo Payan Rodriguez ____________________________ listas@... http://www.alpanet.org   Re: [MiKTeX] problem with writing math expressions From: Stephan Klumpp - 2004-06-28 20:51:23 Hi Luis A. Payan R, > > Eqnarray could work as good as align environmet, just it is necessary=20 > correct the space around equal symbol, try the next document: > Thank you! So it's quite easier updating my old files :-). Stephan *__________________________________________________________________* *Dipl.-Phys. Stephan Klumpp * *Fachbereich Physik * *Technische Universit=E4t Kaiserslautern * *Erwin-Schr=F6dinger-Stra=DFe* *D-67663 Kaiserslautern * =20 *Tel.: +49 (0631) 205 2325 * *Fax: +49 (0631) 205 2394 * =20 *mailto: klumpp@... * * * *Arbeitsgruppe Atomphysik und Angewandte Elektronenoptik:* * * *http://3beam.physik.uni-kl.de/* * *__________________________________________________________________* *   Re: [MiKTeX] problem with writing math expressions From: - 2004-06-29 11:13:36 On Mon, 28 Jun 2004 15:36:01 -0500, Luis A. Payan R. =20 wrote: > Eqnarray could work as good as align environmet, just it is necessa= ry =20 > correct the space around equal symbol, try the next document: There is more to this than you might think. Remember that any arrays = =20 inside an eqnarray where you have altered \arraycolsep will also be = =20 affected. Furthermore there is also a question of visual appearance. = Try =20 running this document: \documentclass{article} \usepackage{amsmath} \begin{document} % Just for showing the margins: \noindent \raisebox{-\textheight}[0pt][0pt]{\rule{.1pt}{\textheight}} \hfill\raisebox{-\textheight}[0pt][0pt]{\rule{.1pt}{\textheight}} \setcounter{equation}{10} {\setlength\arraycolsep{.16667em}% 3mu =3D 3/18em \begin{eqnarray} a&=3D&b + \begin{array}{cc} 1 & 2 \\ x & y \end{array} \end{eqnarray} } \begin{align} a &=3Db + \begin{array}{cc} 1 & 2 \\ x & y \end{array} \end{align} {\setlength\arraycolsep{.16667em}% 3mu =3D 3/18em \begin{eqnarray} a&=3D&b + \framebox[.7\columnwidth]{Wide math; not adjusted} \end{eqnarray} } \begin{align} a &=3Db + \framebox[.7\columnwidth]{Wide math; adjusted} \end{align} {\setlength\arraycolsep{.16667em}% 3mu =3D 3/18em \begin{eqnarray} a&=3D&b + \framebox[.83\columnwidth]{Wide math overprinting the equation num= ber} \end{eqnarray} } \begin{align} a &=3Db + \framebox[.83\columnwidth]{Wide math; equation number shifted to a= void =20 overprinting} \end{align} \end{document} Cheers, --=20 Morten H=F8gholm   Re: [MiKTeX] problem with writing math expressions From: Luis A. Payan R. - 2004-06-29 13:17:35 ;-) Ok, now I have another alternative to align equations. I understand that align equations by means of eqnarray is just a trick. Regards... Morten Høgholm wrote: > On Mon, 28 Jun 2004 15:36:01 -0500, Luis A. Payan R. > wrote: > >> Eqnarray could work as good as align environmet, just it is >> necessary correct the space around equal symbol, try the next document: > > > There is more to this than you might think. Remember that any arrays > inside an eqnarray where you have altered \arraycolsep will also be > affected. Furthermore there is also a question of visual appearance. > Try running this document: > > \documentclass{article} > \usepackage{amsmath} > \begin{document} > % Just for showing the margins: > \noindent > \raisebox{-\textheight}[0pt][0pt]{\rule{.1pt}{\textheight}} > \hfill\raisebox{-\textheight}[0pt][0pt]{\rule{.1pt}{\textheight}} > > \setcounter{equation}{10} > > > {\setlength\arraycolsep{.16667em}% 3mu = 3/18em > \begin{eqnarray} > a&=&b + \begin{array}{cc} > 1 & 2 \\ > x & y > \end{array} > \end{eqnarray} > } > \begin{align} > a &=b + \begin{array}{cc} > 1 & 2 \\ > x & y > \end{array} > \end{align} > > {\setlength\arraycolsep{.16667em}% 3mu = 3/18em > \begin{eqnarray} > a&=&b + \framebox[.7\columnwidth]{Wide math; not adjusted} > \end{eqnarray} > } > \begin{align} > a &=b + \framebox[.7\columnwidth]{Wide math; adjusted} > \end{align} > > {\setlength\arraycolsep{.16667em}% 3mu = 3/18em > \begin{eqnarray} > a&=&b + > \framebox[.83\columnwidth]{Wide math overprinting the equation number} > \end{eqnarray} > } > \begin{align} > a &=b + > \framebox[.83\columnwidth]{Wide math; equation number shifted to > avoid overprinting} > \end{align} > \end{document} > > Cheers, -- Luis Alfredo Payan Rodriguez ____________________________ listas@... http://www.alpanet.org   Re: [MiKTeX] problem with writing math expressions From: Cornelius C. Noack - 2004-06-28 20:46:01 Attachments: lattanzi.tex Hi Ricardo, since you say you are new to LaTeX, I must commend you on a certain amount of bravery, tackling an already pretty advanced task. You made about 4 different errors simultaneously. That is not so unusal for a first draft; but obviously you had trouble understanding the significance of the various error messages (in your case coming from 3 different programs: TeX, LaTeX and the amsmath package), and that is also quite common in the beginning. So here is the most important advice: | Comment out as much as possible (literally even everything | between the '\begin{document}' and the '\end{document}') | until you get the source running errorfree, and then work | your way up from there! I have taken your example and commented all your errors; cf. the attachment. I hope you understand everything now; if not, you should read both the LaTeX and the AmsMath documentation. The code I sent back should run errorfree; if it doesn't, there is an installation problem, get back to this list in that case. Here are a few more comments: (i) the command \mathscr is unkown to TeX, LaTeX and amsmath (and to me, by the way). I have replaced it by \textsc just to show you what's wrong, (ii) 'letterpaper' should be the default (unless you have a very special installation), so that is superfluous (but innocuous), (iii) the sitation is similar for the 'amsfonts' package: you need that only when you need rather special math fonts (usually not for regular physics texts), (iv) the most non-trivial error is the mix of generic LaTeX math constructions and those of amsmath. These are often pretty tricky to find. You should by all means at least browse through the amsmath users's guide, available, e.g., from ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf I hope this is of some help to you. Regards, ccn. -- On Mon, 28 Jun 2004, Riccardo Lattanzi wrote: > Hi, > > I'm new to Latex and I really want to learn it. > I'm trying to write a report containing some mathematical expression... > so far it doesn't compile and I can't understand why. > Can anybody help me with this? > I'm pasting the code lines below. > Thanks, > Riccardo > > \documentclass[letterpaper,12pt]{article} > \usepackage{amsfonts} > \usepackage{amsmath} > \author{Riccardo Lattanzi} > \title{Analytical expression for the noise covariance matrix for > different sample geometry} > \begin{document} > \maketitle > \tableofcontents > \section{General expression} > \begin{displaymath} > \Psi _{ \mathscr{ll}'}=\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l > }(\mathbf r) \cdot > {\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d^3 \mathbf r > \end{displaymath} > \begin{displaymath} > \mathcal{E} _{\mathscr l }(\mathbf r) = \sum _{\mathscr l } \, > \mathcal{E} _{\mathscr l }^{^{+,-}} > e^{i {\mathbf k} _{\mathscr l } \cdot \, \mathbf r - \, i \omega t }> \end{displaymath} > > \section{Filled cylinder: length 2*l, radius a} > > \label{eq:sgnl} > \begin{align} > > \Psi _{ \mathscr{ll}'}& =\sigma \mathcal{E}_{\mathscr l} \cdot > {\mathcal{E}_{\mathscr l'}}^* \int _{\mathscr -l }^{\mathscr l } > e^{i ( k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) z}dz \, > \int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} > e^{i [( k _{{\mathscr l} x} - \, k _{{\mathscr {l'}} x}^*) \cos{\theta} + > ( k _{{\mathscr l} y} - \, k _{{\mathscr {l'}} y}^*) \sin{\theta}]r}d{\theta} \\ > > \frac{2\sin{(k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) l}{(k > _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*)} > > > \end{align} > > > > \end{document} > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit http://www.blackhat.com > _______________________________________________ > MiKTeX-Users mailing list > MiKTeX-Users@... > https://lists.sourceforge.net/lists/listinfo/miktex-users > -- ................................................................. Prof.Dr. Cornelius C. Noack Phones: Inst. f. Theor. Physik FB 1 office : +49 (421) 218-2427 Universit"at Bremen secretary: -2422 Otto-Hahn-Allee Fax : -4869 D - 28334 Bremen home : +49 (421) 34 22 36 Fax: 346 7872 E-mail: noack at physik.uni-bremen.de or ccnoack at mailaps.org WWW-page: http://www.itp.uni-bremen.de/~noack .................................................................  Re: [MiKTeX] problem with writing math expressions From: Riccardo Lattanzi - 2004-06-28 21:30:19 Thanks everybody for helping. For those who ask about \mathscr I found it on one of the tutorials available on-line (pag 78 of PDF, pag 64 in the text): http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf Does anybody know how to solve the other display problem I wrote about: e^{i [( k _{lx} - \, k _{{l'} x}^*) is displayed with the subscript letters not aligned (at different levels). So the first "k" has the subscript "lx" at a higher position than the subscript "l'x" of the second "k". Is that solvable, or it has to do with the fact that the second "k" has also the superscript "*" (and the symbol ') and Latex automatically moves down the subscript? Best Regards, Riccardo On Mon, 28 Jun 2004 22:45:52 +0200 (=?iso-8859-1?Q?Westeurop=E4ische_Sommerzeit?=), Cornelius C. Noack wrote: > > Hi Ricardo, > since you say you are new to LaTeX, I must commend you on a > certain amount of bravery, tackling an already pretty advanced > task. You made about 4 different errors simultaneously. That is > not so unusal for a first draft; but obviously you had trouble > understanding the significance of the various error messages (in > your case coming from 3 different programs: TeX, LaTeX and the > amsmath package), and that is also quite common in the beginning. > So here is the most important advice: > > | Comment out as much as possible (literally even everything > | between the '\begin{document}' and the '\end{document}') > | until you get the source running errorfree, and then work > | your way up from there! > > I have taken your example and commented all your errors; cf. the > attachment. I hope you understand everything now; if not, you > should read both the LaTeX and the AmsMath documentation. > The code I sent back should run errorfree; if it doesn't, there is > an installation problem, get back to this list in that case. > > Here are a few more comments: > > (i) the command \mathscr is unkown to TeX, LaTeX and > amsmath (and to me, by the way). I have replaced it by > \textsc just to show you what's wrong, > (ii) 'letterpaper' should be the default (unless you have a > very special installation), so that is superfluous > (but innocuous), > (iii) the sitation is similar for the 'amsfonts' package: > you need that only when you need rather special math > fonts (usually not for regular physics texts), > (iv) the most non-trivial error is the mix of generic LaTeX > math constructions and those of amsmath. These are > often pretty tricky to find. You should by all means > at least browse through the amsmath users's guide, > available, e.g., from > > ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf > > I hope this is of some help to you. > > Regards, > ccn. > -- > > > > On Mon, 28 Jun 2004, Riccardo Lattanzi wrote: > > > Hi, > > > > I'm new to Latex and I really want to learn it. > > I'm trying to write a report containing some mathematical expression... > > so far it doesn't compile and I can't understand why. > > Can anybody help me with this? > > I'm pasting the code lines below. > > Thanks, > > Riccardo > > > > \documentclass[letterpaper,12pt]{article} > > \usepackage{amsfonts} > > \usepackage{amsmath} > > \author{Riccardo Lattanzi} > > \title{Analytical expression for the noise covariance matrix for > > different sample geometry} > > \begin{document} > > \maketitle > > \tableofcontents > > \section{General expression} > > \begin{displaymath} > > \Psi _{ \mathscr{ll}'}=\sigma \int_{V_S} \, \mathcal{E}_{\mathscr l > > }(\mathbf r) \cdot > > {\mathcal{E}_{\mathscr l'}}^*(\mathbf r) d^3 \mathbf r > > \end{displaymath} > > \begin{displaymath} > > \mathcal{E} _{\mathscr l }(\mathbf r) = \sum _{\mathscr l } \, > > \mathcal{E} _{\mathscr l }^{^{+,-}} > > e^{i {\mathbf k} _{\mathscr l } \cdot \, \mathbf r - \, i \omega t }> > \end{displaymath} > > > > \section{Filled cylinder: length 2*l, radius a} > > > > \label{eq:sgnl} > > \begin{align} > > > > \Psi _{ \mathscr{ll}'}& =\sigma \mathcal{E}_{\mathscr l} \cdot > > {\mathcal{E}_{\mathscr l'}}^* \int _{\mathscr -l }^{\mathscr l } > > e^{i ( k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) z}dz \, > > \int _0 ^{r_c} rdr \, \int _0 ^{2 \pi} > > e^{i [( k _{{\mathscr l} x} - \, k _{{\mathscr {l'}} x}^*) \cos{\theta} + > > ( k _{{\mathscr l} y} - \, k _{{\mathscr {l'}} y}^*) \sin{\theta}]r}d{\theta} \\ > > > > \frac{2\sin{(k _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*) l}{(k > > _{{\mathscr l} z} - \, k _{{\mathscr {l'}} z}^*)} > > > > > > \end{align} > > > > > > > > \end{document} > > > > > > ------------------------------------------------------- > > This SF.Net email sponsored by Black Hat Briefings & Training. > > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > > digital self defense, top technical experts, no vendor pitches, > > unmatched networking opportunities. Visit http://www.blackhat.com > > _______________________________________________ > > MiKTeX-Users mailing list > > MiKTeX-Users@... > > https://lists.sourceforge.net/lists/listinfo/miktex-users > > > > -- > ................................................................. > > Prof.Dr. Cornelius C. Noack Phones: > Inst. f. Theor. Physik FB 1 office : +49 (421) 218-2427 > Universit"at Bremen secretary: -2422 > Otto-Hahn-Allee Fax : -4869 > D - 28334 Bremen home : +49 (421) 34 22 36 > Fax: 346 7872 > E-mail: noack at physik.uni-bremen.de or ccnoack at mailaps.org > WWW-page: http://www.itp.uni-bremen.de/~noack > ................................................................. > > > lattanzi.tex - 2K Download >   Re: [MiKTeX] problem with writing math expressions From: Michael W Daniels - 2004-06-29 01:16:43 At 05:30 PM 6/28/2004, you wrote: >Does anybody know how to solve the other display problem I wrote about: > >e^{i [( k _{lx} - \, k _{{l'} x}^*) You need to insert an invisible prime in the first subscript:e^{i[(k_{l{\vphantom'}x}^{\phantom*} - k_{l'x}^*)]}$  RE: [MiKTeX] problem with writing math expressions From: Philip G. Ratcliffe - 2004-06-29 09:30:36 > >Does anybody know how to solve the other display problem I wrote about: > > > >e^{i [( k _{lx} - \, k _{{l'} x}^*) > > You need to insert an invisible prime in the first subscript: > >$e^{i[(k_{l{\vphantom'}x}^{\phantom*} - k_{l'x}^*)]}\$ Michael, take a close look at these two: $$e^{i [( k _{l^{\vphantom\prime}x}^{\vphantom{*}} - \, k _{l'x}^*)]}$$ $$e^{i[(k_{l{\vphantom'}x}^{\phantom*} - k_{l'x}^*)]}$$ You need to take care with ' since \vphantom' behaves as \vphantom{^\prime} and not ^{\vphantom\prime}, which are subtly different. Cordialmente, Philip G. Ratcliffe 

## Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks