Commit Graph

257 Commits

Author SHA1 Message Date
Juergen Spitzmueller
35e64bf951 Allow usage of algorithm2e package (#8744)
This simple module allows users to use the algorithm2e package at all. Before, it was not possible with LyX, since this package conflicts with LyX's own algorithm support (see also #8728)
2014-01-26 19:23:40 +01:00
Juergen Spitzmueller
ed1ef9d740 Fix typo 2013-12-14 15:09:23 +01:00
Juergen Spitzmueller
3f9e644c25 Do not load the tipa package when fontspec is used
This was until now only cared of by the IPA inset, not by unicodesymbols.
2013-12-14 09:13:17 +01:00
Juergen Spitzmueller
3ccb2a1691 Also consider main language in hasOnlyPolyglossiaLanguages() and hasPolyglossiaExclusiveLanguages() 2013-11-14 17:40:47 +01:00
Juergen Spitzmueller
36730a2f3f fix macro order for newsubfloat 2013-10-13 11:45:59 +02:00
Juergen Spitzmueller
d1a77eadc1 Load AMS packages before newtxmath (#8824) 2013-09-01 10:21:21 +02:00
Uwe Stöhr
158571ea00 LaTeXFeatures.cpp: fix bug #8731
- we must assure that the package mhchem is loaded before the package esint
2013-07-16 23:16:09 +02:00
Uwe Stöhr
f33454b3c7 LaTeXFeatures.cpp: add rsphrase
- also modify the rsphrase.module
- correct naming scheme for the bicaption.module
2013-05-30 18:15:44 +02:00
Uwe Stöhr
a2e6fc773a LaTeXFeatures.cpp: add multicol and shapepar 2013-05-30 17:55:21 +02:00
Julien Rioux
9e50872e50 Add babelbib, bibgerm, chscite, and opcit to LaTeXFeatures.
This way they can be Required by layout or module files and LyX
will insert them in the appropriate location in the preamble.
2013-05-26 21:10:32 +02:00
Richard Heck
f34394460a Whitespace. 2013-05-23 09:39:16 -04:00
Richard Heck
1230372566 Add support for package options in layout files. E.g.:
PackageOption tipa safe will load tipa with the
 "safe" option, if we load it.
2013-05-23 09:34:40 -04:00
Georg Baum
274b3caff2 Fix most important case of bug #8205
Since a complete solution requires some refactoring, I fixed the bug for the
most important case: The main document language is only supported by
polyglossia. If any other language than the main one is only supported by
polyglossia the bug is still there.
2013-03-31 23:48:05 +02:00
Richard Heck
82b8723654 Handle other text ranges in XHTML output. 2013-03-27 13:51:26 -04:00
Kornel Benko
8f36aef17a Added "cancel" to the GUI handled list of LaTeX packages.
Generalized convert_use_???() and revert_use_???() routines in lyx2lyx.
2013-02-27 13:12:03 +01:00
Julien Rioux
2e72a0af48 Add known citation packages to LaTeXFeatures:
- achicago
  - apacite
  - apalike
  - astron
  - authordate
  - chicago
  - harvard
  - mslapa
  - named

This allows these citation packages can be Required by the document layout.
LyX handles the package ordering, loading any of these packages before natbib
when both are required by the document layout. For example, apacite can be
used with or without natbib.

The package achicago isn't compatible with natbib out-of-the-box,
but the following compatibility code makes it work:

\usepackage{achicago}
\let\achicagobib\thebibliography
\usepackage[authoryear]{natbib}
\let\thebibliography\achicagobib
\let\UnexpandableProtect\protect
\let\SCcite\astroncite
2013-01-05 00:08:55 +01:00
Georg Baum
56ece75ad9 Fix bug #8464: stackrel with subscript.
The fix is basically mechanical, the additional code for fraction like insets
with three arguments was stolen from \unitfrac. As any math package,
stackrel.sty needs a buffer parameter to switch it off.
I also added the two stackrel flavours to the toolbar.
2012-12-28 20:08:43 +01:00
Juergen Spitzmueller
0dd741e4da Load babel with English-only documents (bug 8423) 2012-12-23 11:34:38 +01:00
Georg Baum
f67cf6f4bb Add support for stmaryrd.sty (bug #8434)
The stmaryrd package adds support for lots of math symbols, using a font
designed to accompany the computer modern fonts. The changes in detail:

- Fix generate_symbols_list.py to work with stmaryrd.sty. It loooks like it
  was automatically translated from a perl version and never used.
- Generate the new symbols in lib/symbols using generate_symbols_list.py and
  add some manual adjustments
- Generate stmary10.ttf by a simple ttf export from stmary10.sfd with fontforge
- Add license info for stmary10.ttf
- Create a test file with all symbols from stmaryrd.sty. Actually it would be
  nice to have this for the other fonts as well.
- The mechanics: lyx2lyx, tex2lyx, font machinery etc.
2012-12-15 13:10:31 +01:00
Juergen Spitzmueller
39ec866f68 make \lyxadded and \lyxdeleted robust (#8435) 2012-12-03 13:55:20 +01:00
Lars Gullik Bjønnes
6b2232a29c src/*.cpp: reformatting to increase consistency 2012-10-28 17:42:07 +01:00
Juergen Spitzmueller
e55aa4359f Do not check for LaTeX fonts if we use nonTeXFont 2012-10-06 15:51:35 +02:00
Juergen Spitzmueller
a41dcb5768 Recognize Provides from math fonts 2012-09-23 17:40:44 +02:00
Vincent van Ravesteijn
29e64597d0 Fix bug #6389: Make columns RTL in RTL document 2012-09-22 23:15:53 +02:00
Juergen Spitzmueller
8f9898994d Basic UI for math (TeX) fonts
This addresses #6543 by adding an option to prevent fonts such as Palatino and Times to automatically adapt the math font (IOW it lets you load the text font only for a bunch of fonts where this is easily possible).

Furthermore it adds an interface to select a specific math font, which is defined in latexfonts. Currently, this is only euler (the only one I know), but if there are other math-only tex fonts, they can be added easily (but note that this changes the file format).

Non-TeX math fonts are not yet supported. Eventually, unicode-math support can use the existing UI, but this is not on my agenda.
2012-09-22 17:44:00 +02:00
Juergen Spitzmueller
a5151c92a9 Much more flexible implementation of alternative (LaTeX) fonts
The LaTeX font now do not specify simply alternative packages or packages for OT1 encoding etc., but they refer to complete AltFonts (which are not directly accessible via the GUI). This way, alternative fonts can also have options (osf, sc etc.), and they can use all sorts of initializing methods (\usepackage, \setrmfamily etc.).
2012-09-22 10:59:53 +02:00
Juergen Spitzmueller
f4261030e2 Implement Provides tag to LaTeXFonts
This allows to suppress conflicting packages, such as amssymb with mathdesign.
2012-09-19 15:46:19 +02:00
Juergen Spitzmueller
1267319117 The tipa tone macro requires the tone package from the tipa bundle 2012-08-20 08:52:42 +02:00
Juergen Spitzmueller
4950bb5ebc Comments 2012-08-08 17:23:02 +02:00
Juergen Spitzmueller
1db9ff9b1a Add a way to surpass special English treatment in useBabel
Normally, we do not load babel when English is the only language. However, if we check if babel is used from Font::validate, we need to surpass this test, else no secondary language is registered if English is the main language.
2012-08-08 17:02:12 +02:00
Juergen Spitzmueller
8f451fdbef Add missing breaks in switch 2012-08-08 11:27:37 +02:00
Juergen Spitzmueller
6d2ed04800 Decouple lyxrc-default_language from useLanguagePackage() 2012-08-07 08:00:42 +02:00
Juergen Spitzmueller
6c1326cdeb Rework language package detection
This puts the diverse use[LangPack] function into one (less error-prone) function and differentiates the custom package from the babel case
2012-07-23 14:34:24 +02:00
Juergen Spitzmueller
566a5f2b75 Fixes to the language package call
* Assure that really no language package is called when none is selected.
* Only call global custom package if global is desired.
This is a candidate for branch as well.
2012-07-23 11:36:55 +02:00
Juergen Spitzmueller
4d5bef1bdc Add \makeat switches to babel settings if necessary.
Babel settings might contain @ characters. Check for this and wrap the settings into \makeatletter ... \makeatother switches if necessary (see discussion at #8265).
2012-07-18 12:41:53 +02:00
Juergen Spitzmueller
f42c9e50df fix bug #8211: \setotherlanguage not set for non-babel languages 2012-06-23 13:50:40 +02:00
Uwe Stöhr
8afad998ed LaTeXFeatures.cpp: polyglossia is only required if a language is not supported by babel _and_ also no other special package; patch by Jürgen, to fix the regression mentioned in bug #8026 2012-06-22 01:08:51 +02:00
Juergen Spitzmueller
f71a55a279 some less language hardcoding 2012-06-09 11:32:34 +02:00
Juergen Spitzmueller
040fb73b9c Do not hardcode polyglossia-only languages 2012-06-08 12:54:57 +02:00
Juergen Spitzmueller
9fc92f783c Load bibtopic after hyperref (bug #8005) 2012-05-29 13:25:30 +02:00
Georg Baum
b86c984bf4 Disentangle amsmath and amssymb loading.
This is needed if you load a font package incompatible to amssymb manually
(see bug #5058).
2012-05-06 20:49:49 +02:00
Georg Baum
a2e8cb758b Translations for listings insets
The listings inset and include inset of type listings use two english terms
that are not localized yet: "Listing" for the caption and "Listings" for the
list of listings (not supported natively by LyX yet). The existing layout
translation mechanism has been extended to translate these terms as well:

1) Support [[stuff]] context in lib/layouttranslations
2) Support BabelPreamble and LangPreamble in InsetLayout
3) Use a InsetLayout for InsetInclude of type listings
4) Define BabelPreamble and LangPreamble in the layouts for InsetInclude
   and InsetListings
2012-04-10 20:21:01 +02:00
Georg Baum
1a6c599917 Extend the notermination flag to math as well.
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
2012-03-25 15:57:38 +02:00
Julien Rioux
b6eb780d64 Small fixups to r40663
lyx2lyx: Clean up the convert/revert queue.
LaTeXFeatures: Just add cancel to the list of packages that are
               simply used with a \usepackage{} line.

Uwe: In case cancel needs to be loaded after amsmath or something,
     please revert my changes to LaTeXFeatures and add a comment
     about package ordering to the source. Thanks.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40667 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 17:20:07 +00:00
Uwe Stöhr
65f26a7a14 add support for the package cancel in math (fixes #6819); fileformat change only for the preamble handling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40663 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-23 01:49:49 +00:00
Enrico Forestieri
07b2898afe After r40612, the check for isFullUnicode is redundant. So, partially
revert r40607 and accordingly adapt the code.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40613 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 14:27:55 +00:00
Enrico Forestieri
76c376c427 Avoid \inputencoding altogether if the buffer encoding permits
(part of bug #7800).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40612 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-14 01:21:00 +00:00
Enrico Forestieri
08ba2b9b45 Refine fix for bug #7800. Don't use \inputencoding with unicode backends.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40607 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-13 00:52:03 +00:00
Julien Rioux
e3f65fd088 Buffer param \cite_engine_type (authoryear|numerical).
To avoid duplicity, remove natbib_authoryear and natbib_numerical
and replace them by natbib, and keep track of the engine `type'
in the new \cite_engine_type document setting. This will make it
easier to add more citation engines.

LyX format incremented to 424.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40592 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-09 13:16:38 +00:00
Georg Baum
187790135b Fix bug #5029: Support \smash, \mathclap, \mathllap and \mathrlap.
Also improve lyx2lyx roundtrip for automatically loaded packages.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40589 a592a061-630c-0410-9148-cb99ea01b6c8
2012-01-08 12:34:12 +00:00