Clone wiki

pygments-main / Code.py

Example Code Files

# -*- coding: utf-8 -*-
"""
    Pygments LaTeX formatter test
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from django.db import models

# this is a test for \textbackslash handling
# \textbf{following will be bold if texcomments enabled}

# LaTeX math environments can be used with either
# texcomments of mathescape set to true, allowing for:
# $ \lim_{x \to 2} f(x) = 5 $
# or 
# $\lim\limits_{x \to 2} f(x)=5$

# this is a comment
# this is a new comment
# this is an old comment
# this comment highlighted
# this comment new and highlighted
# this comment old and highlighted

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')
    pub_date = models.DateTimeField('new date published')
    pub_date = models.DateTimeField('old date published')
    pub_date = models.DateTimeField('highlighted date published')

class NewChoice(models.Model):
    poll = models.ForeignKey(Poll)
    choice_text = models.CharField(max_length=200)
    votes = models.IntegerField(default=0)

class OldChoice(models.Model):
    poll = models.ForeignKey(Poll)
    choice_text = models.CharField(max_length=200)
    votes = models.IntegerField(default=0)

Updated