Increase tex2lyx output format to 310.

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
This commit is contained in:
Georg Baum 2010-12-19 19:29:07 +00:00
parent 2d5e1123d1
commit d1be0d2af7
3 changed files with 36 additions and 14 deletions

View 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}
@ -8,12 +10,22 @@
\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}

View 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();

View 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();