LaTex: Switch from article to report/book - replacing section with chapter

1 minute read

Out Of Date Warning

This article was published on 23/09/2011, this means the content may be out of date or no longer relevant.
You should verify that the technical information in this article is still up to date before relying upon it for your own purposes.

To quickly change from a Article doc-class to a Book or Report class, one have to replace all section with chapters and so on. Using sed helps:

find | grep tex$ | xargs sed -i 's/\\section{/\\chapter{/'
find | grep tex$ | xargs sed -i 's/subsection/section/'

Reposted from