Commit Graph

1449 Commits

Author SHA1 Message Date
Uwe Stöhr
fc1c5c6f28 BufferParams: rename formula_indent to math_indent etc. as requested
- also add flyx2lyx feature to import existing document class option as requested by JMarc
- also don't use a real default indentation length
2017-04-13 02:31:26 +02:00
Enrico Forestieri
031748d9c8 Avoid an assertion when compiling in debug mode with MSVC 2015
Seemingly, when removing an argument from argv, and thus inserting
a null pointer to shorten the array, causes an assertion because
the null pointer is not a valid heap pointer (sic!)

Fixes bug #10440
2017-04-12 21:19:42 +02:00
Uwe Stöhr
818373ce4f tex2lyx: support rotated algorithm floats
LyX knows algorithm floats since ages. tex2lyx's support for rotated algorithm floats has simply been forgotten.
2017-04-11 00:36:00 +02:00
Uwe Stöhr
1c2d056cfc tex2lyx: fix the preamble output
- LyX has new preamble tags. Although that they are not relevant for LaTeX they must be created by tex2lyx nevertheless
- also fix an issue that the formula indentation was always output
- update the tex2lyx tests accordingly
2017-04-08 04:55:22 +02:00
Uwe Stöhr
fae697a65c update tex2lyx tests to latest file format 2017-04-08 04:13:05 +02:00
Uwe Stöhr
b3b7675f54 Length.cpp: add new unit representing \baselineskip
- fileformat change
2017-04-08 03:30:21 +02:00
Kornel Benko
723f0e14d9 Make runtests.py python3 ready
Tex2lyx tests with ctest depend on it
2017-04-07 18:51:35 +02:00
Jean-Marc Lasgouttes
86ae7dad3f Require automake 1.14 and autoconf 2.65
This allows to fix distclean properly, since we know that
subdir-objects is used. When it is the case, it is not a good idea for
a Makefile to use a source file which is under the control of another
one. This could not be made to work work with old automake versions
(<1.14).

Therefore we refer directly to object files in Makefile.am instead of
source files. The actually leads to less compilation in tex2lyx.

Update the code here and there to remove compatibility hacks. Update
documentation.

Re-enable the layout test and fix the Length test, which was ovewriting
memory in test_inPixels() because lyxrc did not had a correct layout.
2017-04-06 14:56:30 +02:00
Uwe Stöhr
808339790c support to indent formulas
- adds support for the general document class option fleqn
- adds support to specify the formula indentation
- fileformat change
2017-04-05 22:22:47 +02:00
Uwe Stöhr
e575e7eebd Add support to cross out characters
- adds support for the command \xout of the LateX package ulem
- fileformat change
2017-04-05 00:01:19 +02:00
Uwe Stöhr
7aaa85915f latexfonts: support for the Noto fonts
- fileformat change
- the support to scale the sf and the tt fonts can be added later, see enhancement #10611
2017-04-04 23:02:47 +02:00
Uwe Stöhr
86cd1a9c97 tex2lyx: support for the cochineal fonts 2017-04-04 00:19:14 +02:00
Kornel Benko
0d6c64a4eb Cmake build: Project names *should* be uniq 2017-03-30 14:01:56 +02:00
Jean-Marc Lasgouttes
72af7f340c Pass big parameters by address
Spotted by coverity.
2017-03-24 15:11:21 +01:00
Enrico Forestieri
72a488d7e6 Fix output of en- and em-dashes with TeX fonts
This commit fixes the regression introduced in 2.2 about the
output of en- and em-dashes. In 2.2 en- and em-dashes are output as
the \textendash and \textemdash macros when using TeX fonts, causing
changed output in old documents and also bugs (for example, #10490).

Now documents produced with older versions work again as intended,
while documents produced with 2.2 can be made to produce the exact
same output by simply checking "Don't use ligatures for en-and
em-dashes" in Document->Settings->Fonts.

When exporting documents using TeX fonts to earlier versions, in order
to avoid changed output, a zero-width space character is inserted after
each en/em-dash if dash ligatures are allowed. These characters are
removed when reloading  documents with 2.3, so that they don't accumulate.
2017-03-19 20:50:34 +01:00
Jean-Marc Lasgouttes
7a124ab861 Fixup commit 50060053
Fix two instances where theFormats() was used instead of a local parameter.

Fix layout test.
2017-03-14 14:26:26 +01:00
Richard Heck
50060053e3 Move the global formats and system_formats variables into the
LyX singleton.

Mostly, this is very boring, but it might be good if someone would
check what I did about the dummy implementation in tex2lyx.
2017-03-13 23:40:29 -04:00
Jean-Marc Lasgouttes
ed15c31bf8 Make a dummier LyXRC for tex2lyx
The old version made coverity complain about uninitialized members.
The new one is the same as in support/tests/dummy_impl.cpp.
2017-03-08 16:37:53 +01:00
Juergen Spitzmueller
2902028a38 update tex2lyx tests 2017-02-04 19:28:18 +01:00
Juergen Spitzmueller
bedebfc45a Support for multiple bibliographies setting "per child"
This adds support for the chapterbib package, but also adds ways to
produce this sort of multibib with biblatex and bibtopic (which are
both incompatible with chapterbib).

File format change.
2017-02-04 19:23:45 +01:00
Juergen Spitzmueller
199c3f8e22 update tex2lyx tests 2017-02-04 13:45:16 +01:00
Juergen Spitzmueller
7ca20b292c Support for multiple bibliographies
Using refsection=unit in biblatex, or bibtopic's btUnit environments
in BibTeX.

File format change.
2017-02-04 12:02:00 +01:00
Juergen Spitzmueller
48af150896 Update tex2lyx tests 2017-01-30 08:29:16 +01:00
Juergen Spitzmueller
e15a8f3551 Extend LATEXIFY command param handling and add literal param.
File format change.

This allows for the relevant InsetCommand-based dialogs (such as
citation text before/after, Bibitem label, hyperlink name etc.)
to provide both the input of verbatim code or text that is transformed
to proper LaTeX code.

Some dialogs (Nomencl, Href) already had some methods (although they
could not be toggled), which are now centralized and streamlined.

The initial work of this patch has been done by Georg Baum (see
http://www.lyx.org/trac/attachment/ticket/2751/x.diff)

Fixes: #2751, #8227.
2017-01-30 07:44:55 +01:00
Juergen Spitzmueller
9cad99c2b5 update tex2lyx tests 2017-01-21 14:46:43 +01:00
Juergen Spitzmueller
68ab4023cc Support for "qualified citation lists"
These are biblatex-specific multicite commands that allow for multiple
pre- and postnotes, as in:

\cites(pre)(post)[pre1][post1]{key1}[pre2][post2]{key2}...

with an optional general pre- and postnote, which applies to the whole
list (like [][] in normal cite commands) and an optional pre- and
postnotes for each item, so that pagination can actually be specified in
multi-cite references, as in:
(cf. Miller 2015, 2; furthermore Smith 2013, 23-23; Jenkins 2012, 103,
also refer to chapter 6 in this book)

See the biblatex manual, sec. 3.8.3., for details.

File format change.
2017-01-21 14:25:17 +01:00
Juergen Spitzmueller
384723b63f update tex2lyx tests 2017-01-13 18:27:38 +01:00
Kornel Benko
cf3f4814d9 Adapt the cmake-build-system to the reworked biblatex handling 2017-01-13 13:17:12 +01:00
Juergen Spitzmueller
493f6c6cd3 update tex2lyx tests once more 2017-01-13 11:57:39 +01:00
Juergen Spitzmueller
013515e450 Update tex2lyx tests 2017-01-13 10:13:47 +01:00
Juergen Spitzmueller
ce8929e9b2 Merge branch 'master' into biblatex2 2017-01-12 09:05:28 +01:00
Richard Heck
a7aef29600 Update tex2lyx tests. 2017-01-11 14:16:28 -05:00
Juergen Spitzmueller
8319b3e9d6 Biblatex support
File format change
2017-01-08 09:39:46 +01:00
Juergen Spitzmueller
ecbd047cff Merge branch 'master' into biblatex2 2017-01-08 09:06:26 +01:00
Richard Heck
ff3690a5fd Add a "noprefix" option to the "labelonly" version of the reference
inset.

If the reference is "sec:mysec", then this will output just "mysec".
This is what is needed, e.g., to use refstyle's range commands, e.g.,
    \secrangeref{mysec1}{mysec2}
You *cannot* use:
    \secrangeref{sec:mysec1}{sec:mysec2}
even if those are the actual labels.

Eventually, I'd like to add native support for this, but I'm a bit
frightened of trying to make the reference dialog support multiple
selections.
2017-01-07 15:07:44 -05:00
Juergen Spitzmueller
f6d4bce123 Merge branch 'master' into biblatex2 2017-01-03 21:49:56 +01:00
Richard Heck
c13fa33d87 Update tex2lyx tests to new format. 2017-01-02 22:32:45 -05:00
Richard Heck
00b8f04988 Adapt tex2lyx to the new file format. 2017-01-02 22:32:45 -05:00
Richard Heck
78a76cc8d4 Update tex2lyx tests. 2017-01-02 18:14:41 -05:00
Juergen Spitzmueller
97aea7e5b1 Disentangle CiteEngines and Modules
These two are different beasts and thus should be handled differently.
2017-01-01 07:56:24 +01:00
Juergen Spitzmueller
ec2520677c More precise format description 2016-12-29 17:36:55 +01:00
Juergen Spitzmueller
01c2433070 The usual tex2lyx tests update after file format change 2016-12-29 16:48:22 +01:00
Juergen Spitzmueller
f8a85f35be Add support for the Crimson font
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
2016-12-29 16:45:19 +01:00
Juergen Spitzmueller
e21733037f update tex2lyx tests 2016-12-26 14:04:52 +01:00
Juergen Spitzmueller
89ce0c9069 Support for CJK quotation marks
File format change

Fixes: #2712
2016-12-26 14:03:48 +01:00
Juergen Spitzmueller
2ebd535e99 Update tex2lyx tests 2016-12-25 12:20:06 +01:00
Juergen Spitzmueller
6abe8dc6ae Update tex2lyx tests 2016-12-24 14:31:59 +01:00
Juergen Spitzmueller
237193f8a8 Some new quote styles
* 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")
2016-12-24 14:27:00 +01:00
Juergen Spitzmueller
1ed70d10fd Add "Plain" quotation mark style
File format change
2016-12-21 15:17:30 +01:00
Juergen Spitzmueller
59b8253bac Update tex2lyx tests for format 519. 2016-12-20 18:57:34 +01:00
Juergen Spitzmueller
857506e992 Rename \\quotes_language to\\quotes_style
File format change.
2016-12-20 18:54:07 +01:00
Juergen Spitzmueller
cce4639b55 Rename some quote-related params
Quote Language -> Quote Style
Quote Times-> Quote Level

No change in functionality.
2016-12-20 17:55:43 +01:00
Richard Heck
6915fc7de8 Update tex2lyx references after last format change. 2016-12-13 21:51:11 -05:00
Juergen Spitzmueller
84ffa4b834 Update tex2lyx tests
Thanks Scott for the heads-up!
2016-12-12 10:27:26 +01:00
Günter Milde
81f5e596b4 File format update after 418016bf79
Removing unsupported encoding "pt254" from \inputencoding values makes documents using this value invalid (J.S.).
2016-12-07 18:38:41 +01:00
Uwe Stöhr
41a5833920 tex2lyx test files: update them
- update the test files after the last 3 fileformat changes
- this is now possible thanks to the patch for bug #10440
2016-10-28 00:45:33 +02:00
Uwe Stöhr
87c00f3383 add support for Urdu and Syriac
- fileformat change
- I could not update the tex2lyx testfiles because of bug #10440 (there is now a probable fix)
2016-10-28 00:21:58 +02:00
Uwe Stöhr
d9c52c7a3f support for Amharic, Asturian, Kannada and Khmer
- 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
2016-10-22 15:33:59 +02:00
Uwe Stöhr
5adf949abb tex2lyx/Preamble.cpp: forgot this in r[f179173e/lyxgit]
- polyglossia supports Romansh, Piedmontese and Friulian
2016-10-21 00:20:27 +02:00
Uwe Stöhr
fe542e7989 tex2lyx/Preamble.cpp: sort alphabetically to keep overview
- also comment out the unsupported languages
2016-10-21 00:14:09 +02:00
Uwe Stöhr
f179173e42 support for the languages Bosnian, Friulian, Macedonian, Piedmontese and Romansh
- file format change
- note that I could not update the tex2lyx test files because of bug #10440
2016-10-16 15:33:23 +02:00
Günter Milde
f2a263e334 tex2lyx: Remove "textglobfall" hack.
tex2lyx tests for TIPA (test-inset-*) resulted in {End} in ERT after fixing lib/unicodesymbols.
Should be fine now.
2016-09-13 22:23:53 +02:00
Günter Milde
99eeb29e58 tex2lyx test: make box-color-*.tex sample compilable
Load required package textcomp.
Replace call to non-existent packages textcyr and textgreek with the backup definition of the commands as done by LyX export.
Do not load marvosym (clash with pifont) (LyX does not load the package either).
Remove invalid command \\ascii.
2016-09-12 11:46:30 +02:00
Scott Kostyshak
d3c63f97c4 Update tex2lyx test reference after 754cb3d1
From Günter [1]:

  the difference is the textcommand for ETB which changed from
  {\ascii\ETB} to

  0x21a8 "\\ETB"                    "ascii" "force=utf8" # UP DOWN
  ARROW WITH BASE

  because the former resulted in

  l.513 \ascii
              \ETB{}
  ! Undefined control sequence.

[1]
https://www.mail-archive.com/search?l=mid&q=nr48qn%242gb%241%40blaine.gmane.org
2016-09-11 17:52:02 -04:00
Enrico Forestieri
2a371bb4b3 Add verbose option
Using the option -v (--verbose) all spawned commands are print
on the terminal. Note that this was done by default on previous
versions.
2016-08-17 22:32:14 +02:00
Richard Heck
20328c4a44 Update tex2lyx tests. 2016-08-08 16:47:33 -04:00
Guillaume Munch
670efa8f64 Rationalise includes
Modifying TexRow.h or texstream.h no longer triggers the recompilation of the
complete source tree.
2016-07-04 02:42:17 +02:00
Georg Baum
d66d6f7805 Remove external date inset
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.
2016-06-19 21:23:25 +02:00
Guillaume Munch
6144bbfbf8 Replace foreach with for
C++11 allows foreach-style iterations with the following syntax:

for (auto & element : container) {
 ...
}
2016-06-12 19:17:33 +01:00
Jean-Marc Lasgouttes
0f5c34b8ab Initialize Parse::theCatCode_ in constructor
Normally, it is done before tokenizing, but it does not hurt to do it
even before.

Found by Coverity.
2016-06-09 17:11:41 +02:00
Georg Baum
273c67d8aa Require a C++11 compiler
As discussed on the list. If no C++11 compiler is found configuration stops
with an error. There are now unneeded parts of boost, the will be removed in
a second commit.
2016-06-07 20:34:52 +02:00
Georg Baum
bf60696ee6 update test references for ba2b86fa 2016-06-04 17:00:17 +02:00
Pavel Sanda
d5933fc5b5 Comment only 2016-06-02 22:48:58 -07:00
Pavel Sanda
ba2b86fa5d Introduce basic support for microtype.sty.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg192743.html
2016-06-02 22:48:58 -07:00
Georg Baum
08afc52c4c Configure included iconv with autotools
The included iconv should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included iconv or not.
cmake does already support that.

eilseq.m4 was taken from the original libiconv 1.14 package.
2016-05-29 17:55:43 -04:00
Georg Baum
78e17b1579 Configure included zlib with autotools
The included zlib should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included zlib or not.
cmake does already support that.

zconf.h.in was taken from the original zlib 1.2.8 package. The generation of
zconf.h was made equivalent to the one generated by cmake.
2016-05-29 17:55:43 -04:00
Enrico Forestieri
d4ca8d7404 Introduce the latexpar separator.
This is the same as the parbreak separator and is represented on screen
as the old parbreak. Old parbreak separators are converted to latexpar
separators when they are used for introducing blank lines in the
latex output rather than for separating environments.
Instead, parbreak separators are now represented on screen by a
double line. In essence, latexpar and parbreak separators produce
the same output but are represented differently on screen.
The context menu does not account for latexpar separators and only
"true" separators can be turned each into the other one.
2016-04-06 05:25:27 +02:00
Jean-Marc Lasgouttes
fd1ee3b424 Rename Caption:LongTableNoNumber to Caption:Unnumbered
The term LongTable has been deprecated and moreover the renaming makes the interface easier to the eye.

File format updated to 507. (conversion based on jamatos patch)
Layout format updated to 60.
tex2ylx tests updated.
Document EmbeddedObjects.lyx has been updated.
2016-03-30 16:07:00 +02:00
Georg Baum
de3e5280f6 Open tex2lyx input files with correct encoding
We open the input file now twice: The first time in latin1 encoding to read
the document encoding from the preamble. This does always work, since
traditional TeX does not allow non-ASCII contents without an encoding changing
command (except for comments, but we do not need them, and using latin1 rather
than utf8 ensures that they do not produce an iconv exception, but are simply
recored with wrong characters), and we do detect the utf8 based TeX engines
XeTeX and LuaTeX as well. The second time we open the file directly with the
document encoding.

This fixes a few tex2lyx tests on OS X, since changing the encoding of an
open file steam does not work with clang on OS X. Files using more than one
encoding are still broken, but all single-encoding files are fixed now.
2016-01-31 12:54:59 +01:00
Georg Baum
250b058192 Do not use static objects in Preamble
This does not make any difference currently, since the only instance of the
Preamble class is a global one, but it is cleaner and will be needed for
parsing the encoding with a second Preamble instance.
2016-01-31 12:37:22 +01:00
Uwe Stöhr
4dce8d4da4 tex2lyx testfiles: update fileformat 2016-01-30 02:17:45 +01:00
Georg Baum
5727cb2d43 Use consistent iconv encoding names
We should stick to the names used in lib/encodings. iconv has many aliases,
but fi we ever compare names it is better to use only one variant.
2016-01-29 20:38:40 +01:00
Uwe Stöhr
c1e0b24304 acmsiggraph.layout: update layout for ACM siggraph 0.92
fileformat change: update fileformat for all files
2016-01-27 01:58:13 +01:00
Stephan Witt
1440ae2e13 pass values for @executable_path and @loader_path to instruct the dyld where to find the Qt frameworks 2016-01-23 07:16:09 +01:00
Guillaume Munch
467bc27aea Update tex2lyx tests
Just add \save_transient_properties as expected.
2016-01-12 21:25:34 +00:00
Guillaume Munch
5c2d049996 Add \save_transient_properties parameter (#9841)
Increment LyX format to 504.

With this new parameter, the user can indicate that some other parameters that
are frequently switched must not be recorded in the file (as if they were a
setting specific to the user or transient, rather than a document setting). This
will play nicer with version control systems.

See the discussion, e.g.:
http://thread.gmane.org/gmane.editors.lyx.devel/157824/focus=157993 (third
solution mentioned)

TODO:
* The interface remains to be set up. We cannot change this setting from LyX
  for now.
* If save_transient_properties is false, we should read the user setting as a
  per-user-per-document (session) setting (e.g. like the cursor position).
* Once the above is done, we can treat \justification the same way (but it would
  be even better if \justification was moved to lyxrc).
2016-01-12 21:25:34 +00:00
Stephan Witt
34cbec9074 remove unused minizip include; avoid putting zlib include dir before others, this causes use of external boost headers if they are at the same location 2016-01-10 18:06:15 +01:00
Georg Baum
f35ed0c168 Improve \AA and \aa tex2lyx import
The lib/unicodesymbols part is based on work by Günter Milde:

Both, \r{A} and \AA (rsp. \r{a} and \aa) are equivalent standard LICR macros
for Aring/aring  as well as the deprecated "angstrom sign" character (212B).

However, with \AA for 212B and \r{A} for 00C5, tex2lyx converts \AA to the
deprecated "angstrom sign" which is missing in many fonts including the
Unicode version of Latin Modern.

I added the normalize_c() calls so that tex2lyx prefers the precomposed forms
(these are better editable in LyX) and the deprecated flag.
2016-01-08 21:06:24 +01:00
Georg Baum
ac1cd1ad9a Add symbol tests for A WITH RING ABOVE
The conversion is not completely correct yet, but adding the test before the
fix has the advantage that the fix can easily be documented by changing the
test reference.
2016-01-06 22:34:12 +01:00
Uwe Stöhr
219b5645c2 Inset files: add includes to compile with cxx11
see the list thread "Re: use FindCXX11Compiler.cmake also for MSVC"
2015-12-10 01:15:16 +01:00
Georg Baum
5c35ebcd24 Simplify logic
The old code was more complicated than needed, we have unstarred_name to make
our live easier. The test proves that the new code works as before.
2015-11-27 20:35:13 +01:00
Georg Baum
8ac43f2e04 Add tex2lyx test for verbatim* 2015-11-27 20:30:41 +01:00
Uwe Stöhr
bfc749eb23 stdlayouts.inc: support for verbatim*
fileformat change
2015-11-24 23:56:26 +01:00
Jean-Marc Lasgouttes
2811f76039 tex2lyx: Add a newline at the end of comment if not at the end of a paragraph.
When importing TeX code like
  %comment
  TEXT
the LyX document currently becomes
  [ERT %comment] TEXT
so that TEXT is now part of the comment.

Now output_comment adds a trailing newline if the token after the
comment is not a newline. Note that the newline that marks the end of
the comment has already been parsed at this point.

tex2lyx tests have been checked manually and updated.

Fixes ticket #9551.
2015-11-20 15:07:21 +01:00
Kornel Benko
492d44a284 Correct tex2lyx/roundtrip/test-structure.tex test. 2015-11-18 18:35:54 +01:00
Uwe Stöhr
cc6c86ff3b theorems.inc: add environment "solution"
fileformat change, fixes bug #6363
2015-11-18 01:14:30 +01:00
Georg Baum
2fc430d5ae Store both sets of font selections
This is one part of bug 9744: If you toggle between TeX fonts and non-TeX
fonts, the settings of the other choice are no longer thrown away, but stored
and re-activated if you switch back. Most parts of the patch are purely
mechanical (duplicating some BufferParams members), the only non-mechanical
change is in the GUI logic.
2015-11-09 07:36:42 +01:00
Scott Kostyshak
22104ac518 Fix a Makfile.am typo preventing "make lyxdist"
Thanks to Vincent.
2015-11-07 01:48:43 -05:00
Jean-Marc Lasgouttes
a5822a2976 Allow quotes in PDF text properties
PDF properties (Author, Title...) need to be quoted properly when writing (normal operation and tex2lyx). Also, reading them requires to use Lexer::getString() directly, because >> uses next(), which does not handle escapes.

Fixes bug #9830.
2015-11-04 12:18:01 +01:00
Uwe Stöhr
62a69584e6 achemso.layout: add a flex inset
- this one is in achemso since version 3.8

- fileformat change
2015-11-04 01:18:13 +01:00
Kornel Benko
ea70c1ff0d Cmake tests: Display process while executing for target updatetex2lyxtests
The execution took some time and the messages were delayed
until all test files were processed. Now as each testfile
is processed, the appropriate messages are printed.

There is also a new target: cleanupdatetex2lyxtests
It is the same as updatetex2lyxtests, but removes also
some extra created files from the source directory.
2015-10-30 13:28:20 +01:00
Kornel Benko
9b1f459f77 Cmake tests: Remove the use of file(TIMESTAMP...)
Cmake versions prior to 2.8.11 don't know this command, but
our minimal requirenment is 2.6.4

Thank to Vincent, it is replaced by using 'if(file1 IS_NEWER_THAN file2)' comparision.
2015-10-29 11:07:34 +01:00
Kornel Benko
e430586ec3 Cmake tests: Get rid of use of command 'env', which is not available under Windows. 2015-10-28 17:59:28 +01:00
Uwe Stöhr
2c1851e2ec moderncv.layout: update some styles and add new ones
- support for at least modernCV 1.5 (layout will still work with moderncv 1.3 as before)
- fileformat change
2015-10-28 02:27:32 +01:00
Georg Baum
d5ed835225 Revert the box alignment part of 8010b90c
The horizontal alignment changes caused a regression for documents in older
formats. This could have been fixed by adding the following lines to the
format entry for 489 in development/FORMAT:

	Previously, the horizontal position was ignored except for the
	following parameter combinations:
	- fixed width and type Boxed and without inner box
	- fixed width and any type   and with    inner box and with makebox
	Now, it is also used for the parameter combination below:
	- makebox is not used and not (type Boxed and without inner box)

and a corresponding conversion to convert_BoxFeatures() in
lib/lyx2lyx/lyx_2_2.py. However, it was decided to revert the box alignment
changes instead: The box alignment can contradict the paragraph alignment. A
better way to avoid the additional space that can be created by paragraph
alignment (which was the motivation for implementing box alignment) is the
same as for table cells (see noTrivlistCentering() in src/Paragraph.cpp).
This would be a file format change and it is too late now for 2.2.0.

See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg188147.html for the
complete discussion (subject "Regression in lyx2lyx box alignment").
2015-10-23 22:08:38 +02:00
Günter Milde
a0e2d48a56 Update the fileformat number in the tex2lyx test's expected output.
This needs to be done with every fileformat change!
2015-10-20 17:09:54 +02:00
Günter Milde
7e716a26a5 Fix #9764, combining diacritical characters for line below (part 2).
The correct mappings break the tex2lyx roundtrip tests because both, 
the tests and tex2lyx use the wrong mapping (\b for "combining minus below").

Fix tex2lyx and the test files so that round-trip tests pass again.
2015-10-19 18:34:48 +02:00
Vincent van Ravesteijn
92b7c5a92f cmake: Put updatetex2lyxtests in an appropriate folder 2015-10-19 17:54:04 +02:00
Georg Baum
8a047a4112 Add missing intializations
These were found by cppcheck:
Member variable 'x' is not initialized in the constructor.
The crash #9788 would not have happened if this had been done earlier.
2015-10-10 21:04:28 +02:00
Jean-Marc Lasgouttes
b7909e7e6c Remove support for precompiled headers for autotools
This was turned off by default for a long time, and it does not seem
to have any use these days.
2015-09-25 12:05:40 +02:00
Georg Baum
b24664b0ac Remove unused variables found by cppcheck
There are still a few warnings of the kind
(style) Variable 'x' is assigned a value that is never used.
since I did not touch code where I was not sure whether there might be a real
bug, and I kept some for symmetry reasons as well.
2015-09-20 21:39:59 +02:00
Georg Baum
b6aed54c45 Fix cppcheck variable scope warnings
These were all flagged by "(style) The scope of the variable 'x' can be reduced."
Narowing the scope improves readability, and if it is in a loop then the
compiler will be clever enough to produce efficient code, we do not need
manual optimization for POD types.
2015-09-20 10:42:35 +02:00
Georg Baum
4a5efb5a7d Refuse to run tex2lyx tests with in-source builds
As Günter found out running the tex2lyx tests overwrites the test references
if the build directory is identical to the source directory. Therefore the
tests would always pass, but git diff would show a non-empty diff if the tests
should have failed. Since it is better anyway to build in a separate directory
we simply do not support srcdir = builddir for the tests and abort with an
error.
2015-09-17 22:11:18 +02:00
Georg Baum
81e592603d Support units in external inset bbox
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.
2015-07-16 22:06:35 +02:00
Georg Baum
0cbcc8a166 Remove InsetGraphics noUnzip parameter
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
2015-07-16 20:44:47 +02:00
Georg Baum
6f84ceb821 Make tex2lyx tests green again
Unfortunately I overlooked in 44f73b0650 that the first three whitespace
changes in box-color-size-space-align.lyx.lyx were actually correct, so they
should not have been reverted. In detail:
1), 2): The space after \raggedleft must not be part of the ERT inset, but it
        is ouput by check_space() as part of the standard text which follows.
3):     The space in front of www is caused by the fact that there is a
        newline between the opening brace of the parbox and the \centering
        command, so this space is not the one after \centering (which is
        correctly swallowed). This additional space is in fact not needed,
        and the contents would look better in LyX without it, but since it is
        not caused by special code I'll put it back in the refernce for now.
        We can still improve this in the future if anybody has a good idea.

The remaining whitespace issues are all fixed by a simple change in
parse_text(): Instead of always eating whitespace after detecting \centering
et al, and always output a space as part of the ERT if these commands need an
ERT, let the standard space handling mechanism kick in: skip whitespace if
no ERT is used (in this case LyX will always output the needed space), and
do not touch whitespace if an ERT is used.
2015-06-11 22:25:00 +02:00
Georg Baum
44f73b0650 Revert whitespace changes in test references
These whitespace changes are not correct. The test fail now, but they will
pss again once the tex2lyx bug is fixed.
2015-06-01 21:20:08 +02:00
Georg Baum
e1d9ad9f28 Revert some recent test changes
These should not have been done without discussion.

- Removal of the dcolumn table in 1a8b74f5e1. Even if LyX does not support
dcolumn anymore, it is still a useful test whether tex2lyx imports it
correctly.

- Removal of the first "%% LyX" line. A long time ago it was decided (after
long discussion between at least Jean-Marc, Uwe and me), that this line is
interpreted by tex2lyx, and used to remove some LyX-generated preamble code.
These lines in the current tests exist on purpose (one can see in the diff
how the removal added unwanted stuff). I do not really like the
interpretation of the "%% LyX" line, but if this behaviour is to be changed
then this needs discussion first.

- Changed comment of \date. The comment was put there on purpose, and the
warning which was "fixed" by the change hints at a limitation in LyX, not a
tex2lyx problem (LyX does not know that a comment inset between some title
insets is OK). The roundtrip .tex output was OK with the old version.

- Change of \verbatiminput{foo}. This was supposed to test whether a
verbatim inset is correctly created even if the included file does not
exist.

- Removal of \lyxlines. Although these tests test input of files created by
old LyX versions, they are useful.

- Change of the lemma in test-modules.tex. The old version was put there on
purpose, and the file itself explains why it is translated to ERT.
2015-06-01 21:15:52 +02:00
Georg Baum
d4ae233106 Fix xfig test reference
For a not yet known reason the correct external xfig inset was replaced by an
include inset in 656bb6a0cb. Now it is correct again.
2015-06-01 20:43:31 +02:00
Georg Baum
f329d2c2ec Revert e1c04e56e1
verbatim.tex was added by Kornel on purpose and should not be removed without
discussing it beforehand.
2015-05-28 22:11:35 +02:00
Georg Baum
59294b71fe Revert 82c7669381
Now make dist works again. See b188e74cd6 for details.
2015-05-28 20:48:15 +02:00
Uwe Stöhr
a06b3900d2 tex2lyx/Preamble.cpp: revert a part of [041a3add/lyxgit]
There is a general problem of tex2lyx handling theorems. it is not sufficient to cure only one instance as I did. For more info see bug #9561.

Update the references accordingly.
2015-05-25 17:49:54 +02:00
Uwe Stöhr
6867277843 test/test-refstyle-theorems.lyx.lyx: update reference according to yesterdays tex2lyx changes
- I am aware that the resulting LyX file cannot be compiled - another tex2lyx bug
2015-05-25 17:20:41 +02:00
Uwe Stöhr
656bb6a0cb tex2lyx: update references according to today's changes 2015-05-25 02:10:03 +02:00
Uwe Stöhr
9960709fc2 tex2lyx/Preamble.cpp: handle \LyX
The definition for \LyX is re-added if the file contains \LyX
2015-05-25 02:02:10 +02:00
Uwe Stöhr
111df7b600 tex2lyx/Preamble.cpp: handle \lyxline 2015-05-25 01:48:28 +02:00
Uwe Stöhr
a7db473445 tex2lyx/Preamble.cpp: handle \lyxarrow
this fixes error 20 in bug #9565
2015-05-25 01:40:59 +02:00
Uwe Stöhr
77c8599658 tex2lyx/test/test-insets.tex: remove the \lyxline stuff
the \lyxline hack has gone from LyX long time ago. Therefore only one reference is enough
2015-05-25 01:38:52 +02:00
Uwe Stöhr
429f4669b0 test-insets-basic.tex: remove (in my opinion) wrong parser test
for more info see bug #9563
2015-05-25 01:07:35 +02:00
Uwe Stöhr
32cc0d2b2f tex2lyx/test/test-insets.tex: don't say that this is a LyX file
With the now removed command we said that this is a file created by LyX but this is not the case

- also replace a comment to avoid LaTeX warnings about mixing title and non-title stuff
2015-05-25 00:53:59 +02:00
Uwe Stöhr
1a8b74f5e1 tex2lyx: use correct LaTeX code for a table
before LyX 2.1 was released the dcolumn support was dropped and another method was used to align at the decimal point. Nevertheless the old LaTeX table was even wrong in terms of dcolumn

Now a table is used that uses the decimal alignment as it is supported by LyX
2015-05-25 00:17:18 +02:00
Kornel Benko
701a100d0b Adapt tex2lyx tests to Uwe's changes 2015-05-24 19:39:16 +02:00
Uwe Stöhr
e69124ab76 test-insets-basic.tex: add new testfile
The idea is to get a compilable file that does not require programs that are only available on certain platforms.
For example on Windows there is no Gnumeric available (only a very outdated and unsupported version with bugs).
2015-05-24 18:42:46 +02:00
Uwe Stöhr
410918400c tex2lyx/test/test-insets.tex: avoid 2 error messages 2015-05-24 18:38:40 +02:00
Uwe Stöhr
82c7669381 Dummy Document.tex: this file was missing but input in our test file 2015-05-24 18:06:02 +02:00
Uwe Stöhr
eb90d531be tex2lyx/test/test-insets.tex: input an existing file to avoid errors ad warnings 2015-05-24 18:05:16 +02:00
Uwe Stöhr
e1c04e56e1 delete test file verbatim.tex
because we already check for verbatim in test-structure.tex
2015-05-24 17:20:55 +02:00
Uwe Stöhr
041a3add6c tex2lyx/Preamble.cpp: fix bug #9561
there were 2 issues:
- the body was not output to the Preamble
- the theorem module already defines a theorem. It must not be output to the preamble to avoid a redefinition error of LaTeX

update the test files accordingly
2015-05-24 17:03:13 +02:00
Juergen Spitzmueller
19b6248498 Update tex2lyx test after dbe0096c12 2015-05-24 14:23:20 +02:00
Juergen Spitzmueller
ee41b0f193 Forgotten tex2lyx change in dbe0096c12 2015-05-24 14:21:36 +02:00
Juergen Spitzmueller
dbe0096c12 Rename ref prefix "sub:" to "subsec:"
This solves a macro conflict between subfloat's \subref and our own
\subref definition (bug #7550)

File format change.
2015-05-24 13:50:21 +02:00
Uwe Stöhr
175568b797 tex2lyx/test/test-insets.lyx.lyx: update according the the recent text2lyx fixes 2015-05-22 22:03:02 +02:00
Jean-Marc Lasgouttes
c444fddc0b Use macro LYX_USE_CXX11 in one more location
This is a follow-up to commit 329eae56.
2015-05-22 12:41:30 +02:00
Uwe Stöhr
96874489f4 tex2lyx/text.cpp: avoid a tex2lyx error message 2015-05-20 22:26:42 +02:00
Uwe Stöhr
437d0d2b10 tex2lyx/text.cpp: a fix for \fboxcolor around \parbox and minipage 2015-05-20 21:37:14 +02:00
Uwe Stöhr
896d0e00ca box-color-size-space-align.lyx.lyx: update file 2015-05-20 00:15:03 +02:00
Uwe Stöhr
bf532908b6 tex2lyx/text.cpp: remove an unintended addition 2015-05-20 00:05:12 +02:00
Uwe Stöhr
013eb54270 tex2lyx/text.cpp: fixes for \mbox{}
now all box constructs should be fully supported by tex2lyx
2015-05-19 23:35:56 +02:00
Uwe Stöhr
8f3ed42294 tex2lyx/text.cpp: remove a now unnecessary hack
\framebox{} is equal to \fbox{} and \makebox{} is equal to \mbox{}
When I once wrote this code LyX did not support \fbbox and \mbox and therefore had to use a workaround.
2015-05-19 23:25:36 +02:00
Uwe Stöhr
f996cf74b8 tex2lyx/text.cpp: set correct alignment for \makebox{test}
also fix an indentation error
2015-05-19 03:25:55 +02:00
Uwe Stöhr
c3178903d4 tex2lyx/text.cpp: coding style improvements and code simplification 2015-05-19 03:03:35 +02:00
Uwe Stöhr
290e7a9e09 tex2lyx/text.cpp: fix a bug I introduced with [c7a11c1d/lyxgit] 2015-05-19 02:29:16 +02:00
Uwe Stöhr
1ace9f5ac2 tex2lyx/text.cpp: add support for box alignment
the nasty hack with the FIXME is due to bug #9552
2015-05-19 02:19:24 +02:00
Uwe Stöhr
78aeccc19a tex2lyx/text.cpp: code simplification 2015-05-19 00:24:13 +02:00
Uwe Stöhr
6ae2a8bcbe tex2lyx/Preamble.cpp: forgot a package in previous commit 2015-05-19 00:21:12 +02:00
Uwe Stöhr
0471fe366a tex2lyx: register required packages for boxes 2015-05-19 00:17:08 +02:00
Uwe Stöhr
bcc423c7ea tex2lyx/text.cpp: support for \fcolorbox
and a fix also for \colorbox
2015-05-19 00:04:45 +02:00
Uwe Stöhr
c7a11c1da5 tex2lyx/text.cpp: fix handling of \fbox
since a while now lyX supports inner boxes in \fbox, tex2lyx was outdated in this case
2015-05-18 23:45:27 +02:00
Uwe Stöhr
496dba4532 tex2lyx/text.cpp: support for lengths like "2.5\width" in boxes
LyX supports these length in boxes for a while now; tex2lyx was not up to date
2015-05-18 01:37:59 +02:00
Uwe Stöhr
7eaae7b7ff tex2lyx/TODO.txt: add a feature that is not yet supported 2015-05-18 01:00:25 +02:00
Uwe Stöhr
5449a5b837 tex2lyx/text.cpp: support for the commands \fboxsep etc.
It is impossible handle all cases because the closing brace of an \fboxsep block can be everywhere. Therefore the braces remain in ERT.
2015-05-18 00:56:23 +02:00
Uwe Stöhr
f1832074f0 tex2lyx/text.cpp: set correct default horizontal position for \framebox 2015-05-17 21:59:29 +02:00
Uwe Stöhr
76b579ed37 tex2lyx/text.cpp: a fix for the horizontal box position
- if nothing is specified, the box content is left aligned, except for \makebox where it is centered
2015-05-17 18:12:20 +02:00
Uwe Stöhr
55417b50da tex2lyx/text.cpp: fix an indentation mistake 2015-05-17 17:45:56 +02:00
Georg Baum
84cca2dd94 Fix indentation 2015-05-17 17:27:27 +02:00
Uwe Stöhr
92b7ee46ed tex2lyx: support the command \colorbox
support for \fcolorbox will follow soon
2015-05-17 17:26:51 +02:00
Kornel Benko
3cd36977c9 Updated remaining tex2lyx test cases after commit 12ae7140c2 2015-05-17 15:53:58 +02:00
Kornel Benko
e2d4197068 Cmake build: Added target updatetex2lyxtests to update lyx2lyx test files 2015-05-17 15:51:28 +02:00
Uwe Stöhr
12ae7140c2 tex2lyx/text.cpp: add default value for 2 box features
- also add a comment
2015-05-17 15:00:51 +02:00
Georg Baum
39329935f3 Parse \multicolumn in math (bug 396)
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.
2015-05-17 13:43:37 +02:00
Uwe Stöhr
88593e0ec6 support for colored boxes
adds support to set colors for some box types (support for the LaTeX commands \fcolorbox and \colorbox)

fileformat change
2015-05-16 03:22:37 +02:00
Georg Baum
ef456e9607 Update tex2lyx test references correctly
This was produced by

make updatetests
2015-05-15 21:27:47 +02:00
Georg Baum
b2b68969ab Revert broken tex2lyx test reference update
Revert "tex2lyx testfiles: update to latest fileformat"
This reverts commit afdfc3cf43.

The tex2lyx test vrefernces must be produced by tex2lyx, otherwise the tests
would still fail.
2015-05-15 21:23:29 +02:00
Uwe Stöhr
afdfc3cf43 tex2lyx testfiles: update to latest fileformat 2015-05-14 23:13:14 +02:00
Uwe Stöhr
699f4b49a9 tex2lyx/Preamble.cpp: correct capitalization 2015-05-14 23:05:05 +02:00
Uwe Stöhr
e35bb3126a support for all default colors of the package xcolor
fileformat change
2015-05-14 22:23:44 +02:00
Kornel Benko
fecc438964 Update runtests.py to handle \origin for tex2lyx/cmplyx tests used by cmake. 2015-05-14 14:24:17 +02:00
Kornel Benko
4c6f9d039b Make output of runtests.py better readable 2015-05-14 10:45:43 +02:00
Enrico Forestieri
7144f8dad8 Update tex2lyx and tests after 306b136c 2015-05-14 01:02:37 +02:00
Enrico Forestieri
9b9f381598 Update tex2lyx tests after 8010b90c 2015-05-13 21:36:36 +02:00
Uwe Stöhr
8010b90cb4 add ability to change box line thickness and separation
fileformat change
2015-05-11 21:30:32 +02:00
Kornel Benko
9e105996d6 Adapt tex2lyx testfiles to the new format 488. 2015-05-05 12:34:25 +02:00
Georg Baum
4069e3daed Update tex2lyx test references
The lyx2lyx conversions for the new formats are empty, therefore we can simply
update the format number.
2015-04-12 10:07:42 +02:00
Georg Baum
d4718b18b6 Fix tex2lyx linker error on windows
The FontMetrics dummy class was in the wrong namespace. Linking on linux
did work because the GNU linker is more clever than the MSVC linker for this
particular example and throws out more unused code, so that theFontMetrics was
not referenced at all.
2015-04-08 22:06:51 +02:00
Uwe Stöhr
c6b17b685a support for Georgian
add support to set Georgian as document language, fileformat change
2015-04-06 06:00:11 +02:00
Jean-Marc Lasgouttes
e4fe294bdc Make builds reproducible
We do not really need to use __TIME__ and __DATE__, which prevent from making LyX builds reproducible.

Fixes bug #9415.
2015-03-26 18:14:45 +01:00
Jean-Marc Lasgouttes
66fa801e74 Improve support for on screen length calculation
The computation of length on screen depend in particular of the computation of the size of an em. Many places of the code used to rely on the width of the M character, which is not really correct:
http://en.wikipedia.org/wiki/Em_%28typography%29

In digital typography, the best value to use is the point size of the font.

* Implement FontMetrics::em(), which returns the value in pixels of the EM unit.
 Convert code to use it.

* Introduce Length::inPixel(MetricsBase const &), which takes the textwidth and em information from the MetricsBase object. Convert code to use it.

* Fix several places where Length::inPixel is used without a proper em value.

* add mathed_font_em() helper function. It should eventually be removed like some other functions in MathSupport.

* Add dummy implementation of FontMetrics to tex2lyx for linking purposes.
2015-03-26 17:10:15 +01:00
Georg Baum
49ac79100b Make InsetSpecialChar names more consistent
This is the rersult of a discussion on the list. Now all special characters
have meaningful names, and it is clear that the LyX file syntax is not LaTeX.
2015-03-23 21:28:04 +01:00
Georg Baum
19297a891c Fix tex2lyx import of \LaTeXe
Previously, it did generate an invalid SpecialChar inset.
2015-03-23 20:52:51 +01:00
Georg Baum
d752334ec4 Fix tex2lyx script output
tex2lyx did not use the InsetLayout for the script insets, so it did not know
that it had to use Plain Layout. However, there is still a possible pitfall:
InsetScript uses a hard coded plain layout for the InsetText constructor, so
if anybody would remove ForcePlain 1 and MultiPar false from the InsetLayout
then LyX would still write script insets with plain layout, but tex2lyx would
output standard layout again.
2015-03-11 22:20:44 +01:00
Georg Baum
d8ed62f496 Update tex2lyx test references
tex2lyx outputs the correct layout ("Plain Layout") for captions since
9d824a04d1. Previously, it did output  "Standard", which was wrong.
2015-03-11 21:02:59 +01:00
Georg Baum
3e9e6e344a Replace automatic logofication with insets
Previously, LyX did replace some words with typeset logos, and there was no
way to prvent this except putting them, in ERT (bug #4752). Now we have
special insets for these words, and standard text is left alone.
2015-03-01 11:16:57 +01:00
Georg Baum
e76fc73040 Fix \nobreakdash- roundtrip in moving args
Previously, tex2lyx did not remove the \protect which is output by LyX in
front of \nobreakdash- if needed. Now tex2lyx removes it unconditionally (like
it does elsewhere), because LyX will add it if needed.
2015-02-27 22:06:11 +01:00
Georg Baum
8aa37c43a1 Fix plaintext output of dashes (bug #3647)
Previously, consecutive dashes in .lyx files were combined to endash and emdash
in some cases, and in other cases they were output as is. This made the code
complicated, and resulted in inconsitencies ((bug #3647).
Now, a dash in a .lyx file is always a dash in the output, for all flavours.
The special handling is moved to the input side, so that you still get an
endash if you type two hyphens. If needed, this can be changed or made
customizable without the need to update the file format again. Many thanks
for the fruitful mailing list dicsussion, which contributed significantly to
the final version.
2015-02-24 22:06:12 +01:00
Georg Baum
7178f98b0f Fix tex2lyx parsing of consecutive hyphens
tex2lyx was already behaving as if bug #3647 was fixed, but currently -- and
--- have the same special meaning in LyX as in LaTeX.
2015-02-01 14:03:58 +01:00
Georg Baum
3120ff8e9f Fix tex2lyx tests for 23e8db3e5
The textcyr test did not work anymore, since the output of
"CYRILLIC SMALL LETTER VE" changed from \textcyr{\char226} to \textcyr{\cyrv}.
The the old version is now converted to ERT. In theory it could also be
converted to "CYRILLIC SMALL LETTER VE", but this would mean to maintain an
extra list, which is not worth the effort.
2015-02-01 13:12:45 +01:00
Georg Baum
19f3f630bc Remove unused declaration 2015-01-14 21:44:28 +01:00
Georg Baum
7b48e2aac0 Start qt event loop for commandline usage
This is needed since src/support calls lots of qt code, and some parts of it
(e.g. QFileInfo) require a running event loop. This fixes bug #4917 which is
a symptom of the problem.
The fix is to create a QCoreApplication for tex2lyx, lyxclient and LyX running
without GUI. In the future this could be extended, i.e. to split up the
frontend Application class in a GUI and a console class, and having the
console class use LyXConsoleApp in the same way as Application now uses
GuiApplication. If that is done, one could also think of moving
support/ConsoleApplication to frontend/console/ConsoleApplication.
2015-01-11 14:06:17 +01:00
Georg Baum
ca6fba31fb Remove direct calls of exit()
This is a preparation for using QCoreApplication.
2015-01-09 21:43:45 +01:00
Georg Baum
9c1504a416 Update references after 706960eba
The generated output is correct, since the lyx2lyx forward conversion is empty.
2015-01-09 21:05:42 +01:00
Georg Baum
59b705dcd9 Move global variable to preamble
This will be needed in the future, when I need to parse the preamble twice
for detecting japanese encoding (bug #8218).
2015-01-06 19:21:34 +01:00
Georg Baum
3f72a026cc Fix parsing of verbatim options (bug #9113)
Parser::verbatimOption() did swallow backslashes previously. The similar code
in Parser::verbatim_item() was already correct.
2015-01-03 20:45:06 +01:00
Georg Baum
b1bfbfb3f9 Adjust subfigure and subcaption options 2015-01-03 18:43:01 +01:00
Georg Baum
1d4fb5ac7d Parse post command argument insets (bug #8473)
This is now very easy with the new InsetArgument infrastructure.
2014-12-30 18:37:08 +01:00
Georg Baum
d1e530cf5d Handle \textgreek commands from unicodesymbols
This is the second part of bug #8553: The symbols defined in unicodesymbols
are now detected correctly and converted to unicode, so no ERT anymore.
2014-12-30 18:12:35 +01:00
Georg Baum
bf1006a22c Fix misparsing of \textgreek without polyglossia
This is the first part of bug #8553. \textgreek was interpreted as the
polyglossia version even if polyglossia was not used. Now it is not recognized
at all and converted to ERT, but this ensures at least correct LaTeX output.
2014-12-30 17:44:08 +01:00
Georg Baum
b0361fb3c5 tex2lyx: Run configure.py if needed (bug #8539)
Since tex2lyx reads some LyX config files it needs to run configure.py if
they do not exist or are out of date.
2014-12-29 23:46:25 +01:00
Georg Baum
c1c439b94d Handle unknown table column specifiers (bug #9311)
Previously tex2lyx did ignore table columns if the column specifier was
unknown. This can lead to data loss, and now it does not ignore these columns,
but assumes that the column specifiers use only once character. This can still
lead to data loss, but less often.
2014-12-29 22:54:06 +01:00
Georg Baum
cd3b040a70 Write fixed encoding to LyX file (bug #9178)
If the user gave the -fixednec argument to tex2lyx then set that encoding as
LaTeX input encoding in the generated LyX file. Otherwise, included .bib files
could be interpreted using a wrong encoding.
2014-12-29 22:29:20 +01:00
Georg Baum
ff9b4a3834 Use new argument inset code for environments
This removes another instance of the limitation solved by file format 446:
The order of optional and required arguments is not fixed anymore.
2014-12-29 22:06:29 +01:00
Georg Baum
5bfd1c22d2 Skip missing optional argument insets in tex2lyx
Optional arguments are optional, so if one is missing, do not stop the parsing,
but continue with the next argument (it might be a required one).
2014-12-29 21:54:15 +01:00
Georg Baum
e15d3d35cb Reduce caption hardcoding
Now we can handle all types of captions defined in layout files or modules.
This does also mean that \captionabove and \captionbelow are only recognized
in KOMA-classes and not always anymore, but this is correct, since these
captions would not work in other document classes anyway.
2014-12-27 18:15:07 +01:00
Georg Baum
eda5f69cc0 Revert e01886327d
Sorry, this was nonsense.
2014-12-27 17:03:39 +01:00
Georg Baum
e01886327d Output caption insets collapsed
Like all other collapsable insets, there is not reason to treat captions
specially.
2014-12-27 16:10:11 +01:00
Georg Baum
f4417e8125 Remove InsetArgument 999 workaround
Since we iterate through all arguments we can as well compute the correct id
directly.
2014-12-27 15:17:11 +01:00
Georg Baum
0c90821138 Parse starred InsetLayout correctly
Previously, an InsetLayout was not found if the LaTeX name was starred, e.g.
for "\caption*".
2014-12-27 15:17:10 +01:00
Georg Baum
614862fccc Move cjk check out of the loop
According to the indentation this was probably a merge error, and the check is
only needed once.
2014-12-27 15:17:10 +01:00
Georg Baum
16eb4f1ed7 Adjust tex2lyx InsetArgument to format 446
tex2lyx does now allow mixed order of required and optional arguments.
2014-12-27 15:17:09 +01:00
Enrico Forestieri
1b0cbb6932 Fix building with cmake on cygwin.
Add required libraries for the link stage.
2014-12-26 17:00:23 +01:00
Georg Baum
903917f3b8 Add tex2lyx test for KOMA-Script classes
In the future this test case should contain all KOMA-Script features.
Currently, it tests just \captionabove anmd \captionbelow.
2014-12-23 22:33:32 +01:00
Georg Baum
bb87e0422a Revert parts of 7e69ac220d
This fixes the tex2lyx test test-refstyle-theorems.tex. It seems that the
intent of the fix was to remove a \protect in front of a \caption,
\captionabove or \captionbelow, but the implementation did not really do that.
Furthermore, it is not clear in which cases a \protect in front of a caption
needs to removed, and in which cases it needs to be kept: After looking at the
LyX sources I could not see that caprions are always output with \protect.
2014-12-22 21:32:45 +01:00
Uwe Stöhr
0d63bdfc16 tex2lyx/text.cpp: bring back a comment as discussed 2014-12-04 00:57:14 +01:00
Uwe Stöhr
7e69ac220d tex2lyx: support for KOMA-script's \caption* commands
- To my knowledge tex2lyx supports now all caption constructs provided by LyX.
- InsetArgument is correct here, I therefore deleted the FIXME.
2014-12-01 02:57:12 +01:00
Jean-Marc Lasgouttes
8d6d21c6d9 Add new variables lyx_build_date/time
These are now in version.cpp. The build machinery should therefore make sure
that version.cpp is recompiled at every compilation.

These variables are now referred to by the other places that made use of __DATE__ and __TIME__.
2014-11-25 18:58:35 +01:00
Uwe Stöhr
bfc4af2d01 tex2lyx/text.cpp: add missing part of a comment 2014-11-25 00:53:35 +01:00
Uwe Stöhr
1427b6fe31 tex2lyx: support for glue lengths in InsetSpace 2014-11-25 00:50:39 +01:00
Uwe Stöhr
489cdae255 tex2lyx: support relative lengths in \vspace and \hspace 2014-11-23 04:56:47 +01:00
Uwe Stöhr
c2e0f22385 tex2lyx/Preamble.cpp: add support for all \defskip lengths
- support for percentage length was missing and the fix is really that simple
2014-11-23 03:28:07 +01:00
Uwe Stöhr
02b2cd50ed tex2lyx/TODO.txt: \=*{char} is already supported by tex2lyx 2014-11-23 01:30:13 +01:00
Uwe Stöhr
d179ef455c tex2lyx/TODO.txt: the UGM fonts are already fully supported 2014-11-23 00:40:47 +01:00
Uwe Stöhr
2a1ab8b6f0 tex2lyx/Preamble.cpp: whitespace fix
- revert unnecessary change from previous commit
2014-11-20 02:03:06 +01:00
Uwe Stöhr
5c9667d8b8 tex2lyx: support for the libertine fonts
- all libertine font variants are now supported
2014-11-20 02:01:05 +01:00
Uwe Stöhr
ec84cbfb44 tex2lyx: support for \item with opt arg in itemize environment 2014-11-11 01:20:03 +01:00
Uwe Stöhr
20cfef458f tex2lyx/TODO.txt: update file and add information 2014-11-11 01:06:51 +01:00
Uwe Stöhr
9eae2b141d test-insets.lyx.lyx: forgot to commit this in r471889e0 2014-11-10 03:34:01 +01:00
Uwe Stöhr
73f2b01678 tex2lyx: support for bibtopic
can also go to branch
2014-11-07 03:29:53 +01:00
Uwe Stöhr
471889e0db tex2lyx/text.cpp: support for \nameref
\nameref is not recognized

should be backported to branch
2014-11-07 01:58:06 +01:00
Uwe Stöhr
b119f849d7 tex2lyx/Preamble.cpp: support 2 math fonts
- support for kurier and iwona as math font
can also go to branch
2014-11-07 01:28:42 +01:00
Kornel Benko
5a6020ea15 Update file formats of test files 2014-09-04 12:14:47 +02:00
Kornel Benko
90717df577 Cmake tex2lyx tests: Take care of initialized userdir
If we are testing tex2lyx the first time, then the userdir
is empty. We call now configure.py to initalize in case it is needed.
The algorithm to detect if reconfigure is needed mimics the lyx behaviour.
2014-09-03 21:21:05 +02:00
Kornel Benko
08fa62396b Add some missing files to autoconf's dist 2014-08-31 15:23:28 +02:00
Kornel Benko
6c7b5b12c7 Add cmake files to autoconf's dist 2014-08-31 15:21:20 +02:00
Enrico Forestieri
4bdeae2733 Update autotools for building with Qt5.
The option --enable-qt5 allows configuring for Qt5. The default is Qt4.
Nothing special is done with respect to Qt4, apart from pulling in the
correct libraries. Indeed, other than the core and gui libraries, now
also the concurrent and widgets libraries are needed.
2014-07-19 03:34:28 +02:00
Enrico Forestieri
b60b505fd8 Fix import of latex documents with scaled fonts. 2014-07-11 11:21:45 +02:00
Georg Baum
98fc5e518f Support new languages in tex2lyx
I forgot that this was part of the file format update as well.
Also fix a mixup of "english" and "uppersorbian".
2014-07-10 22:15:34 +02:00
Georg Baum
1a073ea416 Missing file format bis from 0c3b88e3 2014-07-10 21:59:17 +02:00
Jean-Marc
93a43742a5 Fix a bunch of small performance issues spotted by cppcheck
Most of these are about passing const strings parameters as references.
2014-07-05 19:13:10 +02:00
Kornel Benko
3b14de740d Cmake build: Symplify use of linking optional libraries found via find_package 2014-06-12 19:02:29 +02:00
Kornel Benko
2b0511510a Cmake build: Added magic library to some link commands.
Needed due to the use of magic_(open|load|error|file|close) after recent changes.
2014-06-12 07:49:17 +02:00
Peter Kümmel
080fca85a8 build with mingw on Windows and Linux 2014-06-07 08:06:13 +02:00