목록에서 생성된 흰색 선을 삭제하는 방법은 무엇입니까?

목록에서 생성된 흰색 선을 삭제하는 방법은 무엇입니까?

나는 똑같은 문제를 겪고 있습니다.이것, 그러나 texstudio의 PDF 뷰어는 오류를 표시하지 않으므로 문서의 32페이지가 될 때까지 눈치채지 못했습니다. 그의 솔루션은 실제로 작동합니다(mdframed 솔루션, 다른 솔루션은 제 경우에는 전혀 효과가 없습니다). 하지만 제가 가지고 있는 모든 단일 코드 조각의 서식을 수동으로 지정하여 문서의 32페이지를 수동으로 탐색할 수는 없습니다. 그래서 문서 전반에 걸쳐 적용할 솔루션이 필요합니다(서문의 목록 환경을 조정하는 작업이 포함될 가능성이 높습니다).

곤란해서 MWE를 5분만에 만들었는데, 죄송합니다.

\documentclass{book}

\usepackage{listings}
\usepackage{color}

\lstset{
    frame=lines,
    rulecolor=\color{deepblue},
    framesep = 5pt,
    language=C,
    aboveskip=3mm,
    belowskip=3mm,
    showstringspaces=false,
    columns=flexible,
    basicstyle={\small\ttfamily\color{cyan}},
    numbers=none,
    %numberstyle=\small\color{green},
    keywordstyle=\color{orange},
    commentstyle=\color{grey},
    stringstyle=\color{mauve},
    breaklines=true,
    breakatwhitespace=true,
    backgroundcolor=\color{deepblue},
    tabsize=3,
    morekeywords={uint32_t},
    keywordsprefix=#
}

\lstdefinestyle{C-small}
{
    language=C,
    morekeywords={uint32_t},
    basicstyle={\fontsize{12}{12}\ttfamily\color{cyan}},
    commentstyle=\color{grey},
    keywordstyle=\color{orange},
}

\lstdefinestyle{C}
{
    language=C,
    morekeywords={uint32_t},
    keywordstyle=\color{orange},
}

\definecolor{orange}{rgb}{1,0.5,0}
\definecolor{deepblue}{rgb}{0, 0, 0.15}
\definecolor{grey}{rgb}{0.5,0.5,0.5}

\begin{document}

\begin{lstlisting}[style =C]
    uint32_t mailbox_message[22] __attribute__ ((aligned (16)));
    uint32_t index;

    void set_init_display_message()
    {
        index = 1;
        mailbox_message[index++] = 0;//request code

        mailbox_message[index++] = (uint32_t) SET_PHYSICAL_WIDTH_HEIGHT; //tag
        mailbox_message[index++] = 8;   //request size
        mailbox_message[index++] = 8;   //response size
        mailbox_message[index++] = physical_width;  //horizontal resolution of the monitor
        mailbox_message[index++] = physical_height; //vertical resolution of the monitor

        mailbox_message[index++] = (uint32_t) SET_VIRTUAL_WIDTH_HEIGHT; //tag
        mailbox_message[index++] = 8;   //rquest size
        mailbox_message[index++] = 8;   // response size
        mailbox_message[index++] = virtual_width;   //horizontal resolution of virtual screen
        mailbox_message[index++] = virtual_height;  //vertical resolution of virtual screen

        mailbox_message[index++] = (uint32_t) SET_DEPTH;    //tag
        mailbox_message[index++] = 4;   //request size
        mailbox_message[index++] = 4;   //response size
        mailbox_message[index++] = color_depth; //color depth of the frame buffer

        mailbox_message[index++] = (uint32_t) ALLOCATE; //tag
        mailbox_message[index++] = 8;   //request size
        mailbox_message[index++] = 8;   //response size
        mailbox_message[index++] = 16;  //alignment fb ptr returned here
        mailbox_message[index++] = 0;   //fb size returned here

        mailbox_message[index++] = END;//end tag

        mailbox_message[0] = index*sizeof(uint32_t);    //size of message
    }
\end{lstlisting}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보