tex2lyx: support for IPA environment

This commit is contained in:
Uwe Stöhr 2013-02-17 22:39:56 +01:00
parent c129ac715d
commit c27976d372
4 changed files with 260 additions and 3 deletions

View File

@ -51,7 +51,6 @@ Format LaTeX feature LyX feature
407 vertical offset for multirows InsetTabular 407 vertical offset for multirows InsetTabular
411 support for polyglossia \language_package (the cases of no package, of babel and of custom package is supported) 411 support for polyglossia \language_package (the cases of no package, of babel and of custom package is supported)
415 automatic undertilde loading \use_package undertilde 415 automatic undertilde loading \use_package undertilde
427 tipa.sty \begin{IPA} InsetTIPA
438 \tone{51}, \tone{15}, \tone{45}, InsetTIPA 438 \tone{51}, \tone{15}, \tone{45}, InsetTIPA
\tone{12}, \tone{454}, \toptiebar, \tone{12}, \tone{454}, \toptiebar,
\bottomtiebar \bottomtiebar

View File

@ -5722,6 +5722,246 @@ pl]
\end_inset \end_inset
\end_layout
\begin_layout Standard
\begin_inset IPA
\begin_layout Standard
lsB!Y
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
textbottomtiebar
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
ae
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
texttoptiebar
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
ar
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
l
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
u{ö}
\end_layout
\end_inset
e
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
t{*}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
̥
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
r
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
̽
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
\begin_inset script superscript
\begin_layout Standard
j
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
H{k}
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
tone
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{
\end_layout
\end_inset
55
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
}
\end_layout
\end_inset
e
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
textglobfall
\end_layout
\end_inset
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
{}
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout \end_layout
\begin_layout Subsection \begin_layout Subsection

View File

@ -520,6 +520,13 @@ $test\vphantom{Wow\&\%}test$
\textipa{[@n Ig"zA\textcolor{red}{:m}pl]} \textipa{[@n Ig"zA\textcolor{red}{:m}pl]}
\begin{IPA}
ls\;B!Y\textbottomtiebar{ae}\texttoptiebar{ar}
l\u{ö}e\t*{ }\textsubring{r}\textovercross{\textsuperscript{j}} d\textcorner{}
\H{k} \tone{55}e\textglobfall{}
\end{IPA}
\subsection{Line breaks\sindex[breaks]{Line breaks}} \subsection{Line breaks\sindex[breaks]{Line breaks}}

View File

@ -1413,6 +1413,18 @@ void parse_environment(Parser & p, ostream & os, bool outer,
p.skip_spaces(); p.skip_spaces();
} }
else if (name == "IPA") {
eat_whitespace(p, os, parent_context, false);
parent_context.check_layout(os);
begin_inset(os, "IPA\n");
//os << "status open\n";
parse_text_in_inset(p, os, FLAG_END, outer, parent_context);
end_inset(os);
p.skip_spaces();
preamble.registerAutomaticallyLoadedPackage("tipa");
preamble.registerAutomaticallyLoadedPackage("tipx");
}
else if (name == "CJK") { else if (name == "CJK") {
// the scheme is \begin{CJK}{encoding}{mapping}text\end{CJK} // the scheme is \begin{CJK}{encoding}{mapping}text\end{CJK}
// It is impossible to decide if a CJK environment was in its own paragraph or within // It is impossible to decide if a CJK environment was in its own paragraph or within
@ -3211,8 +3223,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
else if (t.cs() == "textipa") { else if (t.cs() == "textipa") {
context.check_layout(os); context.check_layout(os);
begin_inset(os, "IPA\n"); begin_inset(os, "IPA\n");
parse_text_in_inset(p, os, FLAG_ITEM, outer, context, parse_text_in_inset(p, os, FLAG_ITEM, outer, context);
"IPA");
end_inset(os); end_inset(os);
preamble.registerAutomaticallyLoadedPackage("tipa"); preamble.registerAutomaticallyLoadedPackage("tipa");
preamble.registerAutomaticallyLoadedPackage("tipx"); preamble.registerAutomaticallyLoadedPackage("tipx");