The syntax in the documentation does not work - gives errors.
Code: Select all
\lstdefinelanguage{[MyDialect]{C++}[Visual]{C++}}


So what am I missing?
Code: Select all
\lstdefinelanguage{[MyDialect]{C++}[Visual]{C++}}
NEW: TikZ book now 40% off at Amazon.com for a short time.
If the language definition is based on another definition, you must specify the whole [<base dialect>]{<and base language>}.
Code: Select all
\lstdefinelanguage{[WilsonPB]C++[Visual]C++}
{
morekeywords={Normalize, DotProduct, CrossProduct}
}
\lstloadlanguages{[Visual]C++}
\lstloadlanguages{[WilsonPB]C++}
Code: Select all
! Package Listings Error: Couldn't load requested language.
The following languages weren't loadable:
,c++$wilsonpb
This may cause errors in the sequel.
Code: Select all
\newcommand{\indexCPP}[1]{\index{C++!#1@\texttt{#1}}}
\newcommand{\indexWilsonPB}[1]{\index{WilsonPB!#1@\texttt{#1}}}
Code: Select all
\lstset{indexstyle=[1]\indexCPP, indexstyle=[2]\indexWilsonPB,
classoffset=0,
language={[Visual]C++},
index=[1][keywords],
classoffset=1,
alsolanguage=WilsonPB,
index=[2][keywords],
classoffset=0
}
You completely misunderstood the meaning of a MWE. Of course there is no source anywhere because you have to build it on your own. Instructions how to do that and important things to consider can be found behind the links I gave in my last reply. It's in your own interest to follow them because otherwise it is impossible for others to give specific help.peterwilson_69 wrote:[...] There is no minimal working example in the manual, or indeed anywhere else on the Internet! Seriously, I've spent two days looking - nothing! [...]
NEW: TikZ book now 40% off at Amazon.com for a short time.