Example #1
0
 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))
Example #2
0
 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))
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 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)
Example #6
0
 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())
Example #7
0
    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')