Commit Graph

21236 Commits

Author SHA1 Message Date
Juergen Spitzmueller
3861fa1cb4 Maths packages: Further GUI improvements 2013-03-02 10:03:08 +01:00
Juergen Spitzmueller
e53b5972c3 Improve math packages GUI 2013-03-01 15:59:37 +01:00
Georg Baum
97bc443584 Fix regression of f2d2b7c
Thanks Scott for finding the relevant change set!
2013-02-28 22:23:23 +01:00
Georg Baum
ea4bbece46 Forgotten files.
Kornel, it looks like the cmake update tests method misses these.
2013-02-28 21:06:45 +01:00
Kornel Benko
74e9f2eb38 Adapt tex2lyx testcases to format 464 2013-02-28 13:19:04 +01:00
Kornel Benko
2639734157 Missed in previous commit. Added handling of package cancel to the new lyx-format 464 2013-02-27 13:14:59 +01: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
Georg Baum
6e2d8cf10a Fix sideset keyboard short cuts
\sideset1 can't be entered via keyboard, so I renamed the commands.
2013-02-26 21:38:27 +01:00
Richard Heck
a4fa1a8f7b Continuing in this case invites disaster. So let's try returning. 2013-02-24 15:34:08 -05:00
Georg Baum
efaae780db Fix regression of 5261ae6a2
Somehow I overlooked that \sideset also supports nonscript arguments for
left and right. This is now fixed, although I do not like the toolbar names.
If somebody knows something better, please improve.
2013-02-24 21:23:50 +01:00
Georg Baum
284f991519 Forgot this in f2d2b7cc7d 2013-02-24 19:43:13 +01:00
Georg Baum
f650c242d0 Found one more nested if to remove 2013-02-24 19:12:56 +01:00
Georg Baum
4ad910c3a6 Try to fix MSVC compile error
We did hit again the MSVC limit of 128 nested if clauses. This change reduces
the number of nested if clauses by 6 which is hopefully enough.
2013-02-24 19:00:17 +01:00
Georg Baum
f2d2b7cc7d Fix some texl2yx accent bugs
This fixes bug #8554 and some recently introduced busg:
- Encodings::fromLaTeXCommand() can now handle all combining characters,
  not only the one letter ones
- The remainder returned from Encodings::fromLaTeXCommand() must never be
  thrown away in tex2lyx, but output as ERT
- No special case for combining diacritical marks needed anymore in parse_text()
- No special cases for accents and IPA combining diacritical marks needed
  anymore in parse_text()
- special tipa short cuts may only be recognized if the tipa package is loaded
- Use requirements returned by Encodings::fromLaTeXCommand() instead of
  hardcoded registering of tipa and tipax
- Get rid of the name2 variable in parse_text(): We must use name, otherwise
  the extra stuff that might have been put into name vanishes
2013-02-24 15:44:16 +01:00
Juergen Spitzmueller
41060c9723 Allow to specify default argument for layout/inset argments
This default argument is inserted iff no inset argument is present. This is useful particularly for mandatory arguments that need to have a sensible default value.
2013-02-24 11:29:21 +01:00
Georg Baum
48c9926d87 Fix bug #8552
tex2lyx skips LyX preamble code only if it thinks that the file was created
by LyX (i.e. special comments are found). I don't like that, but this is
how it works and therefore the special comment neds to be added if the
theorem commands are to be skipped. This header makes also the temporary
setting of in_lyx_preamble obsolete, which caused skipping of user preamble
commands, which were not re-added by LyX.
2013-02-22 22:21:56 +01:00
Georg Baum
b59547ebd5 Improve texl2yx refstyle support
- Convert prettyref to the autopackage mechanism
- Do not load refstyle automatically if some refstyle preamble code of LyX
  is found, since LyX will only load the package if an actual reference
  command is used. This is needed for mixed refstyle/prettyref documents.
- Only recognize refstyle commands if refstyle was detected in the preamble
- Only recognize prettyref commands if prettyref was detected in the preamble
- Add a mixed refstyle/prettyref test case
2013-02-22 21:59:23 +01:00
Jean-Marc Lasgouttes
aa3bbfc984 Fix parsing of literate chunks (bug 7838)
* use verbatimStuff for parsing chunks and make try to follow closely the sweave sytax constraints.
 * merge the two cases for parsing << (noweb or quote)
 * \verb|ff| requires that its parameter is on a single line.
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
e5a9199927 Improvements to Parser::verbatimStuff
* return a Parser:Arg pair to indicate whether parsing was successful
 * add new parameter to restrict parsing to the current line
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
683050d4f9 Some fixes to parsing in tex2lyx
* put_almost_back and putback are actually the same thing
* add Parser::dropPosition
* deparse on Parser::popPosition
2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
0082d183b3 Fix confusing behavior in search when changing directions (bug 8543) 2013-02-22 15:53:40 +01:00
Jean-Marc Lasgouttes
05a4c7f908 Typo 2013-02-22 10:50:49 +01:00
Uwe Stöhr
22101c1044 tex2lyx/text.cpp: whitespace only 2013-02-22 01:21:17 +01:00
Uwe Stöhr
2ba1360509 tex2lyx/text.cpp: logic fix for previous commit
- continue; is here not necessary
2013-02-22 01:18:45 +01:00
Uwe Stöhr
a47e61e666 tex2lyx: support further characters
- support for Cyrillic characters
- support for \textifsymbol and \ascii (fixes bug #8556)
- support for \ding
- tex2lyx/text.cpp: correct an indentation and use "name2" because "name" is already defined in this clause
2013-02-22 01:11:30 +01:00
Richard Heck
c4bed8dbe8 Don't convert --- and -- to entities in XHTML listings output.
Fixes bug #8561.
2013-02-21 18:12:53 -05:00
Uwe Stöhr
8254e84f8f Merge branch 'master' of git.lyx.org:lyx 2013-02-21 23:13:57 +01:00
Uwe Stöhr
e7c75296d6 tex2lyx/text.cpp: correction for TIPA character support
- for all TIPA characters the tipa and tipx package must always be registered because these characters are also allowed outside a TIPA inset
- include \textvertline because we again reached the maximum number of if statements allowed by MSCV (so safe at least one for now)
2013-02-21 23:13:05 +01:00
Georg Baum
84e176851d Add a note about ERT environment
The LyX file format only supports one CJK font mapping per document.
Therefore all CJK environments which use a different mapping than the main
one are output in ERT. THis is now explained in the test case, and also the
converion to ERT is improved (although it is still wrong e.g. for paragraphs).
2013-02-21 22:31:22 +01:00
Georg Baum
eb53c60a8f Complete the NoInsetLayout format change 2013-02-21 21:57:59 +01:00
Richard Heck
eb90ac0988 Do not try to load or copy included files when we are in a comment
or doing a dryrun. We skipped some of this before, but not all of it,
which led to bug #8557.
2013-02-21 11:38:36 -05:00
Kornel Benko
7b7f268552 tex2lyx tests: Sort test files 2013-02-20 12:43:36 +01:00
Georg Baum
9f93983b61 Extend unicodesymbols force flag
As suggested by Günter Milde.
2013-02-19 22:19:10 +01:00
Kornel Benko
b353a0b037 Adapt tex2lyx testcases to new format 2013-02-19 15:44:11 +01:00
Jean-Marc Lasgouttes
30cbe535c3 Make annoying debug message optional 2013-02-19 13:48:48 +01:00
Jean-Marc Lasgouttes
efe06103f3 Add test case for bug #5312 2013-02-19 12:36:06 +01:00
Jean-Marc Lasgouttes
3d2dcab03f Handle properly insets which have the PassThru property
This fixes in particular bug 5312:
  % escape in \url{} treated as TeX comment start by importer
2013-02-19 12:04:41 +01:00
Uwe Stöhr
df6589a97e Merge branch 'master' of git.lyx.org:lyx 2013-02-19 00:07:42 +01:00
Uwe Stöhr
6deb2b7680 tex2lyx: support further TIPA characters
- support for \textdoublevertline, \textvertline, \textglobfall
- support \!o and \!b and \!d and \!g and \!G and \!j
- support  and \*k and \*r and \*t and \*w
- register the package "tipa" if \textipa is detected in an equation
- add a \textipa equation to the testfile

(I failed to implement support for the TIPA character "\t*{ }" and the command "\=*".)
2013-02-19 00:07:24 +01:00
Julien Rioux
9dd1b7c578 Use the LyX name of encodings instead of the LaTeX names.
- Use the LyX name of encodings instead of the LaTeX names.
  The LyX name must be unique, while the name used by LaTeX
  not necessarily, e.g. different packages might implement
  support for the same encoding.

- Rename koi8 to koi8-r, so that the LyX and LaTeX names match.

- Rename euc-jp-plain to euc-jp-platex, jis-plain to jis-platex
  and shift-jis-plain to shift-jis-platex.

- Add utf8-platex encoding (fixes #8408).

LyX file format incremented to 463.
2013-02-18 23:52:42 +01:00
Georg Baum
2a1eb2fe9b Fix encoding for japanese documents
The header parameter \inputenc uses the LaTeX name, so we need must not set
it to the LyX name for japanese documents.
2013-02-18 21:22:21 +01:00
Georg Baum
4061e5bbdb Fix missing language option for CJKutf8.tex 2013-02-18 20:05:33 +01:00
Richard Heck
ef88b88aec Typo. 2013-02-18 09:44:27 -05:00
Uwe Stöhr
fd68d8a37c test-insets.tex: fix the encoding of the œ character 2013-02-18 15:04:28 +01:00
Uwe Stöhr
9027802114 tex2lyx: a fix for the \tone support
- the package tone must explicitly be registered because there can be a single tone that is not found via unicodesymbols
2013-02-18 14:07:13 +01:00
Pavel Sanda
f7d47a803d git typo 2013-02-17 23:30:07 -08:00
Pavel Sanda
8ef1e2b9df Git VCS: use describe for tree revision info. 2013-02-17 23:22:50 -08:00
Uwe Stöhr
112abd1978 tex2lyx: add a missing TIPA mark 2013-02-18 05:03:18 +01:00
Uwe Stöhr
2e5ba6f3f2 tex2lyx: support for TIPA \tone
- also simplify the code a bit
- test-insets.tex: add missing preamble code
2013-02-18 04:50:18 +01:00
Uwe Stöhr
b25016b613 tex2lyx: more support for TIPA
- support for the combining diacritical marks
- support for \texttoptiebar and \textbottomtiebar
- test-insets.lyx: add complete testcase
- TODO.txt: update what still needs to be done
2013-02-18 03:23:34 +01:00
Uwe Stöhr
c27976d372 tex2lyx: support for IPA environment 2013-02-17 22:39:56 +01:00
Georg Baum
25fe87e55c Make tex2lyx encoding changes more robust
This is achieved by not calling Parse::tokenize_one() anymore in
Parser::good(): The status of the input can be tested without performing the
actual tokenizing. Now there are only two methods that may prevent an encoding
change:next_token() and next_next_token().
2013-02-17 15:04:14 +01:00
Georg Baum
5261ae6a29 Fix bug #1424: Native \sideset inset
The toolbar image is the one Uwe attached to the bug report. Note that
\sideset works only for operators like \sum in the nucleus. LyX allows
any content, so you might get a LaTeX error. I don't know how to prevent
wrong content in the nucleus.
2013-02-17 11:08:58 +01:00
Georg Baum
c0395333b2 Fix force flag for multiple encodings
A comma cannot be used as delimiter, since it is already the flag delimiter.
2013-02-17 10:19:58 +01:00
Georg Baum
798f104f99 Add forgotten files 2013-02-17 09:54:21 +01:00
Uwe Stöhr
047218ee8b tex2lyx/TODO.txt: update once again
- the kurier font support of fileformat 461 was already committed
- nothing to do for format 460
2013-02-17 06:23:28 +01:00
Uwe Stöhr
1d6573a330 tex2lyx: support for multiple indices and subindices 2013-02-17 06:18:42 +01:00
Uwe Stöhr
a8563a0f02 Preamble.cpp: code simplification 2013-02-17 04:26:56 +01:00
Uwe Stöhr
7da29712b9 tex2lyx/TODO.txt: update once again
- \nocite and \nocite{*} is already supported since a while, see also the test-insets.tex test file
2013-02-17 04:18:50 +01:00
Uwe Stöhr
a2022d457b tex2lyx: support bibtex inset with \phantomsection
This is an addendum to [72a44b3c/lyxgit] because depending on the environment, LyX adds a \phantomsection before \addcontentsline.

- also update the test file
2013-02-17 04:17:02 +01:00
Uwe Stöhr
3a201976b7 tex2lyx/Makefile.am: rename the file renamed in previous commit 2013-02-17 03:22:20 +01:00
Uwe Stöhr
735c81d2b9 tex2lyx/TODO.txt: update as refstyle is now really supported 2013-02-17 03:18:50 +01:00
Uwe Stöhr
a99241266b tex2lyx/Preamble.cpp: proper handling of the refstyle preamble code
- also rename the test file because it is also an excellent test file for the theorem environments - which are not yet supported by tex2lyx
2013-02-17 03:15:24 +01:00
Uwe Stöhr
fb64fe613f Parser.cpp: a workaround for bug #8525 2013-02-17 02:38:29 +01:00
Uwe Stöhr
43bcf4c9c2 Preamble.cpp: register refstyle
- also Revert "tex2lyx/TODO.txt: update" [4159f05c/lyxgit]
more works needs to be done here
2013-02-17 02:17:04 +01:00
Uwe Stöhr
ec09560cb8 tex2lyx: support for the \textipa inset 2013-02-17 02:11:54 +01:00
Uwe Stöhr
16eaf36436 tex2lyx/TODO.txt: update
- there is nothing to do for xymatrix, the Xy-pic manual roundtrip works fine
2013-02-16 22:34:28 +01:00
Georg Baum
d7013065ad Fix tex2lyx file format comparison
This is an important part of the tests. If updating the test cases is really a
problem there are two better solutions than not testing the format: Convert
the references with lyx2lyx on the fly, or remove the hard coupling of tex2lyx
and LyX versions again. Both increase additional possible error sources, but
these errors could at least be detected. If the test machinery is made blind
for versions, file format errors are impossible to detect.
2013-02-16 17:48:43 +01:00
Georg Baum
633aca9273 Update test case file format 2013-02-16 17:48:43 +01:00
Georg Baum
5f3cd55f1d Fix dangerous parser use
Jean-Marc discovered a possible data loss caused by Parser::getChar().
This is now fixed, and Parser::getChar() is removed, since it is no longer
needed and easy to use it in the wrong way.
2013-02-16 17:48:42 +01:00
Kornel Benko
fe24992a93 tex2lyx testing. Adapt files. 2013-02-16 10:49:34 +01:00
Uwe Stöhr
72a44b3c75 tex2lyx: support for \addcontentsline in BibTeX inset 2013-02-16 05:51:23 +01:00
Uwe Stöhr
8e2d727e36 tex2lyx/TODO.txt: update again
- nothing needs to be done for feyn.sty - it is already recognized as simple feature and the roundtrip using the feynman example file works
- update entry for undertilde to be uniform
2013-02-16 04:04:49 +01:00
Uwe Stöhr
4159f05ced tex2lyx/TODO.txt: update
refstyle support was added by http://www.lyx.org/trac/changeset/49c88776/lyxgit
2013-02-16 03:14:21 +01:00
Jean-Marc Lasgouttes
21be4a31cc Fix bug with reading of verbatim environment
The kind of putback() functionality that we need is more tricky
than I thought at first...
2013-02-15 23:22:46 +01:00
Kornel Benko
f78c69b554 Adapt to corrected tex2lyx 2013-02-15 19:07:26 +01:00
Kornel Benko
df4003b232 Adapt test-insets.lyx.lyx to now correctly running tex2lyx.
Removed errocase.
2013-02-15 18:49:00 +01:00
Jean-Marc Lasgouttes
8cb9707b17 Move stuff around (again!) 2013-02-15 17:15:16 +01:00
Jean-Marc Lasgouttes
47b8ab14db Implement deparsing of tokens
When switching catcodes (for example to verbatim), there are in general some tokens that have already been parsed according to the old catcodes. It is therefore needed to "forget" those token and reparse them.

The basic idea is to use idocstream::putback() to feed the characters back to the stream, but this does not work (probably because we disable buffering). Therefore, we implement a simple stream-like class that implements putback().
2013-02-15 17:15:16 +01:00
Jean-Marc Lasgouttes
fd939a0426 Move stuff 2013-02-15 17:15:16 +01:00
Uwe Stöhr
ac7d08cb32 environment.cpp: MSVC compile fix
MSVC told me
"environment.cpp(139): error C4716: 'lyx::support::unsetEnv' : must return a value"
2013-02-15 16:28:02 +01:00
Jean-Marc Lasgouttes
9631c36ff0 Move stuff around 2013-02-15 14:46:57 +01:00
Juergen Spitzmueller
3e90b2029c Some libertine versions have osf default, some lining 2013-02-15 10:52:00 +01:00
Juergen Spitzmueller
6885007f1d Adjust Libertine font support to most recent version
This needs yet a file format change. I hope the interface is stable now (I had an exchange with the package maintainer, Bob Tennent, about that)
2013-02-15 10:45:11 +01:00
Juergen Spitzmueller
63eaefc740 tex2lyx: latexfonts importation fixes 2013-02-12 18:47:05 +01:00
Richard Heck
06cac41193 Add "NoInsetLayout" tag for Uwe. Fixes bug #8545. 2013-02-12 10:13:41 -05:00
Jean-Marc Lasgouttes
e4051a6bd5 Remove unused Mac specific code 2013-02-12 12:29:33 +01:00
Jean-Marc Lasgouttes
81d863fd41 Fix bug #8537: LyX creates the environment variable LC_ALL
The current code is not able to unset an environment variable, only to set it to an empty value. This patch refactors a bit the Message class and uses a new EnvChanger helper class that allows to change temporarily an environment variable and that is able to unset variables if needed.

The patch also adds new functions hasEnv and unsetEnv in environment.cpp.

Open issues:
 * there may be systems where unsetenv is not available and putenv("name=") does not do the right thing;
 * unsetenv may lead to leaks on some platforms.
 * when using unsetenv, we may need to remove strings from the internal map that setEnv uses.
2013-02-12 12:14:06 +01:00
Juergen Spitzmueller
a063defd9f If a LaTeX font has a monolithic option for all expert sets (Osf, SC), honor this in the GUI (#8547) 2013-02-11 15:02:24 +01:00
Uwe Stöhr
348b5e6610 tex2lyx: support for fileformat change 444
biolinum is used if libertine is detected
2013-02-11 14:40:35 +01:00
Uwe Stöhr
2066b57ca2 tex2lyx: support for libertine 2013-02-11 14:22:56 +01:00
Uwe Stöhr
1ddcbbdf92 tex2lyx/TODO.txt: update todo list
listings support was added a year ago by r40856 and r40860
2013-02-11 12:13:44 +01:00
Uwe Stöhr
5db148d22c Revert "tex2lyx/Preamble.cpp: fix bug #8525 temporarily"
This reverts commit a69fcde072.
The commit causing #8525 is [2f7f0c76/lyxgit]
2013-02-11 11:56:27 +01:00
Kornel Benko
f1102e8dd4 tex2lyx-tests: Adapt to changes for emty line in preamble 2013-02-11 09:43:10 +01:00
Uwe Stöhr
a9504b8060 tex2lyx: support for newtxmath 2013-02-11 02:56:48 +01:00
Uwe Stöhr
87fe26e5eb tex2lyx: support for eulervm 2013-02-11 02:34:03 +01:00
Uwe Stöhr
0be810ac44 tex2lyx: support for txtt font 2013-02-11 02:24:31 +01:00
Uwe Stöhr
407cc9a62d tex2lyx: support for biolinum-type1 2013-02-11 02:14:53 +01:00
Uwe Stöhr
999fd86dcf tex2lyx: support for TeX Gyre fonts 2013-02-11 02:07:22 +01:00
Uwe Stöhr
d27dac3efc tex2lyx: support for libertine-type1 2013-02-11 01:56:47 +01:00
Uwe Stöhr
6a3acd336b tex2lyx: support for garamondx 2013-02-11 01:46:03 +01:00
Uwe Stöhr
c466916a25 tex2lyx: support for mathdesign 2013-02-11 01:40:13 +01:00
Uwe Stöhr
e3a3797e2f tex2lyx/Preamble.cpp: remove unnecessary whitespace in the preamble
- this removes blank lines that are otherwise written to the preamble
2013-02-11 01:37:03 +01:00
Uwe Stöhr
690d9b68f2 tex2lyx: add test for font settings 2013-02-11 00:49:20 +01:00
Uwe Stöhr
487d3bffab support for the kurier sansserif fonts
- fileformat change
2013-02-11 00:47:09 +01:00
Uwe Stöhr
a69fcde072 tex2lyx/Preamble.cpp: fix bug #8525 temporarily
- this might break some tex2lyx features but tex2lyx was completely broken - not even the simplest TeX file could be imported and compiles
2013-02-10 23:31:38 +01:00
Juergen Spitzmueller
55bc3665a2 LaTeXFonts: Support the rare case where there is really only preamble code 2013-02-10 14:31:49 +01:00
Pavel Sanda
5000a016cf Fix #7865 - Math autocorrection is broken
Patch from Martin Vermeer.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg177004.html
2013-02-09 21:51:30 -08:00
Pavel Sanda
6ba3e8d408 Leftover from SVN. 2013-02-09 19:50:06 -08:00
Pavel Sanda
75090250d4 Add very simple revision comparison for git.
At this moment we do not allow comparison between arbitrary hashes,
but except GUI the code is ready.
Thanks to the powerful way of git addressing we could even ask
for comparisons like '-2 weeks back' if someone wants to play
with GuiCompareHistory.
2013-02-09 19:35:22 -08:00
Richard Heck
a95ed3a2b9 Use std::map::find() instead of iterating ourselves. 2013-02-09 14:40:22 -05:00
Richard Heck
d6709df3d7 Layout changes for changes to LabelType:
LabelType Counter --> LabelType Static
	LabelType Top_Environment --> LabelType Above
	LabelType Centered_Top_Environment --> LabelType Centered
2013-02-09 13:44:06 -05:00
Richard Heck
e7827264e7 Eliminate the hard-coded special handing of chapters. We'll use the
new Above LabelType instead.
2013-02-09 13:44:06 -05:00
Richard Heck
32b0e8cbdb Change LabelType Top_Environment to LabelType Above, and LabelType
Centered_Top_Environment to LabelType Centered.
2013-02-09 13:44:06 -05:00
Richard Heck
57d8b059e0 Remove references to Counter LabelType from source code. The
intention is to use Static in its place, and we now expand the
label for these, as well.
2013-02-09 13:44:05 -05:00
Juergen Spitzmueller
9cbba74a62 Preamble tag for LaTeXFonts (#8530) 2013-02-09 11:00:42 +01:00
Uwe Stöhr
33e185e5ed IEEEtran.layout: support for conference articles
- IEEEtran-Conference.lyx: new template for conference articles of the IEEE
2013-02-09 03:23:34 +01:00
Georg Baum
22b7ad2b0a Implement revision info for git 2013-02-08 21:02:37 +01:00
Richard Heck
99402cd09c Don't hardcode listings but use InsetLayout. 2013-02-08 09:48:48 -05:00
Richard Heck
f623ded109 Fix bug #7948 by not hardcoding XHTML info for captions but instead
using InsetLayout.
2013-02-08 09:30:31 -05:00
Richard Heck
7821022ca0 Fix bug #7947 by using InsetLayout rather than hardcoding things. 2013-02-08 09:19:09 -05:00
Richard Heck
1b7d812e51 Fix really silly logic error. This should make prettyref-based
files work better when converted to refstyle.
2013-02-07 08:45:21 -05:00
Georg Baum
2f9ef2b98a Implement very basic git support
Only the local index is considered, no remote repo. Also getting the revision
(aka commit hash) is missing. How push and pull could be integrated with the
LyX VCS interface needs to be discussed, but the implemented functionality was
quite straight forward.
2013-02-06 22:07:31 +01:00
Georg Baum
a3e6c7830c Fix copy-paste error 2013-02-06 20:38:54 +01:00
Georg Baum
0526eb9d47 Implement VCS copy and rename
The advantage of having this in LyX is the intelligent file name handling
of included files. Implementation as discussed on the list, but ensure also
that an attempt to use locked files fails.
2013-02-06 20:38:54 +01:00
Georg Baum
067fbe49cd Correctly delete temp files
FileName::erase() only clears the file name, if you want to delete the file
you need to call FileName::removeFile().
2013-02-06 20:38:54 +01:00
Julien Rioux
3408ca4204 Support for \fullcite in LyXHTML and text export (fixes #8491). 2013-02-06 17:37:59 +01:00
Julien Rioux
cc1ce04798 Generate the citation labels before exporting to plain text. 2013-02-06 17:37:58 +01:00
Julien Rioux
6456c2262e Move label generation from InsetBibtex to BiblioInfo.
This only move the code, but does not change the displayed labels.
Thus for numerical citation, the label is set to the cite number;
for author-year citation, the abbreviated list of authors is used
i.e. "Smith et al. 2001".

Eventually, we might want to make the label customizable, or get
it from BibTeX.
2013-02-06 17:37:58 +01:00
Julien Rioux
f51636b547 Remove unused code. 2013-02-06 17:37:57 +01:00
Julien Rioux
f94d77ae88 Whitespace only. 2013-02-06 17:37:56 +01:00
Kornel Benko
7333494c89 tex2lyx tests:
Corrected the tex2lyx check-file for test-refstyle-references.tex
2013-02-06 13:44:46 +01:00
Kornel Benko
55c2dc15fa tex2lyx tests:
1.) Remove empty layout 'Plain'
2.) Adapt to changed look of layout 'Verbatim'
2013-02-06 13:42:27 +01:00
Jean-Marc Lasgouttes
14e01a92a4 Rename Path.h to PathChanger.h (actual name of the class) 2013-02-06 11:51:06 +01:00
Georg Baum
d33450a592 Fix inconsistent VCS checkin return values
It is not possible to transport the different error/abort/success conditions
of a VCS checkin through a simple empty or nonempty string. Therefore it was
no wonder that the return values were used inconsistently for different VCS.
Now the log and return status are decoupled, and all VCS are handled
consistently. This is a prerequisite for proper locking detection of the
upcoming rename command.
2013-02-04 22:01:59 +01:00
Uwe Stöhr
f2eb5004de tex2lyx: adapt refstyle support aft the fix for bug #8536 2013-02-04 21:37:14 +01:00
Uwe Stöhr
387a6ba09a tex2lyx/Makefile.am: fix a typo 2013-02-04 20:14:22 +01:00
Jean-Marc Lasgouttes
bac4fe7843 Continue support for verbatim
This is a refactoring commit, which may introduce minor regressions, but should go in the right direction.

 * introduce Parser::verbatimEnvironment, which is a wrapper around verbatimStuff
 * introduce output_ert, which inserts a string as ERT; this allows to factor out several code instances.
 * rename handle_ert to output_ert_inset: this creates an inset and then calls output_ert
 * remove handle_comment (use handle_ert instead)
 * remove handle_backaspace (unused now)
 * use the new methods in handle_listing

TODO:
 * use for other verbatim-like cases (Sweave chunk, url...)
 * maybe implement Parser::unparse to reparse tokens already parsed with the wrong catcodes (if needed)
2013-02-04 15:14:30 +01:00
Kornel Benko
83e2c45d83 Add test for verbatim environment in tex2lyx tests 2013-02-04 10:53:25 +01:00
Jean-Marc Lasgouttes
be42f1398d Fix bug #5408: tex2lyx cannot handle verbatim code
- Implement catcode setting in Parser
- add a new Parser::verbatimStuff method that reads verbatim contents
- use this method to parse "verbatim" environment.
- use it to parse \verb too.
- rename Parser::verbatimEnvironment to ertEnvironment.

TODO:
- use for other verbatim-like cases (Sweave chunk, lstlisting...)
- factor out the function that outputs ERT (including line breaks)
- maybe implement Parser::unparse (if needed)
2013-02-04 10:25:58 +01:00
Juergen Spitzmueller
f9691aed8d Fix float label prefix (bug #8536) 2013-02-04 08:41:46 +01:00
Kornel Benko
9dbbe6a372 Add test-refstyle-references to cmake. Also added missing file test-refstyle-references.lyx.lyx 2013-02-04 08:36:18 +01:00
Uwe Stöhr
ede866f67a tex2lyx: test also for algorithm floats 2013-02-04 02:19:54 +01:00
Uwe Stöhr
49c887761a tex2lyx: support refstyle and its commands
fixes #4288
2013-02-04 01:41:56 +01:00
Uwe Stöhr
793dd3b9c0 tex2lyx: update fileformat of LyX files 2013-02-04 01:39:49 +01:00
Georg Baum
1a48d5a967 Dot not swallow log messages 2013-02-03 19:55:44 +01:00
Georg Baum
e82cc5d498 Fix typos 2013-02-03 19:55:44 +01:00
Stephan Witt
141fbb6f8c Prepare LyX code to compile and link with Qt5:
* some functionality is in new modules now
  new header locations and library names: QtConcurrent and QtWidgets
* method setResizeMode is renamed to setSectionResizeMode
* deprecated QAbstractItemModel::reset() is dropped now
* platform specific code like QApplication::syncX() is not common anymore
* QString::fromAscii() is dropped now
* some QDesktopServices methods has been moved to QStandardPaths
2013-02-03 19:26:21 +01:00
Juergen Spitzmueller
0de23da9cd Tooltip change as suggested by Jean-Pierre 2013-02-02 09:08:42 +01:00
Jean-Marc Lasgouttes
652512a38c Clarify two strings in PDF properties
This is a patch from Martin Vermeer.
2013-02-01 15:00:41 +01:00
Juergen Spitzmueller
75fb3e4b6c Do not output ZERO WIDTH NON JOINER glyph for ligature break via toString
I do not see where this is really useful (contrary to real plaintext). And it breaks spell checking with hunspell and 8bit disctionaries (part of bug #8526)
2013-01-26 09:53:53 +01:00
Pavel Sanda
718eeba60f Another attempt at Encoding::any (we don't compile at linux now). 2013-01-25 21:19:10 -08:00
Scott Kostyshak
e2f5b4a5e6 Add some linebreaks to LyXAction.cpp
Should make the LyX output look better.
2013-01-25 23:27:02 -05:00
Scott Kostyshak
c70b62a18e LyXAction.cpp: add move row to LFUN_INSET_MODIFY
Same for move column.
2013-01-25 23:27:02 -05:00
Uwe Stöhr
9e29dc2338 Encoding.cpp: make it compilable again after [2eea1590/lyxgit] 2013-01-25 23:24:26 +01:00
Jean-Marc Lasgouttes
dc5d63ae24 Fix bug #8049: extra empty line at the end of verbatim environment 2013-01-25 12:18:40 +01:00
Jean-Marc Lasgouttes
f7548ae2cd Make sure that inset-forall does not skip insets
This could happen with
  inset-forall Note:Note char-delete-forward
when there where consecutive note insets.
2013-01-25 10:57:10 +01:00
Julien Rioux
e5165f7fc3 Exclude unsafe encodings when setting the inputencoding value.
All of the japanese encodings are safe, but nevertheless the
logic here should exclude unsafe encodings.
2013-01-23 12:30:15 +01:00
Julien Rioux
0601336c24 Respect the encoding passed to tex2lyx on the command line.
Fixup for #8218, fixes #8518.
2013-01-23 00:25:00 +01:00
Julien Rioux
2eea1590b1 Separation of the various names for encodings.
Provide functions for translating to the LyX name
of an encoding from either a LaTeX name or an Iconv
name, with the possibility to specify the package.
This is in anticipation of changing to use the LyX
name of the encoding in the .lyx file format and
allowing multiple lib/encodings entries to have
the same LaTeX name (but different packages!).

The tex2lyx parser needs to worry about the iconv
name of the input encoding, so store that instead
of the latex name.
2013-01-22 23:43:18 +01:00
Scott Kostyshak
0247f726aa Improve -help output regarding --export switch
Thanks to Jean-Pierre Chrétien.
2013-01-22 03:26:59 -05:00
Jean-Marc Lasgouttes
db025be5ae Consider deleted text when inserting quote inset.
This bug was reported against the ubuntu build:
  https://bugs.launchpad.net/bugs/1100046

Additionally, some extra code for avoiding double undo entries has
been removed, since this is handled by grouped undo now.
2013-01-21 14:49:45 +01:00
Scott Kostyshak
3c84267d8d Implement move row/column in tabular inset
This patch implements 'move row' and 'move column' features for tabular.
The purpose is to provide a useful behavior in tabular that is
consistent with PARAGRAPH_MOVE_UP and PARAGRAPH_MOVE_DOWN so that the
user can, for example, do alt-<up> to move a row up. Alternatively,
icons for these features are also added to the table toolbar and
context menu.

If there is any selection, the feature is disabled. This is consistent
with how PARAGRAPH_MOVE_UP works in other contexts. Additionally, 'move
row' is disabled if there is a multi-row in the current or target row;
and 'move column' is disabled if there is a multi-column in the current
or target column.

'move row' moves only the left and right borders of a cell along with
the row. Similarly, 'move column' moves only the the top and bottom
borders.

Implementing similar functionality for other insets, such as arrays and
array environments, is on my TODO list.
2013-01-20 21:54:30 -05:00
Juergen Spitzmueller
e199ec0310 Fix typo spotted by Jean-Pierre 2013-01-20 15:33:33 +01:00
Pavel Sanda
6479c6fd4a Add comment from Georg.
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg176694.html
2013-01-15 21:39:51 -08:00
Julien Rioux
6c58e3faa9 Highlight warning and errors in the BibTeX log. 2013-01-15 16:13:20 +01:00
Julien Rioux
843be77e54 Remove unused include. 2013-01-15 15:34:40 +01:00
Benjamin Piwowarski
8c09d3ba1a Fixed a bug when there is no citation 2013-01-15 14:51:29 +01:00
Benjamin Piwowarski
9f62413b10 Initial patch for citation-insert 2013-01-15 14:51:29 +01:00
Julien Rioux
cd17d87e47 Implement plain text export of BibTeX bibliography (fixes #8487). 2013-01-15 14:13:38 +01:00
Julien Rioux
a14e3d9a5d Use buffer().B_() instead of translateIfPossible. 2013-01-15 14:13:06 +01:00
Julien Rioux
3f8de8fe92 Better fix for #7732: Use buffer.B_().
Also handle "and others" which is translated by BibTeX to "et al.".
2013-01-15 14:12:34 +01:00
Georg Baum
7c6a6a05a2 Fix bug #5087 as suggested by Jürgen
Now it is possible to force certain commands only for some encodings.
2013-01-13 21:36:41 +01:00
Juergen Spitzmueller
e27ee60098 Reset postcommandargs as well on resetargs (bug #8500) 2013-01-13 09:16:39 +01:00
Scott Kostyshak
a4a836916b LyXRC: escape existing quote characters in 'cmd' 2013-01-12 16:04:50 -05:00
Julien Rioux
2ffd130d2b Force BibTeX rerun upon add/remove/change citation (fixes #6955).
Reordering citations is one case where catching "Citation undefined
on page ..." doesn't catch the need for a bibtex rerun. This patch
ensures the proper ordering is obtained in pdf output without having
to resort to closing and reopening the LyX document.
2013-01-12 10:12:25 +01:00
Scott Kostyshak
010f64735f LyXRC: allow space in {editor,viewer}_alternatives 2013-01-12 01:13:58 -05:00
Scott Kostyshak
47e9848783 Fix editor and viewer combo boxes in prefs (#8237) 2013-01-12 01:13:58 -05:00
Scott Kostyshak
562fa5bcb0 Typo in LFUN doc 2013-01-11 04:36:37 -05:00
Georg Baum
d2b49e54b9 Add remaining images for math symbol toolbar
Most images are generated by development/tools/generate_symbols_images.py, but
some were drawn manually. Now there is no image missing from the ones the
script can generate.
2013-01-10 21:22:55 +01:00
Georg Baum
45052f56ab Handle text-only wasy symbols correctly.
Some macros defined by wasysym.sty work only in text mode: They either
produce an error in math mode, or wrong output. These symbols are now marked
as text symbols, so that no \ensuremath is created for LaTeX export if they
appear inside \text{}, and the correct images are created.
2013-01-10 21:22:54 +01:00
Julien Rioux
15b2501177 LyXHTML linking from citation to bib entry for LyX 2.1 (fixes #8490).
What was previously accomplished by wrapCitation is now customizable in the
layout files. What we provide by default here corresponds roughly to the
LyX 2.0 behavior.
2013-01-10 15:32:00 +01:00
Juergen Spitzmueller
b57f585109 GuiSymbols: Use a grid with appropriat size 2013-01-10 13:19:14 +01:00
Juergen Spitzmueller
0dd91a1fd7 do not setUniformItemSizes since the symbols have different width (bug #5707) 2013-01-10 11:33:09 +01:00
Kornel Benko
75483b612c Rename misleading function name from_gmtime() to form_asctime_utc() 2013-01-09 13:45:58 +01:00
Julien Rioux
30f200a7e7 Fix cache for getInfo() with/without richtext (fixes #8486). 2013-01-08 16:34:02 +01:00
Julien Rioux
f6cd5ab863 Preserve BibTeX metadata in LyXHTML output (fixes #8451). 2013-01-08 16:33:12 +01:00
Julien Rioux
24a2c57ff0 Move richtext escaping to its own postprocessing routine. 2013-01-08 16:33:11 +01:00
Julien Rioux
e6aab49ff4 Use document language when exporting citations to LyXHTML (fixes #7732). 2013-01-07 16:00:47 +01:00
Kornel Benko
e04523f77b Make change tracking in export to latex be independent of timezone 2013-01-07 15:46:47 +01:00
Juergen Spitzmueller
364de0c2ed LFUN_CAPTION_INSERT is not 'inactive' 2013-01-05 10:04:04 +01:00
Juergen Spitzmueller
3c41319f0b Disable caption-insert in mathed 2013-01-05 09:42:27 +01:00
Juergen Spitzmueller
f164ffd093 do not try to expand arguments in mathed (bug #8482) 2013-01-05 09:41:53 +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
Kornel Benko
2f33755814 findLyxBinary():
Add program suffix test before trying to determine
and use the extension to search for the lyx-executable
2013-01-04 11:05:12 +01:00
Kornel Benko
bd2468c341 Use program suffix to address lyx-executable, according to suffix
of tex2lyx.

Still the is error in tex2lyx, which searches for invalid suffix to
find the correct lyx executable.
2013-01-03 13:02:34 +01:00
Kornel Benko
4ff3e14144 In tex2lyx tests do not compare the first 2 lines.
This removes the need to update the lyx-format of the test files too often.
(To please Vincent and me)
2013-01-01 13:23:24 +01:00
Kornel Benko
297d534fdd Adapt format to lyx-files in tex2lyx-tests 2012-12-31 18:50:35 +01:00
Georg Baum
a98f7ad02d Fine tune image generation 2012-12-31 18:22:05 +01:00
Georg Baum
9c33bddffa Let tex2lyx really produce format 458. 2012-12-31 18:22:05 +01:00