#!/bin/bash

# Script to convert latex to libreoffice to execute the grammar checker
# By Leandro Sehnem Heck

# Needs latex2html package
# sudo aptitude install latex2html

# get the 1st tex from folder

filename=main
texfile=${filename}.tex

latex2html ${texfile} -split 0 -no_navigation -info "" -address "" -html_version 4.0,unicode
libreoffice --headless --convert-to odt:"OpenDocument Text Flat XML" ${filename}/index.html
xdg-open index.odt &