bugeLyXer - Bugs: bug #31351, Index, Nomenclature and...


bug #31351: Index, Nomenclature and Bibliography in TOC and related problems

Submitted by:  Jose Ramon Alvarez-Sanchez <jras>
Submitted on:  Sat 16 Oct 2010 02:20:24 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  Alex Fernandez <alexfernandez>
Open/Closed:  Closed

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Mon 25 Oct 2010 10:09:54 PM UTC, comment #14:

Fine, I am closing this report then. Thanks!

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Sun 24 Oct 2010 10:41:01 PM UTC, comment #13:

I think that having all level-1 items in TOC is OK, as I said it could be considered an extra feature for lists. And now thinking about it again, it could be even necessary because eLyXer will generate separate pages for them with "--splitpart 1", so having a link in TOC for lists could be very usefull to reach the correct page easier.

For the rare case of both bibliography bibtex and separate entries with splitpart, it is just a glitch and it could be ignored if you know the cause, because it is a very unnusual case with negligible consecuences. I just reported about it in case it could be usefull to find other hidden problems. Don't waste more time in it.

Jose Ramon Alvarez-Sanchez <jras>
Sun 24 Oct 2010 08:13:46 PM UTC, comment #12:

I thought I had a way to make Bibliography appear in the TOC, but I cannot reproduce it now. It apparently doesn't have to do with the Document Class options: bibtotoc (but Nomenclature appears in test/index-1.6.lyx, maybe idxtotoc). I don't know what to do without more information about LyX (or LaTeX) options.

Your problem with BibTeX bibliography and separate entries is probably due to a repeated #Bibliography anchor. I should just remove the Bibliography anchor for the separate bibliography entries and leave it as is until I get more information, but I kind of like having all level-1 items in the TOC. What do you think?

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Sun 24 Oct 2010 07:44:02 PM UTC, comment #11:

About your comment #10, LaTeX/LyX also does not show in TOC the bibliography list generated from separate layouts. They are always shown as a list even if not cited, but I have not found any way in LyX (except with ERT) to make them appear in TOC. Index and Nomenclature have the same behaviour, LaTeX does not show them in TOC by default and LyX cannot mark them to appear (except with ERT).
With your last changes in git, eLyXer shows separate layouts bibentries list always in TOC, like Index and Nomenclature, so it seems coherent and, although different from LaTeX, it can be considered as a convenient extra feature of eLyXer, but, as a suggestion/wish, this behaviour (lists in toc) could be switched on/off with a command line option in eLyXer (leaving the default not showing them in TOC as in LaTeX).

Also I have found now (git version) that in the strange case of a document with both a bibtex bibliography (with show-all-entries active) and a list of entries in separate layouts, if the document is generated with "--splitpart 1", then in the last page generated for the references appear some content, an extra partial navigation bar and a repeated footer all outside the white box frame. This could be due to a problem in the new code added now.

All the other issues in this bug are now solved (or inserted in whish-list) from the version in git.

Jose Ramon Alvarez-Sanchez <jras>
Sun 24 Oct 2010 06:00:29 PM UTC, comment #10:

There was another bug here: bibliography items (inserted as separate layouts) did generate a big Bibliography header, but it was not being added to the TOC. I have corrected it now.

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Sun 24 Oct 2010 05:04:15 PM UTC, comment #9:

OK, now I think I have got it. I thought it was solved, but the code was a bit messy at that point (it was trying to look into the header's parent before it was assigned) and failed to hide the element.

Now that it is working, I will try to make it more robust. And once you confirm it works well I will close the bug since nothing is missing; please correct me if I'm wrong.

I will leave bibliography cites for commented references in the wish list then, if it's not important to you (even though it's not exactly like LyX). Thanks!

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Sun 24 Oct 2010 11:48:53 AM UTC, comment #8:

I think that remaining issues in point 2 of this bug need to be clarified:

When the Bibliography list (bibtex) is inside a comment, then the expected behaviour for eLyXer should be to not show it in TOC (independently of the show -in-toc option state in LyX inset) and to not show the corresponding chapter/section with the list of references at the end of document (independently of the show-all-refs option in LyX inset).
The second part is already working this way in eLyXer (git version), but not the first part (bibliography already appears in TOC even when it is inside a comment).

The behaviour of normal citations (not inside comment) when the bibliography is inside a comment is undefined and any behaviour is acceptable for eLyXer in this case (LaTeX shows "[??]" and eLyXer a label-link to nowhere), because it is the fault of the document author to supply the bibiliography correctly.

I have not thought about the citation itself inside a comment until now, reading your last comment #7, and as I can see eLyXer now does not show the citation, but it shows the reference in the bibliography list as if the citation was used. I agree that this behavior (different with LaTeX) is a minor problem that can go as a suggestion to the wish-list because it could be usefull only in some cases.

In any case, of course you don't need my permission to treat the bug reports in the order or with the priority you feel are better. You are already doing an impressive work with eLyXer and most of these bugs are just strange and corner cases.
Best regards,
Jose R.

Jose Ramon Alvarez-Sanchez <jras>
Sun 24 Oct 2010 10:30:50 AM UTC, comment #7:

Thanks for the list of book document classes. I already have a list of article classes provided by another contributor, so the list should be fairly complete by now: check out [HeaderConfig.styles] in conf/base.cfg. I am ignoring right now the last category of custom or "weird" classes.

All of your points should be solved now in git, except for 2: do not label bibliography cites where the reference is in a comment. With your permission I will queue it as there are more pressing bugs to get to; I have added it to the wish list so I don't forget it, even though it's a bug and should be solved before the next release.

As to part numbers, I reopened bug #31342 and inserted your comment. I will get to that presently.

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Fri 22 Oct 2010 12:51:17 PM UTC, comment #6:

I cannot find an exhaustive list of all "documentclass" supported by LyX layouts, but I have found that there are at least the following book/report type "documentclass":
[ book, amsbook, scrbook, extbook, tufte-book, report, extreport, scrreprt, memoir, tbook, jsbook, jbook, mwbk, svmono, svmult, treport, jreport, mwrep ]
Their first autonumbered level is 0 (\chapter), and they can have independent numbered level -1 (\part), with\bibname = "Bibliography".

On the other hand article/paper type of "documentclass" like article, paper, extarticle, seminar, amsart, and a lot of other journal specific papers, have first numbered level is 1 (\section), but they can have also independent numbered level -1 (\part) with \bibname = "References".

Note: In closed bug #31342 http://savannah.nongnu.org/bugs/index.php?31342 , I forgot to mention that Part numbers in LaTeX and LyX are uppercase roman...

Additionally, I found that there is a third kind of "documentclass":
[letter, extletter, dinbrief, g-brief, g-brief2, scrlttr2, scrlettr, slides, beamer, foils, powerdot, tufte-handout, simplecv, europecv, moderncv, broadway, hollywood ]
that don't have autonumbered hierarchical sectioning levels or have only special labels for few numbered sections (act, scene). Fortunatelly, this kind of documents should not have numbered sections, and most of them cannot handle a Bibliography, so, probably, it is not neccesary to take any special care with them in eLyXer.

Until now, I was just navigating in git tree and logs through web interface, but I can (and will do from now on) import git tree and use "./make" to build elyxer.py for tests, so you will not need to upload elyxer.py each time.
I found a problem in this process that I have reported in a different bug.


Jose Ramon Alvarez-Sanchez <jras>
Thu 21 Oct 2010 11:24:25 PM UTC, comment #5:

2. Clear now: only references need to be changed. I will try to do that.

3. Split bibliography on its own page: working on it. It is a bit difficult because, while Index and Nomenclature are always top level layouts, Bibliography is inserted into Standard layout. A bit weird, but should be solvable.

5. Implemented now: Bibliography for books (and similar), and References for everything else. I don't know if it's too much to ask from you to provide a list of all book formats -- I have located [book,amsbook,scrbook,report], but there might be more.

If you are importing the git tree and can ./make the elyxer.py executable, I can stop uploading it. Right now only 3 is implemented.

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Thu 21 Oct 2010 10:52:30 AM UTC, comment #4:

Hi, I can see a lot of work and changes in this version.

1. Yes, corrected.

2. OK support for LyX option to show bibliography in TOC if requested. But the bibliography already appears in TOC when it is inside a comment (and option to show selected).
Sorry, but probably my initial report was not well explained in this point (English is not my mother language) or I don't understand your comment: "[...]that the bibliography is being added to the document even if inside a comment, yet."
The expected behavior for eLyXer (mimicking LyX/LaTeX) if a Bibliography is inside a comment, should be to not show it in text and to not show it in TOC. Of course, when bibliography is inside a comment, the citations in text cannot link to any point and they are shown as "[??]" in LaTeX/PDF, and something similar could be done in eLyXer in this case. If bibliography is inside a comment, it is the responsability for the document author to provide the correct bibliography for citations or to not cite them.

3. All styles correct with commited .css.
But with "--splitpart 1" the Bibliography is always at the end of the previous chapter/section (no different page), while the Nomenclature and Index correctly get a separated page like the level 1 (chapter in book of Section in article). In LaTeX/LyX, for book and report types, Bibliography starts in a new page like Nomenclature and Index, while in other documents all of them continue in the same page. It should be natural for eLyXer to separate in a new page all elements in the same level (Bibliography, Nomenclature and Index) when requested by splitpart option.

4. Yes (seen committed in .po file).

Also, I can see the string "Bibliography" has changed to "References" (and corresponding translations) for all document types (or so it seems), but I have some points about it:
The command "\bibname" in LaTeX contains the string "Bibliography" (and translations) for book and report type documents, and the string "References" (and translations) for the rest of types. LyX uses "Bibliography" in GUI and menus, but it show the correct label "References" or "Bibliography" inside the text preview depending on document type.
There is a subtle difference in the meaning of both terms:
"Bibliography" can be the list of works used by author to produce the document (even if they are not referenced explicitly in the text). This term is used in books as it is usual to include in the list also other works not cited but used in general (as with option to show all bibentries now supportted in eLyXer).
"References" is the list of works referenced or cited by author in the text of document. This name is more common in short documents (articles, papers, etc.) to reflect the nature of the list of works as citations.


Jose Ramon Alvarez-Sanchez <jras>
Wed 20 Oct 2010 11:32:05 PM UTC, comment #3:

Hi again,

All issues should be corrected now. Some further notes:

1. Done.

2. Bibliography is added to the TOC if so configured, but I did not reproduce the part that the bibliography is being added to the document even if inside a comment, yet.

3. Bibliography was actually a level 1 header <h1>, but of reduced size in the CSS. Corrected now (but you have to use the committed CSS to see it).

4. Done.

(file #21735)

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Wed 20 Oct 2010 06:42:07 AM UTC, comment #2:

More comments:

1. The first issue is more generic than described: all TOC entries are shown in the TOC (chapters, sections...), even if they are inside comments. They are also considered for numbering: if Chapter 2 is inside a comment, the next chapter will be Chapter 3 for eLyXer (but another Chapter 2 for LyX and on the PDF output).

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Wed 20 Oct 2010 06:35:00 AM UTC, comment #1:


All bugs confirmed. A couple of comments:

3. Bibliography is indeed level 2, but Nomenclature and Index are level 1 (and shown as <h1>): Example.

4. No problem to switch to the LyX version, but I think "Glosario" is perfectly valid Spanish.

Alex Fernandez <alexfernandez>
Project AdministratorIn charge of this item.
Sat 16 Oct 2010 02:20:24 PM UTC, original submission:

1. Index and Nomenclature inside a comment note are shown in text and in Table of contents, they should be not shown in this case.
It could be useful to have Index or Nomenclature inside a comment while developing early versions of a document with very incomplete Index, etc.

2. Bibliography is never shown in Table of contents, but Bibliography inside a comment is always shown in text. In LyX there is an option to show Bibliography in TOC. It would be nice if eLyXer could support it (except if Bibliography is inside a comment).
A Bibliography inside a comment could have sense if you want to be able to see cites from the bib file through LyX GUI while working on document, but you don't want the bibliography to be shown yet in current document, or when none reference is cited yet, etc.

3. Bibliography, Index and Nomenclature should have the same style as the first level (section in article or chapter in book) unnumbered, both in text and in table of contents. In eLyXer now they are shown as level 2 or smaller.

4. In eLyXer Spanish locale "Index" is incorrectly translated into "Glosario", but in LyX and in LaTeX it is translated as "├Źndice alfab├ętico".
Probably in LaTeX (and LyX), the "Nomenclature" should have been named "Glossary", that describes more accurately its real funcion (list of terms with description or definition), but it cannot be applied to "Index" (a list without description).

Best regards,
Jose R.

Jose Ramon Alvarez-Sanchez <jras>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #21735:  elyxer.py added by alexfernandez (266KiB - text/x-python)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by alexfernandez (Updated the item)
  • -email is unavailable- added by jras (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    Mon 25 Oct 2010 10:09:54 PM UTC alexfernandez StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    Sun 24 Oct 2010 08:13:46 PM UTC alexfernandez StatusReady For Test => Confirmed
    Sun 24 Oct 2010 10:30:50 AM UTC alexfernandez StatusConfirmed => Ready For Test
    Thu 21 Oct 2010 11:24:25 PM UTC alexfernandez StatusReady For Test => Confirmed
    Wed 20 Oct 2010 11:32:05 PM UTC alexfernandez Attached File- => Added elyxer.py, #21735
        StatusConfirmed => Ready For Test
    Wed 20 Oct 2010 06:35:00 AM UTC alexfernandez StatusIn Progress => Confirmed
    Sat 16 Oct 2010 03:05:54 PM UTC alexfernandez StatusNone => In Progress
        Assigned toNone => alexfernandez

    Back to the top

    Powered by Savane 3.3