Partially Attended

an irregularly updated blog by Ian Mulvany

testing latex and syntax hilighting on blogger

Sun Apr 12, 2009

75 Words
Some python code


some links
http://www.ramymostafa.com/?p=99
http://alexgorbatchev.com/wiki/SyntaxHighlighter
http://www.botcyb.org/2008/10/rendering-latex-in-blogger.html
http://blog.yourequations.com/


Syntaxhiligher2 (unreliable)


def AuthenticateSession(username,password):
blogger_service = service.GDataService(username,password)
blogger_service.source = 'mulvanynet-BloggerTagger-1.0'
blogger_service.service = 'blogger'
blogger_service.server = 'www.blogger.com'
blogger_service.ProgrammaticLogin()
return blogger_service

def PrintUserBlogInfo(blogger_service):
query = service.Query()
query.feed = '/feeds/default/blogs'
feed = blogger_service.Get(query.ToUri())
blog_id = feed.entry[0].GetSelfLink().href.split("/")[-1]
print feed.title.text
print blog_id
for entry in feed.entry:
print "\t" + entry.title.text,
print entry.GetSelfLink().href.split("/")[-1]

def GetBlogFeed(blogger_service):
query = service.Query()
query.feed = "/feeds/default/blogs"
feed = blogger_service.Get(query.ToUri())
return feed



\int_{0}^{1}\frac{x^{4}\left(1-x\right)^{4}}{1+x^{2}}dx
=\frac{22}{7}-\pi


renders as


\int_{0}^{1}\frac{x^{4}\left(1-x\right)^{4}}{1+x^{2}}dx
=\frac{22}{7}-\pi
This work is licensed under a Creative Commons Attribution 4.0 International License