tests/009/compare/Notes.md

title: "Test 009: Aligning styles between PDF and nonPDF" author: 'Emma Cliffe, Skills Centre: MASH, University of Bath' date: 'August 2020' site: bookdown::bookdown_site language: en documentclass: article classoption: a4paper fontsize: 10pt geometry: margin=2.5cm output: clavertondown::gitbook_clav: split_by: section config: download: [["Notes.html", "HTML page"], ["Notes.pdf","Standard print PDF"], ["NotesClear.pdf","Clear print PDF"], ["NotesLarge.pdf","Large print PDF"], ["Notes.docx","Accessible Word document"], ["Notes.epub","Accessible EPub book" ]] sharing: no clavertondown::epub_clav: toc: false clavertondown::html_clav: toc: false clavertondown::pdf_clav: latex_engine: pdflatex dev: pdf keep_tex: true fig_caption: false toc: false clavertondown::word_clav: toc: false number_sections: true keep_md: true

Problem

The styles in HTML are an attempt to colour code based on the type of enviroment. Since the user can define any number of these we have to... guess... to try and align colours. We have four HTML styles:

Our assignment is NOT currently based, at all, on the PDF styling specified by the author, or any other information like e.g. numberwith. LaTeX styling, while originally intended to broadly correspond to semantic type is not used this way by authors due to the fonts which are imposed in standard LaTeX. So, the three styles in LaTeX:

are used to impose the authors visual preferences mostly with respect to font, font attributes and layout.

Actual user story

I thought I could give the same appearance to my Notation, Remarks and Sketch Proof environments by styling them all with style_with remark. But, in HTML, Remarks and Sketch Proof are both pink with roman text (which I expected since it matches the Bookdown Remark), whereas my Notation environment is green with italic text (colours judged by eye in sepia mode, but the point is they look different).

So... I can either:

The easiest is clearly the first. While I am at it I can give the user control over the use of italics in the HTML.

Thoughts

The only requirements we have in the code are:

Tests

\BeginKnitrBlock{theorem}

Theorem 3.1

This is an inbuilt theorem.

\EndKnitrBlock{theorem}

\BeginKnitrBlock{remark}

Remark.

This is an inbuilt remark.

\EndKnitrBlock{remark}

\BeginKnitrBlock{Notation}

Notation:

This is notation.

\EndKnitrBlock{Notation}

\BeginKnitrBlock{Remarks}

Remarks:
This is remarks.
\EndKnitrBlock{Remarks}

\BeginKnitrBlock{Sketch Proof}

Sketch Proof:
This is a sketch proof.

\EndKnitrBlock{Sketch Proof}



BathMASH/clavertondown documentation built on Oct. 13, 2023, 6:25 p.m.