Reorganizing lib/dist/fmt_lyx.pl and lib/dist/linuxdoc-tools/lyx/mapping

* Move lyx header from mapping to fmt_lyx.pl
* Move tscreen code from mapping to fmt_lyx.pl
* fmt_lyx.pl: Move verbatim stuff below
* fmt_lyx.pl: new article|book|report and tscreen sections
* mapping: Cosmetic changes
parent 870695b4
......@@ -98,18 +98,40 @@ $lyx->{postASP} = sub {
my $initem;
my $intag;
my $intt;
my $tscreen;
my $lyxout = '';
my $lyxheader = "#This file was created by LinuxDoc-SGML
#(conversion : Frank Pavageau and Jose' Matos)
\\lyxformat 2.15
\\textclass linuxdoc
\\language default
\\inputencoding default
\\fontscheme default
\\graphics default
\\paperfontsize default
\\spacing single
\\papersize Default
\\use_geometry 0
\\use_amsmath 0
\\paperorientation portrait
\\secnumdepth 3
\\tocdepth 3
\\paragraph_separation indent
\\defskip medskip
\\quotes_language default
\\quotes_times 2
\\papercolumns 1
\\papersides 1
\\paperpagestyle default\n";
while( <$INFILE> ) {
next if ( /^\s*$/ );
chomp;
# Itemize; Enumerate and Description. $indent_level counts the level
if( /^\@verb\@/ ) {
$verbatim = 1;
} elsif ( /^\@\/verb\@/ ) {
$verbatim = 0;
} elsif( /^\@itemize\@/ ) { # --- Itemized list begins
if ( /^\@(article|book|report)\@/ ) {
$lyxout = $lyxheader;
} # Itemize; Enumerate and Description. $indent_level counts the level
elsif( /^\@itemize\@/ ) { # --- Itemized list begins
$indent_level++;
$level_layout[$indent_level] = "Itemize";
$lyxout .= "\\begin_deeper\n" if ($indent_level);
......@@ -150,6 +172,20 @@ $lyx->{postASP} = sub {
$lyxout .= "\\layout Description\n";
} elsif( /^\@\/tag@/ ) {
$intag = 0;
} # tscreen
elsif( /^\@tscreen\@/ ) {
$tscreen = 1;
$lyxout .= "\\begin_deeper\n";
$lyxout .= "\\layout Standard\n"
} elsif ( /^\@\/tscreen\@/ ) {
$tscreen = 0;
$lyxout .= "\\end_deeper\n";
$lyxout .= "\\layout Standard\n";
} # Verbatim
elsif( /^\@verb\@/ ) {
$verbatim = 1;
} elsif ( /^\@\/verb\@/ ) {
$verbatim = 0;
} else {
$inheading = 0 if ( /^\\layout Standard/ );
$intt = 0 if ( /^\\family default.*$/ );
......
......@@ -11,37 +11,15 @@
<qwertz> +
</qwertz> +
<article> "#This file was created by LinuxDoc-SGML\n"
"#(conversion : Frank Pavageau and Jose' Matos)\n"
"\\lyxformat 2.15\n"
"\\textclass linuxdoc\n"
"\\language default\n"
"\\inputencoding default\n"
"\\fontscheme default\n"
"\\graphics default\n"
"\\paperfontsize default\n"
"\\spacing single\n"
"\\papersize Default\n"
"\\use_geometry 0\n"
"\\use_amsmath 0\n"
"\\paperorientation portrait\n"
"\\secnumdepth 3\n"
"\\tocdepth 3\n"
"\\paragraph_separation indent\n"
"\\defskip medskip\n"
"\\quotes_language default\n"
"\\quotes_times 2\n"
"\\papercolumns 1\n"
"\\papersides 1\n"
"\\paperpagestyle default\n\n" +
<article> + "@article@" +
</article> + "\\the_end"
<report>
</report>
<report> + "@report@" +
</report> + "\\the_end"
<book>
</book>
<book> + "@book@" +
</book> + "\\the_end"
<notes>
</notes>
......@@ -59,7 +37,7 @@
<subtitle> +
</subtitle> +
<author> + "\\layout Author\n"
<author> + "\\layout Author" +
</author> +
<name>
......@@ -68,10 +46,10 @@
<and> " and "
</and>
<date> + "\\layout Date\n"
<date> + "\\layout Date" +
</date> +
<abstract> + "\\layout Abstract\n"
<abstract> + "\\layout Abstract" +
</abstract> +
<toc> + "\\layout Standard\n"
......@@ -79,34 +57,34 @@
"\\end_inset\n" +
</toc>
<sect> + "\\layout Section\n"
<sect> + "\\layout Section" +
</sect>
<sect1> + "\\layout Subsection\n"
<sect1> + "\\layout Subsection" +
</sect1>
<sect2> + "\\layout Subsubsection\n"
<sect2> + "\\layout Subsubsection" +
</sect2>
<sect3> + "\\layout Paragraph\n"
<sect3> + "\\layout Paragraph" +
</sect3>
<sect4> + "\\layout Subparagraph\n"
<sect4> + "\\layout Subparagraph" +
</sect4>
<heading>
</heading>
<p> + "\\layout Standard\n"
<p> + "\\layout Standard" +
</p> + "\n"
<itemize> "@itemize@\n" +
</itemize> + "@/itemize@\n"
</itemize> + "@/itemize@" +
<enum> "@enumerate@\n" +
</enum> + "@/enumerate@\n"
</enum> + "@/enumerate@" +
<item> + "@item@\n"
<item> + "@item@" +
</item> + "\n" +
<descrip> + "@descrip@\n" +
......@@ -137,13 +115,10 @@
</code>
<verb> + "@verb@\n" +
</verb> + "@/verb@\n"
</verb> + "@/verb@" +
<tscreen> + "\\begin_deeper\n"
"\\layout Standard\n"
</tscreen> + "\\end_deeper\n"
"\\layout Standard\n"
<tscreen> + "@tscreen@" +
</tscreen> + "@/tscreen@" +
<quote> + "\\layout Quote\n" +
</quote>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment