Hi, I have generated a table with the rows having (alternating) background colors. I set the page background for a watermark (“Draft” slightly rorated), which prevents the watermark to be seen.
Can that be done?
Hi, I have generated a table with the rows having (alternating) background colors. I set the page background for a watermark (“Draft” slightly rorated), which prevents the watermark to be seen.
Can that be done?
Hi. Use alpha from rgb or transparentize method.
#set page(
background: rotate(-45deg, text(blue, 300pt, ligatures: false)[Draft]),
)
#set par(justify: true)
#let moore-csv = ```csv
Year,Transistors per microprocessor
1995,9646616
1996,9646616
1997,9646616
1998,15261378
1999,21673922
2000,37180264
2001,42550656
2002,220673400
2003,220673400
2004,273842000
2005,305052770
2006,582941600
2007,805842200
2008,805842200
2009,2308241400
2010,2308241400
2011,2600000000
2012,2600000000
2013,5000000000
2014,5700000000
2016,8000000000
2017,19200000000
2018,21100000000
2019,39500000000
2020,39500000000
2021,58200000000
```.text
#let moore-log = csv(bytes(moore-csv), row-type: dictionary).map(row => {
let count = row.at("Transistors per microprocessor")
let log = calc.log(float(count))
let rounded = str(calc.round(log, digits: 2))
(row.Year, rounded)
})
#lorem(50)
// https://typst.app/docs/guides/tables/#importing-data
#show table.cell.where(x: 0): strong
#figure(table(
columns: moore-log.first().len(),
align: right,
fill: (_, y) => if calc.odd(y) { rgb("D7D9E0").transparentize(50%) },
stroke: none,
table.header[Year][Transistor count ($log_10$)],
table.hline(stroke: rgb("4D4C5B")),
..moore-log.flatten(),
))
#lorem(100)