Problema con elenco dei listati

  • Creatore
    Topic
  • #115977
    Up
    0
    Down
    ::


    Buonasera,

    Ho un report da consegnare entro la fine della giornata di domani e mi ritrovo con un problema che non riesco a risolvere.
    Il codice ridotto all’osso è il seguente:
    `\documentclass[11pt]{report}
    \usepackage[english]{babel}
    \usepackage[utf8x]{inputenc}
    \usepackage{listings}
    \usepackage[most]{tcolorbox}
    \usepackage{inconsolata}
    \usepackage{graphicx}
    \tcbuselibrary{breakable}

    \lstdefinelanguage{VHDL}{
    morekeywords={
    library, use, all, entity, is, port, variable, map, in, out, end, architecture, of, begin, and, generic, signal, if, then, else, generate, for, component, constant, process, to, downto, std_logic, std_logic_vector, ieee, std_logic_1164, std_logic_unsigned, numeric_std, rising_edge, type, case, when, others, natural, integer, unsigned, signed, array, to_integer
    },
    morecomment=[l]–
    }
    \lstdefinelanguage{ASM}{
    morekeywords={
    addui, jal, j, seqi, bnez, sw, lw, mult, jr
    },
    morecomment=[l]\;
    }
    \newtcblisting[auto counter, number within=chapter, list inside=listing]{VHDLlisting}[2][]{sharp corners, breakable, fonttitle=\bfseries, colframe=gray, listing only, listing options={basicstyle=\ttfamily\tiny, commentstyle =\color{gray} \textit, language= VHDL, breaklines=true, showstringspaces=false, breakatwhitespace=false, tabsize=4, postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}}}}, title=Listing \thetcbcounter: #2, #1, list entry={\protect\numberline{\thetcbcounter}#2}}
    \newtcblisting[use counter from=VHDLlisting, number within=chapter, list inside=listing]{ASMlisting}[2][]{sharp corners, breakable, fonttitle=\bfseries, colframe=gray, listing only, listing options={basicstyle=\ttfamily\tiny, commentstyle =\color{gray} \textit, language=ASM, breaklines=true, showstringspaces=false, breakatwhitespace=false, tabsize=4, postbreak={\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}}}}, title=Listing \thetcbcounter: #2, #1, list entry={\protect\numberline{\thetcbcounter}#2}}

    \begin{document}

    \tcblistof[\chapter*]{listing}{List of Listings}

    \chapter{capitolo}
    \begin{VHDLlisting}{test.vhd}
    questo e' un listato
    questo e' un listato
    questo e' un listato
    questo e' un listato
    questo e' un listato
    \end{VHDLlisting}
    \end{document}`

    Il problema è che nell’elenco dei listati appare anche un pezzo di listato.
    Ho già usato questo codice in precedenza senza problemi ma mi sono accorto che anche modificando i vecchi report (ad esempio togliendo uno tra i vari listati) può capitare questo errore, ma non riesco a capire da cosa dipenda.

    Un grazio di cuore a chi riuscirà ad aiutarmi.
    N.V.

  • Devi essere connesso per rispondere a questo topic.

Go to top