Home > Downloads, cmd-lines, linux, studying/job/career > LaTeX: Filesplitter/merger

LaTeX: Filesplitter/merger

2 Bash-Skripte von mir:

LaTeX-File-Splitter: Splitted mir ein oder mehrere Latex-Files in die entsprechenden Chapters/sections/subsections auf, und generiert die entsprechenden Inputstatements. Ich habe dieses Skript infolge einer Arbeit bei Prof.R. Hiptmair (ETH Zürich geschrieben, um sein 20′000 Zeilen Latex-File aufzusplitten.

Das Skript ist gut dokumentiert (inklusive Hilfe-Aufruf) und steht unter GPL.

LaTeX-File-Merger: Dieses Script mergt die von texsplit.sh gesplitteten files wieder zusammen.

Auch dieses steht unter GPL.

Hier ist der Hilfe Text von texsplit.sh:

Usage: texsplit.sh [-h] [--help] [[file2.tex] file3.tex … ]
Wildcards can be used for multiple files
the splitting Argument may be:

-c for chapter
-s for section
-ss for subsection

Description:

Splits file.tex according the splitting Argument
To split a file completely into its chapters then in its sections and
then in its subsection, type:
(I’m assuming, that there is only one
tex-file in the current directory. If that’s not the case, please copy your tex-file in a seperate directory

texsplit.sh -c file.tex
texsplit.sh -s *.tex
texsplit.sh -ss *.tex

a backup file ‘name.tex.backup’ is generated for each splitted file

Depends on:

grep, read, sed, cut, tail, head and basic bash-operations

the scripts assumes that a chapter/section/subsection entry in the latex file looks like this:

\chapter{the title}
or
\chapter*{the title}

on a single line

Special Characters are not allowed in the text for the title
what means: no math-environement in the title

It is also assumed, that there is no section outside of a chapter
or a subsection outside of a section etc.

Author: Martin Knoller Stocker [mjava@gmx.net]
bugreport to mjava@gmx.net

martin Downloads, cmd-lines, linux, studying/job/career

  1. Bisher keine Kommentare
  1. Bisher keine Trackbacks
Du musst Dich anmelden um einen Kommentar zu schreiben