People working on the documentation do probably want to switch this on. It
gives easy access to LyX and LaTeX logos (bug 9626), and the info and menu
separator insets.
The export tests, check_load tests, and URL tests are now documented
in the Development.lyx file. The export tests are described in
detail, such as how to run them and how to interpret the results.
These icons are for lfuns that are not very interesting for users, but quite
often used when working on the LyX documentation. Now we can create a special
LyX documentation toolbar.
Many of our documents have babel-specific preamble code. By putting
this code in a \@ifpackageloaded{babel}{}{} conditional, XeTeX and
LuaTeX compilation with polyglossia now works. This fixes some
LuaTeX tests that were broken by edd37de8 and also allows us to
uninvert some XeTeX tests.
Note that in some of the files although the preambles were fixed to
allow for polyglossia, they still do not compile without errors:
es/Math.lyx
es/Customization.lyx
de/Customization.lyx
Similar fixes might be desired in other manuals but these at least
fix regressions in the tests.
PolyglossiaOpts are case-sensitive so "latin" must be changed to
"Latin". Without this change, compiling examples/sr/Braille.lyx
with LuaTeX and system fonts gives the following error:
Package Polyglossia Error: Unknown script `latin' for Serbian
language
Many of our Spanish documents use babel-specific features in the
documents, e.g. to write "sin" in Spanish ("sen"). Because babel
seems to have good support for Spanish, I am setting the "Always
babel" for the manuals.
This fixes several LuaTeX tests with non-TeX fonts. A XeTeX test is
also reverted accordingly.
Some of my following commits will make changes to these files
(mainly just changing the preambles). This commit simply updates the
format so the diffs of the following commits are easy to read.
Since a while now we can translate the unit descriptions. For some special applications it is also necessary that the users know the LaTeX command of the relative units.
- also fix a typo in Customization.lyx
- also disable PDF-reply since this never works correctly and it could even destroy the whole PDF and exceeds the TeX capacity
- update the french version accordingly
paralist.sty extends the standard list environments by some more compact
versions. Support for this has already been requested 15 years ago, and
now I needed it myself.
* Omit commented-out lines
* Properly escape backslash
* Do not allow non-space chars after delaration
* Allow blanks before # comment character
Fixes: #9746
Greek and Times under MikTeX with auto-install may fail due to a half-installed
font package. However, the workaround in LyX stands in the way of
alternative approaches (see bug #6469).
`os.popen` is deprecated since Python-2.6. Also, this fixes the handling
of files with quotes in their names. The patch requires Python >= 2.7.
Furthermore, the patch executes the lyx2lyx script with the same
interpreter used for it, to maintain compatibility.
I also removed some lines related to Python-2.4, as it is no longer
supported anyway.
Actually photos (i.e. .jpg files) where supported previously, but for pdflatex
output an unneeded conversion to png was done. The RasterImage templates
behaves now exactly as InsetGraphics for these files: If the input format is
jpg, use that for pdflatex, else convert to png.
This is another advantage of the new logo insets: We see in LyX where they are
inserted for the output. In these two cases, the text describes keywords of
the external template configuration file language, so these should not be
typeset as logos.
The difference to bitmap graphics is that these will be included as PDF for
pdflatex, so the vector properties are retained if a suitable conversion path
exists.
This brings the external inset on par with the graphics insets as far as the
clipping option is concerned. The graphicxs package supports both: A bounding
box without units (which means that bp ia assumed), and a bounding box with
units, so we can simply output the values including the units.
Being able to compile document with zipped .eps files was a useful feature of
the graphicxs package 20 years ago, but the LyX support is no longer relevant:
- The flag is ignored if preview is on
- If pdflatex is used then uncompressing happens during the compilation anyway
- If set, the flag prevents LyX from issuing proper error messages if
something with the image is wrong
- For hard disk capacities from 20 years ago not uncompressing is a useful
feature, but for current hard disk capacities it does not matter
- The external inset does not have it, and if we want to merge both insets
one day we would need to implement it there, which is even more difficult
than in InsetGraphics
Now the minibuffer toolbar is "auto" by default. It is opened by
command-execute (M-x) and closed when the command is executed without error.
* make lyx::dispatch return a DispatchResult struct
* there is a new MINIBUFFER type of toolbar, that can be used for this use.
* remove special handling of M-x in minnibuffer; Escape can be used instead. Fix focus in this case.
* when minibuffer toolbar is "auto", make the toolbar close itself after
- a command has been executed without error
- an empty command has been executed
- the Escape key has been used
[this is actually commit fdcff02a, which was later reverted at dd61d8cf]
LaTeXFeatures defines \textcommabelow and \textcommaabove based on a
generic \LyXTextAccent and declares TextCompositeCommands for the Baltic
letters in the T1 font encoding, using \textcommaabove for the small letter g
and \textcommabelow else.
This allows overwriting of the composite definition for other font encodings.
Especially, it does not interfere with the polish/baltic font encoding L7x
(supported by LatinModern and TeXGyre fonts) that provides pre-composed
glyphs.
Greek characters with perispomeni (tilde) accent were not properly shown
in the output document, because the "textgreek" feature re-defined \~ in
a way incompatible with lgrenc.def since version 0.8 (2013-05-13)
(package greek-fontenc).
The compatibility-definition is required for older versions of the font setup
(before the move of "lgrenc.def" from "babel" to "greek-fontenc").
It is now done with "ProvideTextCommand" to not overwrite the more complete
implementation in lgrenc.def.
With the compatibility definition, combined diacritics with tilde
must be input with the tilde first (e.g. \~>, not \>~).
"unicodesymbols" is changed accordingly.
Also, some LICRs for combining Greek diacritical characters were added to
Unicodesymbols.
Add font encodings auto-set by babel.
Set font encoding for georgian to the babel default.
Remove InternalEncoding from languages that use a font encoding
compatible to T1.
Change (LaTeX input) encoding for Serbian (cyrillic) and Romanian.
See #9652 for details.
This fixes bug #9615.
The "notermination" flag tells LyX, that terminating an LICR macro with {} is
not necessary. This is normally the case for all macros with non-alphabetical
name (e.g. \{).
However, combining diacritical characters are converted to *accent macros*,
which expect an argument (the base character).
In Unicode, the base character precedes the combining character,
in LaTeX the combining character precedes the base character.
LyX changes the order of the two characters to get this right,
e.g. "x" + "combining tilde" becomes "\~{x}".
In the special case there is no preceding character (e.g. at the start of the
document or a paragraph), Unicode shows the combining diacritical character
without base character.
The replacement is currently not "terminated" (e.g. "\~"), because of the
"notermination=text" flags in "unicodesymbols".
The accent macros take the *following* character as base character, which is
clearly not intended.
In case of a paragraph consisting of just one combining diacritical character,
LaTeX compilation fails with an error.
With the patch, LyX writes the accent macros with an empty argument,
e.g. "\~{}", the output is similar to the view in the GUI with the diacritical
character on its own, not on the follwoing character.
* Take into account the filesystem encoding for the zip export on *nix
such that the representation of filenames in the zip archive is not
mangled, when possible. This only concerns the way filenames are displayed
as their creation in the filesystem was nevertheless correct.
* On Windows, try to obtain the command line parameters from the wide char
representation by directly accessing the platform APIs through ctypes.
This allows to also deal with filenames not exactly representable using
the current code page and corrects a bug resulting in silently dropping
those kind of filenames.
Now the minibuffer toolbar is "auto" by default. It is opened by
command-execute (M-x) and closed when the command is executed without error.
* make lyx::dispatch return a DispatchResult struct
* there is a new MINIBUFFER type of toolbar, that can be used for this use.
* remove special handling of M-x in minnibuffer; Escape can be used instead. Fix focus in this case.
* when minibuffer toolbar is "auto", make the toolbar close itself after
- a command has been executed without error
- an empty command has been executed
- the Escape key has been used
Instead of redefining \usepackage for avoiding the microtype package
when generating previews in dvi mode, the draft option can be used
for disabling it. This also allows to somewhat simplify the
fix_latex_file function.
These were added when the user guide was converted to latest format.
Their purpose is assuring that the vertical spacing is not changed for
old documents. Given that they also assure that the bad spacings in
nested item environments is preserved, let's simply get rid of them.
The path argument of checkProg* was added to the PATH list in a nested
loop such that the list doubles in size each time the loop is executed,
thus also slowing down detection of missing programs.
The strategy adopted in bc47054b had some drawbacks related to the way
instant preview snippets are generated. See the subthread starting at
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg187916.html
for details.
The strategy adopted in this commit is that of adding macro definitions
only for the macros actually used in a preview snippet, independently
of whether some macro was already used in a previous snippet. In this way
the snippets don't need to be changed according to whether they are
compiled as a whole or separately from each other. This fact was causing
the regeneration of a preview snippet whenever the cursor entered the
corresponding inset, even if the generated image would have not changed.
The problem of defining or redefining a macro is taken care by the
python scripts.
The escaping of symbols read from unicodesymbols was inconsistent, which lead
to wrong replacements (bug 9559). Now the escaping is consistent: unicode_reps
contains unescaped LaTeX commands, the needed escaping for LyX files is
applied in put_cmd_in_ert() and lyx2latex().
This is bug #9612. The patch is from Günter Milde. He wrote:
The patch uses the "long" macro names (\llless and \gggtr) to minimize
name-clash probability. (There is, e.g., a name clash of \lll with Babel's
polish.ldf (cf. bug #6197))
This is for people who cannot grasp the superior conventions of emacs ;)
A new argument "partial" has been added to word-upcase, word-lowcase
and word-capitalize that restores the old emacs-like behavior.
The (x)emacs bindings are updated to use the "partial" argument, and
also to bind correctly M-u and M-l (M-c is unfortunately not
available).
Fixes bug #2826.
* Provide for vector fonts only if needed.
* Make sure microtype doesn't throw a trantum in dvi mode.
* Use correct macro definition in preview insets.
In June the R-SS phrase system is replaced officially by the GHS H-P statement system in the EU.
So just in time here is support for this.
No new LaTeX package is required since the already supported package mhchem provides the statements.
The documents saved to the system directory have now the origin tag
prefix "/systemlyxdir/". This allows both saving them always using
the same virtual path irrespective of the real path and to let the
origin tag work out of the box also on MacOS.
Since lyX 2.0 we support to use the in_preamble tag. This allows to support more commands. For an unknown reason I forgot the jss.layout when I updated the other layouts once.
Fileformat change
according to the powerdot manual it uses the standard floats and indeed, the float deinitions were identic to the ones in stdfloats.inc
- powerdot-example.lyx: add a slide with floats (floats are only possible with the H placement option. (assuring this will be possible with the fix for bug#7752)
This reverts commit bede4d320b.
As JMarc notes [1], if we replaced show with toggle, we would lose some
functionality:
There is one use that is not possible with this change (as I argued
before), which is a fully keyboard-based navigation.
With LyX 2.1, I can do C-M-o and navigate with cursor in the
outline. I can do the same with advanced S&R. IN this sense,
toggling is a step back IMO.
The plan now is to find another way to close the dialog (without
using toggle), such as having ESC close it or another key bind.
Ticket #8388 will stay closed because 'show' and 'toggle' are too
close for the cost of having two separate bindings.
[1] http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg187693.html
Add a new tag HasGuiSupport to language file. Add it for all l10ns
that we currently ship. The po files that are unused are not currently
tagged as available, but this could be done, since the code later
checks that the translation is actually there.
This new information is used in GuiPrefs when populating the language
combox.
The new scheme implies that adding a new language is now a two-step
process:
* the language code has to be added to po/LINGUAS, as before;
* one of the entries of the lib/language file has to be selected as
reference and be given the "HasGuiSupport true" property.
Since Kornel's commit at e2d41970, it is now possible to update the
tex2lyx tests with CMake. Note that this is a case where a make
target in the build directory can affect the source directory, which
might not be advisable.
Old LyX version can cope with degenerated multicolumn cells spanning only one
column, so these should not cause a conversion of the whole formula to ERT.
Such columns are used to set border lines or alignment for single cells.
The math parser could not handle multicolumn grids. This is a problem because
there is no true ERT in math (everything is parsed).
Now multicolumn cells are parsed correctly. The display is also somewhat OK,
but apart from that any multicolumn related UI is missing. Since the file
format change is now done the UI can be added at any later point. The most
important part of bug 396 is now fixed: tex2lyx does not create invalid .lyx
files anymore for formulas containing \multicolumn.
I updated the tex2lyx test cases that produce correct output. tex2lyx does
still produce invalid output for the test cases which are not updated because
of the previous format change.
I don't understand why the string "shadowsize" is not already in the file because when I convert from format 474 to 489 it is added. So why is it not there when I convert from format 474 to 491.
We also get a consistent look with amsmath, so require esint or amsmath.
When resolving alternatives, do also take into account whether the package
is available. For this to work, we also need to test for amsmath.sty (which
was surprisingly not yet done).
The "save-as" part of the bug is fixed by extending the \textclass tag
such that, if a local layout file is used, its path relative to the
document directory is now stored together with the name. If a relative
path cannot be used, an absolute one is used but, in this case, the
document is not usable on a different platform.
The "copy" part is fixed by introducing a new \origin tag, which is
written when the file is saved. This tag stores the absolute path of
the document directory. If the document is manually copied to a
different location, the local layout file is retrivied by using
\origin (which is only updated on save).
This new tag may prove useful also for locating other files when the
document is manually moved to a different directory.
As in the original implementation the files needed for the layout
(for example, a latex class) had to be in the same directory as the
layout file, this directory has also to be added to TEXINPUTS.
Avoid that \newcommand[x] definitions of math macros are pushed multiple
times to the preview loader.
Redefinitions (via \renewcommand[x]) are properly handled.
If use of hyperref is detected, the postscript route is not attempted
(because we know it will fail) and the PDF route is directly chosen.
Also account for all upper case extensions for pdflatex image files.
Was forgetting this last bit from 64e0c558. Also give a message such
that the user is informed that not everything is lost if latex fails.
With this, the previews are generated also when the document directly
specifies a specific pdf output format.
This is a followup commit to 691fdea3 and restores the behavior of the
script as it was intended before 64e0c558, other than taking into account
possible inclusion of files that only pdflatex can process and the
possibility of multiple defined math macros.
The instant previews in the math manual now work again.
- enrich the examples
- add info about naming
- formatting fixes to improve the layout of the PDF
- make the document compilable also if the package insdljs is not installed
If pdftocairo is detected, it is used for generating bitmaps in the
legacy method route in preference to ghostscript. This is justified
by the fact that the conversion is 4 to 5 times faster and the
quality of the generated images is superior.
When the dvipng route is selected and latex fails, the lyxpreview2bitmap.py
script simply bails out. The failure may be due to using a specific pdf
only feature in ERT (for example, the inclusion of a pdf image).
In this case the procedure may succeed simply trying to use pdflatex
and the legacy conversion method.