This plugin provides a mechanism to generate a pdf file out of an predefinied tex template. The user can create an own site the input all the information (e.g. name), which going to be transfered to the document or just let this plugin generate one.
Anyway the following points are important to produce a fully functional pdf file
All templates have to be situated into the TWiki template directory.
you should insert these 2 packages \usepackage{amssymb,amsmath} , if you want to use all functionality
Example
The following tex file:
\documentclass[a4paper,12pt]{report}
\usepackage[ansinew]{inputenc}
\usepackage{amssymb,amsmath}
\pagestyle{empty}
\begin{document}\hspace*{-5mm}
\hspace*{-2mm}\begin{normalsize}\textbf{\underline{Internship Application}}\end{normalsize}\vspace{4mm}\\
NAME (last, first, middle):%NAME (max 30)#t%
\\CURRENT ADDRESS:%Current Address (max 80)#ta%
\\GENDER: \hspace*{5mm} %Gender#r:option=masculine,feminine:distance=5%
\\COUNTRY OF CITIZENSHIP:%Country of Citizenship#o:option=China, England, France, Germany, Japan, ...%
\\%IS STUDENT#c%
\\...
\end{document}
and the input
leads to
Syntax Rules
The user can use the GenApplication module to generate only the pdf output or provide the information for the automatic input form generation within the tex template.
Syntax to generate the pdf (only)
You have to specify a form and insert a button, which calls the method /bin/view/genapplication. Some parameters, which can be submitted via hidden fields are necessary as well.
The complete form should look like this:
The WEBNAME and FAVCONTENTSTORETOPIC should be defined as in the global settings below and the TEMPLATENAME should at least contains the username (e.g. RolfSabschContent).
To create a new field for the data, typed by the user you just have to insert
%_NAME_(_STRING_ _LENGTH_)%
into the tex template. If no LENGTH is specified, the module take 50 letters to limit the input.
Syntax to generate an input form
If you wish to insert this plugin into a TWiki side, you have to add
%GENAPPLICATION% or
%GENAPPLICATION{_TEMPLATENAME_}%.
The second one specifies a template, which is going to be extracted in this place. Otherwise a box occurs, which contains all the templates, defined below. After choosing one, the input gets extracted the same way as submitting (using an URL parameter) the template via the second method.
The next part deals with the syntax of the particular input components (textbox, textarea, combobox, checkbox and radiobutton). The common part of one component definition looks like
%_NAME_(_STRING_ _LENGTH_)#_TYPE__POSITION IN ORDER_:_OPTION1_:_OPTION1_:_OPTION1_...%
, where NAME specifies the naming of this component. The optional text between the brackets determines the amount of letters, which can be typed in. The string after the # symbol tells the system which input component should be used and the also optional ORDER determines its position within the generated input form. The OPTIONS could be any html attribute (e.g. size=10).
The following enumeration listed all available type and give some extra information on certain, non common OPTION definitions.
textbox: t
there is no special option value
%Name (max 30)#t1% leads to Name (max 30):
textarea: ta
there is no special option value
%Process Description (max 150)#ta% leads to Process Description:
combobox (optionbox), o
%Gender#o:option=masculine,feminine% leads to Gender:
the value after option specifies all the available entries in the combobox
checkbox c
there is no special option value
%Has car#c% leads to Has car:
when the checkbox gets created, a hidden field is generated to insert a empty box within the latex document, when this component is unchecked
radiobutton r
This component generated checked and empty boxes within the produced pdf file
%Has Childrens#r:option=yes,no:selectnr=1:distance=10% leads to Has Childrens: yesno
the value after option specifies all the available radiobox options
the optional value selectnr =1 specifies the element, which is checked on loading (zero indicates the first element)
and _distance_= 10 gets expanded to \hspace{10mm} to determine to distance between the boxes within the generated pdf file
Management of the favorites
This feature is available when this plugin generates the input form out of the tex file and a user is logged in. The form then includes a checkbox in front of every textbox and textarea. By pressing the generate button, all information, which belongs to a checked box gets stored into a site (customized by the global settings below).
To set up a newline you have use §n symbol.
An entry which contains one element looks like:
NAME: VALUE
The NAME also contains all brackets and the specified limit of the according text component.
When several values are stored the enumeration gets expanded to:
NAME
VALUE1
VALUE2
At the bottom of the site, which contains the favorites is also a restriction added, which limited the read and write access to the Administrator and the currently logged in user.
<!-- Only for the authorized people
* Set ALLOWTOPIC CHANGE = Main.TWikiAdminGroup, Main.RolfSabsch
* Set ALLOWTOPIC VIEW = Main.TWikiAdminGroup, Main.RolfSabsch
-->
Set SHORTDESCRIPTION = Allows to generate a pdf Document out of a predefined tex file.
Used to restrict the used characters in the names of all variables :
Set ALLOWEDLETTERSINNAMES = \w|\s|\"|\.|,
Used to restrict the used characters in the options of all variables :
Set ALLOWEDLETTERSINOPTIONS= \w|#|:|=|\s|\"|,|\(|\)|\."
Specifies all available templates :
Set TEMPLATES= Urlaubsantrag, Internship, test
In which topic should all user data be stored (%u = user name, %a application name)
Set FAVTOPIC = %uContent
The header of the generated document (%a application name, %f location of the favorits)
Set HEADER = ---++ Form zur Eingabe der Daten für das %a Dokument\nIm Folgenden kann die Checkbox () dazu benutzt werden, die Eingaben zu den %f hinzuzufügen. Die volle Funktionalität steht dabei nur eingeloggten Benutzern zur Verfügung.\n \n
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
Download the ZIP file from the Plugin web (see below)
Unzip GenApplicationPlugin.zip in your twiki installation directory. Content: