PREAMBLE The program is uncomplete (but work) The program is more a Bash exercize then a application GOAL Create a template system to produce multi-format/multi-language documents from a single content file. As test the template system is used to produce a curriculum vitae. IDEA The basic idea behind this program is the possibility to have three type of files: - an infrastructural template (one for each format) - a user-independent multi-language content template file - a user-dependent multi-language content file and combine them to produce all the output matrix [ formats X languages ] using a single file as content description with all the languages inside. USAGE - copy cv_exa_mple.data to cv__.data - edit it to describe your curriculum - run ./populate.sh cv__ - at the end you will find cv__.tex cv___eng.tex cv__.htm cv___eng.htm SUPPORTED FILE FORMATS Currently html and latex are supported. SUPPORTED LANGUAGES populate.sh havn't limitation but the europecv module (included in the texlive-latex-extra package) have some language limitation. CHAR-SET SUPPORT UTF-8 is the only supported charset. FILE FORMAT Simple tag Definition: "#T_#" Description: Each simple tag will be substitute by the content of T_ variable for the main language and of T__ for the others languages; if the T__ is not defined the program fault-back to the T_ var. Row block Definition: "##T_:start## ... ##T_:stop##" Description: Each block will be replaced by N occurences of itself with valorized tags (see below for the policy to define N) Indexed row tag Definition: (start of a block) ... "#T__X#" ... (stop of a block) Description: Each indexed row tag is substitute with the T___1 variable in the first line, with the T___2 variable in the second and so on. The number of blocks row (N) is defined by the index of the variable associated with the first indexed row tag in the alphabetical order (in the group of index row tags of the current block). Simple row tag Definition: (start of a block) ... "#T_#" ... (stop of a block) Description: Each simple row tag is substitute with the T__ variable for each line of the block. Recursive tag Definition: ..[#T_[#T_]]#T_#[#[#]].. Description: If a tag substitution produce a new tag this tag will be substitute with the relate var value. Recursive tags can be found in or out blocks. CONTENT FORMAT further then normal content you can use XML-like tags to specify minimal text attributes: ... to set bold ... to set italic ... to set underline ... to set a text as url REQUIREMENTS Packages: latex pdflatex texlive-latex-extra UPGRADE YOUR .data FILE to add entries to your document you can use something like: for i in 3 2 1; do n=$((i + 1)) ; sed -i "s/\(^T_ESPROF_[^_]\+\)_${i}\([=_]\)/\1_${n}\2/g" cv_matteo_nastasi.data ; done