Re: Opzioni ad una nuova classe

#39273
Up
0
Down
::


Ciao a tutti,
Risollevo questo topic che avevo creato tempo fa e che avevo lasciato in quanto tutto funzionava. Se non che oggi, dopo un po’ di tempo che non facevo presentazioni con questa classe, mi trovo che non funziona più…`\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{colorbeamer}[2009/11/15 v0.1 Mirko's version of Beamer]

\DeclareOption{red}{\def\colorbeamer@color{red}\chardef\colorbeamer@colnumber\z@}
\DeclareOption{green}{\def\colorbeamer@color{green}\chardef\colorbeamer@colnumber\@ne}
\DeclareOption{blue}{\def\colorbeamer@color{blue}\chardef\colorbeamer@colnumber\tw@}

\DeclareOption{bibbook}{\def\colorbeamer@bib{book}\chardef\colorbeamer@bibnumber\z@}
\DeclareOption{bibart}{\def\colorbeamer@bib{art}\chardef\colorbeamer@bibnumber\@ne}

\PassOptionsToPackage{svgnames}{xcolor}
\PassOptionsToClass{hyperref={pdfpagelabels=false}}{beamer}

\ExecuteOptions{green,bibart}

\ProcessOptions\relax

\LoadClassWithOptions{beamer}%[2005/06/12]

\RequirePackageWithOptions{isodate}
\RequirePackageWithOptions{graphicx}
\hypersetup{colorlinks=false}

%Layout

\renewcommand{\fontsubfuzz}{1pt}

\usetheme{Warsaw}
\beamertemplatenumberedballsectiontoc
%\usecolortheme[rgb={.5,0,0}]{structure}

\useoutertheme{split}
\usefonttheme{default}

\ifcase\colorbeamer@colnumber
%Rosso
\usecolortheme[rgb={.5,0,0}]{structure}
\or
%Verde
\usecolortheme[rgb={0,.5,0}]{structure}
\or
%Blu
\usecolortheme[rgb={0,0,.5}]{structure}
\else
\PackageWarning{colorbeamer}{Unknown color, switching to default}
\usecolortheme[rgb={0,.5,0}]{structure}
\fi

\ifcase\colorbeamer@bibnumber
%Book
\setbeamertemplate{bibliography item}[book]
\or
%Article
\setbeamertemplate{bibliography item}[article]
\else
\PackageWarning{colorbeamer}{Unknown bibliography style, switching to default}
\setbeamertemplate{bibliography item}[article]
\fi`Ora, se io chiamo:`\documentclass[green,italian]{colorbeamer}`tutto funziona a meraviglia, mentre se provo `\documentclass[red,italian]{colorbeamer}`ottengo errori che vi riporto:

! Package isodate Error: Isodate definition file red.idf not found.

See the isodate package documentation for explanation.
Type H for immediate help.

l.79 \ProcessOptions*

Maybe you misspelled the language option?

\c@iso@tmpmonth=\count152
\c@iso@yeartwo=\count153
\c@iso@slash=\count154
\c@iso@minus=\count155
\c@iso@dot=\count156
\c@iso@@slash=\count157
\c@iso@@minus=\count158
\c@iso@@dot=\count159
) (c:/texlive/2009/texmf-dist/tex/latex/guitlogo/guit.sty
Package: guit 2009/07/31 v0.9.1 Logo del GuIT

(c:/texlive/2009/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2008/08/13 v2.6a package option processing (HA)

(c:/texlive/2009/texmf-dist/tex/generic/xkeyval/xkeyval.tex
\XKV@toks=\toks38
\XKV@tempa@toks=\toks39
\XKV@depth=\count160
File: xkeyval.tex 2008/08/13 v2.6a key=value parser (HA)
))
(c:/texlive/2009/texmf-dist/tex/latex/guitlogo/guit.cfg
File: guit.cfg 2009/07/31 v0.9.1 File di configurazione di guit.sty
))
Package hyperref Info: Option `colorlinks’ set `false’ on input line 25.

(c:/texlive/2009/texmf-dist/tex/latex/beamer/themes/theme/beamerthemeWarsaw.sty
Package: beamerthemeWarsaw 2007/01/28 (rcs-revision 1.9)

(c:/texlive/2009/texmf-dist/tex/latex/beamer/themes/inner/beamerinnerthemeround
ed.sty
Package: beamerinnerthemerounded 2007/01/28 (rcs-revision 1.5)
)
(c:/texlive/2009/texmf-dist/tex/latex/beamer/themes/outer/beamerouterthemeshado
w.sty
Package: beamerouterthemeshadow 2007/01/28 (rcs-revision 1.9)

(c:/texlive/2009/texmf-dist/tex/latex/beamer/themes/outer/beamerouterthemesplit
.sty
Package: beamerouterthemesplit 2007/01/28 (rcs-revision 1.5)
))
(c:/texlive/2009/texmf-dist/tex/latex/beamer/themes/color/beamercolorthemeorchi
d.sty
Package: beamercolorthemeorchid 2007/01/28 (rcs-revision 1.3)
)
(c:/texlive/2009/texmf-dist/tex/latex/beamer/themes/color/beamercolorthemewhale
.sty
Package: beamercolorthemewhale 2007/01/28 (rcs-revision 1.4)
))

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.

l.43 \usecolortheme[rgb={.5,0,0}]{structure}

You’re in trouble here. Try typing to proceed.
If that doesn’t work, type X
to quit.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##
2##3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.43 \usecolortheme[rgb={.5,0,0}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##2##
3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.43 \usecolortheme[rgb={.5,0,0}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! Extra \else.
…,}{,rgb={0.7,0.2,0.2},}\ifin@ \else
\let \reserved@a \@secondo…
l.43 \usecolortheme[rgb={.5,0,0}]{structure}

I’m ignoring this; it doesn’t match any \if.

! LaTeX Error: Option clash for package beamercolorthemestructure.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.

l.43 \usecolortheme[rgb={.5,0,0}]{structure}

The package beamercolorthemestructure has already been loaded with options:
[rgb={0.7,0.2,0.2}]
There has now been an attempt to load it with options
[rgb={.5,0,0}]
Adding the global options:
rgb={0.7,0.2,0.2},rgb={.5,0,0}
to your \documentclass declaration may fix this.
Try typing to proceed.

! Extra \or.
l.44 \or

I’m ignoring this; it doesn’t match any \if.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##
2##3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.46 \usecolortheme[rgb={0,.5,0}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##2##
3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.46 \usecolortheme[rgb={0,.5,0}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! Extra \else.
…,}{,rgb={0.7,0.2,0.2},}\ifin@ \else
\let \reserved@a \@secondo…
l.46 \usecolortheme[rgb={0,.5,0}]{structure}

I’m ignoring this; it doesn’t match any \if.

! LaTeX Error: Option clash for package beamercolorthemestructure.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.

l.46 \usecolortheme[rgb={0,.5,0}]{structure}

The package beamercolorthemestructure has already been loaded with options:
[rgb={0.7,0.2,0.2}]
There has now been an attempt to load it with options
[rgb={0,.5,0}]
Adding the global options:
rgb={0.7,0.2,0.2},rgb={0,.5,0}
to your \documentclass declaration may fix this.
Try typing to proceed.

! Extra \fi.
\@for … \@forloop #2,\@nil ,\@nil \@@ #1{#3}\fi

l.46 \usecolortheme[rgb={0,.5,0}]{structure}

I’m ignoring this; it doesn’t match any \if.

! Extra \or.
l.47 \or

I’m ignoring this; it doesn’t match any \if.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##
2##3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.49 \usecolortheme[rgb={0,0,.5}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##2##
3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.49 \usecolortheme[rgb={0,0,.5}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! Extra \else.
…,}{,rgb={0.7,0.2,0.2},}\ifin@ \else
\let \reserved@a \@secondo…
l.49 \usecolortheme[rgb={0,0,.5}]{structure}

I’m ignoring this; it doesn’t match any \if.

! LaTeX Error: Option clash for package beamercolorthemestructure.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.

l.49 \usecolortheme[rgb={0,0,.5}]{structure}

The package beamercolorthemestructure has already been loaded with options:
[rgb={0.7,0.2,0.2}]
There has now been an attempt to load it with options
[rgb={0,0,.5}]
Adding the global options:
rgb={0.7,0.2,0.2},rgb={0,0,.5}
to your \documentclass declaration may fix this.
Try typing to proceed.

! Extra \fi.
\@for … \@forloop #2,\@nil ,\@nil \@@ #1{#3}\fi

l.49 \usecolortheme[rgb={0,0,.5}]{structure}

I’m ignoring this; it doesn’t match any \if.

! Extra \else.
l.50 \else

I’m ignoring this; it doesn’t match any \if.

Package colorbeamer Warning: Unknown color, switching to default on input line
51.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##
2##3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.52 \usecolortheme[rgb={0,.5,0}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! You can’t use `macro parameter character #’ in horizontal mode.
\in@ #1#2->\def \in@@ ##1#1##2##
3\in@@ {\ifx \in@ ##2\in@false \else \in@tru…
l.52 \usecolortheme[rgb={0,.5,0}]{structure}

Sorry, but I’m not programmed to handle this case;
I’ll just pretend that you didn’t ask for it.
If you’re in the wrong mode, you might be able to
return to the right one by typing `I}’ or `I$’ or `I\par’.

! Extra \else.
…,}{,rgb={0.7,0.2,0.2},}\ifin@ \else
\let \reserved@a \@secondo…
l.52 \usecolortheme[rgb={0,.5,0}]{structure}

I’m ignoring this; it doesn’t match any \if.

! LaTeX Error: Option clash for package beamercolorthemestructure.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.

l.52 \usecolortheme[rgb={0,.5,0}]{structure}

The package beamercolorthemestructure has already been loaded with options:
[rgb={0.7,0.2,0.2}]
There has now been an attempt to load it with options
[rgb={0,.5,0}]
Adding the global options:
rgb={0.7,0.2,0.2},rgb={0,.5,0}
to your \documentclass declaration may fix this.
Try typing to proceed.

! Extra \fi.
\@for … \@forloop #2,\@nil ,\@nil \@@ #1{#3}\fi

l.52 \usecolortheme[rgb={0,.5,0}]{structure}

I’m ignoring this; it doesn’t match any \if.

! Extra \fi.
l.53 \fi

I’m ignoring this; it doesn’t match any \if.

Quindi non riesce a gestire l’opzione per isodate e soprattutto non riesce a cambiare il colore…

Qualcuno sa aiutarmi?

Grazie a tutti,

P.s. Non è che magicamente ora non funziona; non ricordo di averlo modificato dopo l’ultimo messaggio in discussione, ma ora di fatto non va…

Go to top