Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would to know for what is used the code below (Last lines code) in arsclassica.sty. Also I would to know why in arsclassica-settings there are some repetitions of \lstset is not the same thing put all the options in one \lstset? And why, for examples this string: \lstset{moredelim={[is][\ttfamily]{!?}{?!}}} is repeated?


Listings code

\lstset{basicstyle=\normalfont\ttfamily}
\lstset{flexiblecolumns=true}
\lstset{moredelim={[is][\normalfont\itshape]{/*}{*/}}}
\lstset{basicstyle=\normalfont\ttfamily}
\lstset{flexiblecolumns=false}
\lstset{moredelim={[is][\ttfamily]{!?}{?!}}} 
\lstset{escapeinside={�*}{*�}}
\lstset{firstnumber=last}
\lstset{moredelim={[is][\ttfamily]{!?}{?!}}}

Last lines code

\def\toc@headingbkORrp{% 
  \def\toc@heading{% 
    \chapter*{\contentsname}% 
    \@mkboth{\spacedlowsmallcaps{\contentsname}} 
      {\spacedlowsmallcaps{\contentsname}}}} 
\@ifclassloaded{scrreprt}{\toc@headingbkORrp}{} 
\@ifclassloaded{scrbook}{\toc@headingbkORrp}{}
share|improve this question
1  
@MartinSchröder Schröder You are wrong ! that code is in arsclassica.sty, you can see with your eyes that is in that package ! look at the last seven lines of codes: ftp.uniroma2.it/TeX/macros/latex/contrib/arsclassica/… And if you look into the user manual of ArsClassica you can see that isn't commented: ftp.uniroma2.it/TeX/macros/latex/contrib/arsclassica/…. If you read my question is not about the Listings package, but about the programming style of the settings of listings in ArsClassica. –  FormlessCloud Sep 24 '12 at 17:42
    
Sorry, I was wrong. I was looking for your first lines of code. %-{ –  Martin Schröder Sep 24 '12 at 17:53
    
@MartinSchröder On purpose, I have write "Last lines code". However does not matter ! :) –  FormlessCloud Sep 24 '12 at 17:58

1 Answer 1

up vote 5 down vote accepted

The second code block defines a macro that if executed sets the heading for the table for contents to be based on \chapter rather than \section. It then executes that code if the main class is scrrept or scrbook,

In most key=value setting setups calling the command multiple times or using one command with a comma separated list is a matter of style. The multiple command version makes it easier to comment out some of the settings when debugging perhaps. I would guess the duplicated setting is a harmless cut and paste error while setting up the package.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.