- Notifications
You must be signed in to change notification settings - Fork63
Open
Description
Description
Option to easly copy-paste tables toTypst project.
Purpose
Easly export table result to Typst project.
Use-case
In academic works with Typst.
Is your feature request related to a problem?
No.
Additional context
Typst table reference
You don't need to specify any style. Styles will be applied from template style.
Just give the data like this:
#{table(columns:4, [], [Exam 1], [Exam 2], [Exam 3],table.hline(), [John], [],a, [],table.hline(), [Mary], [],a,a,table.hline(), [Robert],b,a,b,table.hline(), )}
OR:
#{// Sütun sayısını belirle [Determine the number of columns]letmonth-count=month-numbers.len()// Sayfa başlığı [Page title]heading(level:1,translator(key:language-keys.WORK-SCHEDULE))// İş paketleri listesi [Work packages list]for (index,work-package)inwork-packages.enumerate(start:1) { [*#translator(key:language-keys.SHORT-WORK-PACKAGE)#index:*#work-package.description\ ] }// Tablo başlığındaki aylar [Months in the table header]lettable-header-months=month-numbers.map(index=> { [*#index*] })// Tablo hücreleri [Table cells]lettable-cells=for (index,work-package)inwork-packages.enumerate(start:1) { ( [*#translator(key:language-keys.SHORT-WORK-PACKAGE)#index*],..month-numbers.map(month=> {ifwork-package.months.contains(month) {table.cell(fill:rgb(166,166,166))[] }else { [] } }), ) }// Çalışma takvimi tablosu [Work schedule table]table(columns: (auto,)+ ((1fr,)*month-count),align:center+horizon,table.header(table.cell(rowspan:2)[*#translator(key:language-keys.SHORT-WORK-PACKAGE)\**],table.cell(colspan:month-count)[*#translator(key:language-keys.MONTHS)*],..table-header-months, ),..table-cells,table.footer(table.cell(colspan:month-count+1,align:left,stroke: (left:0pt,right:0pt,bottom:0pt, ), )[\*#translator(key:language-keys.SHORT-WORK-PACKAGE):#translator(key:language-keys.WORK-PACKAGE)], ), )}
OR USE CSV: SeeTypst CSV Reference
Meaing provide CSV export for tables.
#{letresults=csv("example.csv")table(columns:2, [*Condition*], [*Result*],..results.flatten(), ) }
OR:
#{lettabledata=csv("example.csv")lettable-headings=tabledata.first()letdata=tabledata.slice(1).pop().flatten()lettable-footer=tabledata.last()table(columns:4,..table-headings.map(x=> [*x*]),// bold..data,..table-footer, )}
Metadata
Metadata
Assignees
Labels
No labels