Re: Campi si ma più intelligenti

#95777
franen
Partecipante
    Up
    0
    Down
    ::


    Dovresti mettere CONCORSONE nel titolo, oppure “offro cassa di birra”, forse i tempi si stringerebbero 😀
    Intanto la parte 1:
    `\begin{filecontents}{robyclass.cls}
    \NeedsTeXFormat{LaTeX2e}[2005/12/01]
    \ProvidesClass{robyclass}[2014/08/01 v. 0.1 Classe per le prove di Roberto]
    \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}
    \ProcessOptions\relax
    \LoadClass[a4paper]{book}
    \RequirePackage{etoolbox}
    \newcommand{\set}[2]{\expandafter\def\csname robitex@#1\endcsname{#2}}
    \newcommand{\get}[1]{%
    \ifcsdef{robitex@#1}%
    {\csname robitex@#1\endcsname}%
    {\ClassError{robyclass}{Attento, il comando robitex@#1 non è definito!}{}}}
    \end{filecontents}
    \documentclass{robyclass}
    \begin{document}
    \set{Prova}{Ciao!}
    \get{Prova}
    \get{prova}
    \end{document}`

    Go to top