Search found 8 matches

by alastairandrew
Wed Aug 11, 2010 1:54 am
Forum: Page Layout
Topic: Referencing suppressed section numbers
Replies: 2
Views: 4275

Re: Referencing suppressed section numbers

Thanks Stefan,

That's ideal, cheers for the suggestion. I do agree with you that I am misleading the readers by providing a reference number for a section that doesn't actually appear but I feel that's the best option for my requirements.

I'm currently writing my thesis and I have several ...
by alastairandrew
Wed Aug 11, 2010 12:31 am
Forum: Page Layout
Topic: Referencing suppressed section numbers
Replies: 2
Views: 4275

Referencing suppressed section numbers

Hi,

I'd like to know if it's possible to reference the section numbers that have been repressed with the star (*) option. I've made a little example with two sections which are numbered, and several subsections which are not. If I use the \ref to point to labels within the subsections the ...
by alastairandrew
Wed Dec 02, 2009 4:10 am
Forum: General
Topic: Listings package == issue
Replies: 7
Views: 5651

Listings package == issue

Finally cracked it by taking gmedina's suggestion of putting a space in between the equals signs. Rather than editing all my source to do this I scoured the Listings manual and found the literate command.

Placing literate={==}{= =}{3} into the input command seemed to sort things out exactly as ...
by alastairandrew
Wed Dec 02, 2009 2:06 am
Forum: General
Topic: Listings package == issue
Replies: 7
Views: 5651

Re: Listings package == issue

Thanks for your replies.

I'd like to stick to the sans serif font, it looks cleaner and a bit more modern than the old typewriter family. Escaping the LaTeX or putting spaces in do work, the drawback is that I'm using \lstinputlisting to load my source code straight into my document so I was hoping ...
by alastairandrew
Wed Dec 02, 2009 12:28 am
Forum: General
Topic: Listings package == issue
Replies: 7
Views: 5651

Listings package == issue

Here's a minimal example reproducing the problem on my machine. The setup I'm using is I'm pdfLatex from gwTex on a Mac.


\documentclass{letter}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[language=C,basicstyle=\sffamily]
if(a == b){
print("Example");
}
\end{lstlisting}
\end ...
by alastairandrew
Tue Dec 01, 2009 10:15 pm
Forum: General
Topic: Listings package == issue
Replies: 7
Views: 5651

Listings package == issue

Hi,

I'm having a problem using the Listings package to typeset some code. Anywhere that it should display the == equality operator it renders this as a single wide equals. I'm using the following option: basicstyle=\sffamily to change the font into a sans serif one.

Any comments would be ...
by alastairandrew
Sun Aug 31, 2008 11:07 pm
Forum: Document Classes
Topic: Listings package: otherkeywords / comments question
Replies: 1
Views: 7769

Re: Listings package: otherkeywords / comments question

I found a way around the problem by using the classoffset and declaring the otherkeywords as more keywords instead.

For future reference here is the amended version:

% My language definition
\lst@definelanguage[]{OPL}%
{
classoffset=0,
keywords={maximize, minimize, subject, to, forall, sum, solve ...
by alastairandrew
Sun Aug 31, 2008 10:25 pm
Forum: Document Classes
Topic: Listings package: otherkeywords / comments question
Replies: 1
Views: 7769

Listings package: otherkeywords / comments question

Hi there,

I've been using the Listings package to develop a new language definition to display some source code for an academic project I'm working on. The language I want to display has various assignment operators akin to <=, <-, :=: etc. and I've declared them in the otherkeywords section. The ...