Release 0.19

Add a new tool for fixing left/right quotes
Modified Files:
	Linux+IPv6-HOWTO.lyx runsgmlfix.sh sgmllyxtabletagfix.pl
Added Files:
	sgmllyxquotefix.pl
This commit is contained in:
pbldp 2002-01-25 23:04:44 +00:00
parent a6a655eedb
commit 7a6db5704b
4 changed files with 105 additions and 8 deletions

View File

@ -49,8 +49,8 @@ on>
<revhistory>
\layout SGML
<revision> <revnumber>Release 0.18.3</revnumber> <date>2002-01-25</date> <authorin
itials>PB</authorinitials> <revremark>See
<revision> <revnumber>Release 0.19</revnumber> <date>2002-01-25</date> <authorini
tials>PB</authorinitials> <revremark>See
\begin_inset LatexCommand \ref[revision history]{revision-history}
\end_inset
@ -380,6 +380,48 @@ SGML generation
\layout Standard
SGML is generated using export function in LyX.
\layout Standard
Also some fixes are have to be made to create proper SGML code (see also
here for the Perl programs
\begin_inset LatexCommand \url[LDP-CVS / users / Peter-Bieringer]{http://cvsview.linuxdoc.org/index.cgi/users/Peter-Bieringer/?cvsroot=Linuxdoc}
\end_inset
):
\layout Itemize
Export of LyX table does not create proper
\begin_inset Quotes sld
\end_inset
colspan
\begin_inset Quotes srd
\end_inset
tags - tool for fixing:
\begin_inset Quotes sld
\end_inset
sgmllyxtabletagfix.pl
\begin_inset Quotes srd
\end_inset
\layout Itemize
LyX sometimes uses special left/right entinities for qoutes instead the
normal one, which will still exist in generated HTML.
Some browers don't parse this very well (known: Opera 6 TP 2 or Konqueror)
- tool for fixing:
\begin_inset Quotes sld
\end_inset
sgmllyxquotefix.pl
\begin_inset Quotes srd
\end_inset
\layout Subsection
On-line references to the HTML version of this HOWTO (linking/anchors)
@ -8147,7 +8189,8 @@ Revision history
Releases 0.x
\layout Description
0.18.3 2002-01-25/PB: Add two German books
0.19 2002-01-25/PB: Add two German books, fix quote entinities in exported
SGML code
\layout Description
0.18.2 2002-01-23/PB: Add a FAQ on the program chapter

View File

@ -14,6 +14,7 @@ FILE_LYX="Linux+IPv6-HOWTO.lyx"
FILE_TMP="tmp.sgml"
PROG_FIX_TABLETAG="sgmllyxtabletagfix.pl"
PROG_FIX_QUOTE="sgmllyxquotefix.pl"
if [ "$FILE_LYX" -nt "$FILE_SGML" ]; then
echo "ERR : LyX file '$FILE_LYX' is newer than SGML file '$FILE_SGML' - forgot to export?"
@ -31,7 +32,7 @@ if [ -f "$FILE_TMP" ]; then
fi
echo "INF : Fix SGML now"
cat "$FILE_SGML" | ./$PROG_FIX_TABLETAG >$FILE_TMP
cat "$FILE_SGML" | ./$PROG_FIX_TABLETAG | ./$PROG_FIX_QUOTE >$FILE_TMP
echo "INF : Remove old SGML file '$FILE_SGML'"
rm "$FILE_SGML"

View File

@ -0,0 +1,47 @@
#!/usr/bin/perl
#
# $Id$
#
# SGML LyX qoute entinity fix tool
#
# (P) & (C) 2002 by Peter Bieringer <pb@bieringer.de>
#
# Published under the GNU GPL licence
#
# Takes SGML output exported by LyX and fix a bug regarding quote entinities
# Don't know the reason what causes this, but it is wrong.
#
# Replaces:
# &ldquo; -> &quot;
# &rdquo; -> &quot;
#
# Changes:
# 20020125: Initial release
#
# Known bugs:
# Entinity must be in one line
print STDERR "INF : Replacing special quotes entinities\n";
while (<STDIN>) {
my $line = $_;
chomp $line;
#print "$line";
#print "\n";
if ($line =~ /&ldquo;/) {
print STDERR "<";
# Substitute
$line =~ s/&ldquo;/&quot;/g;
};
if ($line =~ /&rdquo;/) {
print STDERR ">";
# Substitute
$line =~ s/&rdquo;/&quot;/g;
};
print $line . "\n";
};
print STDERR "finished\n";

View File

@ -16,9 +16,12 @@
# + <colspec colname="col0" align="center">
#
# Changes:
# 20020119: Initial release
# 20020119/PB: Initial release
# 20020125/PB: Minor review
#
print STDERR "INF : Fix 'colspec' lines\n";
while (<STDIN>) {
my $line = $_;
chomp $line;
@ -27,11 +30,14 @@ while (<STDIN>) {
#print "\n";
if ($line =~ /^<colspec/) {
print STDERR "INF: Find a 'colspec' line \n";
if ($line =~ /\/>$/) {
print STDERR "C";
# Substitute '/>' with '>'
$line =~ s/\/>$/>/g;
# Substitute '/>' with '>'
$line =~ s/\/>$/>/g;
};
};
print $line . "\n";
};
print STDERR "\n";