We use the more comprehensive cochineal package if available and fall
back to the crimson package, if not.
Math support is provided by means of newtxmath
Fixes: #9974, #9976
* b `british' (``inner quotation'')
* w >>swedishg>> ('inner quotation') ["g" = Guillemets]
* f <<french>> (``inner quotation'')
* i <<frenchin>> (<<inner quotation>>) ["in" = Imprimerie Nationale]
* r <<russian>> (,,inner quotation``)
Rename "french" to "swiss"
Also rename "single/double" to "secondary/primary" ("inner/outer" in
the UI) and "left/right" to "opening/closing". Note that the inset
identifier string is left as is ("s/d" and "l/r")
The xfrac package is the "state of the art" for "split-level" (nice) fractions.
Character replacements look consistent, scale properly and fit in the line.
Fixes#5220.
This encoding (modified Mac Cyrillic for Asian languages) is rarely used and not supported by Gnu iconv.
Update comments in lib/encodings.
Update ctests: Gnu iconv only supports cp858, if configured with "--enable-extra-encodings".
The missing character problem is fixed upstream.
Also fix the scaling of the \sun-symbol-index by wrapping the symbol in \text.
(wasysym's \sun is valid in text and math mode. LyX currently adds a spurious \ensuremath.)
- Allow using logical values for icon sizes as the standard sizes may
differ among different icon sets
- Do not allow setting sizes smaller than smallIconSize
When the logical sizes differ and the icon set is changed, the correct
sizes are established only after a restart.
Addressing #10481.
This patch adds the new 'needauth' option for converters launching
external programs that are capable of running arbitrary code on behalf
of the user. These converters won't be run unless the user gives explicit
authorization, which is asked on-demand when the converter is about to
be run (question is not asked if the file is cached and calling the
converter is not needed).
The user prompt has a 3rd button so that he/she's not prompted again
for (any converter over) the same document (identified through
buffer->absFileName()).
Two preference options are added:
lyxrc.use_converter_needauth_forbidden disables any converter with
the 'needauth' option, which is meant to force user to an explicit
action via the preferences pane, before being able to use advanced
converters that can potentially bring security threats;
lyxrc.use_converter_needauth enables prompting the user for 'needauth'
converters, or bypasses the check if not enabled, falling back to the
previous behavior.
So, the first option is for maximum security, the second is for
maximum usability.
- Adds LFUNs for setting the icon size
- Adds icons sizes to the Toolbars menu
- Uses the Toolbars menu as application context menu
- The context menu can now be user defined in stdcontext.inc
Fixes ticket #10428.
Move math style to FontInfo and compute the font sizes for scriptstyle and
scriptscriptstyle according to standard proportions: 0.73 and 0.55.
This is simpler and more accurate. It also fixes the font size of
${\scriptscriptstyle {\textstyle A}}A$ which exposed the limitations of the
previous approach.
The purpose of this branch is to improve the spacing in math equations
* do not use hardcoded pixel values, but math units that depend on
zoom and dpi. This should be good for HiDPI systems.
* implement as much as possible the math typesetting algorithm
described in Appendix G of the TeXbook.
One typical example of the spacing algorithm is that ``-a'' has no
spacing, contrary to ``a + b''. This reflects the unitary/binary
minus that will indeed happen in typeset output.
Together with the better character substitution that has already been
implemented by Guillaume, we get a nice improvement of mathed looks.
What makes this code complicated is that it handles macros properly:
the spacing inside the macro will depend on the values of the
arguments and the elements that are before and after the macro.
As a result, many definitions in lib/symbols are now just copy/pasted
from the relevant sty file. In particular, it is now possible to make
use of \mathrel, \mathbin, etc. macros to specify spacing.
This merge is a starting point. Remaining work includes
* proper handling of sub/superscript nucleus and of font-changing
insets (as is done in the TeX algorithm).
* proper typesetting of fractions
Thanks to Guillaume for extensive testing.
Try as far as possible to use the same definitions as in the LaTeX files.
An example of that is the definition and subsequent use of \joinrel,
\relbar and \Relbar.
This is mostly Guillaume's work.
Test unicodesymbols for most supported input encodings with Kornel's addition to ctests.
Add required "forces" to unicodesymbols:
* utf8x does not support all characters supported by LyX
* several 8-bit encodings map characters to math-mode commands - force replacement in text-mode so that LyX can wrap them in \\ensuremath.
Fix a misalignment (wrong replacements) in the Cyrillic Unicode block.
Use \\mathscr for Mathematical Script characters in Mathematical Alphanumeric Characters (in line with the characters in other unicode blocks.
* set up a replacement of *, -, and : by the adequate symbols (#9893)
* fix the wrong character selection and operator spacing in \text mode
* hide some internal symbols from the auto-completion.
* Fix spacing in lib/symbols after recent commits about math spacing, as well as
older spacing issues (e.g. \Join).
* InsetMathKern now uses the same em value as other math length commands.
What is nice is that the kerning amount now matches the ones found in the
packages definition (modulo 10mu that lyx currently adds between relations).
Testcase: $\CheckedBox\LEFTcircle\RIGHTcircle\photon\gluon\vcentcolon\dblcolon\Coloneqq\eqcolon\models\hookrightarrow\bowtie\hookleftarrow\Join\APLinv\neq$
First run of Kornels patch for tests with all input encodings in lib/encodings.
Remove redundant sample files - keep only one sample and change the input encoding in the test script.
Put remaining failing test in "unreliableTests" for later sorting...
1. We must always output all (diverging) options, including
default options; if not, default options might get overwritten.
2. Do not output options in \setotherlanguage, since we might have
multiple "other languages" varieties from the same language (such
as naustrian, nswissgerman). And the options are output for the
language switches anyway.
Hence, LaTeXFeatures::getPolyglossiaLanguages() does not have to record
varieties. This was not done correctly anyway, since the map allowed
for one entry per language only.
- fileformat change
- I could not update the tex2lyx test files because of bug #10440
- maybe the lyx2lyx routine could be improved but since a document can also begin with another layout than "Standard" I could not use the lyx2lyx function put_cmd_in_ert
Do not use REVERSE SOLIDUS OPERATOR for backwards conversion of
\\\\textbackslash in LyX and tex2lyx.
Both, \\\\ (005C REVERSE SOLIDUS = backslash) and 0x29f5 map to
\\\\textbackslash but 005c is the preferred back-transformation.
Otherwise, using \\\\ in "mathematical text" leads to literal 0x29f5 in the LyX
source which leads to "missing character" errors with non-TeX fonts.
Ideally, we would use a proper counter here, but this seems to be
impossible with the current counter mechanism.
What we would need is a counter that is incremented when either of the
layouts is used. Currently, the counter seems to be stepped only inside
one layout.
The current fix is a candidate for stable.
Note that the lyxrc.document_path variable corresponds to what we
call the "Working directory" in the GUI preferences dialog.
Setting document_path to "." makes it so when LyX is started from a
directory, that directory is the default path for many of LyX's
operations, such as the following:
- new file, new from template
- adding a custom BibTeX file
- GUI compare dialog
- local layout button in document settings
- external material file browser
- graphics browser, include browser
The best guess for where the user wants to save or find files is the
directory the user started LyX from. Before, the default was always
the home directory. If desired, the old behavior can be restored by
changing the default path in Preferences > "Working directory".
This commit takes advantage of 9b64d7bd, which allows the use of a
relative path for path preferences.
* custom non-tex fonts with all required characters
* use 2.2 fileformat (easier backporting)
* test all export formats
Also, fix pattern for "mixing_inTitle_layouts" in unreliableTests.
force=utf8 is required for most characters provided by add-on packgages
and (almost) all mathematical characters, because these are not
set up for inputencs utf8
unicodesymbols.py failed here (python 2.7 under Linux) before the simple fix
included in this commit.
Based on Daniel Groger's work of five years ago, with minor changes
http://www.mail-archive.com/lyx-devel%40lists.lyx.org/msg169820.html
This extends the support for Xfig LaTeX + PDF to a more modern and
actively developed vector graphics editor. Embedded Objects manual
updated, also to include a workaround for an Inkscape 0.91 bug.
Specify non-TeX fonts that work in the source for documents that
fail with "missing characters" if compiling with "non-TeX fonts"=true.
(This does not interfere with the default output in any way.)
THe pdf output showed a very visible line overfull. I slightly changed the text to
avoid this without adding an hyphenation point, not appropriate in documents for beginners.
Use LyX note instead of comment. This is less invasive that
converting Beamer frames to fragile to accommodate the comment
environment.
(cherry picked from commit e81f6b04bc)
The title is changed to "LaTeX (pdflatex) Preview", etc. depending on the
format. The actual default format is computed.
The menu name "Source Pane" is replaced by "Code Preview Pane" to better reflect
its purpose.
Consider biblatex's new field names: location (address),
journaltitle (journal), institution (school).
Biblatex provides alias for the legacy bibtex field names. Hence check
for the new names only if the legacy names are not used.
The compilation did not succeed before because of an é in an ERT
inset. This is changed to \'{e}.
Also correct spelling of "decouvert" to "découvert".
Alternatives would be to use a LyX note or a comment inset. Since
the original version uses ERT, I do not change that.
This commit fixes the following ctest:
export/examples/fr/beamer-article_pdf4_texF
It likely also fixes the corresponding test for fr/beamer.lyx, but
since the default output format is set to pdf2 we do not run the
test.
For more information, see:
https://www.mail-archive.com/search?l=mid&q=20160919192413.ftnz4gk6dl5w3k5c%40Opti1604
(cherry picked from commit 9f3518bcd2)
sidecap does not work well for some reason with the Japanese doc, so
the sidecap bool is set to false to restore compilation.
The following test now passes:
export/doc/ja/EmbeddedObjects_pdf3
Fix problems revealed by hand-compiling an examining the test samples in autotests/export/Unicode-characters/:
* new definitions
* fixed definitions
* "force=utf8" when required
* some IPA symbols fail without the "extraipa" package
* fix direction of "textcommaaboveright"
Please fix at first the versions in branch since this is the working copy delivered with LyX.
Also please keep the fileformat unless you need to document a new feature that requires a new fileformat.
This led to errors when compiling with polyglossia (and non-TeX fonts).
A minimal (currently non-compiling) test sample is kept in autotests/export/
and inverted in suspiciousTests.
We do already have docx, but xlsx was missing. This is a separate format
because of the MIME type. nd because some users might need converters which
can only handle one format. Now the spreadsheet template does not hide the
fact anymore that it can deal with xlsx files as well.
This change fixes the export of our FeynmanDiagrams.lyx example
files on the latest TeX Live 2016.
The IJMP(C|D).lyx examples compiled before the change but might as
well convert these instances of '\rm' also.
The changes were made with the help of the following command:
find ./ -iregex .*lyx -exec sed -i 's/\\rm /\\textrm /g' {} \;
and the resulting diff was confirmed manually.
This commit is consistent with 3cecd4d3.
There are still many math symbols in lib/symbols that lack a corresponding
entry in lib/unicodesymbols, although a clear mapping exists. This commit
adds some of them (not all yet). In the future we should probably move the
information from both files into one database.
The XHTML entries were added in the wrong field, if they are given we need
extra xhtml requires. The order is inconsistent, there are discussions on the
list about that but for now I'll use the existing order to fix the export tests.
The format of the lib/symbols file does not support "" for empty strings.
One would have to use x for fields that are not set (this is a hack), but
actually we know how to fill the extra field.
By moving date and author above the standard layouts, author is now
output in the PDF and the terminal error from LyX about mixing an
InTitle layout with non-InTitle layouts is gone.
After the fix at fe06ef0e, several converter chains to DVI
(dviluatex) were broken because they had previously gone through an
incorrect link in the chain.
This commit adds converters for the above formats to dviluatex and
fixes the following ctests:
export/examples/Literate_dvi3_texF
export/examples/Literate_dvi3_systemF
export/examples/knitr_dvi3_texF
export/examples/knitr_dvi3_systemF
export/examples/lilypond_dvi3_texF
export/examples/lilypond_dvi3_systemF
export/examples/noweb2lyx_dvi3_texF
export/examples/noweb2lyx_dvi3_systemF
export/examples/sweave_dvi3_texF
export/examples/sweave_dvi3_systemF
export/templates/RJournal_dvi3_texF
File format change. On format reversion, we need to put some extra code
in the local layout that emulates the 2.3 behavior.
Simply Input'ing the respective layouts is unfortunately not enough,
due to the insertion order.
See #9977
On Linux and Mac OS, this action brings the LyX window into focus.
Such behavior is not allowed by Windows OS so instead the color of
the taskbar entry is changed to indicate that the window has changed
in some way.
The action is hidden in the shortcuts menu because it would make
sense to assign a shortcut to it. The only way to execute shortcut
would be if the LyX window is already activated.
lyx-activate will be used (see next commit) to allow the PDF viewer
to switch to LyX after executing a reverse search.
This commit documents the feature introduced at 4803c769, which
fixed#10288.
The User Guide already has a section on closing tabs, so this fits
in well.
The default for ZOOM_OUT is -20 from a user perspective. That is,
the following are equivalent:
buffer-zoom-out -20
buffer-zoom-out
The reason for this is that the argument to ZOOM_OUT is treated the
exact same way as ZOOM_IN. The only way they differ is how the
default case is handled.
This commit also clarifies that (1) the argument may be positive or
negative and that (2) the argument is interpreted as percentage
points, not percent.
Add get_bool_value to parser_tools to be used in other places.
Make the upgrade convertion seamless from lyx writing the file (regarding
microtypes, there are still other dragons to chase. :-)
The keytests were previously enabled by default if the necessary
dependencies were found. They require a GUI and mouse so can
sometimes be annoying. Further, they are not currently reliable.
They are thus now disabled by default.
is output when a branch is NOT activated. Fixes bug #7698.
At the moment, inversion is controlled through the branch settings
dialog. There is no provision for inserting inverted insets directly,
or for changing them from the context menu. Both of these could be
done, of course. The latter would need LFUN_BRANCH_TOGGLE_INVERTED.
Although this a problem that only manifests itself on windows the change is general
and it works anywhere.
The major change is to change the file redirection > to -o the specifies the output file.
At the same time it makes the call to lyx2lyx less cryptic, e.g. to revert to the 1.3
format we have:
\converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" ""
now instead of
python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o
we use a call where the version to revert is explicit
python -tt $$s/lyx2lyx/lyx2lyx -V 1.3 -o $$o $$i
or we could write a longer, but more understandable form:
python -tt $$s/lyx2lyx/lyx2lyx --final_version 1.3 --output $$o $$i
FWIW I shuffled the order of the arguments just for the sake of readability,
to let $$i be the last argument.
These are all in lib/symbols, but we did not yet know the corresponding unicode
numbers. unicodesymbols does still not contain all symbols from lib/symbols.
The parser that reads unicodesymbols uses backslashes to escape quotes, so
every backslash that is part of a LaTeX command needs to be escaped as well.
There are more candidates in the greek and cyrillic sections, but I don't
know those commands, so I did not touch them.
\it and the other oldfont commands are deprecated and the new forms
(e.g. \mathit) should be used instead. The old forms can lead to a
warning in TeX Live 2015 and an error in TeX Live 2016.
Note that with this commit only affects completion, so LyX still
supports displaying e.g. \it in math if the user enters it without
completion.
This is consistent with 24d01111.
Thanks to Guillaume for the patch.
The external templates requested conversion to these formats, but there was no
converter defined, so plain text export did fail, and there are no obvious ways
to create plain text representations for the files used by these templates.
Now we output the file name as for other templates and also the graphics inset.
This fixes bug #7135.
On TeX Live 2016, Math.lyx gives an error when compiling with
pdflatex. On TeX Live 2015, Math.lyx compiles but the log gives the
following warning:
Usage of deprecated font command `\it'!
This commit amends 67e45aa3.
Provides two new styles:
1. An "In Premable" style that puts whatever is entered into it into the preamble.
This can be used, if one wishes, to include preamble code in the body of the
LyX document.
2. An "In Title" style that will put its contents into the body of the LaTeX
document, but before \maketitle is issued. This is useful for making branches
and notes in title-related material. (If you put these in a Standard layout,
this signals to LyX to output \maketitle, which may then come too early.)
Due to the ForceLocal machinery, no format change is needed.
The external date inset was implemented as a demonstrator for external insets
in general. It was never intended for production code. Now that we have several
external insets defined we do not need the demonstrator anymore. This fixes
bugs #4398 and #9948.
Previously the commandline arguments were processed in an operating system
dependent encoding if running under python 2. Now they are converted to
unicode during the parsing, using the more modern argpase instead of optparse.
The individual conversion methods do no longer need to know anything about
commandline encoding. This fixes a bug similar to #10218 if running under
python 2 which I probably introduced during the python 3 conversion.
The LyX class works now with python 3. Certain file format conversions may
still fail (convert_multiencoding() is a hot candidate), but this will need
to be fixed in the individual modules.
LyX did not distinguish compressed and uncompressed svg files previously.
Therefore XHTML export of vector graphics did use svgz images directly, which
is not supported by browsers. If svg and svgz are treated as two formats then
all works fine. This is also consistent with the loadable image formats
reported by qt: It reports both svg and svgz.
The gunzip dependency in converters is not new (it is already used internally),
but the gzip dependency is new, so it might not be available on windows.
This is not important at the moment, since we do not yet need to convert svg
to svgz, I only added the converter for completeness.
Although the fix affects only a content of a LyX note, it is
still surprising to get a dialog-window demanding creation
a new document if trying to edit the subdocument.
Now that 5mu are added on each side of : (because it is a relation), there is no need to do the same in the definition of \vcentcolon.
This is closer to what is done in mathtools.sty.
Inset-icons are auto-scaled according to their width.
This is problematic, if converted from SVG
with the bounding box set to content (ignoring the page size)
and the content is not square.
OTOH, ignoring page size is done for good reasons - we usually want just
the drawing area when inserting an image into a document.
An invisible square with fixes this problem.
Some icons had spurious invisible elements outside the page -- leading
to too small results in the PDF. These were removed.
(#8738)
For efficiency, we add a new flag to the buffer indicating when changes are
present. This flag is updated at each buffer update, and also when explicitly
requested via a dispatch result flag.
The old text was incorrect and came from the 2.0 release. LyX works fine if
the default python interpreter is python 3, as long as python 2 is available
as well.
Building LyX does also work with python 3, but since I did not check all
special build steps with both cmake and autotools, I kept a note about
possible problems.