src/app/components/output/latex-table/latex-table.component.html
<div class="grid-content-latex">
<pcard heading="Latex Table" class="large-paper-card">
<div class="card-content" style="overflow: auto;"><!--
@formatter:off
-->%\usepackage{calc}<br/>
%\usepackage{booktabs}<br/>
%\usepackage{url}<br/>
%\usepackage{hyperref}<br/>
%\usepackage{footnote}<br/>
%\usepackage{scrextend}<br/>
%\usepackage{amssymb}<br/>
%\makesavenoteenv{tabular}<br/>
%\makesavenoteenv{tabule}<br/>
\begin{tabular}{@{}<!--
--><ng-template ngFor let-column [ngForOf]="columns">p{\linewidth/{{columns.length}}}<!--
--></ng-template>@{}}<br/>
\toprule<br/>
<!--
--><ng-template ngFor let-column [ngForOf]="columns" let-last="last" let-i="index">{{columns[i]}} <!--
--><ng-template [ngIf]="!last">& </ng-template><!--
--><ng-template [ngIf]="last">\\<br/></ng-template><!--
--></ng-template>
\midrule<br/>
<!-- iterate over data rows
--><ng-template ngFor let-item [ngForOf]="items"><!--
iterate over data columns
--><ng-template ngFor let-entry [ngForOf]="item" let-last="last" let-i="index"><!--
print url (only print the text and not the link)
--><ng-template [ngIf]="types[i] === 'URL' && entry">{{entry.text}}</ng-template><!--
print labels
--><ng-template [ngIf]="types[i] === 'LABEL' || types[i] === 'REPOSITORY' && entry"><!--
iterate over labels
--><ng-template ngFor let-label [ngForOf]="entry?.labelArray" let-lastItem="last"><!--
print label
-->{{label.name}}<!--
tooltip
--><ng-template [ngIf]="label.tooltip && label.tooltip.latex && label.tooltip.latex.length > 0"><!--
print tooltips?
--><ng-template [ngIf]="showTableTooltips"><!--
print tooltips in footnotes
--><footnote *ngIf="tableTooltipsAsFootnotes && label.tooltip.latex && label.tooltip.latex.length > 0" [footnote]="label.tooltip.latex" [(footnotes)]="footnotes"></footnote><!--
print tooltips after labels
--> (<span *ngIf="!tableTooltipsAsFootnotes" [innerHtml]="label.tooltip.latex | sanitizeHtml"></span>)<!--
--></ng-template><!--
--></ng-template><!--
label separator --><ng-template [ngIf]="!lastItem">, </ng-template><!--
--></ng-template><!--
--></ng-template><!--
print name-url
--><ng-template [ngIf]="types[i] === 'NAME_URL'">{{entry.text}}</ng-template><!--
print text
--><ng-template [ngIf]="types[i] === 'TEXT' && entry">{{entry.content}}</ng-template><!--
print rating
--><ng-template [ngIf]="types[i] === 'RATING' && entry?.rating">{{'$' + entry.rating+'\\bigstar$'}}</ng-template><!--
print markdown
--><ng-template [ngIf]="types[i] === 'MARKDOWN' && entry?.latex"><!--
--><span class="ltInline" [innerHtml]="entry?.latex | sanitizeHtml"></span><!--
--></ng-template><!--
--><ng-template [ngIf]="!last"> & </ng-template><!--
--><ng-template [ngIf]="last">\\<br/>
<!-- --></ng-template><!--
--></ng-template><!--
--></ng-template>\bottomrule<br/><!--
-->
\end{tabular}<br/><!--
footnotes
--><ng-template [ngIf]="tableTooltipsAsFootnotes"><!--
--><br/>\newcommand\snum{0}<!--
--><ng-template ngFor let-item [ngForOf]="getFootnotes()" let-i="index"><!--
--><br/>\footnotetext[\numexpr\snum+{{i}}]{<!--
--><span class="ltInline" [innerHtml]="item.text|sanitizeHtml"></span><!--
-->\label{{('{'+item.ref+'}')}}<!--
-->}<!--
--></ng-template><!--
--></ng-template>
<!-- @formatter:on -->
</div>
</pcard>
</div>