Commit Graph

146 Commits

Author SHA1 Message Date
Juergen Spitzmueller
d4f58c96b5 Add support for multiple indexes in Memoir
As with almost everything, this class bakes its own cake also with
multiple indexes. So we need to account for this to produce
compilable output.

Not very nice, but there you go!
2024-07-26 12:48:12 +02:00
Juergen Spitzmueller
f74cc0ec92 Limit nomencl backwards support to case when old package is really used
This is only needed for very old versions of the nomencl package
(before March 2005)

No need to output compatibility code with newer versions

Furthermore, this breaks the use of the glossary package which also
has .glo extension (#12968)
2023-11-08 16:17:58 +01:00
Juergen Spitzmueller
1812c946fc Fix nomencl launching
The problem here was that we checked depfile changes too late.
After all these subsequent LaTeX runs, the files's checksums
did not change any longer.
2023-09-15 18:08:10 +02:00
Juergen Spitzmueller
7b6707fc52 Properly resolve undefined citations with Xe/Lua and bibliography environment
These need an extra LaTeX run
2023-04-08 19:25:30 +02:00
Thibaut Cuvelier
997f0621c5 Rename LATEX debug level to OUTFILE and use it for DocBook, HTML, and XML messages. 2022-03-01 16:05:42 +01:00
Juergen Spitzmueller
f7e8e3f10e Correct error message 2022-02-17 10:52:37 +01:00
Juergen Spitzmueller
44d5676430 Report if index processor failed (#7820) 2022-02-17 07:25:00 +01:00
Juergen Spitzmueller
1888a2ccb5 Oops. 2022-02-16 13:17:30 +01:00
Juergen Spitzmueller
cc4de1501c More generic message
Nomencl processor can be something else than makeindex.
2022-02-16 13:16:24 +01:00
Juergen Spitzmueller
8cb7fb26d7 Fix run of index processor in the export chain (#2696)
It does not make sense to issue the index processor before the
pagination is fixed. Particularly, if (classic) BibTeX is run,
we need one or more extra LaTeX runs after that before issuing
the index processor, since the citation labels and references are
only expanded then, which might change pagination. As a consequence,
we ended up in wrong index references.

This fixes a 16 year old bug report.
2022-02-16 12:03:38 +01:00
Juergen Spitzmueller
f350072565 Provide proper fallback if a bibliography processor is not found
Check for appropriate fallbacks and warn user if the requested
bibliography processor is unavailable.
2021-10-17 17:14:14 +02:00
Yuriy Skalko
d3c335a5d5 Remove useless casts reported by GCC with -Wuseless-cast option 2021-09-30 10:37:24 +03:00
Richard Kimberly Heck
170f06089d Add a bit of debugging code 2021-02-27 20:34:29 -05:00
Yuriy Skalko
7779316e6c Include standard <regex> 2020-11-29 15:27:28 +02:00
Yuriy Skalko
5061db891c Use const references 2020-11-01 22:23:26 +02:00
Yuriy Skalko
10272e4747 Move include of own header to the top. Fix dependencies 2020-10-25 19:58:57 +02:00
Yuriy Skalko
196d9caeb0 Clean includes using the output of iwyu tool 2020-10-20 11:38:55 +03:00
Yuriy Skalko
715b8cda54 Refactoring based on cppcheck suggestions 2020-10-03 13:39:51 +02:00
Juergen Spitzmueller
1bf18368cf Add support for the xindex index processor
This is a modern alternative for makeindex that is fully unicode-aware
and written in lua.

As opposed to xindy, it is more lightweight and actively maintained.

The program is still in a rather early stage of development, so we do
not propose this as default.

This relies on xindex 0.22 (about to be released) to function properly.
2020-05-30 12:54:20 +02:00
Richard Kimberly Heck
c6b3f35c8c Properly check return values so TIMEOUT is recognized. 2020-05-17 14:58:15 -04:00
Jean-Marc Lasgouttes
a85c48de5a Do not for copies in range-based for loops.
Spotted by clang++ 10.
2020-04-28 13:27:50 +02:00
Juergen Spitzmueller
05c7c65d93 Improve reporting of undefined control sequences in preamble
Fixes #11844
2020-04-19 10:56:58 +02:00
Juergen Spitzmueller
bb277747d2 Support log parsing for multi-line warnings wrt undefined references 2020-03-14 11:16:12 +01:00
Juergen Spitzmueller
037b1e1478 thinko 2020-03-14 09:51:07 +01:00
Juergen Spitzmueller
02d2e4aa32 Do not break on undefined references that are part of the family.
Thus a document can be viewed if it contains references to
its master, children or siblings that are being excluded via includeonly,
or viewed standalone if it contains references to its master or siblings.
2020-03-14 09:43:57 +01:00
Juergen Spitzmueller
f4af191403 Introduce maintain unincluded children "mostly"
This is a mode for includeonly handling that is effective and still outputs
at least mostly correct counters and references. This is intended for non-
final editing work.

File format change.
2020-03-13 15:46:35 +01:00
Juergen Spitzmueller
6c889209a7 Improve performance of includeonly with "maintain counters and references"
First, we do not need to run bibtex/biber on the maintenance run, as
the necessary references will be generated on the includeonly run.

Second, exclude the master from DepTable in maintenance run, as the
master is re-checked in any case in the includeonly run, and as it will
always be detected as changed due to the \includeonly statement, which
will trigger a complete build.

More improvements to follow.
2020-03-13 11:49:07 +01:00
Juergen Spitzmueller
b879821897 Pass proper input markup option to xindy with xetex/luatex
plain xindy also needs the latex input markup specified
2019-12-16 11:50:11 +01:00
Juergen Spitzmueller
239dee34af Report makeindex/xindy errors
Fixes #2569
2019-12-15 13:48:21 +01:00
Juergen Spitzmueller
aa141bc293 Enhance support for Xindy
This adds the proper language module and codepage for languages supported
by Xindy
2019-12-15 12:01:59 +01:00
Scott Kostyshak
ef6d83bc06 Give error if undefined citations with Biblatex
This commit catches situations when one key in a multi-key citation
is not defined. This commit causes an error to be given, but the
name of the key that is undefined is not provided in the error
dialog.

This commit is consistent with bf99ece7.

For more information, and possible follow-up discussion (e.g., on
putting the key in the error dialog), see the following ML thread:

https://www.mail-archive.com/search?l=mid&q=20190908165644.qnz6xu5bm5eqiko6%40boogie
2019-09-10 10:43:40 -04:00
Juergen Spitzmueller
762ba6a3c8 Handle endnotes aux file in removeAuxiliaryFiles() 2019-08-17 09:32:15 +02:00
Juergen Spitzmueller
8abe7b25e8 Add support for the enotez package
This is a modern implementation of endnotes building on LaTeX3 tools which
gets away with deficiencies of the endnotes package, has some extra features,
is localized, supports hyperref and is better customizable.

As this is a fairly new package requiring l3, we keep the old endnotes
module and provide this as an alternative.
2019-08-13 07:30:20 +02:00
Pavel Sanda
2a8c8b6345 Minor comment.
Offshoot of bf99ece736.
https://mailman.ntg.nl/pipermail/ntg-pdftex/2019-August/004306.html
2019-08-07 17:16:52 +02:00
Juergen Spitzmueller
bf6a7dc38f Fix nomencl generation with LuaTeX
Fixes: #11571
2019-07-06 15:15:06 +02:00
Pavel Sanda
bf99ece736 Start reporting missing citations and broken references in LaTeX build.
Now we report these in the same way as LaTeX errors (but let the user to
see the result anyway). It remains to be shown much is this disturbing
to users. Generally, ignoring these is not a good idea, because they are
harder to manually spot in longer documents.

The details of reported error varies because log linebreaks at 90
induced by pdflatex make log harder to parse.
The committed code is more robust than previous, in which some missing
cits/refs with long keys would go unnoticed.

Tested on bibtex and natbib.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg208912.html
2019-06-07 16:47:04 +02:00
Juergen Spitzmueller
1e1800a21a Consider sub-subfiles on log file parsing.
These are listed as (subfile.ext (sub-subfile.ext))

Fixes: #11112
2018-04-14 14:33:21 +02:00
Richard Heck
c67eed8ccb Fix bug #10916. 2018-02-23 23:54:24 -05:00
Juergen Spitzmueller
398e026250 Fix child document regex in scanLogFile
Several problems:
* The regex failed at names such as 1_text_2_text.tex
  (returned "2_text.tex)
* The regex failed at names such as 12_text.tex
  (returned "2_text.tex)
* Masters with digits in the name (2018_text.tex) were
  tracked as their own children
2018-02-09 11:46:43 +01:00
Richard Heck
a765f465da Fix problem with BibTeX error reporting.
We only want to abort this process if the process was killed.
Also fix some style issues.
2017-12-29 11:12:17 -05:00
Richard Heck
6c407a9571 Fix puzzling warning. 2017-12-22 22:03:54 -05:00
Richard Heck
b5e5c2576a Allow makeindex, nomencl, and bibtex runs to be canceled, too. 2017-12-21 18:55:39 -05:00
Richard Heck
12b03b30f4 Allow LaTeX processes to be canceled. 2017-12-21 18:55:39 -05:00
Juergen Spitzmueller
a40868510d Do not error on missing ZWNJ (ligature break) characters.
Since TeXLive 2016, "fontspec" maps the ligature break command
\textcompwordmark to the ZWNJ character (U+200C).
This character is missing in many fonts (including the default: Latin
Modern) which leads to "Missing character" warnings in the XeTeX/LuaTeX
log file if a document using non-TeX fonts contains a ligature break.

LyX reports missing characters as error since fixing #9610.
In case of "invisible" characters, there is no data loss, in case of the
ZWNJ the functionality is kept: ligatures are prevented also if the ZWNJ
is missing in a font.

Therefore, a missing ZWNJ is now treated similar to missing characters
in "nullfont" (see [63f41711/lyxgit], bug #10394) and does not trigger
an error.

Fixes: #10727
2017-07-23 18:41:06 +02:00
Christian Ridderström
e30f3d76d2 Bulk cleanup/fix incorrect annotation at the end of namespaces.
This commit does a bulk fix of incorrect annotations (comments) at the
end of namespaces.

The commit was generated by initially running clang-format, and then
from the diff of the result extracting the hunks corresponding to
fixes of namespace comments. The changes being applied and all the
results have been manually reviewed. The source code successfully
builds on macOS.

Further details on the steps below, in case they're of interest to
someone else in the future.

1. Checkout a fresh and up to date version of src/

    git pull && git checkout -- src && git status src

2. Ensure there's a suitable .clang-format in place, i.e. with options
   to fix the comment at the end of namespaces, including:

    FixNamespaceComments:                           true
    SpacesBeforeTrailingComments:                   1

and that clang-format is >= 5.0.0, by doing e.g.:

    clang-format -dump-config | grep Comments:
    clang-format --version

3. Apply clang-format to the source:

    clang-format -i $(find src -name "*.cpp" -or -name "*.h")

4. Create and filter out hunks related to fixing the namespace

    git diff -U0 src > tmp.patch
    grepdiff '^} // namespace' --output-matching=hunk tmp.patch  > fix_namespace.patch

5. Filter out hunks corresponding to simple fixes into to a separate patch:

    pcregrep -M -e '^diff[^\n]+\nindex[^\n]+\n--- [^\n]+\n\+\+\+ [^\n]+\n'  \
        -e '^@@ -[0-9]+ \+[0-9]+ @@[^\n]*\n-\}[^\n]*\n\+\}[^\n]*\n'         \
        fix_namespace.patch > fix_namespace_simple.patch

6. Manually review the simple patch and then apply it, after first
   restoring the source.

    git checkout -- src
    patch -p1 < fix_namespace_simple.path

7. Manually review the (simple) changes and then stage the changes

    git diff src
    git add src

8. Again apply clang-format and filter out hunks related to any
   remaining fixes to the namespace, this time filter with more
   context. There will be fewer hunks as all the simple cases have
   already been handled:

    clang-format -i $(find src -name "*.cpp" -or -name "*.h")
    git diff src > tmp.patch
    grepdiff '^} // namespace' --output-matching=hunk tmp.patch  > fix_namespace2.patch

9. Manually review/edit the resulting patch file to remove hunks for files
   which need to be dealt with manually, noting the file names and
   line numbers. Then restore files to as before applying clang-format
   and apply the patch:

    git checkout src
    patch -p1 < fix_namespace2.patch

10. Manually fix the files noted in the previous step. Stage files,
    review changes and commit.
2017-07-23 13:11:54 +02:00
Juergen Spitzmueller
d50e2aa7bf typo in comment 2017-07-23 12:11:03 +02:00
Juergen Spitzmueller
94d45d9c56 Some comments wrt log file encoding (#10728) 2017-07-23 12:06:58 +02:00
Juergen Spitzmueller
7609221ada Use appropriate conv. method
These are plain ASCII strings, no need for local8bit conversion.
2017-07-23 09:37:11 +02:00
Richard Heck
75bfed5507 Fix trailing whitespace in cpp files. 2017-07-03 13:53:14 -04:00
Juergen Spitzmueller
0a58035f84 Catch xdvipdfmx driver error (that breaks XeTeX compilation).
This prevents an assertion due to an unrecognized error.

Fixes: #10076.
2017-06-25 10:29:19 +02:00