-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_data_classification_label.qmd
More file actions
137 lines (104 loc) · 3.31 KB
/
example_data_classification_label.qmd
File metadata and controls
137 lines (104 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
title: "Data Classification Label Example"
subtitle: Demonstrating document security classification
author: TeXnative Documentation
date: last-modified
format: texnative-pdf
filters:
- texnative
# Minimal document configuration
toc: false
cover_page: true
letterhead: false
page_numbers: true
paragraph_numbers: false
papersize: a4
# Data Classification Label Configuration
data_classification_label:
level: confidential # Active classification level
# Define your classification levels
levels:
confidential:
bgcolor: '#ff0000' # Red background
txtcolor: '#ffffff' # White text
txt: CONFIDENTIAL
internal:
bgcolor: '#ee7d2f' # Orange background
txtcolor: '#000000' # Black text
txt: INTERNAL
public:
bgcolor: '#70ac45' # Green background
txtcolor: '#000000' # Black text
txt: PUBLIC
# Label styling
width: 35mm # Label width
height: 8mm # Label height
top: 10mm # Distance from top of page
left: 10mm # Distance from left of page
txtsize: small # Font size: tiny, scriptsize, footnotesize, small, normalsize
border-radius: 3pt # Corner radius
---
# Data Classification Labels
This document demonstrates the data classification label feature in TeXnative. A red "CONFIDENTIAL" label appears in the top-left corner of every page.
## How It Works
The `data_classification_label` option adds a colored label box to every page of your PDF document. This is useful for marking documents with security classifications like:
- **Confidential** - Sensitive information with restricted access
- **Internal** - For internal use only
- **Public** - Safe for public distribution
## Configuration
To enable a classification label, add the following to your document's YAML front matter:
```yaml
data_classification_label:
level: confidential # Select active level
levels:
confidential:
bgcolor: '#ff0000'
txtcolor: '#ffffff'
txt: CONFIDENTIAL
```
## Changing the Level
To change the classification, simply update the `level` field:
```yaml
data_classification_label:
level: internal # Changed to internal
```
The label will automatically use the styling defined for that level.
\newpage
## Page 2
This second page also displays the classification label, demonstrating that it appears on every page of the document.
## Customizing Position and Size
You can adjust the label's position and dimensions:
```yaml
data_classification_label:
level: confidential
levels: { ... }
# Position (from page edges)
top: 10mm
left: 10mm
# Dimensions
width: 35mm
height: 8mm
# Styling
txtsize: small
border-radius: 3pt
```
## Global vs Document Configuration
Define levels globally in `_quarto.yml` and override the active level per document:
**_quarto.yml:**
```yaml
data_classification_label:
levels:
confidential:
bgcolor: '#ff0000'
txtcolor: '#ffffff'
txt: CONFIDENTIAL
internal:
bgcolor: '#ee7d2f'
txtcolor: '#000000'
txt: INTERNAL
```
**document.qmd:**
```yaml
data_classification_label:
level: internal
```