← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 2310: Minor documentation fixes.

 

------------------------------------------------------------
revno: 2310
committer: Václav Šmilauer <eudoxos@xxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-07-01 12:31:49 +0200
message:
  Minor documentation fixes.
modified:
  doc/publications.bib
  doc/references.bib
  doc/sphinx/bib2rst.py
  doc/sphinx/yadeSphinx.py
  py/pack/pack.py


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'doc/publications.bib'
--- doc/publications.bib	2010-07-01 09:56:50 +0000
+++ doc/publications.bib	2010-07-01 10:31:49 +0000
@@ -30,7 +30,7 @@
 	month=3,
 	journal={Internal seminary in Laboratoire 3S-R, Grenoble},
 	url={https://yade-dem.org/w/images/5/59/Eudoxos2010-yade-past-present-future.pdf},
-	note={`LaTeX sources <https://code.launchpad.net/~eudoxos/yade/pres-grenoble2010>`_}
+	note={`LaTeX sources <http://bazaar.launchpad.net/~eudoxos/yade/pres-grenoble2010/files>`_}
 }
 
 @phdthesis{Smilauer2010b,

=== modified file 'doc/references.bib'
--- doc/references.bib	2010-06-29 14:32:03 +0000
+++ doc/references.bib	2010-07-01 10:31:49 +0000
@@ -136,7 +136,7 @@
 	year = {1996},
 	issn = {0730-0301},
 	pages = {179--210},
-	doi = {http://doi.acm.org/10.1145/231731.231732},
+	doi = {10.1145/231731.231732},
 	publisher = {ACM},
 	address = {New York, NY, USA},
 }

=== modified file 'doc/sphinx/bib2rst.py'
--- doc/sphinx/bib2rst.py	2010-07-01 09:56:50 +0000
+++ doc/sphinx/bib2rst.py	2010-07-01 10:31:49 +0000
@@ -35,14 +35,12 @@
 	for key in keys:
 		i=db[key]; type=i['type']
 		line=r'.. [%s] \ '%key ## ← HACK: explicit space to prevent docutils from using abbreviated first name (e.g. "F.") as enumeration item; it works!!
-		#ret.append('.. %s:'%key)
-		#ret.append(':[%s]:'%key)
-		#line='\t\ ' ## this also prevent considering abbreviated initial as enumeration
+		if i.has_key('author'): author=i['author'].replace(' and ',', ') # the module does not handle this..?
 
 		# required fields from http://en.wikipedia.org/wiki/Bibtex
 		# in some cases, they are not present, anyway
 		if type=='article':
-			if i.has_key('author'): line+='%s '%i['author']
+			if i.has_key('author'): line+='%s '%author
 			if i.has_key('year'): line+='(%s), '%i['year']
 			line+='**%s**. *%s*'%(i['title'],i['journal'])
 			if i.has_key('issue'): line+=i['issue']
@@ -50,21 +48,21 @@
 			if i.has_key('pages'): line+=', pages %s'%i['pages']
 			line+='.'
 		elif type=='book':
-			if i.has_key('author'): line+='%s '%i['author']
+			if i.has_key('author'): line+='%s '%author
 			if i.has_key('year'): line+='(%s), '%i['year']
 			line+='**%s**.'%i['title']
 			if i.has_key('publisher'): line+=' %s.'%i['publisher']
 		elif type=='inproceedings':
-			line+='%s (%s), **%s**. In *%s*.'%(i['author'],i['year'],i['title'],i['booktitle'] if i.has_key('booktitle') else i['journal'])
+			line+='%s (%s), **%s**. In *%s*.'%(author,i['year'],i['title'],i['booktitle'] if i.has_key('booktitle') else i['journal'])
 		elif type=='phdthesis':
-			line+='%s (%s), **%s**. PhD thesis at *%s*.'%(i['author'],i['year'],i['title'],i['school'])
+			line+='%s (%s), **%s**. PhD thesis at *%s*.'%(author,i['year'],i['title'],i['school'])
 		elif type=='proceedings':
 			if i.has_key('editor'): line+='%s (ed.), '%i['editor']
 			line+='**%s** (%s).'%(i['title'],i['year'])
 			if i.has_key('organization'): line+=' *%s*.'%i['organization']
 			if i.has_key('publisher'): line+=' %s'%i['publisher']
 		elif type=='misc':
-			if i.has_key('author'): line+=i['author']
+			if i.has_key('author'): line+=author
 			if i.has_key('year'): line+=' %s'%i['year']
 			if i.has_key('title'): line+=' **%s**'%i['title']
 		# add doi and url to everything, if present

=== modified file 'doc/sphinx/yadeSphinx.py'
--- doc/sphinx/yadeSphinx.py	2010-06-29 14:32:03 +0000
+++ doc/sphinx/yadeSphinx.py	2010-07-01 10:31:49 +0000
@@ -196,11 +196,13 @@
 	import bib2rst # our module
 	f=open('references.rst','w')
 	f.write('References\n'+40*'='+'\n\n\n')
+	f.write('.. note:: This file is generated from :ysrc:`doc/references.bib`.\n\n')
 	f.write(bib2rst.bib2rst('../references.bib'))
 	f.close()
 	escapeTilde('../publications.bib','./_publications.bib')
 	f=open('publications.rst','w')
 	f.write('Publications about Yade\n'+40*'='+'\n\n\n')
+	f.write(r'.. note:: This file is generated from `BiBTeX <http://en.wikipedia.org/wiki/Bibtex>`_ file :ysrc:`doc/publications.bib`, which you can also use in your `LaTeX <http://en.wikipedia.org/wiki/LaTeX>`_ papers.'+'\n\n')
 	f.write(bib2rst.bib2rst('_publications.bib').replace('@tilde@','~'))
 
 import sphinx,sys,shutil

=== modified file 'py/pack/pack.py'
--- py/pack/pack.py	2010-07-01 09:56:50 +0000
+++ py/pack/pack.py	2010-07-01 10:31:49 +0000
@@ -54,10 +54,6 @@
 	ur"""Append spheres directly to the simulation. In addition calling :yref:`O.bodies.append<BodyContainer.append>`,
 this method also appropriately sets periodic cell information of the simulation.
 
-:param Quaternion/Matrix3 rot: rotation of the packing, which will be applied on spheres and will be used to set :yref:`Cell.trsf` as well.
-:param **kw: passed to :yref:`yade.utils.sphere`
-:return: list of body ids added (like :yref:`O.bodies.append<BodyContainer.append>`)
-
 	>>> from yade import pack; from math import *
 	>>> sp=pack.SpherePack()
 
@@ -86,6 +82,9 @@
 	>>> O.cell.trsf
 	Matrix3(0.707107,-0.707107,0, 0.707107,0.707107,0, 0,0,1)
 
+:param Quaternion/Matrix3 rot: rotation of the packing, which will be applied on spheres and will be used to set :yref:`Cell.trsf` as well.
+:param **kw: passed to :yref:`yade.utils.sphere`
+:return: list of body ids added (like :yref:`O.bodies.append<BodyContainer.append>`)
 """
 	if isinstance(rot,Quaternion): rot=rot.toRotationMatrix()
 	assert(isinstance(rot,Matrix3))