Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a main.book.tex and a main.beamer.tex which then \input the same source files. In those source files, I have a lot of \mode<> designations and generally, a lot of beamer markup -\overlayarea's, \only<>'s, etc. My problem is that I also want to output to HTML. Now, tex4ht is generally awesome, generally plays nice with beamer and beamerarticle, and I've spend a lot of time customizing it to get it to do what I want. But, I'd like to try other conversion tools (e.g. pandoc) that can't handle beamer markup. Are there any good tools I could run my files through to remove the beamer markup? I've started writing a script to do this, but I thought maybe tex.sx already knows of such tools or has better ideas.

share|improve this question
add comment

1 Answer

No, I don't think so.

The best bet -- and probably fastest approach -- is to write some regular expression scripts that remove exactly what you want.

Candidates are sed (http://www.grymoire.com/Unix/Sed.html), Perl (perldoc.perl.org/perlre.html , perldoc.perl.org/perlretut.html), and Python (http://docs.python.org/2/library/re.html).

You can have these scripts run automatically if you incorporate calling them into an automated build system like make or SCons.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.