]> git.lyx.org Git - features.git/commitdiff
Increase tex2lyx output format to 310.
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 19 Dec 2010 19:29:07 +0000 (19:29 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 19 Dec 2010 19:29:07 +0000 (19:29 +0000)
299-302: Nothing to do (empty lyx2lyx conversion)
303:     Nothing to do (tex2lyx did not use the serbocroation language)
304:     Convert framed and greyed out notes to box insets
305-310: Nothing to do (empty lyx2lyx conversion)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36947 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/test/box-color-size-space-align.tex
src/tex2lyx/tex2lyx.h
src/tex2lyx/text.cpp

index 03752d44134e1a6d88c449c53325aa3195da5b31..17bdf06e04d982e70260f4a2234ac2c8809499d7 100644 (file)
@@ -1,3 +1,5 @@
+%% LyX trick_preamble_code_into_believing_that_this_was_created_by_lyx created this file.  For more info, see http://www.lyx.org/.
+%% Do not edit unless you really know what you are doing.
 \documentclass[b4paper,twoside, twocolumn,12pt]{article}
 
 \usepackage[T1]{fontenc}
 
 \usepackage{amsmath}
 \usepackage{color}
+\definecolor{note_fontcolor}{rgb}{0, 0, 1}
+\definecolor{shadecolor}{rgb}{1, 0, 0}
+\usepackage{framed}
 
 \setlength{\parskip}{3mm}
 \setlength{\parindent}{0sp}
 \usepackage{setspace}
 \setstretch{1.2}
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
+
+%% The greyedout annotation environment
+\newenvironment{lyxgreyedout}{\textcolor{note_fontcolor}\bgroup}{\egroup}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
+
 \setlength{\fboxsep}{3mm}
 
 \definecolor{darkgreen}{cmyk}{0.5, 0, 1, 0.5}
@@ -105,6 +117,15 @@ Dies ist ein Beispieltext.
 
 $\boxed{\int A=B}$
 
+\subsection{LyX Boxes}
+
+\begin{lyxgreyedout}
+\textbf{Note:} Not all DVI-viewers are able to display rotations.
+\end{lyxgreyedout}
+
+\begin{shaded}%
+Shaded background box\end{shaded}
+
 \section{Colors}
 
 \subsection{Predefined Colors}
index 5a55db0305516a4b93f3f7fc801118bec6420699..7af46e40a96939af4a66719b01fa9ed5e2ba7e88 100644 (file)
@@ -114,7 +114,7 @@ extern CommandMap known_math_environments;
 ///
 extern bool noweb_mode;
 /// LyX format that is created by tex2lyx
-int const LYX_FORMAT = 298;
+int const LYX_FORMAT = 310;
 
 /// path of the master .tex file
 extern std::string getMasterFilePath();
index 56ed6442b8487aaa16c5cd77ea12a7df03ed1574..46d4b127fa5bb833640703d61ab6e77a7e1f2d22 100644 (file)
@@ -817,21 +817,22 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                p.skip_spaces();
        }
 
-       else if (name == "framed") {
+       else if (name == "framed" || name == "shaded") {
                eat_whitespace(p, os, parent_context, false);
                parent_context.check_layout(os);
-               begin_inset(os, "Note Framed\n");
-               os << "status open\n";
-               parse_text_in_inset(p, os, FLAG_END, outer, parent_context);
-               end_inset(os);
-               p.skip_spaces();
-       }
-
-       else if (name == "shaded") {
-               eat_whitespace(p, os, parent_context, false);
-               parent_context.check_layout(os);
-               begin_inset(os, "Note Shaded\n");
-               os << "status open\n";
+               if (name == "framed")
+                       begin_inset(os, "Box Framed\n");
+               else
+                       begin_inset(os, "Box Shaded\n");
+               os << "position \"t\"\n"
+                     "hor_pos \"c\"\n"
+                     "has_inner_box 0\n"
+                     "inner_pos \"t\"\n"
+                     "width \"100col%\"\n"
+                     "special \"none\"\n"
+                     "height \"1in\"\n"
+                     "height_special \"totalheight\"\n"
+                     "status open\n";
                parse_text_in_inset(p, os, FLAG_END, outer, parent_context);
                end_inset(os);
                p.skip_spaces();