[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [DOK] listings (var: java kode og latex)



Jacob Bunk Nielsen wrote:

> Rasmus Meldgaard <sslug@sslug> writes:
> 
>> Så vidt jeg husker har listings problemer med danske tegn,
>> er det noget du kender en løsning på?
> 
> Nej, desværre. Jeg er aldrig selv stødt på problemet.
> 

Det er der en simpel løsning på, du skal bare tilføje "extendedchars=true" i
din opsætning (se nedfor).

\lstset{% general command to set parameter(s) i kodeafsnit
        language=Java,
        basicstyle=\footnotesize,
        tabsize=4,
        tab=$\to$,
        float=tbph,
        extendedchars=true,
        breaklines=true,
        prebreak={\space\MyHookSign},
        frame=single,
        showtabs=false,
        showspaces=false,
        showstringspaces=false,
        keywordstyle=\bfseries,
        identifierstyle=\ttfamily,
        stringstyle=,
        captionpos=t,
        sslug@sslug@,
        numbers=left,
        numberstyle=\tiny,
        stepnumber=2,
        numbersep=10pt
}

Iforbindelse med java kan det også nogle gange være nødvendtigt at bruge et
andet escape tegn end normalt, det kan du gøre på følgende måde.
\lstinputlisting[escapechar=£]{file.java}

Mvh Finn


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 18:57 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *