Skip to content

Commit d451c65

Browse files
committed
Add DRAFT watermark to PDF and HTML output
1 parent c387c23 commit d451c65

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

_quarto.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ bibliography: references.bib
3232
format:
3333
html:
3434
theme: cosmo
35+
css: styles/draft.css
3536
code-fold: false
3637
toc: true
3738
number-sections: true
@@ -55,6 +56,12 @@ format:
5556
- margin=1in
5657
include-in-header:
5758
text: |
59+
% Draft watermark
60+
\usepackage{draftwatermark}
61+
\SetWatermarkText{DRAFT}
62+
\SetWatermarkScale{1}
63+
\SetWatermarkColor[gray]{0.9}
64+
5865
% Required packages
5966
\usepackage{bm} % For bold math symbols
6067

styles/draft.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* Draft watermark for HTML output */
2+
body::before {
3+
content: "DRAFT";
4+
position: fixed;
5+
top: 50%;
6+
left: 50%;
7+
transform: translate(-50%, -50%) rotate(-45deg);
8+
font-size: 10rem;
9+
font-weight: bold;
10+
color: rgba(200, 200, 200, 0.3);
11+
pointer-events: none;
12+
z-index: 9999;
13+
white-space: nowrap;
14+
}

0 commit comments

Comments
 (0)