File: html2latex.sh

package info (click to toggle)
espresso 6.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 311,040 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,502; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (14 lines) | stat: -rwxr-xr-x 390 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

html=$1
tex=${1%.html}.tex

gnuhtml2latex $html

# the wiki produced html is so heavy that gnuhtml2latex fails; 
# fix the latex source

cp $tex /tmp/$tex.$$
sed 's/\\par \\\\/\\par~\\\\/g' /tmp/$tex.$$ | \
    sed 's/\\begin{description}]/\\begin{description}\\item/g' | \
    sed 's/\\begin{document}/\\begin{document}\\title{Quantum-Espresso Documentation}\\maketitle/' > $tex