Commit Graph

217 Commits

Author SHA1 Message Date
Juergen Spitzmueller
07c99393be Consider PackageOptions with parskip 2023-10-30 12:54:29 +01:00
Richard Kimberly Heck
2ad57dcb6b Preview formatted references in the work area.
Patch from Daniel Ramoeller <d.lyx@web.de>, fixed up by RKH.
2023-08-24 21:24:31 -04:00
Juergen Spitzmueller
315c2f132a Account for babel's bidi option (#12866)
bidi=bidi-{r,l} load the bidi package
2023-08-17 14:25:33 +02:00
Jean-Marc Lasgouttes
90ea508111 Fix pasting as LaTeX in documents with no modules
When there is no module, the old code would invoke tex2lyx with option
 -m
instead of
 -m ""
and an error would ensue.

This is because the QProcess command line parser used in Systemcall is
broken and does not recognize empty parameters as such. The solution
is to rewrite our parsecmd() parser to generate a list of parameters.
This is post-2.4.0 work.

The workaround used here is:

- set the list of modules to "," when it should be empty. In effect,
  this is a list of two empty modules.

- change tex2lyx to accept empty module names and ignore them; this is
  good in terms of robustness anyway.

Additionally, when there is no receiving buffer, set the defaults as
the BufferParams defaults instead of empty (this is cleaner, but
should not make a difference in practice).

In the long term, we should switch to use the QStringList-based API of
QProcess in Systemcall (see QTBUG-80640).
2022-11-06 13:20:02 +01:00
Juergen Spitzmueller
1da80d4d8f Add basic support for \DeclareMetadata
File format change
2022-02-12 17:10:34 +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
Stephan Witt
4716b1f91a Use a central typedef for vectors of WordLangTuple. 2021-07-16 16:39:05 +02:00
Thibaut Cuvelier
0f782b0ded DocBook: add a parameter to change the namespace prefix for MathML. 2021-03-23 00:32:45 +01:00
Stephan Witt
07122f066b Refactoring: move check for match in spellignore() to buffer params. 2021-03-07 17:46:01 +01:00
Juergen Spitzmueller
07396ab244 Meet per-document spelling dictionaries (fixes #86 [sic!])
Now who can beat that? ;-)
2021-03-06 16:53:33 +01:00
Juergen Spitzmueller
6775d7c3a2 Prevent more local colors from leaking (#6626) 2021-01-22 10:34:41 +01:00
Juergen Spitzmueller
ee475b62fa Do not rely on hardcoded color when determining boxbgcolor 2021-01-20 14:15:48 +01:00
Juergen Spitzmueller
024980cf43 Do not rely on hardcoded color when determining notefontcolor 2021-01-20 13:58:24 +01:00
Richard Kimberly Heck
1582a2afe1 Fix bug #12068 2021-01-14 01:15:19 -05:00
Yuriy Skalko
c0a5987181 Better naming for enums 2020-12-01 00:46:21 +02:00
Yuriy Skalko
6354ad60b4 Refactor InsetQuotes.h enums 2020-12-01 00:46:09 +02:00
Yuriy Skalko
ecf62a8f21 Refactor OutputParams
Now all Inset hierarchy uses OutputParams.h included in Inset.h.
Forward declare some enums to reduce header dependencies.
2020-11-30 13:05:03 +02:00
Richard Kimberly Heck
fba1c434e5 Revert "Fix a number of signedness warnings"
This reverts commit e8a28c33c5.

I was not aware that we used negative numbers for author IDs!
2020-11-02 17:09:59 -05:00
Richard Kimberly Heck
e8a28c33c5 Fix a number of signedness warnings 2020-11-02 12:03:37 -05:00
Yuriy Skalko
84365fc946 Move Author.h, Format.h from BufferParams.h 2020-10-16 08:02:51 +03:00
Yuriy Skalko
4c8d262996 Const refactor 2020-10-16 08:02:51 +03:00
Thibaut Cuvelier
e302757476 Add support for CALS tables in DocBook. 2020-07-16 00:40:16 +02:00
Thibaut Cuvelier
25bb51c865 Remove DOCBOOK enum values, no more used. 2020-07-08 13:15:05 +02: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
c77999a5f3 Add buffer param to opt-out fragile content movement
Fixes #11714

File format change
2020-01-10 10:21:09 +01:00
Juergen Spitzmueller
dc4823e759 Add native changebars
Fixes #10750
2019-12-24 18:12:22 +01:00
Jean-Marc Lasgouttes
714113655a Follow some of the performance advice from cppcheck
Most of that is changing string to string const &.
2019-09-13 16:23:49 +02:00
Juergen Spitzmueller
c6f262a5b7 Add textclass options for paper size selection and default paper size
Fixes: #4506

Implementing this to the classes requires file format changes, as the
classes' page layout will likely differ from geometry's.
2019-08-06 17:34:16 +02:00
Juergen Spitzmueller
dcf06fdb22 Split osf options to families
Nowadays we support sf and tt fonts with osf options, so this needs to
be selectable separately.

File format change.
2019-07-14 11:41:36 +02:00
Juergen Spitzmueller
c3c2815092 Implement support for font options
This revives a patch by Uwe and extends it. Additional options to font
packages/fontspec can now be entered in Document Settings.
This is principally also true for TeX fonts, if the new TeXFont tag
MoreOptions is set. For the time being, I have only done this for
MinionPro, as a model and prove of concept.

Note that adding more TeXFonts requires a file format change,
respectively, and changes to tex2lyx (in the same way as I've done for
MinionPro).

This addresses #8226
2019-07-11 20:28:34 +02:00
Pavel Sanda
7f125f62d2 Introduce doc preference for line numbering.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg208781.html
2019-05-23 15:13:27 +02:00
Juergen Spitzmueller
f75b081551 Add support for mixed-encoded biblatex files
Biblatex 3.12 allows to specifiy individual encodings per bib file
via \addbibresource[bibencoding=<encoding>].

This is now supported via GuiBibtex.
2019-03-29 15:45:55 +01:00
Juergen Spitzmueller
ecb2427f41 Add tablestyle buffer param
Fixes: #9901
2019-03-26 16:24:27 +01:00
Günter Milde
1933102593 ctest update and small documentation fixes. 2019-03-19 22:17:52 +01:00
Enrico Forestieri
7822d11361 Fix reloading of local layout file (bug #11120) 2018-11-16 21:47:24 +01:00
Richard Kimberly Heck
5064c09e9f Copy modules into the Advanced F&R pane as well. 2018-10-04 20:30:01 -04:00
Juergen Spitzmueller
e6e3777363 Add support for bib files encoding
File format change.

Fixes: #6223
2018-07-07 15:25:35 +02:00
Juergen Spitzmueller
0aeeb78f3c Simplify cite engines code
As opposed to modules (from which the framework was initially borrowed),
we only allow one cite engine per document. Thus, we don't need to fiddle
with lists.
2018-05-20 12:27:03 +02:00
Juergen Spitzmueller
aa9543fa2b Add support for global float alignment
It is now possible in the float settings (doc dialog) to specify a global
(inner) alignment for floats, and in the float settings, this can be
overridden (just as with float placement)

Fixes: #8665

File format change.
2018-05-10 20:15:11 +02:00
Enrico Forestieri
f11bfe1697 The shell escape patch
Allow a LaTeX backend to run external commands after user confirmation.
This is a per document and per machine setting. The authorization has
to be given through the document settings pane, but is not recorded in
the document itself. Moving the document to either another computer or
another directory on the same computer revokes the authorization.
This can also be done by right clicking the red icon that appears in
the status bar when a document is marked as one requiring shell escape.
The patch also checks whether the user has added the -shell-escape
option to a LaTeX converter and nags the user to remove the option
(which would be used for all documents) in favor of the (per document)
support offered by LyX.
2017-08-03 13:07:41 +02:00
Richard Heck
51aebc9327 Fix whitespace at EOL. 2017-07-03 13:46:30 -04:00
Enrico Forestieri
8dab1cfe7e Fix bug #9101
Update the listings inset to optionally use the minted package
(instead of the listings one) for typesetting code listings.
Only one of the two packages can be used in a document, but it
is possible to switch packages without issues if the used options
are the same. If a switch is made and the options differ, one needs
to manually adjust them if they were entered in the advanced options
tab, or apply again the gui settings.
Note that minted requires the -shell-escape option for the latex
backend and the installation of additional software (python pygments).
2017-06-07 00:55:23 +02:00
Uwe Stöhr
0dd3311dd4 rename buffer parameter math_number_before to math_numbering_side
this is a fileformat change

also try to fix an UI issue that JMarc gets
2017-05-13 20:39:45 +02:00
Jean-Marc Lasgouttes
f1dd80f464 Proper GUI feedback for leqno option
With these changes, equation numbers are shown properly on screen.
When setting is default, we guess the side using these two rules

* ams(art|book) and siamltex classes are leqno by default. This is
  signalled because the classes provide "leqno" (in amsdefs.inc). If
  there are other classes that do this in output, the relevant classes
  should be updated.

* the language arabic_arabi also sets leqno by default. This is
  currently hardcoded for lack of a better idea.

Besides, a few bugs are fixed:
* use mathrm instead of mathbf for numbers metrics
* set spacing between maths and labels in inches
2017-05-12 15:32:14 +02:00
Jean-Marc Lasgouttes
d4685f2806 Never, never use a string for something that has 3 values
This commit replaces the string math_number_before by a proper math_number enum.

Note that the _before naming was misleading. It was chosen at a time
when we were not sure whether leqno was always left or could be right
in RtL documents.

Note that the token in LyX document is still \math_number_before and
this should be changed.

Fixup for 19cc4a1f.
2017-05-12 12:00:43 +02:00
Uwe Stöhr
19cc4a1fcb GuiDocument: support also the class option reqno
as discussed our support for the formula numbering side should be complete. There are document classes that uses left numbering as default and with the class option "reqno" this can be changed to right numbering. reqno requires the loading of amsamth.
2017-05-12 01:06:05 +02:00
Uwe Stöhr
3f8c15a7c6 support for the document class option leqno
- fileformat change
2017-04-25 02:28:10 +02:00
Jean-Marc Lasgouttes
df6b2f4470 Rewrite mathindent without HSpace class
Use Length instead of HSpace for math_indentation and rename it to mathindent.
Get rid of the string version.

Rename (g|s)etMathIndentation() to (g|s)etMathIndent().

Remove the HSpace class altogether.

Some cleanups to parindent support to look like mathindent.
2017-04-19 17:55:56 +02:00
Jean-Marc Lasgouttes
d86954eb81 Revert "BufferParams: get rid of the HSpace class for mathindent as requested by JMarc"
This reverts commit d9a2a40268.

This is not the right way of getting rid of HSpace. We need a proper
Length, not a string.
2017-04-19 16:19:18 +02:00
Uwe Stöhr
d9a2a40268 BufferParams: get rid of the HSpace class for mathindent as requested by JMarc 2017-04-17 20:32:31 +02:00