riscv-admin / docs-sig

The repository of the RISC-V Docs Team
https://jira.riscv.org/browse/RVG-36
Creative Commons Attribution 4.0 International
1 stars 0 forks source link

unify the pdf style used in specs #48

Closed kbroch-rivosinc closed 4 months ago

kbroch-rivosinc commented 4 months ago

Currently there are 2 different themes being used:

I recently copied the riscv-isa-manual one into docs-resources to help one extension maintainer generate their pdf to look more like the isa-manual.

My proposal is that we should unify the pdf style theme as it is confusing to see specs in one theme and then when they are ratified and put in isa-manual to look differently.

IMO it makes sense to unify based on the isa-manual style. So here's my plan:

Once this is done we can consider a review of the theme (fonts specifically) and or transition to asciidoctor-web-pdf which has been discussed.

@wmat @kersten1 thoughts?

kersten1 commented 4 months ago

YES! Something I've been wanting to do.

kbroch-rivosinc commented 4 months ago

sorted with https://www.npmjs.com/package/yaml-sort and then diff'ed:

❯ diff riscv-spec.yml riscv-pdf.yml 
14d13
<   column_rule_color: $base_border_color
21c20
<       name: fas-info-circle
---
>       name: info
27c26
<       name: far-comments
---
>       name: comments-o
41d39
<   border_color: EEEEEE
61,65c59,63
<   background_color: ffffff
<   caption:
<     end: bottom
<   font-color: 0
<   font-size: 11
---
>   background_color: f4f4fb
>   border_color: cccccc
>   border_radius: $base_border_radius
>   border_width: 0.2
>   font-size: 9
71a70
>   font-size: 11.5
85d83
<   border_color: $base_border_color
94,97d91
< figure:
<   caption:
<     align: center
<     end: bottom
140c134
<   border_width: 0.35
---
>   border_width: 0.25
142c136
<   height: $base_line_height_length * 2.6
---
>   height: $base_line_height_length * 2.5
145c139
<     - $base_line_height_length / 1
---
>     - $base_line_height_length / 2
147c141
<     - 0.5
---
>     - 0
163c157
<     - $base_line_height_length / 1
---
>     - $base_line_height_length / 1.3
165c159
<     - 0.5
---
>     - 0
176c170
<   font_color: 0
---
>   font_color: 3e058e
178c172
<   font_style: bold
---
>   font_style: light
180,183c174,177
<   h2-font-size: 11.5
<   h3-font-size: 11.5
<   h4-font-size: 11.5
<   h5-font-size: 11.5
---
>   h2_font_size: floor($base_font_size * 2.15)
>   h3_font_size: round($base_font_size * 1.7)
>   h4_font_size: $base_font_size_large
>   h5_font_size: $base_font_size
185,187d178
<   margin_bottom: $block_margin_bottom
<   margin_top: $block_margin_bottom
<   min_height_after: auto
191,192d181
<   caption:
<     align: center
201c190
< menu_caret_content: ' <font size="1.15em"><color rgb="000000">›</color></font> '
---
> menu_caret_content: ' <font size="1.15em"><color rgb="b12146">›</color></font> '
239c228
<   font-size: 9
---
>   font-size: 11.5
243d231
<   border_color: $base_border_color
263d250
<     margin-top: 25
271,273c258
<   dot-leader:
<     content: ' '
<     font-style: bold
---
>   dot_leader:
275d259
<   h2-font-style: bold

Zip has above and sdiff: diffs.zip