The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit ec09560cb8ea5b5ea7cccf8b05eba72fa0110c63
Author: Uwe Stöhr <[email protected]>
Date:   Sun Feb 17 02:11:54 2013 +0100

    tex2lyx: support for the \textipa inset

diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp
index 82135a8..b643c90 100644
--- a/src/tex2lyx/Preamble.cpp
+++ b/src/tex2lyx/Preamble.cpp
@@ -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
diff --git a/src/tex2lyx/TODO.txt b/src/tex2lyx/TODO.txt
index 0301bd6..2985608 100644
--- a/src/tex2lyx/TODO.txt
+++ b/src/tex2lyx/TODO.txt
@@ -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
diff --git a/src/tex2lyx/test/test-insets.lyx.lyx 
b/src/tex2lyx/test/test-insets.lyx.lyx
index a1d9236..bfc85c3 100644
--- a/src/tex2lyx/test/test-insets.lyx.lyx
+++ b/src/tex2lyx/test/test-insets.lyx.lyx
@@ -5683,6 +5683,40 @@ 
test\phantom{\textcolor{green}{W}\mathbf{ow}\textsuperscript{Wow}}test
 \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
 Line breaks
 \begin_inset Index breaks
 status collapsed
diff --git a/src/tex2lyx/test/test-insets.tex b/src/tex2lyx/test/test-insets.tex
index 95bfebd..ff2251a 100644
--- a/src/tex2lyx/test/test-insets.tex
+++ b/src/tex2lyx/test/test-insets.tex
@@ -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\\
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 2bf2c5a..4908e88 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -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);

-----------------------------------------------------------------------

Summary of changes:
 src/tex2lyx/Preamble.cpp             |   18 +++++++++---------
 src/tex2lyx/TODO.txt                 |    2 +-
 src/tex2lyx/test/test-insets.lyx.lyx |   34 ++++++++++++++++++++++++++++++++++
 src/tex2lyx/test/test-insets.tex     |    7 +++++++
 src/tex2lyx/text.cpp                 |   10 ++++++++++
 5 files changed, 61 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to