列表并未突出显示所有内容

列表并未突出显示所有内容

我遇到了自定义环境的问题\listings

\begin{document}

\lstdefinestyle{mystyle}{
    backgroundcolor=\color{backcolour},   
    commentstyle=\color{codegreen},
    numberstyle=\tiny\color{codegray},
    stringstyle=\color{codepurple},
    basicstyle=\ttfamily\footnotesize,
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=5pt,                  
    keywordstyle = [2]{\color{red}},
    keywordstyle = [3]{\color{blue}},
    keywordstyle = [4]{\color{green}},
    otherkeywords = {A.actor, A.goal, D.actor, D.goal, Dem.actor, Dem.goal, Der/Dim.goal, GOAL.right.goal, I.actor, I.goal, Incl.actor, Incl.goal, Incl.goal, Indef.actor, Med.actor, Med.goal, N.actor, N.goal, Obv.actor, Obv.goal, Pers.actor, Pers.goal, Pl.actor, Pl.goal, Pron.actor, Pron.goal, Prox.actor, Prox.goal, Px12Pl.actor, Px12Pl.goal, Px1Pl.actor, Px1Sg.actor, Px1Sg.goal, Px3Pl.goal, Px3Pl.goal, Px3Sg.actor, Px3Sg.goal, RdplS, RdplW, Sg.actor, Sg.goal, actor.1, actor.2, actor.3, actor.4, actor.4, awa.goal, goal.1, goal.2, goal.3, goal.4, goal.5, left.GOAL.goal, pn.1Pl.actor, pn.1Sg.actor, pn.1Sg.goal, pn.3Pl.actor, pn.3Sg.actor, pn.3Sg.goal, AI.cooking, AI.do, AI.health, AI.heat.fire, AI.money.count, AI.plural, AI.pray, AI.reflexive, AI.speech, AI.state, II.natural.land, II.plural, II.sense, II.weather, NA.beast.of.burden.actor, NA.beast.of.burden.goal, NA.food.actor, NA.food.goal, NA.money.count.goal, NA.persons.actor, NA.persons.goal, NA.religious.actor, NDA.Relations.actor, NDA.Relations.goal, NDI.Body.goal, NI.natural.force.goal, NI.nature.plants.goal, NI.nominal.actor, NI.nominal.goal, NI.object.actor, NI.object.goal, NI.place.actor, NI.place.goal, PV.Discourse, PV.Move, PV.Position, PV.Qual, PV.StartFin, PV.Time, PV.WantCan, TA.allow, TA.cognitive, TA.do, TA.food, TA.money.count, TA.religion, TA.speech, TI.cognitive, TI.do, TI.money.count, TI.speech, auto.na.1.actor, auto.na.1.goal, auto.na.1.goal, auto.na.2.actor, auto.na.2.goal, auto.na.3.actor, auto.na.3.goal, auto.na.4.actor, auto.na.5.actor, auto.na.5.goal, auto.na.6.actor, auto.na.6.goal, auto.na.7.actor, auto.na.7.goal, auto.nda.1.actor, auto.nda.1.goal, auto.nda.3.actor, auto.nda.3.goal, auto.ndi.1.goal, auto.ni.1.goal, auto.ni.10.goal, auto.ni.2.goal, auto.ni.3.actor, auto.ni.3.goal, auto.ni.4.goal, auto.ni.5.goal, auto.ni.5.goal, auto.ni.6.actor, auto.ni.6.goal, auto.ni.7.actor, auto.ni.7.goal, auto.ni.8.goal, auto.ni.9.goal, auto.vai.1, auto.vai.10, auto.vai.11, auto.vai.12, auto.vai.13, auto.vai.2, auto.vai.3, auto.vai.4, auto.vai.5, auto.vai.6, auto.vai.7, auto.vai.8, auto.vai.9, auto.vii.1, auto.vii.2, auto.vii.3, auto.vii.4, auto.vii.5, auto.vii.6, auto.vta.1, auto.vta.2, auto.vta.3, auto.vta.4, auto.vta.5, auto.vta.6, auto.vta.7, auto.vti.1, auto.vti.2, auto.vti.3, auto.vti.4, auto.vti.5, auto.vti.6}, 
    morekeywords = [2]{A.actor, A.goal, D.actor, D.goal, Dem.actor, Dem.goal, Der/Dim.goal, GOAL.right.goal, I.actor, I.goal, Incl.actor, Incl.goal, Incl.goal, Indef.actor, Med.actor, Med.goal, N.actor, N.goal, Obv.actor, Obv.goal, Pers.actor, Pers.goal, Pl.actor, Pl.goal, Pron.actor, Pron.goal, Prox.actor, Prox.goal, Px12Pl.actor, Px12Pl.goal, Px1Pl.actor, Px1Sg.actor, Px1Sg.goal, Px3Pl.goal, Px3Pl.goal, Px3Sg.actor, Px3Sg.goal, RdplS, RdplW, Sg.actor, Sg.goal, actor.1, actor.2, actor.3, actor.4, actor.4, awa.goal, goal.1, goal.2, goal.3, goal.4, goal.5, left.GOAL.goal, pn.1Pl.actor, pn.1Sg.actor, pn.1Sg.goal, pn.3Pl.actor, pn.3Sg.actor, pn.3Sg.goal}, 
    morekeywords = [3]{AI.cooking, AI.do, AI.health, AI.heat.fire, AI.money.count, AI.plural, AI.pray, AI.reflexive, AI.speech, AI.state, II.natural.land, II.plural, II.sense, II.weather, NA.beast.of.burden.actor, NA.beast.of.burden.goal, NA.food.actor, NA.food.goal, NA.money.count.goal, NA.persons.actor, NA.persons.goal, NA.religious.actor, NDA.Relations.actor, NDA.Relations.goal, NDI.Body.goal, NI.natural.force.goal, NI.nature.plants.goal, NI.nominal.actor, NI.nominal.goal, NI.object.actor, NI.object.goal, NI.place.actor, NI.place.goal, PV.Discourse, PV.Move, PV.Position, PV.Qual, PV.StartFin, PV.Time, PV.WantCan, TA.allow, TA.cognitive, TA.do, TA.food, TA.money.count, TA.religion, TA.speech, TI.cognitive, TI.do, TI.money.count, TI.speech}, 
    morekeywords = [4]{auto.na.1.actor, auto.na.1.goal, auto.na.1.goal, auto.na.2.actor, auto.na.2.goal, auto.na.3.actor, auto.na.3.goal, auto.na.4.actor, auto.na.5.actor, auto.na.5.goal, auto.na.6.actor, auto.na.6.goal, auto.na.7.actor, auto.na.7.goal, auto.nda.1.actor, auto.nda.1.goal, auto.nda.3.actor, auto.nda.3.goal, auto.ndi.1.goal, auto.ni.1.goal, auto.ni.10.goal, auto.ni.2.goal, auto.ni.3.actor, auto.ni.3.goal, auto.ni.4.goal, auto.ni.5.goal, auto.ni.5.goal, auto.ni.6.actor, auto.ni.6.goal, auto.ni.7.actor, auto.ni.7.goal, auto.ni.8.goal, auto.ni.9.goal, auto.vai.1, auto.vai.10, auto.vai.11, auto.vai.12, auto.vai.13, auto.vai.2, auto.vai.3, auto.vai.4, auto.vai.5, auto.vai.6, auto.vai.7, auto.vai.8, auto.vai.9, auto.vii.1, auto.vii.2, auto.vii.3, auto.vii.4, auto.vii.5, auto.vii.6, auto.vta.1, auto.vta.2, auto.vta.3, auto.vta.4, auto.vta.5, auto.vta.6, auto.vta.7, auto.vti.1, auto.vti.2, auto.vti.3, auto.vti.4, auto.vti.5, auto.vti.6},
}

\lstset{style=mystyle}

当我使用这个列表环境时:

\begin{lstlisting}[style=mystyle]
Ind_Cnj_VII_auto<-PV.Time + auto.ni.3.actor + auto.vii.3 + auto.vii.4 + Dem.actor + Pron.actor 
Ind_Cnj_VAI_auto<-RdplW + PV.Time + PV.Move + PV.Qual + PV.StartFin + PV.Position + PV.Discourse + auto.vai.2 + auto.vai.5 + auto.vai.6 + auto.vai.12 + auto.vai.11 + auto.na.5.actor + auto.vai.9 + auto.vai.3 + auto.vai.4 + auto.vai.13 + auto.vai.8 + auto.vai.7 + auto.vai.10 + auto.na.3.actor + Sg.actor + Pron.actor + Pl.actor + Obv.actor + pn.1Pl.actor + actor.3 + actor.1 + actor.2 + actor.4 
Ind_Cnj_VTI_auto<-RdplS + PV.Time + PV.Discourse + auto.vti.4 + auto.vti.2 + auto.na.5.actor + auto.ni.9.goal + auto.ni.2.goal + auto.ni.10.goal + Pron.actor + Pers.actor + pn.1Sg.actor + actor.3 + actor.1 + actor.2 + Sg.goal + Pl.goal 
Ind_Cnj_VTA_auto<-PV.Time + PV.Move + PV.StartFinWantCan + PV.Discourse + PV.Position + auto.vta.6 + auto.vta.3 + auto.vta.5 + auto.vta.1 + auto.na.5.goal + auto.vta.4 + auto.nda.1.actor + auto.na.7.actor + auto.vta.7 + Sg.actor + D.actor + Px1Sg.actor + Obv.actor + actor.3 + actor.1 + actor.4 + goal.3 + goal.4 + goal.2 + Obv.goal + Px3Sg.goal 
\end{lstlisting}

当我使用上述关键字样式(例如actor.4)定义一些项目时,它们最终会变成黑色。

不良列表突出显示

我正在使用 overleaf 与 pdflatex 和 TexLive 2020 进行编译。

相关内容