I have a little problem.. I want to divide code of the document into two pieces: a style, where i could keep all of the visual attributes of the document and a file for the variables, which would generate a whole document using the provided variables.
After all the problem i have is related with the \def command. I think I'm using it wrong.
Here's what i've got:
VARIABLES FILE:
Code: Select all
\documentclass[a4paper,10pt,twoside,notitlepage,onecolumn]{cert}
\begin{document}
\pagestyle{fancy}
\fancyhead[CE,CO]{\ }
\fancyfoot[CE,CO]{\ }
\ \\ \ \\ \ \\ \ \\
\cert{John Smith|Programming|JAVA, SQL, C++|Andrew Norton|New York}
\end{document}
STYLE FILE:
usepackage's etc AND:
Code: Select all
\def\title #1{%
\begin{center}
\Huge
\textbf{
#1}
\end{center}
\normalfont
\normalsize}
\def\name #1{%
\begin{center}
\huge
\normalfont
#1
\end{center}
\normalsize}
\def\normal #1{%
\begin{center}
\Large
\normalfont
#1
\end{center}}
\def\person #1{%
\begin{center}
\Huge
\normalfont
#1
\end{center}
\normalsize}
\def\leader #1{%
\begin{flushright}
\large
\normalfont
#1
\end{flushright}
\normalsize}
\def\dateandplace #1{%
\begin{flushleft}
\large
\normalfont
#1
\end{flushleft}
\normalsize}
\def\cert {#1|#2|#3|#4|#5}{%
\title{CERTIFICATE}%
\name{Of finished course:\#1}%
\normal{For}\person{\#2}%
\normal{Contents of the course \#3}%
\leader{author: \#4}%
\dateandplace{\#5}}%
I get a lot of "You can't use `macro parameter character #' in horizontal mode \cert->##1##2##3##4##5 1.20 \cert
Also the document does not work properly: in places, where there should be my variables there is only text like #1 or #2 etc
I've searched for this kind of error for a long time and I didn't find any clues that may help.. I would appreciate any kind of help, thx in advance