lyx_mirror/src/tex2lyx/test/CJK.lyx.lyx
Enrico Forestieri 7a9bb85184 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.
2017-06-17 02:23:00 +02:00

344 lines
5.0 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#LyX file created by tex2lyx 2.3
\lyxformat 544
\begin_document
\begin_header
\save_transient_properties true
\origin roundtrip
\textclass article
\begin_preamble
\usepackage{babel}
% It is impossible to get the document language because the document could start with a command,
% whitespace, and English word or whatever and the rest is in Japanese. Checking for the first CJK
% environment is no solution because the document could be English and contain only some Japanese.
\end_preamble
\options english
\use_default_options false
\maintain_unincluded_children false
\language japanese-cjk
\language_package default
\inputencoding utf8
\fontencoding T1
\font_roman "default" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\use_dash_ligatures true
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 0
\use_package cancel 0
\use_package esint 1
\use_package mathdots 0
\use_package mathtools 0
\use_package mhchem 0
\use_package stackrel 0
\use_package stmaryrd 0
\use_package undertilde 0
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style english
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
\lang japanese-cjk
Japanese
\end_layout
\begin_layout Standard
\lang chinese-traditional
Chinese traditional
\end_layout
\begin_layout Standard
\lang japanese-cjk
Japanese
\end_layout
\begin_layout Standard
hello
\end_layout
\begin_layout Standard
\lang chinese-simplified
Chinese simplified
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
begin{CJK}{EUC-JP}{hei}
\end_layout
\end_inset
Japanese
(this CJK environment will be put in ERT because LyX supports only one CJK
font mapping per document, this environment uses the
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
\end_layout
\end_inset
texttt{hei} mapping,
and the first mapping is empty.
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
end{CJK}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\lang chinese-simplified
Chinese simplified
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
% The following Bg5 encoded text cannot be processed as is by latex.
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
% It needs to be preprocessed by bg5conv or bg5latex needs to be used.
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
% See the documentation of CJK.sty for details.
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\lang chinese-traditional
Big5 文鼎楷書
\end_layout
\begin_layout Standard
\lang english
English
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
% The following SJIS encoded text cannot be processed as is by latex.
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
% It needs to be preprocessed by sjisconv or sjislatex needs to be used.
\end_layout
\begin_layout Plain Layout
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
% See the documentation of CJK.sty for details.
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\lang japanese-cjk
Shift_JIS 日本語の文章
\end_layout
\begin_layout Standard
hello
\end_layout
\begin_layout Standard
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
begin{CJK}{JIS}{}
\end_layout
\end_inset
JIS-code 
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
$
\end_layout
\end_inset
BF|K
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
\end_layout
\end_inset
8l
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
$
\end_layout
\end_inset
NJ8>O(B
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
end{CJK}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\lang korean
Korean
\end_layout
\end_body
\end_document