einige html-Unschoenheiten werden bereinigt
This commit is contained in:
parent
0db47ee6e3
commit
f12f45ad16
2 changed files with 17 additions and 5 deletions
|
@ -97,7 +97,7 @@ $(TEX_FILES): $(LYX_FILES)
|
|||
|
||||
|
||||
# original html-files, as they are created by lyx
|
||||
$(EXPORT_DIRS): $(TEX_FILES) $(INC_FILES) footer.asc
|
||||
$(EXPORT_DIRS): $(TEX_FILES) $(INC_FILES) footer.asc mod_html_files.py
|
||||
-test -d "$@" && rm -rf "$@"
|
||||
mkdir -p "$@"
|
||||
latex2html $(LATEX2HTML_OPTS) -dir "$@" $(dir $@)/$(patsubst export-%,%.tex,$(notdir $@))
|
||||
|
|
|
@ -33,7 +33,7 @@ try:
|
|||
# zu_manipulierende_variable=string.replace(zu_manipulierende_variable,alter_string,neuer_string)
|
||||
|
||||
# recently switched to latex2html, now cutting of headers
|
||||
# dieser abschnitt muss ueberarbeitet werden!
|
||||
# TODO: dieser abschnitt muss ueberarbeitet werden!
|
||||
startoffset=string.find(content,"<HR>\n<ADDRESS>")
|
||||
endoffset=string.find(content,"</ADDRESS>",startoffset)+len("</ADDRESS>")
|
||||
if (startoffset >10) and (endoffset>startoffset):
|
||||
|
@ -51,11 +51,11 @@ try:
|
|||
startoffset=string.find(content,'<DIV CLASS="author_info"')
|
||||
endoffset=string.find(content,"</STRONG>",startoffset)+len("</STRONG>")
|
||||
if (startoffset >10) and (endoffset>startoffset):
|
||||
content=string.replace(content,'<P ALIGN="CENTER">',"<P>")
|
||||
content=string.replace(content,'<P ALIGN="CENTER">',"<p>")
|
||||
content=string.replace(content,"<STRONG>","")
|
||||
content=string.replace(content,"</STRONG>","")
|
||||
|
||||
#TOC formatieren - Der Abschnitt <A NAME="SECTION00001000000000000000"> muss noch allgemeiner werden
|
||||
#TODO: TOC formatieren - Der Abschnitt <A NAME="SECTION00001000000000000000"> muss noch allgemeiner werden
|
||||
content = string.replace(content,'<BR>\n\n<H2><A NAME="SECTION00001000000000000000">\nInhalt</A>\n</H2>\n<!--Table of Contents-->','\n<div id="toc">\n<div id="toctitle">Auf dieser Seite:</div>')
|
||||
content = string.replace(content,"<!--End of Table of Contents-->","</div>")
|
||||
|
||||
|
@ -63,6 +63,18 @@ try:
|
|||
# (this avoids validation warnings)
|
||||
content = string.replace(content,'HREF="./','HREF="')
|
||||
|
||||
# die Stylesheet-Einbindung von latex2html ist nicht standardkonform
|
||||
# ein Bug-Report ging an die l2html-Mailingliste (29.12.02006)
|
||||
content = string.replace(content, '<LINK REL="STYLESHEET" HREF=', '<link rel="stylesheet" type="text/css" href=')
|
||||
|
||||
# leere Absaetze entfernen (werden durch 'rawhtml' eingefuegt)
|
||||
content = string.replace(content, '\n\n<P>\n', '\n')
|
||||
content = string.replace(content, '\n\n<P>\n', '\n')
|
||||
content = string.replace(content, '\n\n<P>\n', '\n')
|
||||
# leere Absaetze in Tabellenelementen entfernen
|
||||
content = string.replace(content, '\n<P></TD>', '\n</td>')
|
||||
|
||||
|
||||
# Fussnoten finden und Ende ersetzen
|
||||
fussnoten = string.find(content,"<BR><HR><H4>Fußnoten</H4>")
|
||||
startoffset = string.find(content,"</DL>",fussnoten)
|
||||
|
@ -99,7 +111,7 @@ try:
|
|||
writeFile(content,sys.argv[1])
|
||||
|
||||
except: #read/write/whatever failed,
|
||||
# BOESE: unklare Fehlerbehandlung
|
||||
# TODO: unklare Fehlerbehandlung
|
||||
print "an defined error occured - but i'm too lame to fix that"
|
||||
print "usage:",sys.argv[0],"<file_to_modify>"
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Reference in a new issue