Also, perform the URL fixing magic for DocBook and XHTML.
As it was, it was impossible to enter e.g. "tel:" type links. Now
choosing the "Other" type just outputs the URL as given.
Also, the addition of "http" or "file" was not being done for
DocBook and XHTML. Now it is.
This adds a warning icon to either the tab header or the panel stack
entry item if a widget on the panel/stack has invalid content.
Particularly helpful to get aware of such content on other tabs/panes
than the one currently selected.
Before, there was always a space after the tag, even when there were no attributes. Now, the space is output conditionally, so that the output makes more sense.
Before, one space too many for the tag name (title), casting doubt on whether the code had this space hard coded or not:
<!-- Output Error: Unrecognised tag type 'para' for 'title ' -->
After, no such space:
<!-- Output Error: Unrecognised tag type 'para' for 'title' -->
Remove some special cases that I do not really understand and
streamline the cases.
Also make sure that there is only one code path for centering.
Fixes bug #12491.
Instead of having to add and individually test the versions to check
for, we store the current version and test on that with a specific
function isAvailableAtLeastFrom(package, year, month, day)
Currently only used for the LaTeX version, but could also be extended
for package versions.
If the main language does not require the inputenc package, but a
secondary language does, inputenc needs to be loaded as well
(without options)
Also simplify the code a bit.
- new function to list bibtex databases
- citation-insert returns the list of undefined keys
if the request comes from the LyX server
Original patch from Benjamin Piwowarski (2012!).
Modified and updated by Riki Heck and myself.
File switches with documents are done via \inputencoding.
Other than with fontenc, these do not need to be laoded via options
beforehand.
Also, out current code loaded the additional languages' encoding last,
which might result in wrong encoding settings.
This restores the previous behavior of runCommand().
When the child process could not be properly terminated the
error "RunCommand: could not terminate child process" was being
issued. However, in fb7b7e52 there was a misinterpretation
between this condition and the exit status of the child and
these two different errors were mixed up. They are now
disentangled again.
Apostrophes were being converted inside code-like areas, like LilyPond insets. This patch fixes tests that started to fail:
Processing `./60/lily-95ee389a.ly'
Parsing...
././60/lily-95ee389a.ly:7:12: error: undefined character or shorthand: &
\relative c
’’ { g a b c}
This is similar to what LaTeX does in its output.
See the (long) discussion in ticket #11244. Port of ad3e6c69b2 for DocBook.
This patch requires delaying entire strings instead of just characters, so that the DocBook code path can be as similar to the XHTML one as possible.
Instead of specifying "force" to disable the deletion protection
mechanism, invert the default so that "confirm" is needed to activate
it. The idea is to keep the lfun reasonable for scripting and add a
special argument for interactive use.
Document in release notes.
Update LFUN.lyx documentation
Update bind files.
Add conversion step to prefs2prefs_lfun.py.
Remove all trace of Qt4 support. The different elements have been
considered carefully before removal.
The only changes that need to be done concern Windows and macOS
compilation instruction and will need to be taken care of by the
respective maintainers before prerelease.
The file TODO.killqt4 lists what remains to be done.
This macros are important for particle physicists. Note that the
package hepparticles as distributed in recent texlive does not work
(see #11804) and need to be patched. This is however not something we
can do, and any physicist wanting to use this will have patched his
own version I guess.
I contacted Andy Buckley, the author of the package, who answered that
he is aware of the issue but does not have time right now to fix it.
The workaround is straightforward: on line 176 of hepparticles.sty,
replace "\updefault" by "n".
Two parts:
- add *lots* of definitions to lib/symbols
- add hepparticles and hepnames as simple features in LaTeXFeatures.
The definitions are courtesy of @renyhp, and extracted from the
aforemented packages:
https://www.ctan.org/pkg/hepparticleshttps://www.ctan.org/pkg/hepnames
Fixes bug #11804.
We now allow the user to cancel the background process at any point
(via the red "x" in the status bar or Document > Cancel Export), so
we do not need to poll the user with the dialog.
The patch works by setting timeout to "-1" which is treated as a
special value to disable the poll.
Fix (by obviation) #12531 and #9953, which were about the dialog.
An export can be canceled by clicking on the status bar icon or by
executing export-cancel (e.g., via Document > Cancel Background
Process).
The centralized code kills the script and updates the status bar
icons.
No change in functionality intended.
Related commits: 70a71a82 and 01abab9a.
This is consistent with 70a71a82 (which is about the code path
through clicking on the 'x' status bar icon).
In the next commit I'll make a function to centralize this sequence
of killing a script and emitting the scriptKilled() signal.
Removing. M-c e has a different meaning nowadays
(tabular-feature delete-vline-left)
Please file a new report with an updated description if this is still
an issue.
LyX removes a single backslash when it is inserted in a
macro name by the keyboard. However if it is followed by
another character before moving the cursor, it is retained
causing an assertion (bug #12601).
Disable the arguments append-column and delete-column of tabular-features.
The code is taken from InsetMathCases, with some changes
* no need to record undo here
* in dispatch, return is prefered to break, since we do not want to invoke
InsetMathGrid::doDispatch.
Propagate these changes to InsetMathCases.
Cleanup of the InsetMathCases error messages to fit with other parts
of the code.
The handling of tabular-features in mathed needs to be unified somehow.
Based on a commit from lynx <lorenzobertini97@gmail.com>
Part of bug #12590.
Qt >= 5 refuses to display them. We work around this in lib/symbols
already, but make sure we do not try to display math glyphs at these
code points anyway.
Fixes bug #8493.
Backslashes are not allowed in macro names and LyX
enforces this by not allowing entering them by keyboard.
However, it was possible to paste them and this may cause
crashes (see bug #12596).
The previous code explicitly disabled it and this behaviour caused problems (like "A&A" being output as-is, which is wrong in HTML: it should be "A&A").
Qt4 code has been identidifed by
git grep -l 'QT_VERSION.*\(0x050000\|0x04\)' src
Uses of QT_VERSION_CHECK have been checked too.
been used to remember what places need further work.
Then remaining Qt4 references have been searched using
git grep -i qt4
git grep -i 'qt 4'
and relevant issues have been either fixed or noted in the new
TODO.killqt4 file.
It appears that gcc 4.9 does not implement the following part of C++11:
https://cplusplus.github.io/CWG/issues/1148.html
Therefore, we have to use a special case in C++11 mode that does an
explicit std:move.
With recent compilers (gcc >= 9), this leads in C++11 mode to a warning:
MetricsInfo.cpp: In member function ‘lyx::Changer lyx::MetricsBase::changeFontSet(const string&)’:
../../master/src/MetricsInfo.cpp:83:13: warning: redundant move in return statement [-Wredundant-move]
83 | return move(rc);
| ~~~~^~~~
MetricsInfo.cpp:83:13: note: remove ‘std::move’ call
Partly reverts commit fff28c57.
This branch improves handling of spaces on display (see #10117):
* caret is correctly shown in the middle of double spaces in justified rows;
* sequence spaces are correctly shown at the end of rows before
automatic row breaks.
Moreover, this branch:
* streamlines the code that handles spaces in row breaking
* improves display in Qt4 : although the improvements outlined above
are not present in Qt4 for monospaced fonts, some dsplay glitches
are resolved.
* improves performance for very long paragraphs (#12598).
When is it detected that our zero-width characters are not really
zero-width, avoid to use them altogether. Currently, this is known to
happen in Qt4 with monospace fonts.
This allow to remove the special Qt4 code in breaskString_helper.
Related to bug #10117.
This allows to create a new version that takes an already built
TextLayoutHelper struct as parameter.
No intended change.
See discussion in bug #10117.
In order to work around the Qt row breaking algorithm, which considers
multiple spaces as one at QTextLine break, we insert word_joiner unicode
characters beteween each pair of spaces.
The TextLayoutHelper class makes it easy to handle that.
Update Row::Element::rtrim() to only remove one space at row end.
Update support::countExpanders() to count all spaces, without special
handling for consecutive ones.
Fixes bug #10117.
This new code allows to get rid of some hardcoded stuff and will be a
foundation for handling of consecutive spaces.
This code can be used in the future for getTextLayout, x2pos, and
pos2x in order to streamline code. Actually some features as the naked
parameter are here to prepare for this second set of changes.
No change intended. The modified code is much clearer, though.
Related to bug #10117.
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).
This is a convenience function for indexing. It adds a copy of the
index inset under cursor after any word in the buffer that is equal
(case-insensitively) to the word preceding the index inset.
The function can be easily used to generate bad indexes (and I warn
about that in the UserGuide), but if used with care, it can also be
extremely convenient.
Previously, only the suggestions starting with the current input were
shown.
Contains the following minor improvements:
- Add space to indicate when only one suggestion is found
- Select first item in suggestion-list in order to make selecting with
arrow keys more intuitive
- Fix selection with Shift+Up/Down in text-field
Fix for bug #12572.
The new function inset-insert-copy can only be invoked from the ToC.
It is currently only implemented for Index inset.
It is a special lfun because Inset::dispatch is called directly from
the ToC widget with cursor pointing to the inset, whereas the patch
happens in the workarea at caret position. This function cannot be
called directly.
Add an entry for this function in the toc context menu.
Fixes bug #4582.