From de2d8deb7df758cc3c8e064658626a65f3d00571 Mon Sep 17 00:00:00 2001 From: Ryan Reece Date: Thu, 26 Sep 2024 18:09:39 -0700 Subject: [PATCH] rreece/trying memoir (#5) * yml * yml --- Makefile | 19 ++++++++++++++++++- README.md | 14 +++++++++++--- basics.qmd | 5 ++--- templates/mystyle.css | 21 +++++++++++++++------ 4 files changed, 46 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 7b7d69d..c93549a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,14 @@ ## Makefile for quarto-example +## +##----------------------------------------------------------------------------- + +SHELL := /bin/bash +.SHELLFLAGS := -eu -o pipefail -c + + +##----------------------------------------------------------------------------- +## helpers and settings +##----------------------------------------------------------------------------- PRINT = @echo '==> ' @@ -7,10 +17,17 @@ OUTPUT := Quarto-Example OUTDIR := _site BIBLIO := bibs/mybib.bib +#OUTPUT := $(shell grep '^output:'_quarto.yml | head -n1 | sed -e 's/output:[[:space:]]*//' | tr -d "'" | tr -d '"') + QMD_FILES := $(wildcard *.qmd) HTML_FILES := $(QMD_FILES:%.qmd=$(OUTDIR)/%.html) BIB_TXT_FILES := $(sort $(wildcard bibs/*.txt)) + +##----------------------------------------------------------------------------- +## main targets +##----------------------------------------------------------------------------- + .PHONY: all html project_html pdf bib clean realclean check check_pdf publish all: project_html @@ -34,7 +51,7 @@ pdf: $(QMD_FILES) _quarto.yml $(BIBLIO) $(PRINT) "make $@ done." -## create bibs/mybib.bib from bibs/*.txt +## create bibliography bib: $(BIBLIO) $(BIBLIO): $(BIB_TXT_FILES) diff --git a/README.md b/README.md index c0370a8..923da67 100644 --- a/README.md +++ b/README.md @@ -84,16 +84,20 @@ TODOs Documentation: - [ ] Finish Quick start in this README +- [ ] Better example of making plots through jupyter +- [ ] Make a table by reading csv? Build: - [x] GitHub Actions for testing for build artifacts before deployment - [x] Change GitHub Actions to use this Makefile -- [ ] Conditionally build different parts of the document +- [x] Conditionally build different parts of the document: `make html` +- [ ] Make pdf output-file configurable? - [ ] Automatically get Makefile variables from `_quarto.yml` - [ ] Make bibliography optional - [ ] Makefile target for starting a new document -- [ ] Make it easy to create a small single page doc +- [ ] Make it easy to create a small single page doc/webpage +- [ ] Support rendering a document from `./` with no sub-directories? Rendering issues: @@ -103,7 +107,11 @@ Style: - [x] Add `_quarto.yaml` settings for custom css - [ ] Add `_quarto.yaml` settings for latex styling -- [ ] Polish book pdf output + - [ ] Shrink fontsize for code +- [ ] Pollish book pdf output +- [ ] Config for making an article instead of a book +- [ ] Config for making an website instead of a book +- [ ] Template for article (e.g. [NeurIPS](https://www.overleaf.com/latex/templates/neurips-2024/tpsbbrdqcmsh)) Note these quarto issues diff --git a/basics.qmd b/basics.qmd index 7f61c29..fbd5ee2 100644 --- a/basics.qmd +++ b/basics.qmd @@ -175,7 +175,6 @@ can be used, but will indent the output. | Opportunity fleeting, | Experiment dangerous, | Judgment difficult. - Otherwise, one can put two or more spaces at the end of a line of Markdown for the linebreak to be taken literally @@ -184,9 +183,9 @@ this. A **horizontal rule** can be made by just writing some number of dashes: - ---------------------------------------------------- + -------------------- ----------------------------------------------------- +-------------------- Boom. diff --git a/templates/mystyle.css b/templates/mystyle.css index 106759c..e2ac581 100644 --- a/templates/mystyle.css +++ b/templates/mystyle.css @@ -10,20 +10,29 @@ pre { border-bottom: 2px solid #cccccc; border-left: 2px solid black; padding: 10px 10px; - max-width: 700px; + max-width: auto; white-space: pre-wrap; background-color: #444444; - color: white; } -code { + +pre code { + color: white; font-family: Consolas, Monaco, "Andale Mono", monospace; - line-height: 16px; - font-size: 12px; + font-size: 0.8em; + line-height: 1.25em; text-align: left; } +/* poetry (line-block) -------------------------------------------- */ + +div.line-block { + margin-top: 1.0em; + margin-bottom: 1.0em; + line-height: 1.25em; +} + -/* references ------------------------------------------------------- */ +/* references ----------------------------------------------------- */ div#refs {