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++}}
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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! [...]
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis