Re: Referencing subnumbered equations
Am 21.02.2016 um 05:48 schrieb Andrew Parsloe: "If you want to reference the subequations at once". I don't think "at once" sounds right to a native English speaker. "At once" means "immediately" rather than "as a whole" or "collectively". Thus I would prefer, "If you want to reference the subequations collectively". Thanks, I used this term now. The changes are in: www.lyx.org/trac/changeset/e8eed35c/lyxgit (I misspelled your name, sorry.) regards Uwe
Re: Referencing subnumbered equations
On 21/02/2016 4:49 p.m., Uwe Stöhr wrote: Am 21.02.2016 um 03:56 schrieb Uwe Stöhr: OK, so it seems that this referencing method is used. I will add it to the Math manual. Attached is the changed Math manual (sec. 19.3). Is this OK? regards Uwe Thank you Uwe (and apologies for the recent noise). You write in 19.3, "If you want to reference the subequations at once". I don't think "at once" sounds right to a native English speaker. "At once" means "immediately" rather than "as a whole" or "collectively". Thus I would prefer, "If you want to reference the subequations collectively". Andrew LyX Document --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Referencing subnumbered equations
On 21/02/2016 3:56 p.m., Uwe Stöhr wrote: Am 20.02.2016 um 20:41 schrieb Andrew Parsloe: Sec 3.11.3: "A \label command immediately after \begin{subequations} will produce a \ref of the parent number 4.9, not 4.9a.". OK, so it seems that this referencing method is used. I will add it to the Math manual. And particularly section 3.7, "Alignment building blocks", where they discuss the environments aligned, gathered and alignedat, and give Maxwell's equations as an example. But this is in LyX for many years, see the math manual, sec. 18.6. regards Uwe OK, sometimes one makes a complete oaf of oneself and I have just done that. Of course they are in LyX already now that you point it out to me. I have always just looked at that menu, Insert > Math, scanned down through the AMS environments, come to the separator followed immediately by the Array environment, and shut off my brain apparently. I was quite unaware of their presence here despite considerable use of this menu over the past 10 years. Good grief! I retire in humiliation. Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Referencing subnumbered equations
Am 20.02.2016 um 20:41 schrieb Andrew Parsloe: Sec 3.11.3: "A \label command immediately after \begin{subequations} will produce a \ref of the parent number 4.9, not 4.9a.". OK, so it seems that this referencing method is used. I will add it to the Math manual. And particularly section 3.7, "Alignment building blocks", where they discuss the environments aligned, gathered and alignedat, and give Maxwell's equations as an example. But this is in LyX for many years, see the math manual, sec. 18.6. E.g. simply paste this code: \left.\begin{aligned} B'&=-\partial\times E,\\ E'&=\partial\times B - 4\pi j, \end{aligned} \right\} \qquad \text{Maxwell's equations} into an empty formula in LyX. But you told me that this is not enough. You want to number and reference the 2 equations. I don't know how to do this and sent you a link to solutions that are close to that. I would be curious to know if there is any solution for this problem or not on stackexchange. regards Uwe
Re: Referencing subnumbered equations
On 20/02/2016 3:32 p.m., Uwe Stöhr wrote: However, the question for me is if your method should be part of math.lyx or not. ... But maybe you find a nice solution in stackexchange. If so, please send me a LyX file how it is done and i will have a look what could be ported to Math.lyx. many thanks and regards Uwe Hullo Uwe, I thought I would do some serious searching through the AMS documentation. I find amsldoc.pdf in the amsmath document folder in MiKTeX. I confess I've never looked at this before. My eyes light up at two items. Sec 3.11.3: "A \label command immediately after \begin{subequations} will produce a \ref of the parent number 4.9, not 4.9a.". And particularly section 3.7, "Alignment building blocks", where they discuss the environments aligned, gathered and alignedat, and give Maxwell's equations as an example. These are exactly the environments I had in mind, and have seen used so often, and was consequently puzzled that AMS (and LyX) didn't seem to provide them. Well, obviously I was wrong about AMS. They do provide them. I will put in an enhancement request that LyX also provide them (if there isn't one already buried somewhere on trac). Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Referencing subnumbered equations
Original Message From: Andrew Parsloe Sent: Donnerstag, 18. Februar 2016 02:50 To: Uwe Stöhr; lyx-docs@lists.lyx.org Subject: Re: Referencing subnumbered equations > It's possible we are talking about different things Uwe. Extracting the example from 19.3 in the maths manual and compiling it separately, the numbering in the pdf is (1), (1a), (1b), equation (1) being what you mean by the outer equation (I assume). In my example documents there is no outer equation. They are treated equally and so are numbered (1a) and (1b). And yet I would still like to be able to refer to them collectively as "the equations (1)". (I can imagine some discussion like: "The answer to this question is contained in the equations (1). By substituting from (1b) into (1a), ") Yes, I understood you correctly. But the point is still that math.lyx doesn't try to explain what you do, it only explains the subnumbering. Besides this I am still wondering why you make it so complicated to reference 1, 1a, 1b. If you need this you can simply use 1, 2, 3. (you don't need subequations) Regards Uwe
Re: Referencing subnumbered equations
Am 17.02.2016 um 03:08 schrieb Andrew Parsloe: Rather than try to explain things, I've attached two example documents Uwe, one using ERT and one with a local layout that requires no ERT. They show how to reference both a group of equations as a whole and the subequations in the group. Thanks. But this was exactly my point: In Math.lyx the section describes subequations, their labeling and their referencing. What you are doing is to reference the outer equation. But if you don't want to reference the subequations (as you do in your example file) why do you use subequations then? regards Uwe
Re: Referencing subnumbered equations
On 17/02/2016 3:08 p.m., Andrew Parsloe wrote: On 17/02/2016 1:05 p.m., Uwe Stöhr wrote: Rather than try to explain things, I've attached two example documents Uwe, one using ERT and one with a local layout that requires no ERT. They show how to reference both a group of equations as a whole and the subequations in the group. (These documents were written with your beta2 LyX on Windows 7.) Andrew I see that the two documents I attached to my earlier email had the module "Calculyx" added. It has nothing to do with them and can be deleted in the Document > Settings > Module window. Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
Re: Referencing subnumbered equations
On 17/02/2016 1:05 p.m., Uwe Stöhr wrote: Am 16.02.2016 um 10:37 schrieb Andrew Parsloe: The math manual, section 19.3,... Hi Andrew, this is something for the lyx-docs list. gives a method for numbering and referencing subnumbered equations so that although the equations are numbered, e.g., (1a), (1b), (1c), it is possible to reference them collectively, e.g. as the equations (1) (without the a, b, c). The method seems "messy". I am confused because I wanted to show how to reference the equations correctly, meaning as (1a), (1b), (1c). If you want to omit the subnumbering you can do this but this won't be part of Math.lyx since it is the idea of the subnumbering to get the a, b, c. regards Uwe Rather than try to explain things, I've attached two example documents Uwe, one using ERT and one with a local layout that requires no ERT. They show how to reference both a group of equations as a whole and the subequations in the group. (These documents were written with your beta2 LyX on Windows 7.) Andrew --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus #LyX 2.2 created this file. For more info see http://www.lyx.org/ \lyxformat 506 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass book \begin_preamble \end_preamble \use_default_options false \begin_modules calculyx \end_modules \maintain_unincluded_children false \language english \language_package none \inputencoding utf8 \fontencoding T1 \font_roman "lmodern" "default" \font_sans "lmss" "default" \font_typewriter "lmtt" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref false \papersize default \use_geometry false \use_package amsmath 2 \use_package amssymb 2 \use_package cancel 0 \use_package esint 1 \use_package mathdots 0 \use_package mathtools 0 \use_package mhchem 0 \use_package stackrel 0 \use_package stmaryrd 0 \use_package undertilde 0 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 0 \branch Note \selected 0 \filename_suffix 0 \color #7f \end_branch \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Standard Here is an example using ERT with a label inserted immediately after the \series bold \backslash begin{subequations} \series default (it could also be inserted immediately before the \series bold \backslash end{subequations} \series default ), and labels inserted into the subequations, so that they too can be referenced. I've had to write the prefix \begin_inset Quotes els \end_inset eq: \begin_inset Quotes ers \end_inset explicitly for the first label. \end_layout \begin_layout Standard This first example, i.e. the equations ( \begin_inset CommandInset ref LatexCommand ref reference "eq:example-one" \end_inset ), is a functional equation for \begin_inset Formula $M$ \end_inset and \begin_inset Formula $m$ \end_inset in terms of \begin_inset Formula $\mathbf{U}$ \end_inset and \begin_inset Formula $\mathbf{u}$ \end_inset respectively. This becomes clear on substituting ( \begin_inset CommandInset ref LatexCommand ref reference "eq:second" \end_inset ) into ( \begin_inset CommandInset ref LatexCommand ref reference "eq:first" \end_inset ), \begin_inset ERT status open \begin_layout Plain Layout \backslash begin{subequations} \end_layout \end_inset \begin_inset CommandInset label LatexCommand label name "eq:example-one" \end_inset \begin_inset Formula \begin{align} M(\mathbf{U}) & =m(\mathbf{u})A+\sum_{j}u^{j}B_{j},\label{eq:first}\\ U^{i} & =m(\mathbf{u})C^{i}+\sum_{j}u^{j}D_{j}^{i},\label{eq:second} \end{align} \end_inset \begin_inset ERT status open \begin_layout Plain Layout \backslash end{subequations} \end_layout \end_inset where \begin_inset Formula $\mathbf{U}=(U^{1},\ldots,U^{N})$ \end_inset and \begin_inset Formula $\mathbf{u}=(u^{1},\ldots,u^{N})$ \end_inset . \end_layout \begin_layout Standard When compiled to pdf (the example needs the \family typewriter amsmath \family default package) the two equations as a whole are referenced correctly, i.e. ( \begin_inset CommandInset ref LatexCommand ref reference "eq:example-one" \end_inset ) for the group as a whole, the equation number lacking the trailing \begin_inset Quotes els
Re: Referencing subnumbered equations
Am 16.02.2016 um 10:37 schrieb Andrew Parsloe: The math manual, section 19.3,... Hi Andrew, this is something for the lyx-docs list. gives a method for numbering and referencing subnumbered equations so that although the equations are numbered, e.g., (1a), (1b), (1c), it is possible to reference them collectively, e.g. as the equations (1) (without the a, b, c). The method seems "messy". I am confused because I wanted to show how to reference the equations correctly, meaning as (1a), (1b), (1c). If you want to omit the subnumbering you can do this but this won't be part of Math.lyx since it is the idea of the subnumbering to get the a, b, c. regards Uwe