How to create a white-on-black style for LaTeX listings…

Tags: , , , , , , , , , , , , , ,
Posted in dotnet, vb, vb.net | No Comments »

I’ve been looking at Philip Bunge’s post on how to create a “Tango” style with LaTeX listings, and trying to adapt this to make the default text style white and the background black (this is for slides, not an article!). This is what I added:

definecolor{Black}{gray}{0.0}
definecolor{White}{gray}{0.9}
...
lstset{
  basicstyle={color{White}},
  backgroundcolor={color{Black}},
  ...
}

This assumes that basicstyle sets the default style of all text. The listings documentation says this:

basicstyle is selected at the beginning of each listing. You could use footnotesize,
small, itshape, ttfamily, or something like that. The last token of must not read any following characters.

The output of this still shows “default” text as black. It is possible to set more style directives that cover most tokens in a given programming language, but even doing this some tokens (such as brackets and other punctuation) will be missed. What did I do wrong?

Similar:

  1. how do i tokenize a string on the base of special characters such as ‘ and . ect? I have used StringTokenizer class to make tokens of a string but my program tokenizes a string only on the basis of spaces but it...
  2. RadioButtonList forecolor is not changing  Hello,        The default color on the radiobutton text is gray, I need to change that to black. I can see the property...
  3. [LaTeX] listingname won’t change its content I am using the listing (NOT listings) package and have been trying to use renewcommand{listlistingname}{?ndice de c?digo} renewcommand{listingname}{C?digo} in order to change the “List of...
  4. validation summary text renders black <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="CreateUserWizard1" ForeColor="red"… why does the text render black when I have the ForeColor set to red. If I change the displaymode to...
  5. How to create a Facebook-App style notifications custom table? I want to add a custom table to my iPhone app, that should look and work like the one used in the facebook app showing...

Tags: , , , , , , , , , , , , , ,

Leave a Reply