Opzioni ad una nuova classe

  • Creatore
    Topic
  • #39266
    Up
    0
    Down
    ::


    Ciao a tutti, come va?
    Sto creando una nuova classe per beamer che mi permetta di avere sempre lo stesso “stile”, ma di cambiare i colori con un’opzione.

    Ecco la prima parte del codice:
    `\NeedsTeXFormat{LaTeX2e}
    \ProvidesClass{colorbeamer}[2009/11/15 v0.1 Mirko's version of Beamer]

    \ExecuteOptions{hyperref={pdfpagelabels=false},green,bibart}
    \ProcessOptions
    \RequirePackage[svgnames]{xcolor}
    \LoadClassWithOptions{beamer}%[2005/06/12]
    \RequirePackageWithOptions{graphicx}
    \hypersetup{colorlinks=false}
    \RequirePackage{xifthen}

    \newboolean{colorbeamergreen}
    \newboolean{colorbeamerblue}
    \newboolean{colorbeamerred}
    \newboolean{colorbeamerbib}

    \DeclareOption{green}{\setboolean{colorbeamergreen}{true}\setboolean{colorbeamerblue}{false}\setboolean{colorbeamerred}{false}}
    \DeclareOption{blue}{\setboolean{colorbeamergreen}{false}\setboolean{colorbeamerblue}{true}\setboolean{colorbeamerred}{false}}
    \DeclareOption{red}{\setboolean{colorbeamergreen}{false}\setboolean{colorbeamerblue}{false}\setboolean{colorbeamerred}{true}}
    \DeclareOption{bibbook}{\setboolean{colorbeamerbib}{true}}
    \DeclareOption{bibart}{\setboolean{colorbeamerbib}{false}}
    \ProcessOptions\relax
    […]
    \ifthenelse{\boolean{colorbeamerbib}}{\setbeamertemplate{bibliography item}[book]}{\setbeamertemplate{bibliography item}[article]}
    […]
    \ifthenelse{\boolean{colorbeamergreen}}{%
    \setbeamercolor[…]
    }{}
    \ifthenelse{\boolean{colorbeamerblue}}{%
    \setbeamercolor[…]
    }{}
    \ifthenelse{\boolean{colorbeamerred}}{%
    \setbeamercolor[…]
    }{}
    […]`Bene… se carico la classe con`\documentclass[italian]{colorbeamer}` con o senza le opzioni “green”, “bibart”, “bibbook” tutto fila liscio.
    Non appena provo con`\documentclass[blue,italian]{colorbeamer}`o con red, ottengo un errore di

    Missing \begin{document}

    e una serie di altri errori.

    Pobabilmente sbaglio nella definizione delle opzioni a 3 valori della classe, ma non riesco a individuare dove sia l’errore…

    Qualcuno riesce ad aiutarmi?

    Grazie e buona domenica,

Visualizzazione 9 filoni di risposte
  • Autore
    Risposte
    • #39267
      Up
      0
      Down
      ::

      Ciao a tutti, come va?
      Sto creando una nuova classe per beamer che mi permetta di avere sempre lo stesso “stile”, ma di cambiare i colori con un’opzione.

      Ecco la prima parte del codice:
      `\NeedsTeXFormat{LaTeX2e}
      \ProvidesClass{colorbeamer}[2009/11/15 v0.1 Mirko's version of Beamer]

      \ExecuteOptions{hyperref={pdfpagelabels=false},green,bibart}
      \ProcessOptions
      \RequirePackage[svgnames]{xcolor}
      \LoadClassWithOptions{beamer}%[2005/06/12]
      \RequirePackageWithOptions{graphicx}
      \hypersetup{colorlinks=false}
      \RequirePackage{xifthen}

      \newboolean{colorbeamergreen}
      \newboolean{colorbeamerblue}
      \newboolean{colorbeamerred}
      \newboolean{colorbeamerbib}

      \DeclareOption{green}{\setboolean{colorbeamergreen}{true}\setboolean{colorbeamerblue}{false}\setboolean{colorbeamerred}{false}}
      \DeclareOption{blue}{\setboolean{colorbeamergreen}{false}\setboolean{colorbeamerblue}{true}\setboolean{colorbeamerred}{false}}
      \DeclareOption{red}{\setboolean{colorbeamergreen}{false}\setboolean{colorbeamerblue}{false}\setboolean{colorbeamerred}{true}}
      \DeclareOption{bibbook}{\setboolean{colorbeamerbib}{true}}
      \DeclareOption{bibart}{\setboolean{colorbeamerbib}{false}}
      \ProcessOptions\relax
      […]
      \ifthenelse{\boolean{colorbeamerbib}}{\setbeamertemplate{bibliography item}[book]}{\setbeamertemplate{bibliography item}[article]}
      […]
      \ifthenelse{\boolean{colorbeamergreen}}{%
      \setbeamercolor[…]
      }{}
      \ifthenelse{\boolean{colorbeamerblue}}{%
      \setbeamercolor[…]
      }{}
      \ifthenelse{\boolean{colorbeamerred}}{%
      \setbeamercolor[…]
      }{}
      […]`Bene… se carico la classe con`\documentclass[italian]{colorbeamer}` con o senza le opzioni “green”, “bibart”, “bibbook” tutto fila liscio.
      Non appena provo con`\documentclass[blue,italian]{colorbeamer}`o con red, ottengo un errore di

      Missing \begin{document}

      e una serie di altri errori.

      Pobabilmente sbaglio nella definizione delle opzioni a 3 valori della classe, ma non riesco a individuare dove sia l’errore…

      Qualcuno riesce ad aiutarmi?

      Grazie e buona domenica,

      Non puoi dare due volte \ProcessOptions.

      `\NeedsTeXFormat{LaTeX2e}
      \ProvidesClass{colorbeamer}[2009/11/15 v0.1 Mirko's version of Beamer]
      \RequirePackage{xifthen}

      \newboolean{colorbeamergreen}
      \newboolean{colorbeamerblue}
      \newboolean{colorbeamerred}
      \newboolean{colorbeamerbib}

      \DeclareOption{green}{\setboolean{colorbeamergreen}{true}}
      \DeclareOption{blue}{\setboolean{colorbeamerblue}{true}%
      \setboolean{colorbeamergreen}{false}}
      \DeclareOption{red}{\setboolean{colorbeamerred}{true}%
      \setboolean{colorbeamergreen}{false}}
      \DeclareOption{bibbook}{\setboolean{colorbeamerbib}{true}}
      \DeclareOption{bibart}{\setboolean{colorbeamerbib}{false}}

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

      \ExecuteOptions{green,bibart}
      \ProcessOptions\relax

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

      \RequirePackage{graphicx}
      \hypersetup{colorlinks=false}

      `
      Non userei affatto la sintassi di xifthen per quel tipo di impostazioni (non userei \ifthenelse nemmeno sotto minaccia fisica, per la verità :)). Forse sarebbe più semplice dire
      `\DeclareOption{red}{\def\mirko@color{red}\chardef\mirko@colnumber\z@}
      \DeclareOption{green}{\def\mirko@color{green}\chardef\mirko@colnumber\@ne}
      \DeclareOption{blue}{\def\mirko@color{blue}\chardef\mirko@colnumber\tw@}`
      Per il codice successivo puoi usare \mirko@color quando hai bisogno del nome del colore; per codice diverso a seconda dei colori puoi usare \ifcase:
      `\ifcase\mirko@colnumber
      \or
      \or
      \fi`
      Molto più facile da mantenere, secondo me, e anche da estendere.

      Ciao
      Enrico

    • #39268
      Up
      0
      Down
      ::

      Non puoi dare due volte \ProcessOptions.

      `\NeedsTeXFormat{LaTeX2e}
      \ProvidesClass{colorbeamer}[2009/11/15 v0.1 Mirko's version of Beamer]
      \RequirePackage{xifthen}

      \newboolean{colorbeamergreen}
      \newboolean{colorbeamerblue}
      \newboolean{colorbeamerred}
      \newboolean{colorbeamerbib}

      \DeclareOption{green}{\setboolean{colorbeamergreen}{true}}
      \DeclareOption{blue}{\setboolean{colorbeamerblue}{true}%
      \setboolean{colorbeamergreen}{false}}
      \DeclareOption{red}{\setboolean{colorbeamerred}{true}%
      \setboolean{colorbeamergreen}{false}}
      \DeclareOption{bibbook}{\setboolean{colorbeamerbib}{true}}
      \DeclareOption{bibart}{\setboolean{colorbeamerbib}{false}}

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

      \ExecuteOptions{green,bibart}
      \ProcessOptions\relax

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

      \RequirePackage{graphicx}
      \hypersetup{colorlinks=false}

      `
      Non userei affatto la sintassi di xifthen per quel tipo di impostazioni (non userei \ifthenelse nemmeno sotto minaccia fisica, per la verità :)). Forse sarebbe più semplice dire
      `\DeclareOption{red}{\def\mirko@color{red}\chardef\mirko@colnumber\z@}
      \DeclareOption{green}{\def\mirko@color{green}\chardef\mirko@colnumber\@ne}
      \DeclareOption{blue}{\def\mirko@color{blue}\chardef\mirko@colnumber\tw@}`
      Per il codice successivo puoi usare \mirko@color quando hai bisogno del nome del colore; per codice diverso a seconda dei colori puoi usare \ifcase:
      `\ifcase\mirko@colnumber
      \or
      \or
      \fi`
      Molto più facile da mantenere, secondo me, e anche da estendere.

      Ciao
      Enrico

      Ciao Enrico,
      Grazie dei consigli, che han fatto funzionare il codice, almeno parzialmente.
      Nel senso che usando dei flag, il codice va effettivamente all’interno dei casi previsti, ma i comandi non vengono eseguiti… Riporto quello che si trova subito dopo lo stralcio di codice dei messaggi precedenti`\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      \ifcase\mirko@colnumber
      { %Rosso
      \usecolortheme[rgb={.5,0,0}]{structure}
      }\or
      { %Verde
      \usecolortheme[rgb={0,.5,0}]{structure}
      }\or
      { %Blu
      \usecolortheme[rgb={0,0,.5}]{structure}
      }\fi`Questo equivale a non dare nulla (che per la struttura del tema, è come dare il blu)… strano comportamento!
      Per flag, ho tolto i commenti a Rosso, Verde, Blu e ho visto che effettivamente scopre solo l’errore nella posizione giusta e lo scrive nel pdf.

      Il codice dentro i case, se portato fuori, funziona correttamente e fa il suo lavoro!

      Come mai?

      Grazie e buona serata,

    • #39269
      Up
      0
      Down
      ::

      Nel senso che usando dei flag, il codice va effettivamente all’interno dei casi previsti, ma i comandi non vengono eseguiti… Riporto quello che si trova subito dopo lo stralcio di codice dei messaggi precedenti`\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      \ifcase\mirko@colnumber
      { %Rosso
      \usecolortheme[rgb={.5,0,0}]{structure}
      }\or
      { %Verde
      \usecolortheme[rgb={0,.5,0}]{structure}
      }\or
      { %Blu
      \usecolortheme[rgb={0,0,.5}]{structure}
      }\fi`Questo equivale a non dare nulla (che per la struttura del tema, è come dare il blu)… strano comportamento!
      Per flag, ho tolto i commenti a Rosso, Verde, Blu e ho visto che effettivamente scopre solo l’errore nella posizione giusta e lo scrive nel pdf.

      Il codice dentro i case, se portato fuori, funziona correttamente e fa il suo lavoro!

      Come mai?

      Perché quelle graffe? Specificando il rosso sarebbe come scrivere
      `\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      {\usecolortheme[rgb={.5,0,0}]{structure}}`
      che non è certo corretto.

      Ciao
      Enrico

    • #39270
      Up
      0
      Down
      ::

      Nel senso che usando dei flag, il codice va effettivamente all’interno dei casi previsti, ma i comandi non vengono eseguiti… Riporto quello che si trova subito dopo lo stralcio di codice dei messaggi precedenti`\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      \ifcase\mirko@colnumber
      { %Rosso
      \usecolortheme[rgb={.5,0,0}]{structure}
      }\or
      { %Verde
      \usecolortheme[rgb={0,.5,0}]{structure}
      }\or
      { %Blu
      \usecolortheme[rgb={0,0,.5}]{structure}
      }\fi`Questo equivale a non dare nulla (che per la struttura del tema, è come dare il blu)… strano comportamento!
      Per flag, ho tolto i commenti a Rosso, Verde, Blu e ho visto che effettivamente scopre solo l’errore nella posizione giusta e lo scrive nel pdf.

      Il codice dentro i case, se portato fuori, funziona correttamente e fa il suo lavoro!

      Come mai?

      Perché quelle graffe? Specificando il rosso sarebbe come scrivere
      `\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      {\usecolortheme[rgb={.5,0,0}]{structure}}`
      che non è certo corretto.

      Ciao
      Enrico

    • #39271
      Up
      0
      Down
      ::

      Perché quelle graffe? Specificando il rosso sarebbe come scrivere
      `\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      {\usecolortheme[rgb={.5,0,0}]{structure}}`
      che non è certo corretto.

      Ciao
      Enrico

      Me culpa…

      Grazie!!

    • #39272
      Up
      0
      Down
      ::

      Perché quelle graffe? Specificando il rosso sarebbe come scrivere
      `\usetheme{Warsaw}
      \beamertemplatenumberedballsectiontoc
      {\usecolortheme[rgb={.5,0,0}]{structure}}`
      che non è certo corretto.

      Ciao
      Enrico

      Me culpa…

      L’abitudine a \ifthenelse, suppongo. L’idea dei condizionali TeX è che quando sono valutati rimane solo ciò che corrisponde al “caso vero”. Il condizionale \ifcase è un po’ particolare, ma funziona come gli altri, da quel punto di vista:
      `\ifcase
      \or
      \or

      \else
      \fi`
      Il “caso vero” viene scelto in base al che viene passato a \ifcase. Da quel momento è come se tutto il resto non ci fosse. Nota: il ramo \else è opzionale; se manca, il è vuoto.

      C’è, a dire il vero, qualche piccola complicazione TeXnica in situazioni più complesse di quella che stiamo esaminando; non è molto importante per te.

      Ciao
      Enrico

    • #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…

    • #39274
      Up
      0
      Down
      ::

      Ciao a tutti,
      Risollevo questo topic che avevo creato tempo fa e che avevo lasciato in quanto tutto funzionava.

      Perché \RequirePackageWithOptions{isodate}? Togli WithOptions: stai chiedendo a isodate di valutare esplicitamente le opzioni globali e non sa che farsene. Già che ci sei togli anche la chiamata di graphicx che è già fatta da beamer. Toglierei anche WithOptions dalla chiamata di beamer.

      Ciao
      Enrico

    • #39275
      Up
      0
      Down
      ::

      Ciao a tutti,
      Risollevo questo topic che avevo creato tempo fa e che avevo lasciato in quanto tutto funzionava.

      Perché \RequirePackageWithOptions{isodate}? Togli WithOptions: stai chiedendo a isodate di valutare esplicitamente le opzioni globali e non sa che farsene. Già che ci sei togli anche la chiamata di graphicx che è già fatta da beamer. Toglierei anche WithOptions dalla chiamata di beamer.

      Ciao
      Enrico

      Ok, tolto graphicx…
      Quanto ad isodate, facevo così in modo che “leggesse” la lingua che passo come opzione globale a tutti i pacchetti. Non è corretto?
      Togliendo il withoptions alla chiamata di beamer, tutto è tornato a funzionare.

      Altra domandina:
      Ora, se io passo l’opzione handout per fare le trasparenze in versione stampa, non funziona… questo è un po’ scomodo…

    • #39276
      Up
      0
      Down
      ::

      [quote]Ciao a tutti,
      Risollevo questo topic che avevo creato tempo fa e che avevo lasciato in quanto tutto funzionava.

      Perché \RequirePackageWithOptions{isodate}? Togli WithOptions: stai chiedendo a isodate di valutare esplicitamente le opzioni globali e non sa che farsene. Già che ci sei togli anche la chiamata di graphicx che è già fatta da beamer. Toglierei anche WithOptions dalla chiamata di beamer.

      Ciao
      Enrico

      Ok, tolto graphicx…
      Quanto ad isodate, facevo così in modo che “leggesse” la lingua che passo come opzione globale a tutti i pacchetti. Non è corretto?[/quote]
      Ogni pacchetto caricato vede le opzioni globali e, se le capisce, le esegue.

      Togliendo il withoptions alla chiamata di beamer, tutto è tornato a funzionare.

      Altra domandina:
      Ora, se io passo l’opzione handout per fare le trasparenze in versione stampa, non funziona… questo è un po’ scomodo…

      \DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}

      Ciao
      Enrico

Visualizzazione 9 filoni di risposte
  • Devi essere connesso per rispondere a questo topic.

Go to top