| 1 | --- conference.py.bak 2011-06-16 19:02:43.651903000 +0200 |
|---|
| 2 | +++ conference.py 2011-06-12 13:53:36.631365000 +0200 |
|---|
| 3 | @@ -896,11 +896,18 @@ |
|---|
| 4 | spkStyle.spaceAfter=0 |
|---|
| 5 | spkStyle.leading=14 |
|---|
| 6 | self._styles["speakers"]=spkStyle |
|---|
| 7 | + authStyle=getSampleStyleSheet()["Normal"] |
|---|
| 8 | + authStyle.fontSize=12.5 |
|---|
| 9 | + authStyle.spaceBefore=0 |
|---|
| 10 | + authStyle.spaceAfter=0 |
|---|
| 11 | + authStyle.leading=14 |
|---|
| 12 | + self._styles["authors"]=authStyle |
|---|
| 13 | abstractStyle=getSampleStyleSheet()["Normal"] |
|---|
| 14 | - abstractStyle.fontSize=10.0 |
|---|
| 15 | - abstractStyle.spaceBefore=0 |
|---|
| 16 | + abstractStyle.fontSize=11.0 |
|---|
| 17 | + abstractStyle.spaceBefore=10 |
|---|
| 18 | abstractStyle.spaceAfter=0 |
|---|
| 19 | - abstractStyle.alignment=TA_LEFT |
|---|
| 20 | + abstractStyle.leading=14 |
|---|
| 21 | + abstractStyle.alignment=TA_JUSTIFY |
|---|
| 22 | self._styles["abstract"]=abstractStyle |
|---|
| 23 | ttInfoStyle=getSampleStyleSheet()["Normal"] |
|---|
| 24 | ttInfoStyle.fontSize=10.0 |
|---|
| 25 | @@ -935,16 +942,47 @@ |
|---|
| 26 | else: |
|---|
| 27 | caption="%s - %s"%(contrib.getId(),contrib.getTitle()) |
|---|
| 28 | p1=Paragraph(escape(caption),self._styles["title"]) |
|---|
| 29 | +# Speaker |
|---|
| 30 | lspk=[] |
|---|
| 31 | for spk in contrib.getSpeakerList(): |
|---|
| 32 | - fullName=spk.getFullName() |
|---|
| 33 | - instit=spk.getAffiliation().strip() |
|---|
| 34 | - if instit!="": |
|---|
| 35 | - fullName="%s (%s)"%(fullName, instit) |
|---|
| 36 | + fullName=spk.getFullNameNoTitle() |
|---|
| 37 | lspk.append("%s"%escape(fullName)) |
|---|
| 38 | - speakers= _("""<b>_("Presenter"): %s</b>""")%"; ".join(lspk) |
|---|
| 39 | - p2=Paragraph(speakers,self._styles["speakers"]) |
|---|
| 40 | - abstract=contrib.getDescription() |
|---|
| 41 | +# Authors |
|---|
| 42 | + lauthors=[] |
|---|
| 43 | + lcoauthors=[] |
|---|
| 44 | + hasCoAuthors=False |
|---|
| 45 | + for author in contrib.getAuthorList() : |
|---|
| 46 | + fullName = author.getFullNameNoTitle() |
|---|
| 47 | +# check if name is a speaker, if so, underline it. Always "escape" name. |
|---|
| 48 | + if fullName in lspk: |
|---|
| 49 | + fullName="<u>%s</u>"%escape(fullName) |
|---|
| 50 | + else: |
|---|
| 51 | + fullName="%s"%escape(fullName) |
|---|
| 52 | + |
|---|
| 53 | + instit=author.getAffiliation().strip() |
|---|
| 54 | + if instit!="": |
|---|
| 55 | + fullName="%s (%s)"%(fullName, escape(instit)) |
|---|
| 56 | +# check if name is primary or co-author, and file accordingly. |
|---|
| 57 | + if contrib.isPrimaryAuthor(author): |
|---|
| 58 | + lauthors.append("%s"%fullName) |
|---|
| 59 | + else: |
|---|
| 60 | + lcoauthors.append("%s"%fullName) |
|---|
| 61 | + hasCoAuthors=True |
|---|
| 62 | + |
|---|
| 63 | + if (hasCoAuthors): |
|---|
| 64 | + authors= _("""<b>_("Primary authors"):</b> <i>%s</i>""")%"; ".join(lauthors) |
|---|
| 65 | + else: |
|---|
| 66 | + authors= _("""<b>_("Authors"):</b> <i>%s</i>""")%"; ".join(lauthors) |
|---|
| 67 | + |
|---|
| 68 | + if (hasCoAuthors): |
|---|
| 69 | + coauthors= _("""<b>_("Co-authors"):</b> <i>%s</i></br>""")%"; ".join(lcoauthors) |
|---|
| 70 | + |
|---|
| 71 | + p2a=Paragraph(authors,self._styles["authors"]) |
|---|
| 72 | +# Co-author |
|---|
| 73 | + if (hasCoAuthors): |
|---|
| 74 | + p2b=Paragraph(coauthors,self._styles["authors"]) |
|---|
| 75 | +# done |
|---|
| 76 | + abstract=" %s"%(contrib.getDescription()) |
|---|
| 77 | p3=Paragraph(escape(abstract),self._styles["abstract"]) |
|---|
| 78 | ses="" |
|---|
| 79 | if contrib.getSession() is not None: |
|---|
| 80 | @@ -960,7 +998,12 @@ |
|---|
| 81 | else: |
|---|
| 82 | text = ses |
|---|
| 83 | p4=Paragraph(escape(text),self._styles["tt_info"]) |
|---|
| 84 | - abs=KeepTogether([p1,p4,p2,p3]) |
|---|
| 85 | +# abs=KeepTogether([p1,p4,p2,p2b,p3]) |
|---|
| 86 | + if (hasCoAuthors): |
|---|
| 87 | + abs=KeepTogether([p1,p4,p2a,p2b,p3]) |
|---|
| 88 | + else: |
|---|
| 89 | + abs=KeepTogether([p1,p4,p2a,p3]) |
|---|
| 90 | +# abs=KeepTogether([p1,p4,p2,p3]) |
|---|
| 91 | story.append(abs) |
|---|
| 92 | story.append(Spacer(1,0.4*inch)) |
|---|
| 93 | |
|---|
| 94 | @@ -1976,11 +2019,17 @@ |
|---|
| 95 | spkStyle.spaceAfter=0 |
|---|
| 96 | spkStyle.leading=14 |
|---|
| 97 | self._styles["speakers"]=spkStyle |
|---|
| 98 | + authStyle=getSampleStyleSheet()["Normal"] |
|---|
| 99 | + authStyle.fontSize=10.0 |
|---|
| 100 | + authStyle.spaceBefore=0 |
|---|
| 101 | + authStyle.spaceAfter=0 |
|---|
| 102 | + authStyle.leading=14 |
|---|
| 103 | + self._styles["authors"]=authStyle |
|---|
| 104 | abstractStyle=getSampleStyleSheet()["Normal"] |
|---|
| 105 | abstractStyle.fontSize=10.0 |
|---|
| 106 | abstractStyle.spaceBefore=0 |
|---|
| 107 | abstractStyle.spaceAfter=0 |
|---|
| 108 | - abstractStyle.alignment=TA_LEFT |
|---|
| 109 | + abstractStyle.alignment=TA_JUSTIFY |
|---|
| 110 | self._styles["abstract"]=abstractStyle |
|---|
| 111 | ttInfoStyle=getSampleStyleSheet()["Normal"] |
|---|
| 112 | ttInfoStyle.fontSize=10.0 |
|---|