def writePriceJustification(self, doc, sect): if (sect != 'root'): doc.append('\\' + sect + '{' + self.getTitle() + '}' + '\n') if self.precios.TieneDescompuestos(): self.precios.writePriceJustification(doc) self.subcapitulos.writePriceJustification( doc, pylatex_utils.getLatexSection(sect))
def writePriceTableTwoIntoLatexDocument(self, doc, sect): if self.precios.TieneDescompuestos(): if sect != 'root': doc.append('\\' + sect + '{' + self.getTitle() + '}' + '\n') self.precios.writePriceTableTwoIntoLatexDocument(doc) self.subcapitulos.writePriceTableTwoIntoLatexDocument( doc, pylatex_utils.getLatexSection(sect))
def writeQuantitiesIntoLatexDocument(self, doc, parentSection): if (self.hasQuantities()): sectName = pylatex_utils.getLatexSection(parentSection) caption = basic_types.quantitiesCaption if (sectName != 'part'): caption = self.getTitle() docPart = pylatex_utils.getPyLatexSection(sectName, caption) self.quantities.writeQuantitiesIntoLatexDocument(docPart) self.subcapitulos.writeQuantitiesIntoLatexDocument( docPart, sectName) doc.append(docPart)
def ImprCompLtxMed(self, os, sect, otro): if sect != 'root': doc.append('\\' + sect + '{' + self.getTitle() + '}' + '\n') self.quantities.ImprCompLtxMed(os, otro.quantities) lmsg.error("aqui 1: " + self.getTitle() + ' ' + self.subcapitulos.size() + u" subcapítulos" + '\n') lmsg.error("aqui 2: " + otro.getTitle() + ' ' + otro.subcapitulos.size() + u" subcapítulos" + '\n') self.subcapitulos.ImprCompLtxMed(os, pylatex_utils.getLatexSection(sect), otro.subcapitulos)
def ImprLtxResumen(self, doc, sect, recurre=True): if (self.hasQuantities()): if (sect != 'root'): doc.add_item(self.getTitle()) doc.append(pylatex.Command('dotfill')) doc.append(self.getLtxPriceString()) else: doc.append(pylatex_utils.LargeCommand()) doc.append(pylatex.utils.bold('Total')) doc.append(pylatex.Command('dotfill')) doc.append(pylatex.utils.bold(self.getLtxPriceString())) doc.append(pylatex_utils.NormalSizeCommand()) if (recurre): self.subcapitulos.ImprLtxResumen( doc, pylatex_utils.getLatexSection(sect), recurre)
def ImprLtxPre(self, doc, sect): '''Imprime presupuestos parciales.''' if (self.hasQuantities()): if (sect != 'root'): doc.append(pylatex.Section(self.getTitle())) self.quantities.ImprLtxPre(doc, self.getTitle()) self.subcapitulos.ImprLtxPre(doc, pylatex_utils.getLatexSection(sect)) if self.subcapitulos: doc.append(pylatex.Command('noindent')) doc.append(pylatex_utils.largeCommand()) doc.append( pylatex.utils.bold('Total: ' + self.getTitle() + ' ')) doc.append(pylatex.Command('dotfill')) doc.append(pylatex.utils.bold(self.getLtxPriceString())) doc.append(pylatex.NewLine()) doc.append(pylatex_utils.NormalSizeCommand())
def ImprCompLtxPre(self, doc, sect, otro): if sect != 'root': doc.append('\\' + sect + '{' + self.getTitle() + '}' + '\n') self.quantities.ImprCompLtxPre(doc, self.getTitle(), otro.quantities, otro.getTitle()) self.subcapitulos.ImprCompLtxPre(doc, pylatex_utils.getLatexSection(sect), otro.subcapitulos) if self.subcapitulos: doc.append(pylatex_utils.ltx_beg_itemize + '\n') doc.append("\\item \\noindent \\textbf{Total " + self.getTitle() + " (P. de construcción): } \\dotfill \\textbf{" + otro.getLtxPriceString() + "} " + '\n' + '\n') doc.append("\\item \\noindent \\textbf{Total " + self.getTitle() + " (P. modificado): }\\dotfill \\textbf{" + self.getLtxPriceString() + "} " + '\n') doc.append(pylatex_utils.ltx_end_itemize + '\n') doc.append("\\clearpage" + '\n') if self.quantities: doc.append("\\newpage" + '\n')