Instead of displaying the complete path, display the file name
first and then the path enclosed in parenthesis.
In this way files with same name but different path can still be
distinguished and, at the same time, files with different names
but same path are more easily spotted in case the complete path
is truncated by file managers.
This fixes, for example, the following ctests:
export/doc/ja/Customization_pdf4_systemF
export/doc/ja/Customization_pdf5_systemF
Consistent with ffe5d61b.
While it is not necessary to run validate() on insets that do not
produce output (yellow notes and disabled branches), it has to be done
for previewing, since a construct inside the inset may require some
support.
This is done in two steps:
1. in PreviewLoader::dumpPreamble, indicate that a preview is being
prepared. It is not clear why the `for_preview' boolean was not set
before.
2. in Inset(Branch|Note)::validate, always call the parent's validate
method when previewing.
It should have been possible to move the code from 2. to
InsetText::validate, but the weird code in handling
InsetNoteParams::Comment in html makes it difficult.
It is not clear whether this feature was once documented and used (it
would have been 20 years ago).
It is mostly disable now, but there was a remaining bit that is
annoying now.
I'll try to restore this later.
We need to use two backslashes for "\\arabic".
This fixes instances of the following warning:
warning: internationalized messages should not contain the '\a'
escape sequence
Amends a82ea09a.
- Do not clear the initial selection to allow consecutive changes
(this is in line with the behavior in texted)
- Make the color changes last so that the underline is the right color
- Allow to operate on selections that span multiple cells in a grid
- Use \boldsymbol instead of \mathbf to make everything bold
This new warning in gcc 13 is annoying because it happens in certain
parts of our code where it is harmless to pass a temporary variable to
a function that returns a reference.
This patch introduces a new pair of macros,
LYX_BEGIN_MUTE_GCC_WARNING(warn) and LYX_END_MUTE_GCC_WARNING, which
can be used to define a block of code where a given GCC warning is disabled.
The macros are no-ops with compilers other than gcc, although some
compilers that pretend to be GCC make be mis-detected. The worse that
can happen AFAIU is a bunch of warnings.
The macro relies on an intimidating set of for nested macros. The goal
of these macros is to build a nested string bit by bit. Here is how it
works:
PRAGMA_IGNORE(dangling-reference)
=> PRAGMA_IGNORE_1(-Wdangling-reference)
=> PRAGMA_IGNORE_2("-Wdangling-reference")
=> PRAGMA_IGNORE_3(GCC diagnostic ignored "-Wdangling-reference")
=> _Pragma("GCC diagnostic ignored \""-Wdangling-reference\"")
The next question is: what is _Pragma() good for? Well, it is a
version of #pragma that can be used in a macro.
And finally, what are those pragmas good for? The 'push' and 'pop'
ones make changes to warnings local. The 'ignored' ones allow
to disable some warnings. And disabling -Wpragmas ensures that we do
not have a warning if we try to disable a warning that is not
supported by the compiler.
The \underbar macro is a text mode macro that can also be used
in math mode. However, when inserting it in mathed, LyX helpfully
wraps it in a \text inset. One can dissolve such text inset and
the macro would appear in math mode without any problem. But the
output routine thinks that the user is shooting itself in the
foot and tries to protect him by wrapping \underbar in the
\lyxmathsym macro, whose definition is normally added to the
preamble when an unicode character is used in math mode.
Of course, this is not the case for \underbar and a compile
error arises. The easier solution is to simply add lyxmathsym as
a requirement for \underbar in lib/symbols, but this means
that the definition of \lyxmathsym would be added even when not
necessary (because in the validation routine we miss the info
about the current mode). The correct solution is acknowledging
the dual nature of \underbar as a text-mode macro that can also
be used in math mode. Luckily the correct solution is almost as
easy as the easier one and is what is done in this commit.