Commit Graph

673 Commits

Author SHA1 Message Date
Thibaut Cuvelier
32bd5877e7 DocBook: make copier compatible with Python 2. 2021-10-13 02:36:39 +02:00
Thibaut Cuvelier
e9db9d3644 DocBook copy: add links to bug reports. 2021-09-27 01:46:01 +02:00
Thibaut Cuvelier
6d3be39587 DocBook copy: don't error if the file was already copied. 2021-09-27 01:15:16 +02:00
Thibaut Cuvelier
a464915f58 DocBook copy: large refactoring to improve readability. 2021-09-27 01:10:49 +02:00
Thibaut Cuvelier
e22f52e731 DocBook: make LilyPond work more reliably. 2021-09-27 00:39:10 +02:00
Thibaut Cuvelier
508badc78a DocBook: redirect LilyPond output to main LyX output to ease debugging. 2021-09-26 21:13:17 +02:00
Thibaut Cuvelier
e983676f6c DocBook: work around bug in LilyPond.
https://lists.gnu.org/archive/html/bug-lilypond/2021-09/msg00039.html
2021-09-26 21:00:59 +02:00
Thibaut Cuvelier
57e0b860cb DocBook: add the new script as DocBook copier. 2021-09-26 19:10:13 +02:00
Thibaut Cuvelier
f0537d72ee DocBook: add script to start LilyPond on the generated file.
Not yet used anywhere in the code for now (see next commit).
2021-09-26 18:15:09 +02:00
Thibaut Cuvelier
661fcb2628 Unused code. 2021-09-26 17:27:41 +02:00
Thibaut Cuvelier
b2c0604ad1 Typo. 2021-09-26 17:25:28 +02:00
Thibaut Cuvelier
8b6e3d3749 DocBook: add more flexibility for floats.
Intended to fix #12371.
2021-09-20 00:06:20 +02:00
Kornel Benko
bc01f50955 Cmake export tests: Select "-dALLOWPSTRANSPARENCY" flag for ps2pdf converter
Add parameter "-dALLOWPSTRANSPARENCY" for call to ps2pdf.
Used only in test environment.
The fix is proposed by Scott.

Here his comment:
        "Interestingly, the flag fixes the English Powerdot tests but not the
        French ones."
2021-05-30 20:26:41 +02:00
Kornel Benko
5158b54eb9 Cmake export tests: Enable unsafe dvipdfmx
Add parameter "-i dvipdfmx-unsafe.cfg" for call to dvipdfmx.
Used only in test environment.
This is needed because of regression for ja LilyPond found by Scott.
Coment by Jürgen:
  "dvipdfmx-unsafe.cfg makes dvipdfmx call gs (rungs) with -dNOSAFER
  rather than with -DSAFER (as in the default dvipdfmx.cfg of TL21).

  However, this change should definitely only be applied to trustworthy
  files, so changing the converter generally is certainly not such a good
  idea."
2021-05-23 10:05:13 +02:00
Thibaut Cuvelier
b9f355fdb1 ePub: try harder to find image files. 2021-02-19 20:59:20 +01:00
Richard Kimberly Heck
516a25cbb5 Use tabs in prefs2prefs.py, as in the other such files 2021-02-15 11:06:55 -05:00
Richard Kimberly Heck
01dc665a25 Make continuous spellcheck the default.
Convert old preferences to preserve previous setting, as well.
2021-02-15 11:03:43 -05:00
Thibaut Cuvelier
d18dff22b5 DocBook: add the DocBookNoFontInside layout configuration. 2021-02-13 05:09:59 +01:00
Pavel Sanda
223e23bca4 * docbook2epub.py syntax 2021-02-12 23:01:45 +01:00
Thibaut Cuvelier
b1febf112d ePub: improve compatibility with Python 2. 2021-02-12 05:26:32 +01:00
Thibaut Cuvelier
7622292027 ePub: share a bit of code for parsing arguments. 2021-02-07 23:19:07 +01:00
Thibaut Cuvelier
f7beed1ee2 ePub: allow a user-specified Saxon. 2021-02-07 23:19:07 +01:00
Thibaut Cuvelier
bf976cb0ae ePub: use None instead of an empty string. 2021-02-07 20:52:50 +01:00
Thibaut Cuvelier
e95513c823 ePub: add argument for external DocBook XSLT. 2021-02-07 20:51:25 +01:00
Thibaut Cuvelier
d7d31ab512 ePub: restructure the script as a class.
This allows to share a little bit more code and to avoid functions with many arguments.
2021-02-07 20:47:24 +01:00
Thibaut Cuvelier
9d4ffac7fb ePub: detect and use xsltproc. 2021-02-07 20:33:06 +01:00
Thibaut Cuvelier
7f4782d51d ePub: copy images into the ePub archive. 2021-02-07 20:00:45 +01:00
Thibaut Cuvelier
b8a4408ca8 ePub: refactor script as a series of small functions. 2021-02-07 20:00:44 +01:00
Stephan Witt
f55efc6951 ePub: quote all path names of the command 2021-02-07 12:43:01 +01:00
Thibaut Cuvelier
0b50da7321 ePub: comment about subprocess.run instead of os.system to simplify code. 2021-02-07 06:35:42 +01:00
Thibaut Cuvelier
a8853743c5 ePub: update doc for running script. 2021-02-07 06:32:46 +01:00
Thibaut Cuvelier
3e745fabbe ePub: don't use glob.
Recursivity requires Python 3.5+.
2021-02-07 06:32:15 +01:00
Thibaut Cuvelier
6a99e88565 ePub: quote the command only on Windows. 2021-02-07 06:27:07 +01:00
Thibaut Cuvelier
4dcf3d56c2 ePub: remove commented line. 2021-02-07 06:23:21 +01:00
Thibaut Cuvelier
7472be428e ePub: fix argument handling in Python script. 2021-02-07 01:55:43 +01:00
Thibaut Cuvelier
9ad760db92 docbook2epub. 2021-02-05 16:07:43 +01:00
Thibaut Cuvelier
b7181b17e9 Add Saxon 6.5.5. 2021-02-05 16:07:43 +01:00
Thibaut Cuvelier
0b56495e48 ext_copy: bug when creating the error string.
Wrong usage of % syntax.
2021-02-04 20:30:33 +01:00
Juergen Spitzmueller
c567c78e90 Add ProvideInsetLayout and ModifyInsetLayout (#12098)
This complements ProvideStyle and ModifyStyle.
2021-01-30 15:56:31 +01:00
Juergen Spitzmueller
76eae4572e Introduce InputGlobal (#12087)
This is a variant of Input for layout files that only searches build
and system directories and thus allows "InputGlobal name.inc" in a user
file name.inc that attempts to modify its global counterpart.
2021-01-26 08:42:39 +01:00
Kornel Benko
6a37a67b46 Small improvement to 2ac48f2c.
Making the regex little more robust.
2020-12-15 12:55:50 +01:00
Juergen Spitzmueller
2ac48f2c5b Fix prefs2prefs for \\set_color 2020-12-15 09:15:23 +01:00
Juergen Spitzmueller
704331fdcd Add dark theme colors to semantic colors (#8325) 2020-12-12 10:56:05 +01:00
Juergen Spitzmueller
91026711ae Introduce semantic label colors
This allows customization e.g. in dark mode and is a prerequisite
for color theming

Part of #8325
2020-12-11 11:44:45 +01:00
Richard Kimberly Heck
52a0ffc02f Change name and email in some other files 2020-12-05 17:39:46 -05:00
Richard Kimberly Heck
ae2ce7a86a LaTeXName tag for counters. Layout format change. 2020-12-05 16:46:33 -05:00
Thibaut Cuvelier
59acb375d1 DocBook: add layout parameters to control the special case and argument positioning.
Only for flex insets.

Also add similar checks in InsetText to avoid bibliographies in paragraphs.
2020-11-29 22:54:03 +01:00
Sam Crawley
f3c1fa0b04 Added test for nested insets bug (#9395) 2020-11-15 10:36:10 +01:00
Sam Crawley
434ac146bd Added tests for compare function
Runs the compare via the command line, and then compares the output to the
expected result. Required adding a script to do the comparison, so that
the timestamps on changes in the lyx file are ignored.
2020-11-15 10:36:01 +01:00
Richard Kimberly Heck
060c3de2f0 StepMasterCounter --> StepParentCounter 2020-11-02 17:36:58 -05:00
Richard Kimberly Heck
967c43b218 Comment updates 2020-11-01 18:08:18 -05:00
José Matos
c539b57a0e Make all exectuable python scripts use python3
This is only relevant on linux/unix if running the scripts from a shell.
These two were the last where the call still used an unversioned python.

This has no reflex on the way that lyx calls the scripts or the python
version used since the #! "shebang line" is ignored.
2020-10-30 18:46:13 +00:00
Thibaut Cuvelier
149e1ccc02 DocBook: add DocBookSection parameter for styles that define new sections and implement argument parameters; improve Springer support.
For elements that should behave like sections (for now, mostly prefaces).

A second paragraph of PartBacktext can only wreak havok: it should start a section, and nothing else (otherwise, it's a real nightmare to implement).
2020-10-30 01:59:34 +01:00
Thibaut Cuvelier
0bd2978ac9 DocBook: add DocBookInnerTag and family.
This allows old DocBook documents to be valid when output.
2020-10-07 06:05:22 +02:00
Kornel Benko
31d64c7395 Enable handling of spreadsheets in export to docbook5 format.
In cooperation with Thibaut Cuvelier:
lib/scripts/spreadsheet_to_docbook.py: Strip the document header and convert some flags
lib/xtemplates/gnumeric.xtemplate: use this output to be inserted in docbook5
lib/configure.py: Add needed conversion entries
2020-10-04 01:43:44 +02:00
Enrico Forestieri
77f9858388 Fix the layout2layout script
It was not correctly updated at dab71087, ad18c194, and 6998e764.
2020-09-28 22:29:28 +02:00
José Matos
0bda5e5b8d Make script compliant with python 3 2020-09-28 11:13:47 +01:00
Thibaut Cuvelier
1991d0ed24 Converters: always set version to something.
Otherwise, it's common to compare "None >= (6,2,6)", which makes no sense. Set it to (0,0,0) so that any comparison fails (without an error message).
2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
e4065cc1b1 Converters: slightly more pythonic code. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
dd8660c07e layout2layout: use name instead of pseudonym. 2020-09-19 20:43:41 +02:00
Thibaut Cuvelier
6998e76495 DocBook: define new arguments in layouts to configure new-line behaviour. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
dab71087cf DocBook: add a layout tag to tell whether an item is the abstract or not. 2020-09-19 20:43:37 +02:00
Thibaut Cuvelier
ad18c19492 DocBook: add new layout parameter DocBookWrapperMergeWithPrevious. 2020-09-19 20:43:36 +02:00
Yuriy Skalko
cd933534bd Increment preferences format to 34: rename Cyrillic *.kmap files 2020-09-17 15:05:31 +02:00
Juergen Spitzmueller
0d98fb8548 lyxpaperview: take the first match 2020-08-27 12:05:49 +02:00
Juergen Spitzmueller
ff14d0bd00 Report back if citation target could not be opened 2020-08-27 11:52:52 +02:00
Juergen Spitzmueller
8365eabd6f Make paper search function accessible and customizable 2020-08-27 08:48:55 +02:00
Scott Kostyshak
4a9bbe61df ctests: restore use of -shell-escape to fix Minted
This commit amends 4bb00e99 and fixes the Minted tests.
2020-08-24 16:30:36 -04:00
Juergen Spitzmueller
298fa2eee5 lyxpaperview.py: credit Pavel 2020-08-24 15:59:26 +02:00
Juergen Spitzmueller
7097c4e6b1 laypaperview.py: Fix program description 2020-08-24 15:41:52 +02:00
Juergen Spitzmueller
3e31fad5f6 lyxpaperview.py: no need to limit to year and author
The script can now take an unlimited number of arguments, which are all
searched for in the filename. This allows for more flexibility.
2020-08-24 15:38:55 +02:00
Juergen Spitzmueller
935c9aad5a Add python lyxpaperview script 2020-08-24 13:32:50 +02:00
Pavel Sanda
894ad70eba Enable Open Citation menu item iff citation contain locator information or external search script is available.
Per Juergen's request.
2020-08-23 22:19:34 +02:00
Pavel Sanda
8362360639 switch args 2020-08-21 09:25:10 +02:00
Scott Kostyshak
4c0073cd03 Whitespace 2020-08-20 21:51:29 -04:00
Pavel Sanda
4cd3ab1b1a Example script for looking up the citation pdfs. 2020-08-20 09:12:54 +02:00
Kornel Benko
4bb00e99fb Cmake export tests: Omit next group of possible conflicts while runnig test in parallel
Disable conversion cache because all lyx instances use the same cache without
any locking between read and write to the cache.

Thanks to Scott catching this case.
2020-08-19 22:28:50 +02:00
Thibaut Cuvelier
fa38ae3fc0 Revert "DocBook: add new layout parameter DocBookWrapperMergeWithPrevious."
This reverts commit 59b0f88d2b.
2020-08-03 22:57:49 +02:00
Thibaut Cuvelier
f025538c95 Revert "DocBook: add a layout tag to tell whether an item is the abstract or not."
This reverts commit 5ccd63eff6.
2020-08-03 22:55:52 +02:00
Thibaut Cuvelier
5ccd63eff6 DocBook: add a layout tag to tell whether an item is the abstract or not. 2020-08-03 16:04:58 +02:00
Thibaut Cuvelier
59b0f88d2b DocBook: add new layout parameter DocBookWrapperMergeWithPrevious. 2020-08-03 16:04:57 +02:00
Pavel Sanda
28968b1f0d Add required elements in the layouts to support DocBook.
Slightly modified patch from Thibaut Cuvelier.
2020-07-07 09:49:48 +02:00
Richard Kimberly Heck
6f084c4c30 Some python cleanup from Thibault. 2020-06-21 11:37:23 -04:00
Juergen Spitzmueller
bd89a273bc Amend 74f831e06d
Forgot this part.
2020-05-18 08:32:26 +02:00
Juergen Spitzmueller
74f831e06d Add support for inkscape 1.0
Command line syntax has changed. We now check for the version and use
the appropriate cl options.

Fixes #11742
2020-05-15 14:08:46 +02:00
Richard Kimberly Heck
9bcb243ec6 Increment layout format. 2020-05-02 23:17:16 -04:00
Kornel Benko
b55f735afe Moving lib/scripts/{GetOptions.pm,listFontWithLang.pl} to development/tools 2020-05-02 13:40:26 +02:00
Kornel Benko
4d7c7f1e74 Perl script (for developpers) to select desired system font names.
Needed font-config (so that this script is probably OK on unix systems only)
Probably needed module for Getopt::Mixed.
On debian systems it is contained in package libgetopt-mixed-perl
2020-05-02 13:20:53 +02:00
Enrico Forestieri
92c4bb4682 Amend bd6d09fc
Was forgetting this.
2020-03-22 22:03:49 +01:00
Enrico Forestieri
bd6d09fc98 Fix Python 3 issues when generating preview snippets
The log file generated by latex can contain strings encoded in
whatever supported encoding. Instead of guessing the encoding,
it is better to open it in binary mode and then performing the
necessary comparisons as "bytes". In order to do this, the
strings are encoded in utf8, so that, for example, b"pythön" is
encoded as "pyth\xc3\xb6n" (7 bytes). Of course, this means that
we can only successfully perform comparisons with ascii strings.
However, this is what we actually do, as we only search for
ascii strings in the log file.
2020-03-14 17:19:08 +01:00
Günter Milde
0db0d7f375 Remove no longer needed module import. 2020-03-05 00:24:08 +01:00
Richard Kimberly Heck
9d8dfe934b Fix bug #11750.
Unfortunately, stat.st_ino returns 0 on Windows, at least on Python 2.7, so we can't use that way of telling when we're seeing the same directory again. Surely the real pathname should work.
2020-02-24 19:07:31 -05:00
Scott Kostyshak
562917dc1c lyxpreview_tools.py: fix a regular expression
Three backslashes are needed before a LaTeX command, not one. Before
this commit, the code gave the following error with Python >= 3.6:

  re.error: bad escape \g at position 29

This error was introduced with Python 3.6, as documented [1] by the
following line of documentation:

  Changed in version 3.6: Unknown escapes in pattern consisting of
  '\' and an ASCII letter now are errors.

Although previous Python versions did not give an error, the regular
expression was not working as intended: for example, the "\\n" in
"\\newcommandx" would be interpreted as a new line.

[1] https://docs.python.org/3.6/library/re.html#re.sub
2020-02-15 21:57:30 -05:00
Enrico Forestieri
4e3567523a Fix syntax error with Python 2
Python 2 wants b"..." and gives error win rb"...".
2020-02-06 10:50:02 +01:00
Juergen Spitzmueller
5fc2662b13 Add pref to keep ct markup on copy/paste
Fixes #10278, #10128
2020-01-13 15:20:48 +01:00
Juergen Spitzmueller
8e62dcc20f Add pref option to disable underlining of added text (in workarea)
Addresses #10102
2019-12-27 10:35:52 +01:00
Günter Milde
cec04267b2 Make preview skript Python-3 compatible. 2019-09-05 09:42:56 +02:00
Scott Kostyshak
db65b1a3c3 Port gnuplot2pdf.py to Python 3
Instead of wait(), use communicate(), as mentioned here:

  https://docs.python.org/3/library/subprocess.html

Otherwise, the process seems to hang as cautioned in the above URL.

Also, use byte strings.
2019-09-04 09:12:09 -04:00
Juergen Spitzmueller
cbfce678d8 Add Requires to float definition. 2019-08-12 12:18:28 +02:00
Juergen Spitzmueller
006f1cbe43 update layout formats 2019-08-07 17:10:58 +02:00