def ImprLtxPresEjecMat(self, doc): #doc.append(u"\\subportadilla{Presupuestos Generales}{Presupuesto de ejecución material}" + '\n') chapter = pylatex_utils.Chapter( title=u'Presupuesto de ejecución material', numbering=False) chapter.append(pylatex.Command('cleardoublepage')) center = pylatex.Center() center.append(pylatex_utils.LargeCommand()) center.append(pylatex.utils.bold(u'Presupuesto de Ejecución Material')) center.append(pylatex_utils.largeCommand()) chapter.append(center) chapter.append(pylatex.VerticalSpace('2cm')) self.subcapitulos.ImprLtxResumen(chapter, "", False) chapter.append( pylatex.utils.bold(u'Presupuesto de Ejecución Material:')) chapter.append(pylatex.Command('dotfill')) chapter.append(pylatex.utils.bold(self.getLtxPriceString())) chapter.append(pylatex.VerticalSpace('0.5cm')) chapter.append(pylatex.NewLine()) chapter.append( u'Asciende el presente presupuesto de ejecución material a la expresada cantidad de: ' ) chapter.append( pylatex_utils.textsc( basic_types.to_words(self.getRoundedPrice(), False) + ' euros.')) chapter.append(pylatex_utils.input('firmas')) doc.append(chapter)
def add_page3(self): doc = self.m_doc doc.append("Influence of mesocrystal height") doc.append(pl.VerticalSpace("2cm")) doc.append("\n") with doc.create( pl.MiniPage(width=r"0.2\textwidth", height=r"0.25\textwidth", content_pos='t')): lines = data.split("\n") with doc.create(pl.Tabular('l l', row_height=0.8)) as table: myfont = [mono, tiny] for l in lines: parts = l.split(":") print(parts) if len(parts) == 2: table.add_row(parts[0], parts[1], mapper=myfont) elif len(parts) == 1: table.add_hline() table.add_row((l, " "), mapper=myfont) doc.append("\n") with doc.create( pl.MiniPage(width=r"0.8\textwidth", height=r"0.25\textwidth", content_pos='t')): doc.append( pl.Command('includegraphics', options='scale=0.8', arguments='meso.png')) doc.append("\n") doc.append(pl.NewPage())
def ImprLtxPresContrata(self, doc): #doc.append(u"\\subportadilla{Presupuestos Generales}{Presupuesto de ejecución por contrata}" + '\n') chapter = pylatex_utils.Chapter( title=u'Presupuesto de ejecución por contrata', numbering=False) chapter.append(pylatex.Command('cleardoublepage')) center = pylatex.Center() center.append(pylatex_utils.LargeCommand()) center.append( pylatex.utils.bold(u'Presupuesto de Ejecución por Contrata')) center.append(pylatex_utils.largeCommand()) chapter.append(center) chapter.append(pylatex.VerticalSpace('2cm')) self.percentages.printLtx(chapter, self.getRoundedPrice()) chapter.append(pylatex_utils.input('firmas')) doc.append(chapter)
def printLtx(self, doc, precio_ejec_mat): precision = 2 with doc.create(pylatex.Itemize()) as itemize: itemize.add_item(u'Total presupuesto de ejecución material ') itemize.append(pylatex.Command('dotfill')) itemize.append( basic_types.human_readable(precio_ejec_mat, precision)) precio_gg = basic_types.ppl_price(self.GGenerales(precio_ejec_mat)) itemize.add_item(str(self.gg * 100) + u'% Gastos generales ') itemize.append(pylatex.Command('dotfill')) itemize.append(basic_types.human_readable(precio_gg, precision)) precio_bi = basic_types.ppl_price( self.BIndustrial(precio_ejec_mat)) itemize.add_item(str(self.bi * 100) + u'% Beneficio industrial ') itemize.append(pylatex.Command('dotfill')) itemize.append(basic_types.human_readable(precio_bi, precision)) suma_gg_bi = precio_ejec_mat + precio_gg + precio_bi itemize.add_item('Suma ') itemize.append(pylatex.Command('dotfill')) itemize.append(basic_types.human_readable(suma_gg_bi, precision)) precio_iva = basic_types.ppl_price(self.IVA(suma_gg_bi)) itemize.add_item(str(self.iva * 100) + u'% I.V.A. ') itemize.append(pylatex.Command('dotfill')) itemize.append(basic_types.human_readable(precio_iva, precision)) total = suma_gg_bi + precio_iva doc.append( pylatex.utils.bold(u'Presupuesto de ejecución por contrata:') + pylatex.NoEscape('\dotfill') + pylatex.utils.bold(basic_types.human_readable(total, precision))) doc.append(pylatex.VerticalSpace('0.5cm')) doc.append(pylatex.NewLine()) doc.append( u'Asciende el presente presupuesto de ejecución por contrata a la expresada cantidad de: ' ) doc.append( pylatex_utils.textsc( basic_types.to_words(total, False) + ' euros.'))
def _format_header(self): self.doc.append( Command('headername', self.cv.basic.name + ' ' + self.cv.basic.surnames)) self.doc.append( pylatex.base_classes.Arguments( pylatex.NoEscape('\\\\ \\huge' + ' ' + self.cv.basic.profession))) self.doc.append(pylatex.NewLine()) with self.doc.create(pylatex.MiniPage(width='0.60\\textwidth', pos='c')): self.doc.append(Command('cvsect', _('DEVELOPER_BIOGRAPHY_TITLE'))) self.doc.append(pylatex.NewLine()) self.doc.append(self.cv.basic.biography) self._format_skills() self.doc.append(pylatex.HFill()) with self.doc.create(pylatex.MiniPage(width='0.30\\textwidth', pos='c')): self.doc.append( Command('icon', ['MapMarker', 12, self.cv.basic.residence])) self.doc.append(pylatex.NewLine()) self.doc.append( Command('icon', ['Phone', 12, self.cv.contact.phone])) self.doc.append(pylatex.NewLine()) self.doc.append(Command('icon', ['At', 12, self.cv.contact.email])) if self.cv.contact.personal_website or self.cv.contact.twitter or self.cv.contact.linkedin or \ self.cv.contact.github: self.doc.append(pylatex.NewLine()) self.doc.append(pylatex.VerticalSpace('0.25cm')) self.doc.append(pylatex.NewLine()) if self.cv.contact.personal_website: self.doc.append( Command('icon', [ 'Globe', 12, Command('href', [ self.cv.contact.personal_website.href, self.cv.contact.personal_website.anchor ]) ])) self.doc.append(pylatex.NewLine()) if self.cv.contact.twitter: self.doc.append( Command('icon', [ 'Twitter', 12, Command('href', [ self.cv.contact.twitter.href, self.cv.contact.twitter.anchor ]) ])) self.doc.append(pylatex.NewLine()) if self.cv.contact.linkedin: self.doc.append( Command('icon', [ 'Linkedin', 12, Command('href', [ self.cv.contact.linkedin.href, self.cv.contact.linkedin.anchor ]) ])) self.doc.append(pylatex.NewLine()) if self.cv.contact.github: self.doc.append( Command('icon', [ 'Github', 12, Command('href', [ self.cv.contact.github.href, self.cv.contact.github.anchor ]) ])) self.doc.append(pylatex.VerticalSpace('0.50cm')) self.doc.append(pylatex.NewLine())