Codice o codifica in nuovo ambiente?

  • Creatore
    Topic
  • #67088
    samiel
    Partecipante
      Up
      0
      Down
      ::


      Dovendo isare listings, ho modificato la codifica di alcuni file
      da utf8 a ISO8859-15. Tuttavia
      `\documentclass{article}
      \usepackage{lipsum}
      \usepackage{framed}

      \newcommand{\changesections}{\%
      \titleformat{\subsection}
      {\relax}
      {\MakeTextLowercase{\thesubsection}}
      {1em}
      {\large\ttfamily\textbf}%
      \titleformat{\subsubsection}
      {\relax}
      {\MakeTextLowercase{\thesubsubsection}}
      {1em}
      {\normalsize\ttfamily}%
      }
      \newcommand{\cardsection}[1]{%
      \phantomsection
      \addcontentsline{toc}{subsubsection}{\ttfamily\small #1} %
      \subsubsection*{#1}}
      \newcounter{card}
      \newenvironment{card}[1]
      {\changesections\begin{shaded}\stepcounter{card}%
      \phantomsection
      \addcontentsline{toc}{subsection}
      {\ttfamily\small Scheda n.\texorpdfstring{\ }{ }%
      \arabic{card} – #1}
      \subsection*{\ttfamily Scheda n.~\arabic{card}\\#1}}
      {\end{shaded}}

      \begin{document}
      \lipsum[1]
      \begin{card}{Blabla}
      \lipsum[2]
      \end{card}
      \end{document}`
      mi restituisce
      `! Undefined control sequence.
      \changesections ->\% \titleformat
      {\subsection } {\relax } {\MakeTextLowerca…
      l.33 \begin{card}{Blabla}`
      Che errore ho infilato?

      Garzie
      M

    Visualizzazione 1 filone di risposte
    • Autore
      Risposte
      • #67089
        Up
        0
        Down
        ::


        A parte il \% che non ha senso, ti sei dimenticato di caricare titlesec.

        Ciao
        Enrico

      • #67090
        samiel
        Partecipante
          Up
          0
          Down
          ::


          Corretto tutto,
          grazie!

          M

      Visualizzazione 1 filone di risposte
      • Devi essere connesso per rispondere a questo topic.

      Go to top