Commit Graph

1371 Commits

Author SHA1 Message Date
Juergen Spitzmueller
30abecd437 tex2lyx: split huge else-if-clause
Use a loop instead and break out after a condition is met. This prevents
problems on windows where the number of else-if-conditions is limited.
2018-08-22 18:49:16 +02:00
Juergen Spitzmueller
68d48b0015 tex2lyx: Fixes to the btUnit import
1. Do not attempt to mix diverging btUnits (e.g., chapters and sections).
2. use parse_text to properly parse the contents.
2018-08-22 08:39:13 +02:00
Juergen Spitzmueller
5c97424a72 tex2lyx: simplify btUnit parsing 2018-08-21 17:33:30 +02:00
Juergen Spitzmueller
0ae68ae828 tex2lyx: support for btUnit (multibib) 2018-08-21 17:18:04 +02:00
Juergen Spitzmueller
f44a55c367 tex2lyx: add bib encoding support. 2018-08-21 08:19:24 +02:00
Juergen Spitzmueller
924a666166 Remove empty entry 2018-08-20 18:18:48 +02:00
Juergen Spitzmueller
23ea74a40b tex2lyx: support for Plex fonts 2018-08-20 11:13:13 +02:00
Juergen Spitzmueller
c5cab5a8f7 Update tex2lyx tests 2018-08-17 20:34:28 +02:00
Juergen Spitzmueller
b124adbd38 Introduce listpreamble argument type
This uses the InsetArgument interface to provide access to a document
part hitherto inaccessible by LyX: the part between \begin and the first
\item in a list (where lengths and counters can be redefined, for
instance).

Fixes: #11098

File format change, layout format change
2018-08-17 10:22:32 +02:00
Juergen Spitzmueller
b3c57aded7 tex2lyx/TODO: cleanup
Remove items that are done or not relevant to tex import.
2018-08-12 09:09:23 +02:00
Juergen Spitzmueller
521d7c2e0b tex2lyx: fix option parsing of listings
the tricky thing was to decide whether [foo] is taken as option or as
verbatim content.

Candidate for stable.
2018-08-11 16:55:44 +02:00
Kornel Benko
366e37c851 Added latex-DejaVu fonts to lyx-GUI.
Increment lyx-format to 561
2018-08-10 19:38:06 +02:00
Juergen Spitzmueller
781b10306a update tex2lyx tests 2018-08-07 15:42:22 +02:00
Juergen Spitzmueller
4ec8bd05a4 update tex2lyx tests 2018-07-07 15:28:40 +02:00
Juergen Spitzmueller
e6e3777363 Add support for bib files encoding
File format change.

Fixes: #6223
2018-07-07 15:25:35 +02:00
Juergen Spitzmueller
9dcb24d578 Support varwidth's V tabular column type
This effectively enables linebreaks, multipars and layout changes in
non-fixed width (i.e., standard) table columns.

Fixes: #6577

TODO: metrics are wrong (too wide) on screen with linebreaks.
2018-07-01 19:18:38 +02:00
Kornel Benko
41ddac5519 Cmake tests: Added tex2lyx test for xltabular and tabularx 2018-06-25 12:04:45 +02:00
Juergen Spitzmueller
650bb156d9 tex2lyx: tabular width in longtable is now possible (via xltabular). 2018-06-25 11:52:56 +02:00
Juergen Spitzmueller
c33506555f tex2lyx: Add support for multirow
Fixes: #11164
2018-06-24 18:14:10 +02:00
Juergen Spitzmueller
087a43ee1f tex2lyx: check for \maketitle also if other titlename is specified
Beamer for instance supports \maketitle, although we use \makebeamertitle
2018-06-24 10:23:30 +02:00
Juergen Spitzmueller
9c10816b84 Update tex2lyx tests. 2018-06-24 10:09:39 +02:00
Juergen Spitzmueller
f38816bf16 Add support for tabularx/xltabular
I.e., variable width columns in single and multiple page tables

Files format change.

Fixes: #4154, #4155
2018-06-24 10:05:15 +02:00
Juergen Spitzmueller
2fbce44401 We do not natively support multirow yet
See #11164
2018-06-01 17:11:35 +02:00
Kornel Benko
1a36fee79d Added testcase for ticket #11156
The test is named "AMS-import", with defined test-labels 'tex2lyx' and 'batch'
2018-05-24 20:49:11 +02:00
Juergen Spitzmueller
8b4c76fb24 Consider required modules when checking for layout definitions in modules
Fixes: #11156.
2018-05-24 17:38:10 +02:00
Juergen Spitzmueller
429edc0a59 tex2lyx: extend titling support
Rather than checking for hardcoded title commands such as \maketitle,
use the titlename and titletype as defined in the layout.

This now also includes title environments.

Fixes part of #6461
2018-05-23 12:34:41 +02:00
Juergen Spitzmueller
4f33b7d1d1 Update tex2lyx tests 2018-05-21 13:46:04 +02:00
Juergen Spitzmueller
0aeeb78f3c Simplify cite engines code
As opposed to modules (from which the framework was initially borrowed),
we only allow one cite engine per document. Thus, we don't need to fiddle
with lists.
2018-05-20 12:27:03 +02:00
Juergen Spitzmueller
db9e50bdcf update tex2lyx tests after file format change 2018-05-10 20:16:56 +02:00
Kornel Benko
cf7c31b559 Amend 26ea1e1 for roundtrip tests 2018-04-27 12:49:13 +02:00
Juergen Spitzmueller
26ea1e1496 Align fontenc with document fonts
Following a request by Günter, we consider the document fonts (only rm
for now) when selecting an appropriate font encoding.

See #9741

The new default font encoding setting "auto" does

* consider the font encoding needed by the language(s), which can now
  have fallback alternatives
* Consider which font encoding is provided by the document font

Thus, cm now will result in OT1 fontenc, if the language can deal with
that.

The font_enc pref is ditched: it is no longer needed.

The automatism is still very basic and is subject to extension.

File format and prefs format change.
2018-04-22 19:06:46 +02:00
Juergen Spitzmueller
02d37932d0 \textcyr -> \textcyrillic
Use the command as defined by Babel. This allows us to use the (more
advanced) Babel command if provided instead of rolling our own.

I add a dummy file format change in case it turns out we need to
do something here for old documents (e.g. with user preamble definitions)
2018-04-21 16:28:15 +02:00
Juergen Spitzmueller
2551614ff1 Add Landscape module
Support for the (pdf)lscape package.

Fixes: #10801
2018-04-18 14:36:49 +02:00
Juergen Spitzmueller
bd77d8ad61 small fixup in tex2lyx lstlistings/inputminted support. 2018-03-17 18:26:47 +01:00
Juergen Spitzmueller
f3c5bcd2be tex2lyx: complete minted support (inputminted)
Also fix some whitespace issues in minted inset import.
2018-03-17 16:45:05 +01:00
Juergen Spitzmueller
63b67fee83 tex2lyx: add beamer test file 2018-03-17 13:20:48 +01:00
Juergen Spitzmueller
d93076c128 tex2lyx: handle makebeamertitle 2018-03-17 12:39:13 +01:00
Juergen Spitzmueller
7e3a41bd15 tex2lyx: clear latexparam after use. 2018-03-17 12:38:53 +01:00
Juergen Spitzmueller
79728dcde9 tex2lyx: do not eat empty paragraphs if keepempty is true
Fixes: #11078
2018-03-17 12:19:50 +01:00
Juergen Spitzmueller
506ae2d2ea tex2lyx: add support for LaTeXParam
Part of #11068
2018-03-16 12:58:01 +01:00
Juergen Spitzmueller
6a0f0d28a5 Add support for xcharter font.
File format change.

Patch by Yuriy Skalko.
2018-03-15 15:44:49 +01:00
Juergen Spitzmueller
c74e399981 tex2lyx: support for beamer text styles with overlays
E.g. things like \textbf<article>{foo} have to be imported as insets.

Part of #11068
2018-03-14 14:38:18 +01:00
Juergen Spitzmueller
e51265b5f3 tex2lyx: More work on beamer support
* Implement list item overlay support (\item<arg>)
* Implement itemcommand support (e.g., \overprint<arg>)
* Fix general list argument placement

Part of: #11068
2018-03-14 08:40:47 +01:00
Juergen Spitzmueller
4d30e00da8 amend ab4e9adf86 2018-03-13 16:01:13 +01:00
Juergen Spitzmueller
ab4e9adf86 Fix known_escaped_chars 2018-03-13 13:00:58 +01:00
Juergen Spitzmueller
949de66956 tex2lyx: towards beamer overlay argument support.
Implemented: Overlay and standard overlay arguments for commands
and environments.

Still missing:
* List item overlay
* itemcommand overlay (\overprint)
* overlay via LatexParam (e.g., Flex:ArticleMode)

Needs fixing:
* General list argument (\begin{itemize}[arg])
* nested content in a frame with no title (empty par)
2018-03-12 14:56:28 +01:00
Juergen Spitzmueller
f30474a26c update test 2018-03-11 19:50:22 +01:00
Juergen Spitzmueller
386d9953e8 amend 11e4a24e6e 2018-03-11 19:49:28 +01:00
Juergen Spitzmueller
8184f08f4a tex2lyx: update quote handling
* Consider new quote styles
* Consider changed quote styles
* Try to be a bit smarter with ambiguous quotation marks
2018-03-11 18:05:50 +01:00
Juergen Spitzmueller
e5e6e16274 Update tex2lyx tests after cc6f2dae82 2018-03-11 18:05:50 +01:00