Creates a table with specifications of type *specType*. If no label AND no caption are given this method returns a LaTeX tabular snippet. Else it returns a table snippet. :param specs: List with SLiCAP.SLiCAPdesignData.specItem objects. :type specs: list
(self, specs, specType, label="", caption="", color="myyellow")
| 491 | return Snippet(TEX, self.format) |
| 492 | |
| 493 | def specs(self, specs, specType, label="", caption="", color="myyellow"): |
| 494 | """ |
| 495 | Creates a table with specifications of type *specType*. |
| 496 | If no label AND no caption are given this method returns a LaTeX |
| 497 | tabular snippet. Else it returns a table snippet. |
| 498 | |
| 499 | :param specs: List with SLiCAP.SLiCAPdesignData.specItem objects. |
| 500 | :type specs: list |
| 501 | |
| 502 | :param label: Reference label for the table. Defaults to an empty string. |
| 503 | :type label: str |
| 504 | |
| 505 | :param caption: Table caption. |
| 506 | :type caption: str |
| 507 | |
| 508 | :param color: Alternate row color name, should be defined in |
| 509 | 'preambuleSLiCAP.tex' defaults to 'myyellow'. Use None for |
| 510 | no background color. |
| 511 | :type color: str |
| 512 | |
| 513 | :return: SLiCAP Snippet object |
| 514 | :rtype: SLiCAP.SLiCAPprotos.Snippet |
| 515 | """ |
| 516 | linesList = [] |
| 517 | alignstring = '[c]{llrl}' |
| 518 | headerList = ["name", "description", "value", "units"] |
| 519 | for specItem in specs: |
| 520 | if specItem.specType.lower() == specType.lower(): |
| 521 | linesList.append(specItem._specLine()) |
| 522 | if len(linesList) > 0: |
| 523 | TEX = _TEXcreateCSVtable(headerList, linesList, alignstring, |
| 524 | unitpos=3, caption=caption, label=label, |
| 525 | color=color) + '\n' |
| 526 | else: |
| 527 | TEX = "\\textbf{Found no specifications of type: " |
| 528 | TEX += specType + ".}\n\n" |
| 529 | return Snippet(TEX, self.format) |
| 530 | |
| 531 | def eqn(self, LHS, RHS, units="", label="", multiline=False): |
| 532 | """ |
nothing calls this directly
no test coverage detected