Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 09:49:44PM +0100, Moritz Moeller-Herrmann wrote: I have also created bug number 838 and added your patch as attachment. Good. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann [EMAIL PROTECTED] writes: | Angus Leeming wrote: | | Moritz Moeller-Herrmann wrote: | | * You would like some on-screen way to differentiate between | different footnotes. | | Correct. | | * Lars thinks that you really need footnote labels. | | False. I do not need these labels. Well I am not sure you don't... I want to know _what_ you are trying to do. and _why_. When we have a clear perspective on that, _then_ we can begin talking about _how_. | I have watched lyx development since before 1.0. The request for footnote | counters has been made several times by me. I also put it into a bugzilla | wish, where it was closed as invalid, IIRC. If the request was just I want footnote counters then that was a valid response. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Dr. Richard E. Hawkins [EMAIL PROTECTED] writes: | It occurs to me that in the cases where footnote numbering would be | useful, numbering the footnotes that exist on loading the document would | be sufficient--these are the only ones that can already be on paper or | in someone else's hands . . . in fact, it would seem to be more useful | *not* to update numbering after opening the document . . . Yes, footnote numbers has the same problems as chapter/sections numbers in this regard. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 09:49:44PM +0100, Moritz Moeller-Herrmann wrote: > I have also created bug number 838 and added your patch as > attachment. Good. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: | | > Moritz Moeller-Herrmann wrote: | | > * You would like some on-screen way to differentiate between | > different footnotes. | | Correct. | | > * Lars thinks that you really need footnote labels. | | False. I do not need these labels. Well I am not sure you don't... I want to know _what_ you are trying to do. and _why_. When we have a clear perspective on that, _then_ we can begin talking about _how_. | I have watched lyx development since before 1.0. The request for footnote | counters has been made several times by me. I also put it into a bugzilla | wish, where it was closed as invalid, IIRC. If the request was just "I want footnote counters" then that was a valid response. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
"Dr. Richard E. Hawkins" <[EMAIL PROTECTED]> writes: | It occurs to me that in the cases where footnote numbering would be | useful, numbering the footnotes that exist on loading the document would | be sufficient--these are the only ones that can already be on paper or | in someone else's hands . . . in fact, it would seem to be more useful | *not* to update numbering after opening the document . . . Yes, footnote numbers has the same problems as chapter/sections numbers in this regard. -- Lgb
footnote numbering [was: Re: footnotes preview in lyx-1.3]
Angus Leeming wrote: Moritz Moeller-Herrmann wrote: It seems as if you can set \usepackage[footnotes]{preview} in Emacs and have a preview of the footnote mark. [...] LyX uses a little box saying foot (possibly translated) to show a footnote. Would you write better documents if LyX displayed some symbol or other? I doubt it. Sure, we /could/ do it, at the cost of complicating the code (read introduce more bugs). However, I suspect that we'd rather spend out limited time in other ways. If you had ever tried editing a document with more than 1000 footnotes all of them labeled as [foot] in lyx, because lyx is unable to show the footnote number, you would see why it is helpful to see the footnote mark. On a more practical level, the only way to get this right is to make LyX aware of the footnote symbols. If we were to show the symbol on the footnote box, then using preview-latex is just a kludge. Better a kludge, than nothing! I have wished for footnote numbering since 1999. Inserting a new footnote between existing ones will change the symbol for all subsequent footnotes. It seems like a huge overkill to regenerate all these images. Indded, what happens if you use a footnote package that displayed footnotes as numbers starting from 1 on each new page? Should LyX know what text fits on which page? Of course not. This is a can of worms that I will not open. In that case the footnote number is always useless information, which is why noone uses footnote numbering by page in the real world. (I assume it was useful for people with mechanical typewriters...) I am sick of getting this argument against implementing a fscking simple footnote counter in lyx. So after reading your very long answer, I can only conclude, that lyx does not and will never have a useful implementation to see the footnote number, either using preview-latex (kludge) or otherwise. I think this is disappointing, because lyx would be a lot more useful to the sciences where footnotes are common (Humanities, Law), if it were possible to see the footnote number. How hard would it be to learn enough C++ and lyx to add this feature myself?
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 05:42:13PM +0100, Moritz Moeller-Herrmann wrote: How hard would it be to learn enough C++ and lyx to add this feature myself? Two months. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Andre Poenitz wrote: On Tue, Jan 21, 2003 at 05:42:13PM +0100, Moritz Moeller-Herrmann wrote: How hard would it be to learn enough C++ and lyx to add this feature myself? Two months. How long would it take you and how much money would you (or anyone else on this list) want for it?
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann [EMAIL PROTECTED] writes: | LyX uses a little box saying foot (possibly translated) to show a | footnote. Would you write better documents if LyX displayed some | symbol or other? I doubt it. Sure, we /could/ do it, at the cost of | complicating the code (read introduce more bugs). However, I suspect | that we'd rather spend out limited time in other ways. | | If you had ever tried editing a document with more than 1000 footnotes all | of them labeled as [foot] in lyx, because lyx is unable to show the | footnote number, you would see why it is helpful to see the footnote mark. What would you like to see the footnote number or mark? What benefits does it give? | On a more practical level, the only way to get this right is to make | LyX aware of the footnote symbols. If we were to show the symbol on | the footnote box, then using preview-latex is just a kludge. | | Better a kludge, than nothing! I have wished for footnote numbering since | 1999. _why_? | I am sick of getting this argument against implementing a fscking simple | footnote counter in lyx. So after reading your very long answer, I can only | conclude, that lyx does not and will never have a useful implementation to | see the footnote number, either using preview-latex (kludge) or | otherwise. What are you goint to do with that number? Look at it? | I think this is disappointing, because lyx would be a lot more useful to the | sciences where footnotes are common (Humanities, Law), if it were possible | to see the footnote number. _why_? | How hard would it be to learn enough C++ and lyx to add this feature myself? Even if you learn enough C++, and that is not a lot you have to learn, it is questionable if this feature should be added. Seems to me that what you really want is footnote labels and to have the label name mentioned in the foot on screen. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann [EMAIL PROTECTED] writes: | Andre Poenitz wrote: | | On Tue, Jan 21, 2003 at 05:42:13PM +0100, Moritz Moeller-Herrmann wrote: | How hard would it be to learn enough C++ and lyx to add this feature | myself? | | Two months. | | How long would it take you and how much money would you | (or anyone else on this list) want for it? as said in another mail: I am not sure this is what you really want. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 05:50:05PM +0100, Moritz Moeller-Herrmann wrote: How hard would it be to learn enough C++ and lyx to add this feature myself? Two months. How long would it take you Depends on the end of the feature freeze. Probably less than two months. and how much money would you (or anyone else on this list) want for it? Usually nothing. The project would need some beer in June, though ;-} Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 05:51:16PM +0100, Lars Gullik Bjønnes wrote: | If you had ever tried editing a document with more than 1000 footnotes all | of them labeled as [foot] in lyx, because lyx is unable to show the | footnote number, you would see why it is helpful to see the footnote mark. What would you like to see the footnote number or mark? What benefits does it give? Actually I accept his argument that a sequential numbering of all footnotes might be some navigation help if the number of footnotes gets large. What are you goint to do with that number? Look at it? One can e.g. make the (sequential!) numbers appear in print as well. Going back from the proofs to the .lyx would be easy then. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
even if the number of footnotes is not overwhelming, going from paper corrections (can you change this in footnote 6) to the right place in lyx is a bit of a hassle... Ed.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tuesday 21 January 2003 16:57, Andre Poenitz wrote: What would you like to see the footnote number or mark? What benefits does it give? Actually I accept his argument that a sequential numbering of all footnotes might be some navigation help if the number of footnotes gets large. What are you goint to do with that number? Look at it? One can e.g. make the (sequential!) numbers appear in print as well. Going back from the proofs to the .lyx would be easy then. Then this means that both the number and the name are useful. When writing is useful to read the name, when proofreading it is useful the number. Are the arguments like this? Andre' -- José Abílio
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Andre Poenitz wrote: On Tue, Jan 21, 2003 at 05:51:16PM +0100, Lars Gullik Bjønnes wrote: | If you had ever tried editing a document with more than 1000 footnotes | all of them labeled as [foot] in lyx, because lyx is unable to show | the footnote number, you would see why it is helpful to see the | footnote mark. What would you like to see the footnote number or mark? What benefits does it give? Actually I accept his argument that a sequential numbering of all footnotes might be some navigation help if the number of footnotes gets large. What are you goint to do with that number? Look at it? One can e.g. make the (sequential!) numbers appear in print as well. Going back from the proofs to the .lyx would be easy then. Yes, you understand me :-) This is especially true, if you get back corrected and annotated proofs from someone else. Then the footnote numbering (which does normally not change a lot) provides a very good navigation aid. ATM all I would have to use latex directly with src-specials and jump back between dvi and source to make correcting the proofs simpler, but I would prefer doing this in lyx.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, 21 Jan 2003, Edwin Leuven wrote: even if the number of footnotes is not overwhelming, going from paper corrections (can you change this in footnote 6) to the right place in lyx is a bit of a hassle... One way to solve this problem is to implement inverse search http://bugzilla.lyx.org/show_bug.cgi?id=94 You open the document, then call the previewer, find footnote 6 then by inverse search, lyx finds the footnote. João.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
José Matos wrote: On Tuesday 21 January 2003 16:57, Andre Poenitz wrote: What would you like to see the footnote number or mark? What benefits does it give? One can e.g. make the (sequential!) numbers appear in print as well. Going back from the proofs to the .lyx would be easy then. Then this means that both the number and the name are useful. When writing is useful to read the name, when proofreading it is useful the number. Are the arguments like this? The argument goes like this: Mr. Moeller-Herrmann, in footnote 477, your argument is wrong and you have to cite XYZ. At the moment I have to compile the lyx document, check the dvi, find footnote 477, look for and remember some significant text part, go back to lyx, search for the remembered text part, check back with the dvi document to see if I am at the correct position, then start typing. Now with footnote numbering, I would scroll down until I see footnote 477, start typing. Do you understand why it would be useful for me (and others)?
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann wrote: I am sick of getting this argument against implementing a fscking simple footnote counter in lyx. So after reading your very long answer, I can only conclude, that lyx does not and will never have a useful implementation to see the footnote number, either using preview-latex (kludge) or otherwise. I've read the long stream of mails that my response generated. I think that it can be summarised as: * You would like some on-screen way to differentiate between different footnotes. * Lars thinks that you really need footnote labels. * André and myself both think that preview-latex is the wrong way to go about providing this information. The moral? Take an active interest in the 1.4 development cycle. Requests /are/ considered seriously. Often, they result in a vigorous discussion about the 'best' way forward. That can be frustrating when you feel your request is simple (been there), but experience shows we don't have the manpower to implement features poorly. We have to get them 'nearly right' first time. LyX already has counters internally. It uses them for things like Sections. The code was cleaned up enormously by Martin Vermeer in the 1.3 cycle, but he shied away from using them for the screen representation of things like Figure Floats. That's why they appear on screen as Figure '#'. He's done the majority of the work though, so it's not unreasonable to expect to see Figure 1, Table 2 in LyX 1.4. It would probably be trivially easy to have footnotes numbered too. Best regards, -- Angus
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tuesday 21 January 2003 17:20, Moritz Moeller-Herrmann wrote: The argument goes like this: Mr. Moeller-Herrmann, in footnote 477, your argument is wrong and you have to cite XYZ. At the moment I have to compile the lyx document, check the dvi, find footnote 477, look for and remember some significant text part, go back to lyx, search for the remembered text part, check back with the dvi document to see if I am at the correct position, then start typing. Now with footnote numbering, I would scroll down until I see footnote 477, start typing. Then it would be easier to have the footnotes in navigate, or even better a function goto-footnote #n. Do you understand why it would be useful for me (and others)? It is easier to understand now. :-) -- José Abílio
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 06:20:09PM +0100, Moritz Moeller-Herrmann wrote: [...] Here we go. Very quickdirty and only barely functional (it takes a while after an insertion until the change has propagated) Moritz could apply this in hid local tree and remind us during the 1.4 cycle to discuss this issue again. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson) Index: lib/layouts/stdcounters.inc === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/layouts/stdcounters.inc,v retrieving revision 1.1 diff -u -p -r1.1 stdcounters.inc --- lib/layouts/stdcounters.inc 6 Sep 2002 14:47:58 - 1.1 +++ lib/layouts/stdcounters.inc 21 Jan 2003 17:53:36 - @@ -71,3 +71,8 @@ End Counter Name algorithm End + +Counter + Name footnote +End + Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.269 diff -u -p -r1.269 text2.C --- src/text2.C 18 Dec 2002 14:36:28 - 1.269 +++ src/text2.C 21 Jan 2003 17:53:36 - @@ -38,6 +38,7 @@ #include insets/insetbib.h #include insets/insetspecialchar.h #include insets/insettext.h +#include insets/insetfoot.h #include insets/insetfloat.h #include insets/insetwrap.h @@ -1170,7 +1171,6 @@ void LyXText::setCounter(Buffer const * LyXLayout_ptr const layout = par-layout(); if (par-previous()) { - par-params().appendix(par-previous()-params().appendix()); if (!par-params().appendix() par-params().startOfAppendix()) { par-params().appendix(true); @@ -1358,6 +1358,16 @@ void LyXText::setCounter(Buffer const * textclass.counters().reset(enumiii); case 3: textclass.counters().reset(enumiv); + } + } + + // search for footnotes + for (lyx::pos_type pos = 0, n = par-size(); pos n; ++pos) { + Inset * inset = par-getInset(pos); + if (inset inset-lyxCode() == Inset::FOOT_CODE) { + textclass.counters().step(footnote); + static_castInsetFoot*(inset) + -number(textclass.counters().value(footnote)); } } } Index: src/text3.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v retrieving revision 1.29 diff -u -p -r1.29 text3.C --- src/text3.C 17 Jan 2003 09:57:50 - 1.29 +++ src/text3.C 21 Jan 2003 17:53:36 - @@ -1623,7 +1623,6 @@ Inset::RESULT LyXText::dispatch(FuncRequ case LFUN_INSERT_NOTE: case LFUN_INSET_ERT: case LFUN_INSET_FLOAT: - case LFUN_INSET_FOOTNOTE: case LFUN_INSET_MARGINAL: case LFUN_INSET_MINIPAGE: case LFUN_INSET_OPTARG: @@ -1633,6 +1632,11 @@ Inset::RESULT LyXText::dispatch(FuncRequ // Open the inset, and move the current selection // inside it. doInsertInset(this, cmd, true, true); + break; + + case LFUN_INSET_FOOTNOTE: + doInsertInset(this, cmd, true, true); + bv-text-updateCounters(bv); break; case LFUN_INSERT_URL: Index: src/insets/insetfoot.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfoot.C,v retrieving revision 1.50 diff -u -p -r1.50 insetfoot.C --- src/insets/insetfoot.C 25 Sep 2002 14:26:10 - 1.50 +++ src/insets/insetfoot.C 21 Jan 2003 17:53:36 - @@ -28,23 +28,24 @@ #include lyxlayout.h #include buffer.h #include paragraph.h +#include Lsstream.h using std::ostream; InsetFoot::InsetFoot(BufferParams const bp) - : InsetFootlike(bp) + : InsetFootlike(bp), number_(0) { - setLabel(_(foot)); + relabel(); setInsetName(Foot); } InsetFoot::InsetFoot(InsetFoot const in, bool same_id) - : InsetFootlike(in, same_id) + : InsetFootlike(in, same_id), number_(0) { - setLabel(_(foot)); + relabel(); setInsetName(Foot); } @@ -83,6 +84,20 @@ int InsetFoot::docbook(Buffer const * bu os footnote; int const i = inset.docbook(buf, os, mixcont); os /footnote; - return i; +} + + +void InsetFoot::relabel() +{ + ostringstream os; + os _(foot) : number_; + setLabel(os.str()); +} + + +void InsetFoot::number(int n) +{ + number_ = n; + relabel(); } Index: src/insets/insetfoot.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfoot.h,v retrieving revision 1.34 diff -u -p -r1.34 insetfoot.h ---
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Angus Leeming wrote: Moritz Moeller-Herrmann wrote: * You would like some on-screen way to differentiate between different footnotes. Correct. * Lars thinks that you really need footnote labels. False. I do not need these labels. * André and myself both think that preview-latex is the wrong way to go about providing this information. That might be. I thought it might be easier than a lyx native solution with the counters, if the work is already done in preview.sty. The moral? Take an active interest in the 1.4 development cycle. I have watched lyx development since before 1.0. The request for footnote counters has been made several times by me. I also put it into a bugzilla wish, where it was closed as invalid, IIRC. [...] LyX already has counters internally. It uses them for things like Sections. The code was cleaned up enormously by Martin Vermeer in the 1.3 cycle, but he shied away from using them for the screen representation of things like Figure Floats. That's why they appear on screen as Figure '#'. He's done the majority of the work though, so it's not unreasonable to expect to see Figure 1, Table 2 in LyX 1.4. It would probably be trivially easy to have footnotes numbered too. I look forward to 1.4 then. Thanks for your hard work on lyx and your replies.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 09:49:44PM +0100, Moritz Moeller-Herrmann wrote: I will :-) I have also created bug number 838 and added your patch as attachment. This is now bug 409 as it was a dupe (as you know ...) regards john -- When you start off by telling those who disagree with you that they are not merely in error but in sin, how much of a dialogue do you expect ? - Thomas Sowell
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 06:11:59PM +0100, Edwin Leuven wrote: even if the number of footnotes is not overwhelming, going from paper corrections (can you change this in footnote 6) to the right place in lyx is a bit of a hassle... It occurs to me that in the cases where footnote numbering would be useful, numbering the footnotes that exist on loading the document would be sufficient--these are the only ones that can already be on paper or in someone else's hands . . . in fact, it would seem to be more useful *not* to update numbering after opening the document . . . hawk -- Richard E. Hawkins, Asst. Prof. of Economics/\ ASCII ribbon campaign [EMAIL PROTECTED] Smeal 178 (814) 375-4700 \ / against HTML mail These opinions will not be those of Xand postings. Penn State until it pays my retainer. / \
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
John Levon wrote: This is now bug 409 as it was a dupe (as you know ...) Sorry, I searched for footnote and footnotes and did not find my old bug, nor did I get sent the additional responses.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 10:15:52PM +0100, Moritz Moeller-Herrmann wrote: This is now bug 409 as it was a dupe (as you know ...) Sorry, I searched for footnote and footnotes and did not find my old bug, You need to change the default search setting to include closed bugs too, it's quite obscure alas. Forgiven ;) nor did I get sent the additional responses. Hmm, temporary problem perhaps... regards john -- When you start off by telling those who disagree with you that they are not merely in error but in sin, how much of a dialogue do you expect ? - Thomas Sowell
footnote numbering [was: Re: footnotes preview in lyx-1.3]
Angus Leeming wrote: > Moritz Moeller-Herrmann wrote: >> It seems as if you can set \usepackage[footnotes]{preview} in Emacs >> and have a preview of the footnote mark. [...] > LyX uses a little box saying "foot" (possibly translated) to show a > footnote. Would you write better documents if LyX displayed some > symbol or other? I doubt it. Sure, we /could/ do it, at the cost of > complicating the code (read introduce more bugs). However, I suspect > that we'd rather spend out limited time in other ways. If you had ever tried editing a document with more than 1000 footnotes all of them labeled as "[foot]" in lyx, because lyx is unable to show the footnote number, you would see why it is helpful to see the footnote mark. > On a more practical level, the only way to get this right is to make > LyX aware of the footnote symbols. If we were to show the symbol on > the footnote box, then using preview-latex is just a kludge. Better a kludge, than nothing! I have wished for footnote numbering since 1999. > Inserting a new footnote between existing ones will change the symbol > for all subsequent footnotes. It seems like a huge overkill to > regenerate all these images. Indded, what happens if you use a > footnote package that displayed footnotes as numbers starting from 1 > on each new page? Should LyX know what text fits on which page? Of > course not. This is a can of worms that I will not open. In that case the footnote number is always useless information, which is why noone uses footnote numbering by page in the real world. (I assume it was useful for people with mechanical typewriters...) I am sick of getting this argument against implementing a fscking simple footnote counter in lyx. So after reading your very long answer, I can only conclude, that lyx does not and will never have a useful implementation to see the footnote number, either using preview-latex ("kludge") or otherwise. I think this is disappointing, because lyx would be a lot more useful to the sciences where footnotes are common (Humanities, Law), if it were possible to see the footnote number. How hard would it be to learn enough C++ and lyx to add this feature myself?
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 05:42:13PM +0100, Moritz Moeller-Herrmann wrote: > How hard would it be to learn enough C++ and lyx to add this feature myself? Two months. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Andre Poenitz wrote: > On Tue, Jan 21, 2003 at 05:42:13PM +0100, Moritz Moeller-Herrmann wrote: >> How hard would it be to learn enough C++ and lyx to add this feature >> myself? > > Two months. How long would it take you and how much money would you (or anyone else on this list) want for it?
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann <[EMAIL PROTECTED]> writes: | > LyX uses a little box saying "foot" (possibly translated) to show a | > footnote. Would you write better documents if LyX displayed some | > symbol or other? I doubt it. Sure, we /could/ do it, at the cost of | > complicating the code (read introduce more bugs). However, I suspect | > that we'd rather spend out limited time in other ways. | | If you had ever tried editing a document with more than 1000 footnotes all | of them labeled as "[foot]" in lyx, because lyx is unable to show the | footnote number, you would see why it is helpful to see the footnote mark. What would you like to see the footnote number or mark? What benefits does it give? | > On a more practical level, the only way to get this right is to make | > LyX aware of the footnote symbols. If we were to show the symbol on | > the footnote box, then using preview-latex is just a kludge. | | Better a kludge, than nothing! I have wished for footnote numbering since | 1999. _why_? | I am sick of getting this argument against implementing a fscking simple | footnote counter in lyx. So after reading your very long answer, I can only | conclude, that lyx does not and will never have a useful implementation to | see the footnote number, either using preview-latex ("kludge") or | otherwise. What are you goint to do with that number? Look at it? | I think this is disappointing, because lyx would be a lot more useful to the | sciences where footnotes are common (Humanities, Law), if it were possible | to see the footnote number. _why_? | How hard would it be to learn enough C++ and lyx to add this feature myself? Even if you learn enough C++, and that is not a lot you have to learn, it is questionable if this "feature" should be added. Seems to me that what you really want is footnote labels and to have the label name mentioned in the "foot" on screen. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann <[EMAIL PROTECTED]> writes: | Andre Poenitz wrote: | | > On Tue, Jan 21, 2003 at 05:42:13PM +0100, Moritz Moeller-Herrmann wrote: | >> How hard would it be to learn enough C++ and lyx to add this feature | >> myself? | > | > Two months. | | How long would it take you and how much money would you | (or anyone else on this list) want for it? as said in another mail: I am not sure this is what you really want. -- Lgb
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 05:50:05PM +0100, Moritz Moeller-Herrmann wrote: > >> How hard would it be to learn enough C++ and lyx to add this feature > >> myself? > > > > Two months. > > How long would it take you Depends on the end of the feature freeze. Probably less than two months. > and how much money would you > (or anyone else on this list) want for it? Usually nothing. The project would need some beer in June, though ;-} Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 05:51:16PM +0100, Lars Gullik Bjønnes wrote: > | If you had ever tried editing a document with more than 1000 footnotes all > | of them labeled as "[foot]" in lyx, because lyx is unable to show the > | footnote number, you would see why it is helpful to see the footnote mark. > > What would you like to see the footnote number or mark? What benefits > does it give? Actually I accept his argument that a sequential numbering of all footnotes might be some navigation help if the number of footnotes gets large. > What are you goint to do with that number? Look at it? One can e.g. make the (sequential!) numbers appear in print as well. Going back from the proofs to the .lyx would be easy then. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
even if the number of footnotes is not overwhelming, going from paper corrections ("can you change this in footnote 6") to the right place in lyx is a bit of a hassle... Ed.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tuesday 21 January 2003 16:57, Andre Poenitz wrote: > > What would you like to see the footnote number or mark? What benefits > > does it give? > > Actually I accept his argument that a sequential numbering of all footnotes > might be some navigation help if the number of footnotes gets large. > > > What are you goint to do with that number? Look at it? > > One can e.g. make the (sequential!) numbers appear in print as well. > Going back from the proofs to the .lyx would be easy then. Then this means that both the number and the name are useful. When writing is useful to read the name, when proofreading it is useful the number. Are the arguments like this? > Andre' -- José Abílio
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Andre Poenitz wrote: > On Tue, Jan 21, 2003 at 05:51:16PM +0100, Lars Gullik Bjønnes wrote: >> | If you had ever tried editing a document with more than 1000 footnotes >> | all of them labeled as "[foot]" in lyx, because lyx is unable to show >> | the footnote number, you would see why it is helpful to see the >> | footnote mark. >> What would you like to see the footnote number or mark? What benefits >> does it give? > Actually I accept his argument that a sequential numbering of all > footnotes might be some navigation help if the number of footnotes gets > large. >> What are you goint to do with that number? Look at it? > One can e.g. make the (sequential!) numbers appear in print as well. > Going back from the proofs to the .lyx would be easy then. Yes, you understand me :-) This is especially true, if you get back corrected and annotated proofs from someone else. Then the footnote numbering (which does normally not change a lot) provides a very good navigation aid. ATM all I would have to use latex directly with src-specials and jump back between dvi and source to make correcting the proofs simpler, but I would prefer doing this in lyx.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, 21 Jan 2003, Edwin Leuven wrote: > even if the number of footnotes is not overwhelming, going from paper > corrections ("can you change this in footnote 6") to the right place in lyx > is a bit of a hassle... One way to solve this problem is to implement "inverse search" http://bugzilla.lyx.org/show_bug.cgi?id=94 You open the document, then call the previewer, find "footnote 6" then by inverse search, lyx finds the footnote. João.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
José Matos wrote: > On Tuesday 21 January 2003 16:57, Andre Poenitz wrote: >> > What would you like to see the footnote number or mark? What benefits >> > does it give? >> One can e.g. make the (sequential!) numbers appear in print as well. >> Going back from the proofs to the .lyx would be easy then. > Then this means that both the number and the name are useful. When > writing > is useful to read the name, when proofreading it is useful the number. > Are the arguments like this? The argument goes like this: "Mr. Moeller-Herrmann, in footnote 477, your argument is wrong and you have to cite XYZ". At the moment I have to compile the lyx document, check the dvi, find footnote 477, look for and remember some significant text part, go back to lyx, search for the remembered text part, check back with the dvi document to see if I am at the correct position, then start typing. Now with footnote numbering, I would scroll down until I see footnote 477, start typing. Do you understand why it would be useful for me (and others)?
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Moritz Moeller-Herrmann wrote: > I am sick of getting this argument against implementing a fscking > simple footnote counter in lyx. So after reading your very long > answer, I can only conclude, that lyx does not and will never have a > useful implementation to see the footnote number, either using > preview-latex ("kludge") or otherwise. I've read the long stream of mails that my response generated. I think that it can be summarised as: * You would like some on-screen way to differentiate between different footnotes. * Lars thinks that you really need footnote labels. * André and myself both think that preview-latex is the wrong way to go about providing this information. The moral? Take an active interest in the 1.4 development cycle. Requests /are/ considered seriously. Often, they result in a vigorous discussion about the 'best' way forward. That can be frustrating when you feel your request is simple (been there), but experience shows we don't have the manpower to implement features poorly. We have to get them 'nearly right' first time. LyX already has counters internally. It uses them for things like Sections. The code was cleaned up enormously by Martin Vermeer in the 1.3 cycle, but he shied away from using them for the screen representation of things like Figure Floats. That's why they appear on screen as Figure '#'. He's done the majority of the work though, so it's not unreasonable to expect to see Figure 1, Table 2 in LyX 1.4. It would probably be trivially easy to have footnotes numbered too. Best regards, -- Angus
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tuesday 21 January 2003 17:20, Moritz Moeller-Herrmann wrote: > The argument goes like this: > > "Mr. Moeller-Herrmann, in footnote 477, your argument is wrong and you have > to cite XYZ". > > At the moment I have to compile the lyx document, check the dvi, find > footnote 477, look for and remember some significant text part, go back to > lyx, search for the remembered text part, check back with the dvi document > to see if I am at the correct position, then start typing. > > Now with footnote numbering, I would scroll down until I see footnote 477, > start typing. Then it would be easier to have the footnotes in navigate, or even better a function goto-footnote #n. > Do you understand why it would be useful for me (and others)? It is easier to understand now. :-) -- José Abílio
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 06:20:09PM +0100, Moritz Moeller-Herrmann wrote: > [...] Here we go. Very quick and only barely functional (it takes a while after an insertion until the change has "propagated") Moritz could apply this in hid local tree and remind us during the 1.4 cycle to discuss this issue again. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson) Index: lib/layouts/stdcounters.inc === RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/layouts/stdcounters.inc,v retrieving revision 1.1 diff -u -p -r1.1 stdcounters.inc --- lib/layouts/stdcounters.inc 6 Sep 2002 14:47:58 - 1.1 +++ lib/layouts/stdcounters.inc 21 Jan 2003 17:53:36 - @@ -71,3 +71,8 @@ End Counter Name algorithm End + +Counter + Name footnote +End + Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.269 diff -u -p -r1.269 text2.C --- src/text2.C 18 Dec 2002 14:36:28 - 1.269 +++ src/text2.C 21 Jan 2003 17:53:36 - @@ -38,6 +38,7 @@ #include "insets/insetbib.h" #include "insets/insetspecialchar.h" #include "insets/insettext.h" +#include "insets/insetfoot.h" #include "insets/insetfloat.h" #include "insets/insetwrap.h" @@ -1170,7 +1171,6 @@ void LyXText::setCounter(Buffer const * LyXLayout_ptr const & layout = par->layout(); if (par->previous()) { - par->params().appendix(par->previous()->params().appendix()); if (!par->params().appendix() && par->params().startOfAppendix()) { par->params().appendix(true); @@ -1358,6 +1358,16 @@ void LyXText::setCounter(Buffer const * textclass.counters().reset("enumiii"); case 3: textclass.counters().reset("enumiv"); + } + } + + // search for footnotes + for (lyx::pos_type pos = 0, n = par->size(); pos < n; ++pos) { + Inset * inset = par->getInset(pos); + if (inset && inset->lyxCode() == Inset::FOOT_CODE) { + textclass.counters().step("footnote"); + static_cast(inset) + ->number(textclass.counters().value("footnote")); } } } Index: src/text3.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text3.C,v retrieving revision 1.29 diff -u -p -r1.29 text3.C --- src/text3.C 17 Jan 2003 09:57:50 - 1.29 +++ src/text3.C 21 Jan 2003 17:53:36 - @@ -1623,7 +1623,6 @@ Inset::RESULT LyXText::dispatch(FuncRequ case LFUN_INSERT_NOTE: case LFUN_INSET_ERT: case LFUN_INSET_FLOAT: - case LFUN_INSET_FOOTNOTE: case LFUN_INSET_MARGINAL: case LFUN_INSET_MINIPAGE: case LFUN_INSET_OPTARG: @@ -1633,6 +1632,11 @@ Inset::RESULT LyXText::dispatch(FuncRequ // Open the inset, and move the current selection // inside it. doInsertInset(this, cmd, true, true); + break; + + case LFUN_INSET_FOOTNOTE: + doInsertInset(this, cmd, true, true); + bv->text->updateCounters(bv); break; case LFUN_INSERT_URL: Index: src/insets/insetfoot.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfoot.C,v retrieving revision 1.50 diff -u -p -r1.50 insetfoot.C --- src/insets/insetfoot.C 25 Sep 2002 14:26:10 - 1.50 +++ src/insets/insetfoot.C 21 Jan 2003 17:53:36 - @@ -28,23 +28,24 @@ #include "lyxlayout.h" #include "buffer.h" #include "paragraph.h" +#include "Lsstream.h" using std::ostream; InsetFoot::InsetFoot(BufferParams const & bp) - : InsetFootlike(bp) + : InsetFootlike(bp), number_(0) { - setLabel(_("foot")); + relabel(); setInsetName("Foot"); } InsetFoot::InsetFoot(InsetFoot const & in, bool same_id) - : InsetFootlike(in, same_id) + : InsetFootlike(in, same_id), number_(0) { - setLabel(_("foot")); + relabel(); setInsetName("Foot"); } @@ -83,6 +84,20 @@ int InsetFoot::docbook(Buffer const * bu os << ""; int const i = inset.docbook(buf, os, mixcont); os << ""; - return i; +} + + +void InsetFoot::relabel() +{ + ostringstream os; + os << _("foot") << ": " << number_; + setLabel(os.str()); +} + + +void InsetFoot::number(int n) +{ + number_ = n; + relabel(); } Index: src/insets/insetfoot.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetfoot.h,v
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
Angus Leeming wrote: > Moritz Moeller-Herrmann wrote: > * You would like some on-screen way to differentiate between > different footnotes. Correct. > * Lars thinks that you really need footnote labels. False. I do not need these labels. > * André and myself both think that preview-latex is the wrong way to > go about providing this information. That might be. I thought it might be easier than a lyx native solution with the counters, if the work is already done in preview.sty. > The moral? Take an active interest in the 1.4 development cycle. I have watched lyx development since before 1.0. The request for footnote counters has been made several times by me. I also put it into a bugzilla wish, where it was closed as invalid, IIRC. [...] > LyX already has counters internally. It uses them for things like > Sections. The code was cleaned up enormously by Martin Vermeer in the > 1.3 cycle, but he shied away from using them for the screen > representation of things like Figure Floats. That's why they appear > on screen as Figure '#'. He's done the majority of the work though, > so it's not unreasonable to expect to see Figure 1, Table 2 in LyX > 1.4. It would probably be trivially easy to have footnotes numbered > too. I look forward to 1.4 then. Thanks for your hard work on lyx and your replies.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 09:49:44PM +0100, Moritz Moeller-Herrmann wrote: > I will :-) I have also created bug number 838 and added your patch as > attachment. This is now bug 409 as it was a dupe (as you know ...) regards john -- "When you start off by telling those who disagree with you that they are not merely in error but in sin, how much of a dialogue do you expect ?" - Thomas Sowell
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 06:11:59PM +0100, Edwin Leuven wrote: > even if the number of footnotes is not overwhelming, going from paper > corrections ("can you change this in footnote 6") to the right place in lyx > is a bit of a hassle... It occurs to me that in the cases where footnote numbering would be useful, numbering the footnotes that exist on loading the document would be sufficient--these are the only ones that can already be on paper or in someone else's hands . . . in fact, it would seem to be more useful *not* to update numbering after opening the document . . . hawk -- Richard E. Hawkins, Asst. Prof. of Economics/"\ ASCII ribbon campaign [EMAIL PROTECTED] Smeal 178 (814) 375-4700 \ / against HTML mail These opinions will not be those of Xand postings. Penn State until it pays my retainer. / \
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
John Levon wrote: > This is now bug 409 as it was a dupe (as you know ...) Sorry, I searched for footnote and footnotes and did not find my old bug, nor did I get sent the additional responses.
Re: footnote numbering [was: Re: footnotes preview in lyx-1.3]
On Tue, Jan 21, 2003 at 10:15:52PM +0100, Moritz Moeller-Herrmann wrote: > > This is now bug 409 as it was a dupe (as you know ...) > > Sorry, I searched for footnote and footnotes and did not find my old bug, You need to change the default search setting to include closed bugs too, it's quite obscure alas. Forgiven ;) > nor did I get sent the additional responses. Hmm, temporary problem perhaps... regards john -- "When you start off by telling those who disagree with you that they are not merely in error but in sin, how much of a dialogue do you expect ?" - Thomas Sowell