]> git.lyx.org Git - features.git/commitdiff
tex2lyx: support for the \textipa inset
authorUwe Stöhr <uwestoehr@lyx.org>
Sun, 17 Feb 2013 01:11:54 +0000 (02:11 +0100)
committerUwe Stöhr <uwestoehr@lyx.org>
Sun, 17 Feb 2013 01:11:54 +0000 (02:11 +0100)
src/tex2lyx/Preamble.cpp
src/tex2lyx/TODO.txt
src/tex2lyx/test/test-insets.lyx.lyx
src/tex2lyx/test/test-insets.tex
src/tex2lyx/text.cpp

index 82135a8621d7db71741c74ebbe49ff93d24b192c..b643c90b13fe96af4cd34fbfe4cc285c1fc61c8b 100644 (file)
@@ -131,8 +131,8 @@ const char * const known_roman_fonts[] = { "ae", "beraserif", "bookman",
 const char * const known_sans_fonts[] = { "avant", "berasans", "biolinum-type1",
 "cmbr", "cmss", "helvet", "kurier", "kurierl", "lmss", "tgadventor", "tgheros", 0};
 
-const char * const known_kurier_fonts[] = { "kurier", "kurierl", "kurier-condensed",
-"kurier-light-condensed", 0};
+const char * const known_kurier_fonts[] = { "kurier", "kurierl",
+"kurier-condensed", "kurier-light-condensed", 0};
 
 const char * const known_typewriter_fonts[] = { "beramono", "cmtl", "cmtt",
 "courier", "lmtt", "luximono", "fourier", "lmodern", "mathpazo", "mathptmx",
@@ -164,8 +164,8 @@ const char * const known_if_commands[] = {"if", "ifarydshln", "ifbraket",
 const char * const known_basic_colors[] = {"blue", "black", "cyan", "green",
 "magenta", "red", "white", "yellow", 0};
 
-const char * const known_basic_color_codes[] = {"#0000ff", "#000000", "#00ffff", "#00ff00",
-"#ff00ff", "#ff0000", "#ffffff", "#ffff00", 0};
+const char * const known_basic_color_codes[] = {"#0000ff", "#000000", "#00ffff",
+"#00ff00", "#ff00ff", "#ff0000", "#ffffff", "#ffff00", 0};
 
 /// conditional commands with three arguments like \@ifundefined{}{}{}
 const char * const known_if_3arg_commands[] = {"@ifundefined", "IfFileExists",
@@ -179,11 +179,11 @@ const char * const known_xetex_packages[] = {"arabxetex", "fixlatvian",
 
 /// packages that are automatically skipped if loaded by LyX
 const char * const known_lyx_packages[] = {"amsbsy", "amsmath", "amssymb",
-"amstext", "amsthm", "array", "babel", "booktabs", "calc", "CJK", "color", "float",
-"fontspec", "graphicx", "hhline", "ifthen", "longtable", "makeidx", "multirow",
-"nomencl", "pdfpages", "rotating", "rotfloat", "splitidx", "setspace",
-"subscript", "textcomp", "ulem", "url", "varioref", "verbatim", "wrapfig",
-"xunicode", 0};
+"amstext", "amsthm", "array", "babel", "booktabs", "calc", "CJK", "color",
+"float", "fontspec", "graphicx", "hhline", "ifthen", "longtable", "makeidx",
+"multirow", "nomencl", "pdfpages", "rotating", "rotfloat", "splitidx",
+"setspace", "subscript", "textcomp", "tipa", "tipx", "ulem", "url", "varioref",
+"verbatim", "wrapfig", "xunicode", 0};
 
 // codes used to remove packages that are loaded automatically by LyX.
 // Syntax: package_beg_sep<name>package_mid_sep<package loading code>package_end_sep
index 0301bd63012b41e82f38dd7926e5867b482805da..298560825091a877768f386289445b1ed2733ad8 100644 (file)
@@ -55,7 +55,7 @@ Format LaTeX feature                        LyX feature
 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)
 415    automatic undertilde loading         \use_package undertilde
-427    tipa.sty \begin{IPA}, \textipa       InsetTIPA
+427    tipa.sty \begin{IPA}                 InsetTIPA
 438    \tone{51}, \tone{15}, \tone{45},     InsetTIPA
        \tone{12}, \tone{454}, \toptiebar,
        \bottomtiebar
index a1d923641252571609b788c6cc453cfccb96d831..bfc85c3353f23b7d1539ae54e171e4ec011bc541 100644 (file)
@@ -5680,6 +5680,40 @@ test\phantom{\textcolor{green}{W}\mathbf{ow}\textsuperscript{Wow}}test
 \end_inset
 
 
+\end_layout
+
+\begin_layout Subsection
+TIPA
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+[@n Iɡ"zA:mpl]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\begin_inset IPA
+
+\begin_layout Standard
+[@n Ig"zA
+\color red
+:m
+\color inherit
+pl]
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Subsection
index 95bfebdd5e1cbd317757e062b3827b95a10420bc..ff2251a96cb88a9d05e5a67a5acc61e6f0af393b 100644 (file)
@@ -512,6 +512,13 @@ test\phantom{\textcolor{green}{W}\mathbf{ow}\textsuperscript{Wow}}test
 $test\vphantom{Wow\&\%}test$
 
 
+\subsection{TIPA}
+
+\textipa{[@n I\textscriptg "zA:mpl]}
+
+\textipa{[@n Ig"zA\textcolor{red}{:m}pl]}
+
+
 \subsection{Line breaks\sindex[breaks]{Line breaks}}
 
 They can also or be broken by a newline\\
index 2bf2c5aef4422e00497ce45345af83bb664f640f..4908e882628f1cae788bc42da903b9341a40572f 100644 (file)
@@ -3208,6 +3208,16 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        }
                }
 
+               else if (t.cs() == "textipa") {
+                       context.check_layout(os);
+                       begin_inset(os, "IPA\n");
+                       parse_text_in_inset(p, os, FLAG_ITEM, outer, context,
+                                           "IPA");
+                       end_inset(os);
+                       preamble.registerAutomaticallyLoadedPackage("tipa");
+                       preamble.registerAutomaticallyLoadedPackage("tipx");
+               }
+
                else if (t.cs() == "phantom" || t.cs() == "hphantom" ||
                             t.cs() == "vphantom") {
                        context.check_layout(os);