it has been quite a while that I have this problem and I have searched everywhere online and couldn't find a solution.
The problem is latex syntax highlighting doesn't work after this line:
\newcommand{\psins}[1]{\colorbox[rgb]{0.8,0.8,1}{\lstinline[basicstyle=\ttfamily\footnotesize\color{black}]|#1|}}
Everything (almost) after this line is written in the same color. I am using Texmaker on Linux Mint 17. I even compiled texmaker to have the most recent version (4.5) and hoping that it would fix, but no avail. Also, I have read about the bug here https://bugs.kde.org/show_bug.cgi?id=322154 and looked at my latex.xml
(which is located at /usr/share/kde4/apps/katepart/syntax
) and saw that it's the same as the corrected version in this bug report.
It's still not much of a big problem since I am using \include
and doing my writing on different files, but still I was wondering and very curious about what causes this problem.
Thanks
complete tex file to reproduce the bug:
(by the way, that problem didn't occur on this question's code block)
\documentclass[10pt, a4paper]{report}
\usepackage{fullpage}
\usepackage{titlesec}
\usepackage[dvipsnames]{xcolor} % for bg and fg colors
\usepackage{soul}
\setul{1pt}{} % to underline by \ul{}
\setlength\parindent{0pt}
\definecolor{mygray}{rgb}{0.85,0.85,0.85}
\definecolor{techy}{rgb}{0.65,0.85,0.65}
\renewcommand*{\ttdefault}{pcr}
\usepackage{listings}
\lstset{breaklines=true,frame=single}
\lstdefinestyle{DOS}
{
backgroundcolor=\color[rgb]{0.34,0,0.34},
basicstyle=\footnotesize\ttfamily\color{white},
commentstyle=\color{green}
}
\lstdefinelanguage{pshell}
{
morecomment=[l]{\#}
}
\newcommand{\psins}[1]{\colorbox[rgb]{0.8,0.8,1}
{\lstinline[basicstyle=\ttfamily\footnotesize\color{black}]|#1|}}
\newcommand{\nottez}[2]{
\begin{center}
\colorbox{mygray}{
\begin{minipage}{0.9\textwidth}
{\large \textbf{#1}} \vspace*{3pt} \par #2
\end{minipage}}
\end{center}}
\newcommand{\technet}[2]{
\begin{center}
\colorbox{techy}{
\begin{minipage}{0.9\textwidth}
{\large \color{Sepia}\textbf{#1}} \vspace*{3pt} \par #2
\end{minipage}}
\end{center}}
% -------------------------------------------------------------------------
\titleformat{\chapter}[display]{\normalfont\Large\bfseries}{\chaptertitlename\ \thechapter}{-4pt}{\setul{2pt}{}\LARGE\ul}
\titlespacing*{\chapter}{0pt}{3mm}{9mm}
% -------------------------------------------------------------------------
\begin{document}
%\include{mstrch3}
now everything after lstinline is in the same color.
\end{document}
\psins{abc < *.* dir } now everything after lstinline is in the same color.
but thenow everything...
was in black so you really need to provide an example.\newcommand{\psins}
syntax color doesn't change. Compiling is not necessary to reproduce the bug -- just copy paste the above code into any latex editor which has syntax highlight feature