]> git.lyx.org Git - lyx.git/commit
tex2lyx: import minted listings
authorEnrico Forestieri <forenr@lyx.org>
Sat, 17 Jun 2017 00:23:00 +0000 (02:23 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Sat, 17 Jun 2017 00:23:00 +0000 (02:23 +0200)
commit7a9bb851840fe7211cac05cbd898b27143f73559
tree266949d6548c999ebd1d52b4973f479270c39721
parent195e55d3f4df8865995166fc93eff8435f7faf6e
tex2lyx: import minted listings

This commit updates tex2lyx in order to also import minted listings.
For the floating version of a listing, minted uses the listing
environment, a concept that is not shared with the listings package,
towards which our listings inset is geared.
For this reason, a kludge is necessary when importing minted listings
not previously exported by LyX itself.
If the floating listing contains only a caption and a label (other
than the listing itself), everything is fine and the import is (or
aims to be) perfect. But, as in all other floating ebvironments,
one can also stick there other elements, which don't have a place
in the listings inset. So, in order to avoid a data loss, tex2lyx
sticks everything into the caption. In this way, things may be
rearranged in the GUI, if necessary. There is no other way, apart
from a complete redesign of the listings inset, of course. However,
I think that this is an acceptable compromise.
20 files changed:
src/tex2lyx/Preamble.cpp
src/tex2lyx/Preamble.h
src/tex2lyx/TODO.txt
src/tex2lyx/test/CJK.lyx.lyx
src/tex2lyx/test/CJKutf8.lyx.lyx
src/tex2lyx/test/DummyDocument.lyx.lyx
src/tex2lyx/test/Dummy~Document.lyx.lyx
src/tex2lyx/test/XeTeX-polyglossia.lyx.lyx
src/tex2lyx/test/algo2e.lyx.lyx
src/tex2lyx/test/box-color-size-space-align.lyx.lyx
src/tex2lyx/test/test-insets-basic.lyx.lyx
src/tex2lyx/test/test-insets.lyx.lyx
src/tex2lyx/test/test-memoir.lyx.lyx
src/tex2lyx/test/test-modules.lyx.lyx
src/tex2lyx/test/test-refstyle-theorems.lyx.lyx
src/tex2lyx/test/test-scr.lyx.lyx
src/tex2lyx/test/test-structure.lyx.lyx
src/tex2lyx/test/test.lyx.lyx
src/tex2lyx/test/verbatim.lyx.lyx
src/tex2lyx/text.cpp