Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lettravox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
test
lettravox
Commits
a463bc4e
Commit
a463bc4e
authored
May 30, 2015
by
Jocelyn Delalande
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
latex2html changed some default behaviour, adapt to it.
parent
0e0c80e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
texte/Documents/latex/utils.py
texte/Documents/latex/utils.py
+4
-4
No files found.
texte/Documents/latex/utils.py
View file @
a463bc4e
...
...
@@ -79,18 +79,18 @@ def latex2html(texpath):
""" Lance l'utilitaire latex2html sur le fichier situé au chemin
indiqué par texpath
"""
x
=
subprocess
.
Popen
(
"latex2html -html_version 4.0,unicode -split 4 -no_navigation -no_subdir -no_footnode -info 0
%
s"
%
texpath
,
x
=
subprocess
.
Popen
(
"latex2html -html_version 4.0,unicode -split 4 -no_navigation -no_subdir -no_footnode -info 0
-lcase_tags
%
s"
%
texpath
,
shell
=
True
,
stderr
=
dev_null
(),
stdout
=
dev_null
())
return
x
.
wait
()
def
strip
(
soap
):
"""
Vire d'un fichier html produit par latex2html tout ce qui est
inutile à savoir le head et le pied de page. le résultat retourné
est destiné à être inclus dans une page xhtml pré-existante.
est destiné à être inclus dans une page xhtml pré-existante.
"""
keep_body
=
re
.
compile
(
r"<body
>(.*)<hr />\s*<address>"
,
re
.
DOTALL
)
keep_body
=
re
.
compile
(
r"<body
\s*>(.*)<hr ?/?>\s*<address>"
,
re
.
DOTALL
|
re
.
MULTILINE
)
snippet
=
keep_body
.
search
(
soap
)
.
group
(
1
)
return
snippet
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment