用 python-reportlab 将 rst 转换为中文 PDF
|
|
- Mildred George
- 5 years ago
- Views:
Transcription
1 用 python-reportlab 将 rst 转换为中文 PDF Author Keywords License Requires Jiahua Huang RST, PDF LGPL docutils, reportlab python 里用 Reportlab 应该比用 tex docbook fop 合适, 不过 python-reportlab 默认没中文字体, 也没中文换行, 分析 实际上新的 python-reportlab 已经有能力处理中文字体, 也有了一个基本的 CJK Warp (breaklinescjk), 只是通常使用 python-reportlab 的程序都没有去注意 现有 reportlab 程序主要问题就是 1. 使用默认英文字体, 而没考虑中文字 2. 使用默认英文折行, 而没考虑中文长行 解决 那么, 针对现有问题, 可以考虑如下方向解决 问题没有中文字体默认不是中文字体默认不是 CJK 换行 解决注册中文字体文泉驿正黑覆盖选字处理, 一律用文泉驿正黑覆盖折行处理, 一律尝试 breaklinescjk 动手吧 拿把斧头直接砍 python-reportlab 当然省事, 不过系统的库修改了以后维护还真是麻烦, 能不能不修改库本身呢? 既然 Python 是动态语言, 可以运行中动态修改几乎一切东西, 那么运行时修改 reportlab 的类吧, 只要在最终调用 reportlab 生成 PDF 前动态修改到自己要的就行 注册字体 因为主要是自己用, 就硬编码使用自己喜欢的文泉驿正黑字体吧, 用 reportlab.pdfbase.pdfmetrics.registerfont 注册文泉驿 import reportlab.rl_config reportlab.rl_config.warnonmissingfontglyphs = 0 import reportlab.pdfbase.pdfmetrics import reportlab.pdfbase.ttfonts reportlab.pdfbase.pdfmetrics.registerfont(reportlab.pdfbase.ttfonts.ttfont('song', '/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf')) 改默认字体 先好歹让中文能显示吧, 不如暂时让所有字体都用文泉驿 ( 刚才把文泉驿注册为 "song", 所以这里用 "song" 字体 ) 修改 reportlab.lib.fonts.ps2tt 和 reportlab.lib.fonts.tt2ps import reportlab.lib.fonts reportlab.lib.fonts.ps2tt = lambda psfn ('song', 0, 0) reportlab.lib.fonts.tt2ps = lambda fn,b,i 'song'
2 中文换行 为了省事, 就不考虑哪些要 CJK 折行哪些不要了, 直接 try CJK 换行, except 再英文换行 修改 reportlab.platypus.paragraph.wrap import reportlab.platypus def wrap(self, availwidth, availheight) # work out widths array for breaking self.width = availwidth leftindent = self.style.leftindent first_line_width = availwidth - (leftindent+self.style.firstlineindent) - self.style.rightindent later_widths = availwidth - leftindent - self.style.rightindent try self.blpara = self.breaklinescjk([first_line_width, later_widths]) except self.blpara = self.breaklines([first_line_width, later_widths]) self.height = len(self.blpara.lines) * self.style.leading return (self.width, self.height) reportlab.platypus.paragraph.wrap = wrap 完整的一段 就是将上边 3 个合起来 import reportlab.rl_config reportlab.rl_config.warnonmissingfontglyphs = 0 import reportlab.pdfbase.pdfmetrics import reportlab.pdfbase.ttfonts reportlab.pdfbase.pdfmetrics.registerfont(reportlab.pdfbase.ttfonts.ttfont('song', '/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf')) import reportlab.lib.fonts reportlab.lib.fonts.ps2tt = lambda psfn ('song', 0, 0) reportlab.lib.fonts.tt2ps = lambda fn,b,i 'song' ## for CJK Wrap import reportlab.platypus def wrap(self, availwidth, availheight) # work out widths array for breaking self.width = availwidth leftindent = self.style.leftindent first_line_width = availwidth - (leftindent+self.style.firstlineindent) - self.style.rightindent later_widths = availwidth - leftindent - self.style.rightindent try self.blpara = self.breaklinescjk([first_line_width, later_widths]) except self.blpara = self.breaklines([first_line_width, later_widths]) self.height = len(self.blpara.lines) * self.style.leading return (self.width, self.height) reportlab.platypus.paragraph.wrap = wrap 使用 具体的说了那么多, 那实际怎么做呢? 前面说了, Python 是动态语言, 你可以将上边的代码随便插入到你的任何程序或模块里, 只要在实际调用 reportlab 生成 PDF 前就可以了 1. 直接点, 在你的程序 import reportlab 前插入上边的代码 2. 如果想让你原先的文件不要插入这突兀的语句, 那可以将上边的代码写入到如 cjkreportlab.py, 在你需要用 reportlab 做中文 pdf 的代码里加个 import cjkreportlab 例子 这里给个修改的 rst2pdf.py #!/usr/bin/env python # -*- coding utf-8 -*- import docutils.core,docutils.nodes,sys,re import sys import pprint from types import StringType from docutils import version, version_details, SettingsSpec from docutils import frontend, io, utils, readers, writers from docutils.frontend import OptionParser from docutils.transforms import Transformer
3 import docutils.readers.doctree from urlparse import * from reportlab.platypus import * #from reportlab.platypus.para import Paragraph,FastPara,Para from reportlab.pdfbase.pdfmetrics import stringwidth from reportlab.lib.enums import * import reportlab.lib.colors as colors from reportlab.lib.units import * from reportlab.lib.pagesizes import * from copy import copy from cgi import escape try from wordaxe.rl.paragraph import Paragraph from wordaxe.rl.styles import ParagraphStyle, getsamplestylesheet except print "No support for hyphenation, install wordaxe" ## 就是在这里添加前面说的代码啦 ############################ import reportlab.rl_config reportlab.rl_config.warnonmissingfontglyphs = 0 import reportlab.pdfbase.pdfmetrics import reportlab.pdfbase.ttfonts reportlab.pdfbase.pdfmetrics.registerfont(reportlab.pdfbase.ttfonts.ttfont('song', '/usr/share/fonts/truetype/wqy/wqy-zenhei.ttf')) import reportlab.lib.fonts reportlab.lib.fonts.ps2tt = lambda psfn ('song', 0, 0) reportlab.lib.fonts.tt2ps = lambda fn,b,i 'song' ## for CJK Wrap import reportlab.platypus def wrap(self, availwidth, availheight) # work out widths array for breaking self.width = availwidth leftindent = self.style.leftindent first_line_width = availwidth - (leftindent+self.style.firstlineindent) - self.style.rightindent later_widths = availwidth - leftindent - self.style.rightindent try self.blpara = self.breaklinescjk([first_line_width, later_widths]) except self.blpara = self.breaklines([first_line_width, later_widths]) self.height = len(self.blpara.lines) * self.style.leading return (self.width, self.height) reportlab.platypus.paragraph.wrap = wrap import sys reload(sys) sys.setdefaultencoding('utf8') ######################################################## ## style ########################################################################################## # Demo stylesheet module.for rst2pdf from reportlab.platypus import * import reportlab.lib.colors as colors from reportlab.lib.units import * from reportlab.pdfbase.ttfonts import TTFont from reportlab.lib.fonts import addmapping from reportlab.lib.styles import * from reportlab.lib.enums import * from reportlab.pdfbase import pdfmetrics try from wordaxe.rl.paragraph import Paragraph from wordaxe.rl.styles import ParagraphStyle,getSampleStyleSheet except print "No hyphenation support install wordaxe" import os # Set these, and then **maybe** think of setting the stylesheets below # if you want finer control stdfont = 'song' stdbold = 'song' stditalic = 'song' stdbolditalic = 'song' stdmono = 'song' # You can embed your own fonts and use them later if you want if os.path.isfile('wrabbit/whitrabt.ttf')
4 pdfmetrics.registerfont(ttfont('whiterabbit', 'wrabbit/whitrabt.ttf')) addmapping('whiterabbit', 0, 0, 'WhiteRabbit') #normal addmapping('whiterabbit', 0, 1, 'WhiteRabbit') #italic addmapping('whiterabbit', 1, 0, 'WhiteRabbit') #bold addmapping('whiterabbit', 1, 1, 'WhiteRabbit') #italic and bold stdmono = 'WhiteRabbit' def getstylesheet() """Returns a stylesheet object""" stylesheet = StyleSheet1() stylesheet.add(paragraphstyle(name='normal', fontname=stdfont, bulletfontname=stdfont, fontsize=10, bulletfontsize=10, leading=12, language='en', hyphenation=true )) stylesheet.add(paragraphstyle(name='bodytext', spacebefore=6, language='en', hyphenation=true )) stylesheet.add(paragraphstyle(name='footer', backcolor='#efefef', alignment=ta_center) ) stylesheet.add(paragraphstyle(name='attribution', parent=stylesheet['bodytext'], alignment=ta_right) ) stylesheet.add(paragraphstyle(name='fieldname', parent=stylesheet['bodytext'], alignment=ta_right, fontname=stdbold, bulletfontname=stdbold, ) ) stylesheet.add(paragraphstyle(name='rubric', parent=stylesheet['bodytext'], textcolor=colors.darkred, alignment=ta_center) ) stylesheet.add(paragraphstyle(name='italic', parent=stylesheet['bodytext'], fontname = stditalic, bulletfontname=stditalic) ) stylesheet.add(paragraphstyle(name='title', fontname = stdbold, bulletfontname=stdbold, fontsize=18, bulletfontsize=18, leading=22, alignment=ta_center, spaceafter=6), alias='title') stylesheet.add(paragraphstyle(name='subtitle', parent=stylesheet['title'], fontsize=14, bulletfontsize=14), alias='subtitle') stylesheet.add(paragraphstyle(name='heading1', fontname = stdbold, bulletfontname=stdbold, fontsize=18, bulletfontsize=18, leading=22, keepwithnext=true, spaceafter=6), alias='h1')
5 stylesheet.add(paragraphstyle(name='heading2', fontname = stdbold, bulletfontname=stdbold, fontsize=14, bulletfontsize=14, leading=18, spacebefore=12, keepwithnext=true, spaceafter=6), alias='h2') stylesheet.add(paragraphstyle(name='heading3', fontname = stdbolditalic, bulletfontname=stdbolditalic, fontsize=12, bulletfontsize=12, leading=14, spacebefore=12, keepwithnext=true, spaceafter=6), alias='h3') stylesheet.add(paragraphstyle(name='heading4', fontname = stdbolditalic, bulletfontname=stdbolditalic, fontsize=12, bulletfontsize=12, leading=14, spacebefore=12, keepwithnext=true, spaceafter=6), alias='h4') stylesheet.add(paragraphstyle(name='bullet', firstlineindent=0, spacebefore=3), alias='bu') stylesheet.add(paragraphstyle(name='definition', firstlineindent=0, leftindent=36, bulletindent=0, spacebefore=6, fontname=stdbold, bulletfontname=stdbold), alias='df') stylesheet.add(paragraphstyle(name='code', fontname=stdmono, bulletfontname=stdmono, fontsize=8, bulletfontsize=8, leading=8.8, firstlineindent=0, leftindent=12, spacebefore=4)) return stylesheet # Some table styles used for pieces of the document tstyles={} # Used for regular tables tstylenorm = [ ('VALIGN',(0,0),(-1,-1),'TOP'), ('INNERGRID', (0,0), (-1,-1), 0.25, colors.black), ('BOX', (0,0), (-1,-1), 0.25, colors.black), ] # Header row in tables tstylehead = ('BACKGROUND',(0,0),(-1,0),colors.yellow) tstyles['normal']=tablestyle(tstylenorm) # Used for field lists
6 tstyles['field']=tablestyle([ ('VALIGN',(0,0),(-1,-1),'TOP'), ('ALIGNMENT',(0,0),(1,-1),'RIGHT'), ]) fieldlist_lwidth=3*cm # Used for endnotes tstyles['endnote']=tablestyle([ ('VALIGN',(0,0),(-1,-1),'TOP'), ('ALIGNMENT',(0,0),(1,-1),'RIGHT'), ]) # Left column of the endnote. The content of the note takes the rest of # the available space endnote_lwidth=2*cm # Used for sidebars tstyles['sidebar']=tablestyle([ ('VALIGN',(0,0),(-1,-1),'TOP'), ('BACKGROUND',(0,0),(-1,-1),colors.lightyellow), ]) ################################################################################################### styles=getstylesheet() try import wordaxe from wordaxe.pyhnjhyphenator import PyHnjHyphenator try wordaxe.hyphregistry['en'] = PyHnjHyphenator('en_US',5) except wordaxe.hyphregistry['en'] = PyHnjHyphenator('en_US',5,purePython=True) except print "No support for hyphenation, install wordaxe" # This is A4 paper, change it as you wish pw,ph=ps=a4 # Margins tm=2*cm bm=2*cm lm=3*cm rm=1.5*cm # tw is the text width. # We need it to calculate header-footer height # and compress literal blocks. tw=pw-lm-rm page_break_level=0 marks="#=-_*^>%& " lowerroman=['i','ii','iii','iv','v','vi','vii','viii','ix','x','xi'] loweralpha="abcdefghijklmnopqrstuvwxyz" class MyIndenter(Indenter) # Bugs in reportlab? def draw(self) pass width=0 height=0 def depth (node) if node.parent==none return 0 return 1+depth(node.parent) decoration = {'header'none, 'footer'none, 'endnotes'[]} def gather_pdftext (node, depth, in_line_block=false,replaceent=true) return ''.join([gen_pdftext(n,depth,in_line_block,replaceent) for n in node.children ]) def gen_pdftext(node, depth, in_line_block=false,replaceent=true) pre="" post="" if isinstance (node, docutils.nodes.paragraph) \ or isinstance (node, docutils.nodes.title) \ or isinstance (node, docutils.nodes.subtitle) \ +"\n" elif isinstance (node, docutils.nodes.text) node.pdftext=node.astext()
7 elif isinstance (node, docutils.nodes.strong) pre="<b>" post="</b>" elif isinstance (node, docutils.nodes.emphasis) pre="<i>" post="</i>" elif isinstance (node, docutils.nodes.literal) pre='<font face="%s">'%styles['code'].fontname post="</font>" elif isinstance (node, docutils.nodes.superscript) pre='<super>' post="</super>" elif isinstance (node, docutils.nodes.subscript) pre='<sub>' post="</sub>" elif isinstance (node, docutils.nodes.title_reference) # FIXME needs to work as a link pre='<font color="blue">' post="</font>" elif isinstance (node, docutils.nodes.reference) pre='<font color="blue">' post="</font>" uri=node.get('refuri') if uri if urlparse(uri)[0] pre+=u'<a href="%s">'%uri post='</a>'+post uri=node.get('refid') if uri pre+=u'<a href="#%s">'%uri post='</a>'+post node.pdftext=node.astext() elif isinstance (node, docutils.nodes.option_string) \ or isinstance (node, docutils.nodes.option_argument) \ node.pdftext=node.astext() elif isinstance (node, docutils.nodes.header) \ or isinstance (node, docutils.nodes.footer) \ elif isinstance (node, docutils.nodes.system_message) \
8 or isinstance (node, docutils.nodes.problematic) \ sys.stderr.write (node.astext()+"\n") sys.stderr.flush() pre='<font color="red">' post="</font>" elif isinstance (node, docutils.nodes.generated) elif isinstance (node, docutils.nodes.image) node.pdftext='<img src="%s" />'%node.get('uri') elif isinstance (node, docutils.nodes.footnote_reference) # Fixme link to the right place node.pdftext=u'<super><font color="blue">%s</font></super>'%node.astext() elif isinstance (node, docutils.nodes.citation_reference) # Fixme link to the right place node.pdftext=u'<font color="blue">[%s]</font>'%node.astext() # FIXME nodes we are ignoring for the moment elif isinstance (node, docutils.nodes.target) # FIXME make it work as a target for links print "Unkn. node (gen_pdftext) ", node. class print node #print node.transform sys.exit(1) return node.pdftext def PreformattedFit(text,style) """Preformatted section that gets horizontally compressed if needed.""" w=max(map(lambda linestringwidth(line,style.fontname,style.fontsize),text.splitlines())) mw=tw-style.leftindent-style.rightindent if w>mw style=copy(style) f=max((0.375,mw/w)) style.fontsize*=f style.leading*=f return Preformatted(text,style) def gen_elements(node, depth, in_line_block=false, style=styles['bodytext']) global decoration if isinstance (node, docutils.nodes.document) node.elements=gather_elements(node,depth,style=style) ####################### ## Tables ####################### elif isinstance (node, docutils.nodes.table) node.elements=gather_elements(node,depth) elif isinstance (node, docutils.nodes.tgroup) rows=[] hashead=false for n in node.children if isinstance (n,docutils.nodes.thead) hashead=true for row in n.children r=[] for cell in row.children r.append(cell) rows.append(r) elif isinstance (n,docutils.nodes.tbody) for row in n.children r=[] for cell in row.children
9 r.append(cell) rows.append(r) spans=filltable (rows) data=[] for row in rows r=[] for cell in row if isinstance(cell,str) r.append("") r.append(gather_elements(cell,depth)) data.append(r) st=spans+tstylenorm if hashead st+=[tstylehead] node.elements=[table(data,style=tablestyle(st))] elif isinstance (node, docutils.nodes.title) # Special cases (Not sure this is right ;-) if isinstance (node.parent, docutils.nodes.document) # FIXME maybe make it a coverpage? node.elements=[paragraph(gen_pdftext(node,depth), styles['title'])] elif isinstance (node.parent, docutils.nodes.topic) # FIXME style correctly node.elements=[paragraph(gen_pdftext(node,depth), styles['heading3'])] elif isinstance (node.parent, docutils.nodes.admonition) or \ isinstance (node.parent, docutils.nodes.sidebar) node.elements=[paragraph(gen_pdftext(node,depth), styles['heading3'])] node.elements=[paragraph(gen_pdftext(node,depth), styles['heading%d'%min(depth,3)])] elif isinstance (node, docutils.nodes.subtitle) if isinstance (node.parent,docutils.nodes.sidebar) node.elements=[paragraph(gen_pdftext(node,depth), styles['heading4'])] elif isinstance (node.parent,docutils.nodes.document) node.elements=[paragraph(gen_pdftext(node,depth), styles['subtitle'])] elif isinstance (node, docutils.nodes.paragraph) node.elements=[paragraph(gen_pdftext(node,depth), style)] elif isinstance (node, docutils.nodes.docinfo) # A docinfo usually contains several fields. # We'll render it as a series of elements, one field each. node.elements=gather_elements(node,depth,style=style) elif isinstance (node, docutils.nodes.field) # A field has two child elements, a field_name and a field_body. # We render as a two-column table, left-column is right-aligned, # bold, and much smaller fn=paragraph(gather_pdftext(node.children[0],depth)+"",style=styles['fieldname']) fb=gen_elements(node.children[1],depth) node.elements=[table([[fn,fb]],style=tstyles['field'],colwidths=[fieldlist_lwidth,none])] elif isinstance (node, docutils.nodes.decoration) # This is a tricky one. We need to switch our document's # page templates based on this. If decoration contains a # header and/or a footer, we need to use those # right now, we avoid trouble. # FIXME Implement node.elements=gather_elements(node,depth,style=style) elif isinstance (node, docutils.nodes.header) decoration['header']=paragraph(gather_pdftext(node,depth),style=styles['footer']) node.elements=[] elif isinstance (node, docutils.nodes.footer) decoration['footer']=paragraph(gather_pdftext(node,depth),style=styles['footer']) node.elements=[] elif isinstance (node, docutils.nodes.author) if isinstance (node.parent,docutils.nodes.authors) # Is only one of multiple authors. Return a paragraph node.elements=[paragraph(gather_pdftext(node,depth), style=style)] # A single author works like a field node.elements=[table([[paragraph("author",style=styles['fieldname']),
10 ] elif isinstance (node, docutils.nodes.authors) # Multiple authors. Create a two-column table. Author references on the right. td=[[paragraph("authors",style=styles['fieldname']),gather_elements(node,depth,style=style)]] node.elements=[table(td,style=tstyles['field'],colwidths=[fieldlist_lwidth,none])] elif isinstance (node, docutils.nodes.organization) t=table([[paragraph("organization",style=styles['fieldname']), elif isinstance (node, docutils.nodes.contact) t=table([[ Paragraph("Contact",style=styles['FieldName']), elif isinstance (node, docutils.nodes.address) t=table([[ Paragraph("Address",style=styles['FieldName']), elif isinstance (node, docutils.nodes.version) t=table([[ Paragraph("Version",style=styles['FieldName']), elif isinstance (node, docutils.nodes.revision) t=table([[ Paragraph("Revision",style=styles['FieldName']), elif isinstance (node, docutils.nodes.status) t=table([[ Paragraph("Version",style=styles['FieldName']), elif isinstance (node, docutils.nodes.date) t=table([[ Paragraph("Date",style=styles['FieldName']), elif isinstance (node, docutils.nodes.copyright) t=table([[paragraph("copyright",style=styles['fieldname']), elif isinstance (node, docutils.nodes.topic) \ or isinstance (node, docutils.nodes.field_body) \ node.elements=gather_elements(node,depth,style=style) elif isinstance (node, docutils.nodes.section) if depth<page_break_level node.elements=[pagebreak()]+gather_elements(node,depth+1) node.elements=gather_elements(node,depth+1) elif isinstance (node, docutils.nodes.bullet_list) \ or isinstance (node, docutils.nodes.enumerated_list) \ or isinstance (node, docutils.nodes.definition_list) \ or isinstance (node, docutils.nodes.option_list) \ or isinstance (node, docutils.nodes.field_list) \ or isinstance (node, docutils.nodes.definition) \ node.elements=gather_elements(node,depth,style=style) elif isinstance (node, docutils.nodes.option_list_item) og = gather_elements(node.children[0],depth,style) desc = gather_elements(node.children[1],depth,style) node.elements=[table([[og,desc]],style=tstyles['field'])] elif isinstance (node, docutils.nodes.definition_list_item) # I need to catch the classifiers here tt=[] dt=[] for n in node.children if isinstance(n,docutils.nodes.term) or \ isinstance(n,docutils.nodes.classifier) tt.append(gather_pdftext(n,depth,style))
11 dt=dt+gen_elements(n,depth,style) node.elements=[paragraph(''.join(tt),style),myindenter(left=10)]+dt+[myindenter(left=-10)] elif isinstance (node, docutils.nodes.list_item) # A list_item is a table of two columns. # The left one is the bullet itself, the right is the # item content. This way we can nest them. el=gather_elements(node,depth,style=style) b="" if node.parent.get('bullet') or isinstance(node.parent,docutils.nodes.bullet_list) # FIXME use correct bullet symbols, check inter-paragraph spacing b=str(node.parent.get('bullet')) if b=="none" b="" elif node.parent.get ('enumtype')=='arabic' b=str(node.parent.children.index(node)+1)+'.' elif node.parent.get ('enumtype')=='lowerroman' b=str(lowerroman[node.parent.children.index(node)])+'.' elif node.parent.get ('enumtype')=='upperroman' b=str(lowerroman[node.parent.children.index(node)].upper())+'.' elif node.parent.get ('enumtype')=='loweralpha' b=str(loweralpha[node.parent.children.index(node)])+'.' elif node.parent.get ('enumtype')=='upperalpha' b=str(loweralpha[node.parent.children.index(node)].upper())+'.' print "Unknown kind of list_item" print node.parent sys.exit(1) el[0].bullettext = b node.elements=el elif isinstance (node, docutils.nodes.transition) node.elements=[separation()] elif isinstance (node, docutils.nodes.system_message) \ or isinstance (node, docutils.nodes.problematic) \ # FIXME show the error in the document, red, whatever sys.stderr.write (node.astext()+"\n") sys.stderr.flush() node.elements=[] elif isinstance (node, docutils.nodes.block_quote) node.elements=[myindenter(left=20)]+gather_elements(node,depth,style)+[myindenter(left=-20)] elif isinstance (node, docutils.nodes.attribution) node.elements=[paragraph(gather_pdftext(node,depth),styles['attribution'])] elif isinstance (node, docutils.nodes.comment) # Class that generates no output node.elements=[] elif isinstance (node, docutils.nodes.line_block) # Obsolete? Let's do something anyway. # FIXME indent or not? qstyle=copy(style) qstyle.leftindent+=30 node.elements=gather_elements(node,depth,style=qstyle) elif isinstance (node, docutils.nodes.line) # All elements in one line node.elements=[paragraph(gather_pdftext(node,depth),style=style)] elif isinstance (node, docutils.nodes.literal_block) \ or isinstance (node, docutils.nodes.doctest_block) \ or isinstance (node, docutils.nodes.option) \ node.elements=[preformattedfit(gather_pdftext(node,depth,replaceent=false),styles['code'])] elif isinstance (node, docutils.nodes.attention) \ or isinstance (node, docutils.nodes.caution) \ or isinstance (node, docutils.nodes.danger) \ or isinstance (node, docutils.nodes.error) \ or isinstance (node, docutils.nodes.hint) \ or isinstance (node, docutils.nodes.important) \ or isinstance (node, docutils.nodes.note) \ or isinstance (node, docutils.nodes.tip) \ or isinstance (node, docutils.nodes.warning) \
12 or isinstance (node, docutils.nodes.admonition) \ node.elements=[paragraph(node.tagname.title(),style=styles['heading3'])]+gather_elements(node,depth,style=style) elif isinstance (node, docutils.nodes.image) # FIXME handle all the other attributes i=image(filename=str(node.get("uri"))) if node.get('align') i.halign=node.get('align').upper() node.elements=[i] elif isinstance (node, docutils.nodes.figure) # The sub-elements are the figure and the caption, and't ugly if # they separate node.elements=[keeptogether(gather_elements(node,depth,style=style))] elif isinstance (node, docutils.nodes.caption) node.elements=[paragraph('<i>'+gather_pdftext(node,depth)+'</i>',style=style)] elif isinstance (node, docutils.nodes.legend) node.elements=gather_elements(node,depth,style=style) elif isinstance (node, docutils.nodes.sidebar) node.elements=[table([[ gather_elements(node,depth,style=style)]],style=tstyles['sidebar'])] elif isinstance (node, docutils.nodes.rubric) node.elements=[paragraph(gather_pdftext(node,depth),styles['rubric'])] elif isinstance (node, docutils.nodes.compound) # FIXME think if this is even implementable node.elements=gather_elements(node,depth,style) elif isinstance (node, docutils.nodes.container) # FIXME think if this is even implementable node.elements=gather_elements(node,depth,style) elif isinstance (node, docutils.nodes.substitution_definition) node.elements=[] elif isinstance (node, docutils.nodes.tbody) rows=[gen_elements(n,depth) for n in node.children] t=[] for r in rows if not r continue t.append(r) node.elements=[table(t,style=tstyles['normal'])] elif isinstance (node, docutils.nodes.footnote) # It seems a footnote contains a label and a series of elements label=paragraph(gather_pdftext(node.children[0],depth),style) contents=gather_elements(node,depth,style)[1] decoration['endnotes'].append([label,contents]) node.elements=[] elif isinstance (node, docutils.nodes.label) node.elements=[paragraph(gather_pdftext(node,depth),style)] elif isinstance (node, docutils.nodes.text) node.elements=[paragraph(gather_pdftext(node,depth),style)] elif isinstance (node, docutils.nodes.entry) node.elements=gather_elements(node,depth,style) # FIXME nodes we are ignoring for the moment elif isinstance (node, docutils.nodes.target) \ or isinstance (node, docutils.nodes.footnote) \ or isinstance (node, docutils.nodes.citation) \ or isinstance (node, docutils.nodes.reference) \ or isinstance (node, docutils.nodes.raw) \ node.elements=[] print "Unkn. node (gen_elements) ", node. class print node sys.exit(1) # set anchors for internal references for id in node['ids'] node.elements.insert( node.elements and isinstance(node.elements[0], PageBreak) and 1 or 0, Paragraph('<a name="%s"/>'%id,style)) return node.elements def gather_elements (node, depth, in_line_block=false,style=styles['bodytext']) r=[]
13 for n in node.children r=r+(gen_elements(n,depth,in_line_block,style=style)) return r class Separation(Flowable) " A simple <hr>-like thingie" def wrap(self,w,h) self.w=w return (w,1*cm) def draw(self) self.canv.line(0,0.5*cm,self.w,0.5*cm) class FancyPage(PageTemplate) def init (self,_id,pw,ph,tm,bm,lm,rm,hh,fh,head,foot) tw=pw-lm-rm #textframe=frame(lm,tm+hh,tw,ph-tm-bm-hh-fh) textframe=frame(lm,tm+hh,tw,ph-tm-bm-hh-fh,toppadding=hh,bottompadding=fh) self.head=head self.hx=lm self.hy=ph-tm self.foot=foot self.fx=lm self.fy=bm PageTemplate. init (self,_id,[textframe]) def beforedrawpage(self,canv,doc) if self.head self.head.drawon(canv,self.hx,self.hy) if self.foot self.foot.drawon(canv,self.fx,self.fy) def filltable (rows) # If there is a multicol cell, we need to insert Continuation Cells # to make all rows the same length for y in range(0,len( rows)) for x in range (0,len(rows[y])) cell=rows[y][x] if isinstance (cell,str) continue if cell.get("morecols") for i in range(0,cell.get("morecols")) rows[y].insert(x+1,"") for y in range(0,len( rows)) for x in range (0,len(rows[y])) cell=rows[y][x] if isinstance (cell,str) continue if cell.get("morerows") for i in range(0,cell.get("morerows")) rows[y+i+1].insert(x,"") # Create spans list for reportlab's table style spans=[] for y in range(0,len( rows)) for x in range (0,len(rows[y])) cell=rows[y][x] if isinstance (cell,str) continue if cell.get("morecols") mc=cell.get("morecols") mc=0 if cell.get("morerows") mr=cell.get("morerows") mr=0 if mc or mr spans.append(('span',(x,y),(x+mc,y+mr))) return spans if name == " main " input=open(sys.argv[1]).read() import docutils.core doc=docutils.core.publish_doctree(input) elements=gen_elements(doc,0)
14 endnotes = decoration['endnotes'] if endnotes elements.append(spacer(1,2*cm)) elements.append(separation()) for n in decoration['endnotes'] elements.append(table([[n[0],n[1]]],style=tstyles['endnote'],colwidths=[endnote_lwidth,none])) head=decoration['header'] foot=decoration['footer'] if head hh=head.wrap(tw,ph)[1] hh=0 if foot fh=foot.wrap(tw,ph)[1] fh=0 # So, now, create the FancyPage with the right sizes and elements FP=FancyPage("fancypage",pw,ph,tm,bm,lm,rm,hh,fh,head,foot) # A basic document for us to write to 'rl_hello_platypus.pdf' pdfdoc = BaseDocTemplate(sys.argv[1]+'.pdf',pageTemplates=[FP],showBoundary=0,pagesize=ps) pdfdoc.build(elements) 唔, 您可以拿本 RST 文件来测试 rst2pdf 中文, 注意编码得是 utf8 命令./rst2pdf.py XXX.rst 其他问题 现存问题 1. 硬编码的文泉驿正黑字体路径不能灵活适应不同系统 2. 文泉驿正黑中文没有粗体和斜体 3. 由于没有选字, 而是一律文泉驿字体, 使得英文也没有了粗斜体 您说, 本文做的 pdf 没书签没目录? 唔, 这是这个 rst2pdf 程序原先的问题, 本文只解决 python-reportlab 中文显示和换行 还有其他问题么? 请洽 python-cn 的老大 Zoomq 大妈 (Zoom. Quiet <zoom.quiet@gmail.com>) ~ 奥运进行时, 请尽情搔扰 ~
汉字的笔画. 学习目标 Objective. 学习基本笔画和复合笔画 Learn basic and compound strokes
1 汉 学习目标 Objective 学习基本笔画和复合笔画 Learn basic and compound strokes 基本笔画 Basic Strokes 现代汉字是方块形的, 是由一些基本笔画组成的 Chinese characters are square-shaped and composed of some basic strokes. 1. 看一看, 写一写 Look and write.
More informationBallroom Dancing 国标舞
Ballroom Dancing 国标舞 1 Ballroom Dancing 国标舞 Celebrity Dance Show Popular Year after Year 名流国标舞表演日趋看好 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : Ballroom dancing in the UK used
More informationSwimming Star 泳坛新星 1
Swimming Star 泳坛新星 1 Swimming Star 泳坛新星 A thirteen year old swimming success 十三岁的游泳健将 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : Need some inspiration? Looking for a sporting
More informationAthletics World Championships: 世界田径锦标赛
Athletics World Championships: 世界田径锦标赛 Athletics World Championships 世界田径锦标赛 Usain Bolt Makes History Again 博尔特再破世界纪录 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : It's happened
More informationThe Boat Race 划船赛. The Oxford and Cambridge Boat Race 牛津剑桥划船赛. Read the text below and do the activity that follows.
The Boat Race 1 The Boat Race 划船赛 The Oxford and Cambridge Boat Race 牛津剑桥划船赛 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : Oxford and Cambridge are the oldest and most famous
More informationReturn of the Heroes 奥运健将凯旋归来
Return of the Heroes 奥运健将凯旋归来 1 Return of the Heroes 奥运健将凯旋归来 Welcome Back Team GB 欢迎英国队回来 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : Members of the British Team received a
More informationLondon Marathon 伦敦马拉松
London Marathon 2008 2008 伦敦马拉松 1 London Marathon 2008 2008 伦敦马拉松 A Variety of Athletic Runners and Fundraisers 众多运动员和基金筹集人员 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : The
More informationThe 2009 Snooker World Championship 2009 年世界台球锦标赛
The 2009 Snooker World Championship 2009 年世界台球锦标赛 1 The 2009 Snooker World Championship 2009 年世界台球锦标赛 Chinese Players Put On a Great Show 中国选手表现出色 Read the text below and do the activity that follows.
More information中国乒乓球协会裁判委员会通讯. A Summary of Law and Regulation Changes since 2011
中国乒乓球协会裁判委员会通讯 2014(2) 2014 年 3 月 10 日 A Summary of Law and Regulation Changes since 2011 2011 年以来规则和规程的主要变化 LAWS 乒乓球比赛规则 2.02.04 The bottom of the net, along its whole length, shall be as close as possible
More informationThe Snooker World Championship
The Snooker World Championship 1 Snooker 台球 The Snooker World Championship 世界台球锦标赛 Snooker aficionados in the UK have descended upon Sheffield, a city in the north of England, for the 2006 Snooker World
More informationThe English Premier League
The English Premier League 1 The English Premier League 英超联赛 Pre-season Transfers 赛季前的转队球员 Although the 2005/2006 football season doesn t start until mid-august, Premiership clubs are in a state of frantic
More informationJet Li 李连杰. China s highest-earning star 中国收入最高的影星. Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 :
Jet Li 李连杰 1 Jet Li 李连杰 China s highest-earning star 中国收入最高的影星 Read the text below and do the activity that follows. 阅读下面的短文, 然后完成练习 : Actor Jet Li has hit the headlines this week because he has broken
More information红宝书 练习题及答案详解 必考词 考研英语词汇 ( 必考词 + 基础词 + 超纲词 ) 第三节. (Unit 15 Unit 21; 第 99 页 147 页 ) 练习一 : 词汇与搭配 通用网址 : 红宝书. 红宝书网址 :
红宝书 考研英语词汇 ( 必考词 + 基础词 + 超纲词 ) 练习题及答案详解 必考词 第三节 (Unit 15 Unit 21; 第 99 页 147 页 ) 练习一 : 词汇与搭配 1. He failed to carry out some of the provisions of the contract, and now he has to answer the consequences.
More informationCCA Q NEWSLETTER
Corning Chinese Association Since 1960 Corning, New York www.cca-ny.org Editor: Hanzheng (Hank) Wang, Earl Pierce CCA Q2 2016 NEWSLETTER Our Mission: To facilitate networking and personal/professional
More information中国船级社 (2011 年 ) 通函第 58 号总第 122 号 2011 年 7 月 1 日 ( 共 2+18 页 ) 关于修订 散装运输危险化学品船舶构造与设备规范 (2009) ( 以下简称液化规范 ) 进行本次修订 本次修订内容将分别纳入下一版散化规范和液化规范
C C S 通函 Circular Form: RWPRR401-B 中国船级社 (2011 年 ) 通函第 58 号总第 122 号 2011 年 7 月 1 日 ( 共 2+18 页 ) 发 : 总部有关处室 本社验船师 各审图中心 船东 船舶管理公司 船厂 产品制造厂 设计院 关于修订 散装运输危险化学品船舶构造与设备规范 (2009) 和 散装运输液化气体船舶构造与设备规范 (2006) 的通知
More informationHOW DO I REGISTER FOR SKATE SASKATOON PROGRAMS?
HOW DO I REGISTER FOR SKATE SASKATOON PROGRAMS? Go to www.skatesaskatoon.com. Create yourself a login using your email address and password that you will remember as you will need it each time you login.
More informationKids Bike Helmet. User Manual. More language instruction and information please visit the official website to download
KS Kids Bike Helmet User Manual More language instruction and information please visit the official website to download www.livall.com I. INTRODUCTION This kids bike helmet is made of the lightest and
More information锦维商务第 44 期月度电子双语简报 7 月 15 日起由锦维商务发布敬请特别注意上面部分是英文版本中文版本在本英文版本下面请注意阅读预告第 45 期简报将于 2003 年 8 月 15 日起发到您信箱到时请注意查收
锦维商务第 44 期月度电子双语简报 7 月 15 日起由锦维商务发布敬请特别注意上面部分是英文版本中文版本在本英文版本下面请注意阅读预告第 45 期简报将于 2003 年 8 月 15 日起发到您信箱到时请注意查收 JWC Bilingual Monthly E-Newsletter No.44 From July 15, 2003 By Jin Wei Consulting Service Ltd.
More information工厂自动化 FACTORY AUTOMATION MORE THAN IDENTIFICATION RFID CC-LINK INTERFACE 支持CC-LINK的RFID识别系统
工厂自动化 FACTORY AUTOMATION MORE THAN IDENTIFICATION RFID CC-LINK INTERFACE 支持CC-LINK的RFID识别系统 RFID 射频识别系统概述 RFID IDENTIFICATION SYSTEMS 支持各类现场总线系统 RS-85 RS-232 RFID 系统简介 倍加福 RFID 无线射频技术 RFID (Radio Frequency
More information2014 年 12 月大学英语四级考试试卷真题 ( 汇总版 ) 来源 : 文都教育
2014 年 12 月大学英语四级考试试卷真题 ( 汇总版 ) 来源 : 文都教育 Part Ⅱ Listening Comprehension (30 minutes) Section A Directions: In this section, you will hear 8 short conversations and 2 long conversations. At the end of
More informationLITTLE FOAL CROSSES THE RIVER XIAO MA GUO HE 小马过河
LITTLE FOAL CROSSES THE RIVER XIAO MA GUO HE 过 Litt Foal and his mother lived in a beautiful meadow with soft green grass. They were very happy. 和 的 yì qǐ 起 zhù 住 zài 在 yí piàn 片 lǜ yīn yīn 绿茵茵的 měi 美
More informationLexi Srisuwan. (803)
Lexi Srisuwan Lexi.Srisuwan@gmail.com (803) 312-3108 COASTAL BEIJING CAROLINA UNIVERSITY 2015 INSTITUTE OF GRAPHIC COMMUNICATION CCU & BIGC Tee Design Coastal Carolina University had a study abroad program,
More informationAUTOGENOUS DEVICES 气焊设备
ENGLISH OPERATING INSTRUCTIONS... Page 2 操作说明书... 第 28 页 中文 AUTOGENOUS DEVICES 气焊设备 Revision history 2 Revision Date Comments, affected sections/chapters Product responsibility 01 2017-01-25 Reworking
More information学生安全. Student Safety. Vern Granger
学生安全 Student Safety Vern Granger 紧急信息 Emergency information 美国的紧急救援电话号码为 911 The emergency response phone number in the United States is 911 什么时候拨打 911 When to call 911 重要疾病 major illness 严重受伤 serious
More information亚洲脉络电子通讯 e-newsletter. 封面故事 Cover Story 2014 Q2. OneAsia Cloud Based Video Surveillance Solution
封面故事 Cover Story 2014 Q2 亚洲脉络电子通讯 e-newsletter OneAsia Cloud Based Video Surveillance Solution Keeping an eye on what happens in our environment is becoming more important to businesses. However, implementing
More informationLesson 5. Climbing the Wall. Part 1. 一 字彙填空與詞類變化 goal 1. Patrick has made up his mind to reach his g l of being a famous actor.
練習日期 : Lesson Five 43 Lesson 5 Climbing the Wall Part 1 字彙 一 字彙填空與詞類變化 goal 1. Patrick has made up his mind to reach his g l of being a famous actor. peak 2. The mountain p k is covered with snow all year
More informationRules and Regulations 规则和规例
1. Name of Tournament 球赛名称 第二届吉隆坡篮总 / 天天小童少年杯篮球锦标赛 2. Objectives 宗旨 2.1. To promote the game of basketball and to raise the standard of the game 鼓励观摩球艺, 籍以提高水准 2.2. To foster better relationship between
More informationRules and Regulations 规则和规例
1. Name of Tournament 球赛名称 2. Objectives 宗旨 2.1. To promote the game of basketball and to raise the standard of the game 鼓励观摩球艺, 籍以提高篮球水准 2.2. To foster better relationship between players, coaches and
More informationSam: I joined a basketball camp and learned some useful skills.
1 (On the street) Carl: Hey, Sam. How was your summer? 夏天過得怎麼樣啊? Sam: It was great. 很好 Carl: What did you do? 你 ( 夏天 ) 做什麼? Sam: I joined a basketball camp and learned some useful skills. 我參加籃球營, 學了一些有用的技巧
More information2018 IFBB-CBBA Elite Pro Championship
IFBB presents: 2018 IFBB-CBBA Elite Pro Championship 2018IFBB-CBBA 精英职业锦标赛 Inspection Report 竞赛规程 Beijing, China 中国, 北京 November 16-19, 2018 2018 年 11 月 16 日 -19 日 Welcome 欢迎辞 Chinese Bodybuilding Association
More informationContents , 11:01 AM
Contents Unit 1 1 Reading and Translating 1 Reading A: Modern Olympic Games 1 Reading B: Le Baron Pierre De Coubertin 4 Simulated Writing Name Card 7 Listening and Speaking Showing the Way 8 Unit 2 Basketball
More informationUnit 1. Table Tennis
Unit 1 Table Tennis 体育英语 Part One Knowledge Preparation Table tennis or ping-pong, originated in Britain in 1890s, is an indoor sport in which two or four opponents use a small racket to hit a lightweight
More informationName: 1. Wow! Watch this video to find out what we re going to be learning about in this Project:
Level: Project: Martial Arts Kung Fu Series: Culture Name: Welcome, Warrior! Have you ever watched Kung Fu Panda or Karate Kid? Have you heard of the actor Jackie Chan? This is the Project to learn more
More informationReputation Management and Research Integrity. What we do in JIPB? Editor-in-Chief: Chun-Ming Liu ( 刘春明 )
Reputation Management and Research Integrity What we do in JIPB? Editor-in-Chief: Chun-Ming Liu ( 刘春明 ) Journal of Integrative Plant Biology (JIPB) 整合植物生物学报 2015 年 8 月 24 日 Outline 1. About JIPB 2. Reputation
More informationCouncil on Tall Buildings and Urban Habitat
CFD Simulation of Urban Pedestrian Wind Comfort Optimization in High-Rise Building Cluster - Case Study Li Kuishan Ph.D, East China Architectural Design & Research Institute Co 目录 CONTENTS 研究背景 Research
More informationInstruction Manual D103238X012 January Type JEQ. Slam Shut Valve
Instruction Manual D103238X012 January 2018 Type JEQ Slam Shut Valve Contents 1. Introduction...3 2. Specifications... 3 3. Principle of Operation... 5 4. Installation...6 5. Adjustment...9 6. Shutdown...11
More information英文简历常用词汇大全. ambitious 有雄心壮志的 amiable 和蔼可亲的 amicable 友好的 analytical 善于分析的
中国海员之家网站航海英语系列英文简历常用词汇大全第 1 页 英文简历常用词汇大全 1 个人品质常用词汇 able 有才干的, 能干的 adaptable 适应性强的 active 主动的, 活跃的 aggressive 有进取心的 ambitious 有雄心壮志的 amiable 和蔼可亲的 amicable 友好的 analytical 善于分析的 apprehensive 有理解力的 aspiring
More informationKnowledge Preparation. Part One 体育英语
Unit 1 Football 体育英语 Part One Knowledge Preparation Football originated from a ball game called cuju in ancient China, and after being spread to Europe by Arabs, it developed into modern football in Britain
More informationThe Closing Ceremony of Nanjing 2014 is to be held at the Olympic Sports Centre Stadium on 28 August 2014.
南京青奥会闭幕式将于 2014 年 8 月 28 日在奥体中心体育场举行 The Closing Ceremony of Nanjing 2014 is to be held at the Olympic Sports Centre Stadium on 28 August 2014. Media Guide for the Closing Ceremony of Nanjing 2014 1 媒体准入政策
More informationFOX AND TIGER HU JIA HU WEI 狐假虎威
FOX AND TIGER HU JIA HU WEI 狐假虎威 Long long ago, there ved a tiger in a forest. Enormous in stature and magnificent in bearing, he was the king of all beasts, who feared him from the pth of their hearts.
More informationZoomlion Concrete Placing Boom HG28G,HG28E. Zoomlion Concrete Placing Boom (without counterweight) HG28G HG28E (proportional control)
Zoomlion Concrete Placing Boom (without counterweight) HG28G HG28E (proportional control) 1 The history of HG28G & HG28E Zoomlion used to manufacture and sell HG28D separate placing boom in China market,
More informationKAIKŌURA MARINE AREA Recreational Fishing Rules
KAIKŌURA MARINE AREA Recreational Fishing Rules Effective from: December 2017 subject to change without notice. KAIKŌURA EARTHQUAKE SHELLFISH CLOSURE SEE MAP INSIDE WANT THE RULES ON YOUR PHONE? Use our
More informationHollywood s Leading Lady. 妮可基曼在兩年多前以紅磨坊一片贏得她生命中第二座金球獎以及第一個奧斯卡提名, 豔冠群芳, 躍升為好萊塢一線實力派女星 最新力作 冷山 (Cold
附件四 作業暖身單因受篇幅限制, 將原文件所附的照片檔案刪除, 在此建議有興趣直接採用此暖身單活動的老師們, 可從網路上下載明星們漂亮的照片或圖片, 提升學生的注意力 作業一暖身單請以 60-80 字描述你的個人背景以及家庭背景 Hollywood s Leading Lady 妮可基曼在兩年多前以紅磨坊一片贏得她生命中第二座金球獎以及第一個奧斯卡提名, 豔冠群芳, 躍升為好萊塢一線實力派女星 最新力作
More informationIBIS 在信号完整性分析中的应用 Using IBIS for SI Analysis
IBIS 在信号完整性分析中的应用 Using IBIS for SI Analysis Lance Wang, ZhangMin Zhong Cadence Design Systems, Inc. Asian IBIS Summit, Shen Zhen, P.R. China December 6, 2005 1 Copyright 2005, Cadence Design Systems Inc.
More informationMANKS LTD. Stackable Children Chair HKD5,050. Arne Jacobsen 7
1. Series 7 Children Designer: Arne Jacobsen Manufacturer: Fritz Hansen Origin: Denmark The Series 7 designed by Arne Jacobsen is by far the most sold chair in the history of Fritz Hansen and perhaps also
More informationChinatown Broadway Street Design Summary of Public Comment Workshop #2
Chinatown Broadway Street Design Summary of Public Comment Workshop #2 Workshop Details: The second community workshop for the Chinatown Broadway Street Design project took place Gordon J. Lau Elementary
More informationAFIRM Factory Chemical Management Plan. Greg Montello
AFIRM Factory Chemical Management Plan Greg Montello Factory Management Put together a RSL Project Team Assign: * Roles * Responsibilities 2 RSL Strategy for Components and Suppliers Know your business
More informationISSN: (Print) (Online) Journal homepage:
Mitochondrial DNA Part A DNA Mapping, Sequencing, and Analysis ISSN: 2470-1394 (Print) 2470-1408 (Online) Journal homepage: http://www.tandfonline.com/loi/imdn21 Molecular phylogenetic relationships of
More informationSOUTHLAND Recreational Fishing Rules Effective from: December 2017 subject to change without notice.
SOUTHLAND Recreational Fishing Rules Effective from: December 2017 subject to change without notice. WANT THE RULES ON YOUR PHONE? Use our free-text service. Download our free smartphone app. SEE BACK
More informationDevelopment of The Jiaolong Deep Manned Submersible
Development of The Jiaolong Deep Manned Submersible Cui Weicheng September 4, 2013 OI2013 Shanghai, China 1 Table of Contents 1. Introduction 2. Some important technical aspects 3. Latest specifications
More informationLower Primary Sports Day Cleaning Up Lower Primary Games Day
Lower Primary Sports Day Last Month, our school had the Lower Primary Sports Day. It was held in the school hall. When it was our race Yong Xuan had a head start! When Kean was running he tripped. My classmates
More information2017 Guangdong Historical Road Orienteering. Championship 'Surfing IPTV' Cup. & World Ranking Event(Guangzhou, China) 12 17/12/2017
2017 Guangdong Historical Road Orienteering Championship 'Surfing IPTV' Cup & World Ranking Event(Guangzhou, China) 12 17/12/2017 2017 南粤古驿道 天翼高清杯 定向大赛总决赛 ( 广州 黄埔古港站 ) 暨世界定向排位赛 12 17/12/2017 BULLETIN 1
More informationThe 3rd Hong Kong Games Dynamic Moments Photo Contest. Prospectus
The 3rd Hong Kong Games Dynamic Moments Photo Contest Organised by the Sports Commission Co-ordinated by the Community Sports Committee Co-organised by the 18 District Councils, the Leisure and Cultural
More information語文類 ( 一 ) 專業科目 ( 一 ) 英文閱讀能力測驗 注意事項 准考證號碼 :
准考證號碼 : ( 請考生自行填寫 ) 專業科目 ( 一 ) 語文類 ( 一 ) 英文閱讀能力測驗 注意事項 1. 請先核對考試科目與報考類別是否相符 2. 本試題共 50 題, 每題 2 分, 共 100 分, 請依題號順序作答 3. 本試題均為單一選擇題, 每題都有 (A) (B) (C) 四個選項, 請選出一個最適當的答案, 然後在答案卡上同一題號相對位置方格內, 用 2B 鉛筆全部塗黑 答錯不倒扣
More informationFishing, Water Sports, Excursions and Diving Adventures
Fishing, Water Sports, Excursions and Diving Adventures Welcome to Float at Huvafen Fushi. Are you looking to feel the freedom of Scuba Diving, the excitement of the Jet Ski or adrenalin rush of parasailing?
More information2017 年 4 月 20 日雅思考试真题解析
2017 年 4 月 20 日雅思考试真题解析 雅思听力 2017 年 4 月 20 日雅思听力真题 Section1: 主题 : 公司要团建选择酒店会议厅, 一共有三种, 第一种可以提供鲜花, 第二种可以提供 乐队表演, 第三种的一些服务职能在星期五晚上提供 2017 年 4 月 20 日雅思听力真题 Section2: 地图题 regional island 主题 : 介绍一个公园, 包括公园里有的一些设施,
More informationNEWSLETTER No th Mar Dates to Remember
NEWSLETTER No 26 29 th Mar 2018 Dates to Remember 29 th March Primary Science Fair 30 th March Secondary Sports Day 31 st March - 8 th April QingMing Holiday 9 th April PTA Meeting 13 th April Primary
More informationFraction Collector Frac-920 and Frac-950
Fraction Collector Frac-920 and Frac-950 Operating Instructions Original instructions Table of Contents Table of Contents 1 Introduction... 1.1 Important user information... 1.2 Regulatory information...
More informationTacoma Chinese Reconciliation Project & Park. Lihuang Wung City of Tacoma December 5, 2018
Tacoma Chinese Reconciliation Project & Park Lihuang Wung City of Tacoma December 5, 2018 1 Redressing the Outrage of the Tacoma Method Chinese Reconciliation Project A community-led process for reconciling
More informationOSCA 2008 NOVEMBER NEWSLETTER
If undelivered, please return to PO Box 41 Dunedin. OSCA 2008 NOVEMBER NEWSLETTER IN THIS ISSUE PRESIDENT S REPORT 2 SICHUAN EARTHQUAKE DINNER 12 CHILDREN S ACTIVITIES CHRISTMAS PARTY 3 NZCA ACADEMIC AWARDS
More informationHong Kong Football Club Junior Squash Open 2018
Hong Kong Football Club Junior Squash Open 2018 Tournament Status 比賽規格 Tournament Information 比賽資料 The Hong Kong Football Club Junior Squash Open 2018 is an Asian Squash Federation (ASF) Asian Junior Super
More informationSITRANS P measuring instruments for pressure
Overview Siemens AG 007 SITRANS P measuring instruments for pressure Design SITRANS P pressure transmitter,, with built-in analog indicator SITRANS P pressure transmitters,, measure the gage pressure of
More information台北縣立江翠國民中學九十八學年度第二學期第三次定期考查七年級英語科試卷 P1 七年 ˍˍ 班座號 ˍˍ 姓名 :ˍˍˍˍˍˍ
台北縣立江翠國民中學九十八學年度第二學期第三次定期考查七年級英語科試卷 P1 測驗說明 : ( 一 ) 範圍 : 翰林版第二冊 Unit 7 至 Review 3 ( 二 ) 本試卷含答案卷共 4 頁 ( 雙面印製 ) ( 三 )1-35 題為單一選擇題, 請以 2B 鉛筆將正確答案的代碼劃在答案卡上 ( 四 )36-50 題為非選擇題, 請在答案卷上作答 第一部分聽力測驗 (30 % ) 聽力測驗分為三大題,
More informationWhen the Lion Roars. 5 Aug 2018
When the Lion Roars 5 Aug 2018 Introduction The month of Av is associated with the constellation of the lion. This is the month the lion roars. The Lion of Judah is roaring for us (Joel 3:16). We must
More informationNumerical analysis of flow and cavitation characteristics in a pilot-control globe valve with different valve core displacements *
54 Journal of Zhejiang University-SCIENCE A (Applied Physics & Engineering) ISSN 1673-565X (Print); ISSN 1862-1775 (Online) www.zju.edu.cn/jzus; www.springerlink.com E-mail: jzus@zju.edu.cn Numerical analysis
More informationCCA Q NEWSLETTER
Corning Chinese Association Since 1960 Corning, New York www.cca-ny.org Editor: Bo Wang CCA Q3 2017 NEWSLETTER Our Mission: To facilitate networking and personal/professional development amongst the Chinese
More information1. Contest is open to all Malaysian residents aged 18 and above, except for employees, and immediate family members of:
TESCO ONG MALI CONTEST TERMS & CONDITIONS 1. Contest is open to all Malaysian residents aged 18 and above, except for employees, and immediate family members of: a. TESCO (Malaysia) Sdn Bhd ( TESCO ) and
More information年度全港青少年棒球聯賽 Hong Kong Youth Baseball League U14 組競賽附則. U14 - Supplementary Rules & Regulations
U14 組競賽附則 U14 - Supplementary Rules & Regulations ( 一 ) 主辦單位 Organizer 香港棒球總會 Hong Kong Baseball Association ( HKBA ) ( 二 ) 競賽模式和參賽資格 Competition Format and eligibility 1. 單循環 Single round robin. 2. 一局為有效局
More informationRace Talk Against Title the Machine
Race Talk Against Title the Machine Name Title Andrew McAfee Erik Brynjolfsson CDB Annual Conference CDB May Annual 23, 2012 Conference May 23, 2012 1 The Problem Ten years ago we had Steve Jobs, Bob Hope,
More informationIron Man 3 Ita.torrent Magnet ->->->->
Iron Man 3 Ita.torrent Magnet ->->->-> http://bit.ly/2ajrehr 1 / 5 2 / 5 钢铁侠 3/Iron.Man.3.2013.iTA.ENG.720p.BluRay... 原名 : Iron Man 3 别名 : 铁甲奇侠 3( 港 ) 钢铁人 3( 台 ) 铁人 3..Iron Man 1. 钢铁侠 1.2008.Bluray.1080p.DTS.2audio.x264.mkv
More informationTimed Run, Walk & Carnival 2 nd December 2018 (Sunday) Wu Kwai Sha Youth Village Participant Guide (English Version) IMPORTANT INFORMATION
Timed Run, Walk & Carnival 2 nd December 2018 (Sunday) Wu Kwai Sha Youth Village Participant Guide (English Version) IMPORTANT INFORMATION Event Date: 2 nd December 2018 (Sunday) Venue: Wu Kwai Sha Youth
More informationsōng shēn wú fǎ Five Loosening Exercises
黄氏太极拳道基础功 Huáng shì tài jí quán dào jī chǔ gong Huang s Tai Chi Fundamental Exercises 松身五法 sōng shēn wú fǎ Five Loosening Exercises 松身第一式分动的六个动作 sōng shēn dì yī shì fēng dòng de liù ge dòng zuo Song Shen
More information疯狂动物城
疯狂动物城 图书在版编目 (CIP) 数据 迪士尼英文原版. 疯狂动物城 / 美国迪士尼公司著 -- 上海 : 华东理工大学出版社,2017.1 ( 迪士尼丛书 ) ISBN 978-7-5628-4865-3 Ⅰ.1 迪 Ⅱ.1 美 Ⅲ.1 英语 - 语言读物 2 长篇小说 - 美国 - 现代 Ⅳ.1H319.4:Ⅰ 中国版本图书馆 CIP 数据核字 (2016) 第 273980 号 迪士尼英文原版疯狂动物城
More informationThe Chinese steel industry at a crossroads. Frank Zhong, World Steel Association - China Iron Ore 2018, Beijing
The Chinese steel industry at a crossroads Frank Zhong, World Steel Association - China Iron Ore 2018, Beijing Disclaimer This document is protected by copyright. Distribution to third parties or reproduction
More informationLocal Standard of Zhou shan City. China (Zhejiang) Pilot Free Trade Zone Standard. Code of Practice for bunkering
ICS 03.220.40 R 06 DB3309 Local Standard of Zhou shan City DB3309/T 68-2017 China (Zhejiang) Pilot Free Trade Zone Standard Code of Practice for bunkering Released on 2017-07-31 Implemented on 2017-08-15
More information[æ] [ə] 音标入门讲解一 元音. ( 一 ) 单元音 (1) 前元音 :[i:] [i] [e] [æ] (2) 中元音 :[ə:] [ə] 发音组合 : e ee ea ie ei 代表单词 : me he we even. 发音组合 : i 代表单词 : sit bit kick pick
音标入门讲解一 元音 ( 一 ) 单元音 (1) 前元音 :[i:] [i] [e] [æ] [i:] 发音组合 : e ee ea ie ei 代表单词 : me he we even bee feel breeze deep free seat beat lead tea eat reason [i] 发音组合 : i 代表单词 : sit bit kick pick wish grief believe
More informationMagic Millions Yearling Sale Draft
Magic Millions Yearling Sale Draft 2017 Magic Millions 44 55 196 207 216 275 366 415 Nicconi Garden of Eden Brown Colt By successful young sire Nicconi. Out of a half-sister to 10 x Stakes-winner Grand
More information始まりのブザーが鳴るまで問題冊子 解答用紙に手を触れずに
2019 年度一般入学試験問題英語 始まりのブザーが鳴るまで問題冊子 解答用紙に手を触れずに 下記の注意事項に目を通しておくこと 問題用紙は 1 ページから 12 ページまであるので 始まりのブザー が鳴ったらすぐに確認すること 最初に記名をしてから問題を解くこと 解答はすべて別紙の解答用紙に記入すること とじてある問題用紙をばらばらにしたり 一部を切り取ったり しないこと 終了のブザーが鳴ったら筆記用具を置くこと
More informationA Busy Duck. A visit to the zoo
A Busy Duck Busy Duck helped farmers to eat bugs from the soil. The farmers were grateful. He felt very happy. Alvern Lee Zheng Yang A visit to the zoo One Sunday morning, my parents, my brother and I
More information起步前 Before Start. 起步 Start. 衝線後 After Finish 參賽者應自行決定自身之健康情況是否適合比賽, 倘若於比賽日前感到身體不適, 建議請教醫生意見後, 方可參賽 於比賽期間如有任何不適, 請立即向附近的工作人員求助
0 比賽時間流程及地點 Key Times and Locations 起步前 Before Start 行李寄存及報到時間 05:15 06:05 Baggage Deposit and Report Time 行李寄存地區灣仔運動場 Wan Chai Sports Ground Baggage Deposit Area ( 請參閲第 2 頁之起步區安排 Please refer to Start
More informationBlue Ocean Strategy Ebook Pdf Free Download ->>->>->> DOWNLOAD
Blue Ocean Strategy Ebook Pdf Free Download ->>->>->> DOWNLOAD 1 / 5 2 / 5 [ 下载 ]Blue Ocean Strategy (Wcom/Removing-Barriers-Efficient-Manufacturing-ebook/dp/B0... 推荐一个佛学 EBOOK 下载站...2 玺辰 2005-7-18 121486
More informationCalendar of Events 特备项目一览表
4 December 2017 (Monday) 2017 年 12 月 4 日 ( 星期一 ) 08:30 17:30 09:30 11:30 International Workshop on Water-jet Propulsion 2017 1. Science and Technology on Water Jet Propulsion Laboratory (LABJET) 2. Shanghai
More informationA STUDY OF DYNAMIC RIGHT-TURN SIGNAL CONTROL STRATEGY AT MIXED TRAFFIC FLOW INTERSECTIONS
Z. Wu, L. Zhao, J. Sun: A Study of Dynamic ight-turn Signal Control Strategy at Mixed Traffic Flow Intersections ZHIZHOU WU E-mail: wuzhizhou@tongji.edu.cn Department of Traffic Engineering and Key Laboratory
More informationA Decision Making Method using Wants Chain Analysis for Business-model Design
51 ONLINE ISSN: 2188-9023 PRINT ISSN: 0919-2948 Volume 51, Number 1, Page 51-66 Category: Paper Received date: 13, 5, 2015 Accepted date: 25, 9, 2015 Advance publication date: ***** Publication date: 5,
More informationSwimming Programme by Harry Wright International. The Premier Swim School Mid Term Swim Camp , 16, 18 & 19 October 2018
Swimming Programme by Harry Wright International The Premier Swim School Mid Term Swim Camp 2018 15, 16, 18 & 19 October 2018 Club Siena Mid Term Swim Camp 15, 16, 18 & 19 October 2018 Course 4 Days 15,
More information国际太极拳竞赛规则. International Taijiquan Championships Rules and Regulations. ( 套路竞赛规则选编 ) (Routine Championships Regulations Excerpt) 2014 年
国际太极拳竞赛规则 International Taijiquan Championships Rules and Regulations ( 套路竞赛规则选编 ) (Routine Championships Regulations Excerpt) 2014 年 第二章竞赛通则 Chapter 2 General Competition Regulations 第五条竞赛划分 Article 5
More informationThe Hong Kong Polytechnic University Flags of Harmony and Unity. Reminder for Participants
(Please see Chinese translation of this Reminder on Page 5-8, Programme Schedule on Page 9; and Layout Plan of the Sports Ground on Page10. 此參加者備忘的中文譯本見第 5-8 頁 ; 活動程序見第 9 頁 ; 小西灣運動場平面圖見第 10 頁 ) The Hong
More information2017 Hong Kong Marathon Swimming cum Open Water Swimming Competition Series (Part 1) 2017/18
2017 Hong Kong Marathon Swimming cum Open Water Swimming Competition Series (Part 1) 2017/18 Date: Time: Venue: 21 st May 2017 (Sunday) Alternative Race Date: 28 th May 2017 (Sunday) (Only applicable to
More information你使侨民骄傲! 你达到一个使人难忘的成就, 也给中国多元民族一个美好的期望!
October 2008 Volume 16 Issue 12 President s Message 同心合力建立一个美好的公会, 是需要每位会员的支持, 共同的帮忙及合 Tony Quek 作 个人独立的看法是行不通的 民主通过的决定和有利用之地的意见, 是我们议会成员将以接受讨论 以将会所办的更好, 可让每位会员更加快乐 可以做到这点, 公会才会成功! Mrs. Adeline Chan s
More information2013 Fall & Winter CAGT NEWSLETTER. Volume 6 Issue Fall & Winter
2013 Fall & Winter CAGT NEWSLETTER Volume 6 Issue 2 http://www.toledochinese.org 2013 Fall & Winter TABLE OF CONTENTS 1. 2103 Holiday Parade 2. Environmental scientist to prove socioeconomic impact on
More information常葉大学短期大学部一般入学試験前期日程 1. 試験開始の合図があるまで 問題用紙 解答用紙の中を見てはいけません
平成 29 年度 常葉大学短期大学部一般入学試験前期日程 英語 (60 分 100 点 ) 注意事項 1. 試験開始の合図があるまで 問題用紙 解答用紙の中を見てはいけません 2. この表紙以外に 問題用紙が 4 枚 (p.1 8) 解答用紙が 1 枚あります 試験中に問題用紙 解答用紙の印刷不鮮明 枚数の不足 汚れ等に気付いた 場合は 手を挙げて監督者に知らせなさい 3. 解答用紙には解答欄以外に次の記入欄があるので
More informationWE started our participation in the Walking Challenge since 2017 when it was first launched.
Vigor@President s Office Location: Hong Kong The story of Vigor@President s Office at Walking Challenge WE started our participation in the Walking Challenge since 2017 when it was first launched. It was
More information国际龙舟联合会 International Dragon Boat Federation 第二部分比赛规则
国际龙舟联合会 International Dragon Boat Federation 会员手册 MEMBERS HANDBOOK 第三版 Edition No.7 Issue 1 Effective from 1 January PART C: IDBF COMPETITION REGULATIONS and RULES OF RACING 国龙联会赛事规例 & 国龙联会比赛规则 Part.2
More informationRML Example 26: pto. First Try at a PTO. PTO with a table inside
RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf. These RML samples showcase techniques and features
More informationTHE SCOOP. Happy Year of The Snake!!!
NEWS FROM THE CREWS A MONTHLY B ULLETIN F ROM Holiday Edition, part 2 ENGLISH VERSION 中文版 Tiếng Việt FEBRUARY 2013 Happy Year of The Snake!!! Many thanks to all of our colleagues, clients, friends and
More informationHong Kong Contract Bridge Association Ltd.
Member of Pacific Asia Bridge Federation Member of Sports Federation and Olympic Committee of Hong Kong, China 目錄 Table of Contents Page Minutes of the 11 th Council Meeting, 2004/5 3 香港橋牌協會有限公司 Hong Kong
More informationELECTROSTATIC DISCHARGE (ESD) TESTING REPORT
ELECTROSTATIC DISCHARGE (ESD) TESTING REPORT Applicant/Department: RAIO TECHNOLOGY INC. Product: RA8877 LOT: Case NO: B150608046 Test Item: Machine Model (MM) Quantity: 18 ea Package/Pin Count: LQFP-128(14*14)
More informationReport on Transportation Survey Conducted by HKUST Staff Association (Feb 2016)
Report on Transportation Survey Conducted by HKUST Staff Association (Feb 2016) Objective: In response to complaints from staff regarding the public transport to/from HKUST, in particular the frequency
More informationImproving the Failure Rate of Holding Pressure of Gas Pipeline by 6σ Method 品管控制氣體管路保壓失敗率之研究
Journal of China University of Science and Technology Vol.57-2013.10 Improving the Failure Rate of Holding Pressure of Gas Pipeline by 6σ Method 品管控制氣體管路保壓失敗率之研究 1 鐘啟榮 2 李世文 3 陳德請 Chung-Chi Jung 1, Shih-Wen
More information灣仔運動場 Wan Chai Sports Ground, Hong Kong 指定完成時間. Finish Time. 06:30am 15 分鐘. 06:45am 30 分鐘
比賽時間流程及地點 Key Times and Locations 行李寄存及報到時間 Baggage Deposit and Report Time 行李寄存區 Baggage Deposit Location 起步時間 Start Time 起點 Start Location 05:15am 05:45am 灣仔運動場 Wan Chai Sports Ground 06:15am 灣仔運動場 Wan
More information