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

23rd September 2011 – 65 words

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 notes.it-jobs-und-stellen.de