lstings

egin{mdframed}[backgroundcolor=yellow!10, rightline=false]
    lstinputlisting[language=C,mathescape,frame={}]{./temp.c}
end{mdframed}
lstinputlisting[key=value list]{file name}
inputpath=path
firstline=number 
lastline=number

linerange={first1-last1,first2-last2, and so on}

style=style name

showspaces=true false
showtabs=true false

numbers=none left right

title=title text
caption={[short]caption text}
label=name

linewidth=dimension

breaklines=true false
frame= none leftline topline bottomline lines single shadowbox

backgroundcolor=color command



fixed, flexible,
spaceflexible,  fullflexible;
columns=[c|l|r] alignment

原文地址:https://www.cnblogs.com/Searchor/p/14186409.html