Commit Graph

36 Commits

Author SHA1 Message Date
cedounet
b7cb0adc3e New Front page (#172)
* Improve Title page

- Made it full page (almost)
- Added a second page with links to github, license info and hard-copy
  book

* Add an xbb target for the cover page

For some reasons using picture outside float environment confuses the
ebook/dvi building

---------

Co-authored-by: Cedric <ced@awase.ostal>
2023-08-15 18:46:44 +02:00
cedounet
82c23fe8b2 Fix bundle re-run (#165)
* Use standard practices for website build

- Declare your dependencies
- Do not rebuild unless dependencies changed
- Cleanup after yourself
- Document your targets
- COMMANDS in upper case and variables/rules in lowercase

* Prevent bundle install to re-run

Split it into two separate targets one for installing env and one for
actually reworking the html.

* Fix typo in makefile comment

Co-authored-by: Hendrik Kleinwaechter <hendrik.kleinwaechter@gmail.com>

---------

Co-authored-by: Hendrik Kleinwaechter <hendrik.kleinwaechter@gmail.com>
2023-08-07 16:41:39 +02:00
cedounet
a8ad6f0a8b Use standard practices for website build (#161)
- Declare your dependencies
- Do not rebuild unless dependencies changed
- Cleanup after yourself
- Document your targets
- COMMANDS in upper case and variables/rules in lowercase
2023-08-04 15:57:08 +02:00
cedounet
4fdfaaf534 Fix clean rule (#160) 2023-08-04 13:24:13 +02:00
cedounet
0fd5f3431a Use Lualatex (#159)
* Use LuaLaTeX instead of pdfTeX

Will allow to use Open Type Fonts in the future

Other less important reasons:
    - Uniform encoding in UTF-8
    - We could maybe use some luaTeX only packages
    - It's more modern, should be better

* Use Tex Gyre Heros as helvetica clone

As it does not seem available by default on the CI machine and might
have some licensing issues.
2023-08-03 21:38:31 +02:00
cedounet
fa91b6f06f Komascript (#148)
* Add chemfig package

Somhow forgot it in chemical equation commit 8004497b

* Change links colors to codeblue

Closes https://github.com/hendricius/the-sourdough-framework/issues/142

* Use KOMA-Script and twosided printing

Because it looks better.  Also gets rid of headers/footers on empty
pages

* Fix tex4ebook and komascript clash

See https://github.com/michal-h21/tex4ebook/issues/110

* Factor out packages into a sty file

Separates style details out of the main file, now that we start having
more and more style-related settings.

* Remove parskip

Not needed with Koma-script

* Remove tocloft package

Not needed with koma-script

* Use tocbasics instead of floats

to please kpmascript internal algorithm

* Add a bit more breathing space in ToC

so they are not stuck together at 11.11 onwards...
2023-07-13 16:32:00 +02:00
Hendrik Kleinwaechter
aa78d322d5 Fix titles (#146)
This fixes the default auto generated LaTeX titles for the website
2023-07-13 15:39:42 +02:00
Hendrik Kleinwaechter
1ac6c7b196 Fix build issue 2023-07-11 09:55:28 +02:00
Hendrik Kleinwaechter
dc2b810743 Add biber version to version output 2023-07-10 18:20:55 +02:00
Hendrik Kleinwaechter
0aa5aab860 Use 2023 docker image as base 2023-07-10 17:55:33 +02:00
Hendrik Kleinwaechter
d1ff67415f Fix more issues with docker build 2023-07-10 10:42:30 +02:00
Hendrik Kleinwaechter
509092c56e Improve website deployment (#139)
* Fix issue of book not building

* add dependencies

* fix

* test make4ht

* fix cmd

* Use own docker image

* Add label

* fix urls

* Add validate command

* build non mac version

* tmp run

* use smaller tex version

* build full
2023-07-08 10:51:23 +02:00
Hendrik Kleinwaechter
62a9e9a000 Style improvements website (#138)
* Improve general CSS for website

* Update github flow
2023-07-07 13:38:56 +02:00
Hendrik Kleinwaechter
cc96559b6b Add book title to website html 2023-07-07 12:30:08 +02:00
Hendrik Kleinwaechter
b5491096b0 Website improvements for book (#137) 2023-07-06 09:01:35 +02:00
Hendrik Kleinwaechter
bcfe67d4df Static HTML Website (alpha version) (#136)
This is a minimal alpha version of the book as static html website. More
stuff needs to be added, but should be okay for a working prototype.
Fixes #128
2023-07-03 09:21:25 +02:00
cedounet
17b5ae5f52 Various clean up (#134)
* Fix reference and grammar

* Remove obsolete package

* Use colored links in pdf, black when printed

We can debate the colors to use of course, I left the defaults in.
There are accessibility concerns with colors...

* Add supporter.csv to the list of TeX source

So we rebuild everytime we add a new supporter.

* Inline the list of supporters

Those guys are awesome, but do they really need to be in a table one per
line over 3 pages?

* Explicit figure location

h rarelly works, so making it clear top is also an option.
2023-06-30 11:47:09 +02:00
Hendrik Kleinwaechter
0614fe7d8f Fix export figures (#127)
This fixes the export figures command
2023-06-27 14:31:08 +02:00
cedounet
05c33a76b6 Use input figs (#123)
* Make figs includable in main document

Remove the capability to build them as standalone document but we can
include them in the main document.  It should simplify things down the
road.

* Replace tikx pics

* Remove figures compilation from makefile

No need to compile figs to pdf anymore, at least to build the books

* Delete svg figures from ebook build

* Create png for TikZ figures

    - Add export_figures back
    - Build a pdf from the the TikZ in standalone mode
    - Change the cleanup to deal with those changes
    - Remove trailing spaces..

* Replace centering by an environment

More LaTeX idomatic

* Increase clean_figures robustness

as we use temporary tex files (.tex.in) we can't run clean_figures twice in a
row

* Center TikZ figures

Because it looks better

* Remove png building

Seems to struggle on CI with \\\b or something, we don't absolutely need
it right now so let's get rid of it.

* Remove trgt_figures dependency for pdf and ebooks

This should not be needed now that we include the TikZ directly, only
needed for png generation.

* Revert "Remove png building"

This reverts commit fdd542de57.

This is now fine to add the code back, so that it can be debugged when
times come.
2023-06-27 11:07:19 +02:00
cedounet
179e8af62e Makefile bugs fix and debug info (#124)
* Update .gitignore

Hide the svg file created during ebook builds and the new directories
after makefile changes

* Fix a makefile variable that stayed in uppercase

* Do not clean ebook systematically anymore

Should be fixed with new way to build ebooks

* Add rule showing version of tools on build machine

This helps with debugging on another machine.. or a build server.

* Add figures/vars.tex to the list of dependencies

Was missing...

* Add a makefile variable print facility

Quite a neat trick, avoids having to add it manually when you debug

* Add a target to print all variables in the makefile

* Fix the src_tables target

typos one s too many...

* Add a makefile variable to run tools in debug mode

Only ebook for now.

* Make default build the serif version of pdf

This is what the documentation said but both serif and sans were built

* Explicit serif in makefile and flattens rules

We had default (serif) and sans, better we have target named after their
fonts family

Flatten them as well so we can build ebooks or sans serif only as we
wish.

Simplified rules tree before:
-----------------------------
all/ bake
    release_serif
        build_pdf
            build_serif_pdf
                book_serif/book.pdf
            build_sans_serif_pdf
                book_sans_serif/book_sans_serif.pdf
        build_ebook
             build_serif_ebook
                epub/book.epub
                    epub/book.mobi
                    epub/book.azw3
             build_sans_serif_ebook
                epub/book_sans_serif.epub
                    epub/book_sans_serif.mobi
                    epub/book_sans_serif.azw3
    release_sans_serif
        build_sans_serif_pdf
            book_sans_serif/book_sans_serif.pdf
        build_sans_serif_ebook
            epub/book_sans_serif.epub
                epub/book_sans_serif.mobi
                epub/book_sans_serif.azw3

Simplified rules tree now:
--------------------------
all: bake
bake:
	release_serif
        build_serif_pdf
            book_serif/book.pdf
        build_serif_ebook:
            epub/book.epub
                epub/book.mobi
                epub/book.azw3
	release_sans_serif
        build_sans_serif_pdf
            book_sans_serif/book_sans_serif.pdf
        build_sans_serif_ebook
            epub/book_sans_serif.epub
                epub/book_sans_serif.mobi
                epub/book_sans_serif.azw3

build_pdf:
    build_serif_pdf
    build_sans_serif_pdf
build_ebook:
    build_serif_ebook
    build_sans_serif_ebook

release_serif:
    build_serif_pdf
    build_serif_ebook

release_sans_serif:
    build_sans_serif_pdf
    build_sans_serif_ebook

* Explicit the dependency on TikZ figures

latexmk figured that out but better if makefile is aware of it as well
2023-06-26 16:03:53 +02:00
cedounet
0c2fb17439 Ebooks build (#121)
* Use kindlegen for Kindle formats

.mobi and .azw3 are now built directly from .epub saving a few latex
runs, and double build of .mobi.

* Factorize amkefile rules and change coding gudelines

Simplify with a single rule for both serif and sans-serif

several makefiles are that way..
    - variables lower-case
    - commands/tools upper-case

* Simplify cleaning rules as per new rules

the directory structure has changed, so that shall change as well
2023-06-12 16:19:15 +02:00
cedounet
ca43ef0bd9 Improve typography (#120)
* Add unbreakable space before a reference or a citation

avoids ref to be put on next line or page...

* Add unbreakable space between I and verb

* Remove spacing before footnotes

Also moved it before the final sentence dots in many cases... might need
a review of what is best.  But this is a safe default choice from an
esthetic point of view.

* Improve footnotes and punctuations

Reverse order/kerning especially with sans-serif version.

* Remove manual enumerate

* Fix wording in a citation.

Reads better that way and is shorter.

* Use emph instead of italics

1) Markup semantic not style
2) Will deal with various level of empahasis
3) Was a mix of \it and \textit

* Fix usage of quotes

Also replaced some of then by \emph as it is (IMHO) more visually
pleasant.

* Captitalize before reference

* Correct dashes length

see here:
https://www.merriam-webster.com/words-at-play/em-dash-en-dash-how-to-use

* Remove space before label and homogenize caption

Apparently it can create a wrong reference, if notthing else shuts
texcheck up and cost nothing... so let's do it.

While at it adding a dot at the end of each caption.

* Add missing empty line before signature in preface

* Add a static checker target to makefile

Shall help prevent adding mistakes in new versions
2023-06-12 09:12:22 +02:00
cedounet
e451a47d55 improve makefiles (#113)
* Make headrow in tables bold

* Simplify tables markup

- Markup is definitely simpler.
- Will not be built separately in a pdf anymore.
- Fixed some typo as well
- Relatively coherent look
- Can be better, some sizes are relatively arbitrary

* Remove horizontal separation inside tables

Not very nice if you ask me..

* Fix some tables for the ebook

The alignement trick to have nicely alignment on = sign or on unit (g)
used broke the html. Reverting to a less optimal version on pdf while
not breaking the html.

* Simplify table for html output

* Revert "Simplify table for html output"

This reverts commit f85d65adb7.

* Revert pancake table

This way it builds ebook correctly.

* Use latexmk and dedicated build_directory

- Generic rule for building pdf from tex
- build the book in its own directory
- do not clean before

* Make accessible pdf a command line option

* Simplify accessible version generation

using the option in book.tex instead of copying files around.
TODO: figures/Tkiz still are with serif.

* Specify some dependencies as order only

We don't want to trigger a rebuild everytime the directory timestamp
changes

* Remove force rebuild

* Fix dependencies handling

- Explicit some dependencies
- Ebook must be handled manually as we don't have latexmk working with
  latexmk or not sure how to do it...

* Improve clean

- Use latexmk to clean where possible
- clean the sans-serif as well
- failing rm will output a non-stopping error now

* Cleanup and comment makefile

For clarity, also move things around

* Add an mrproper target

clean now only removes intermediate files, keeps pdf and ebook in there.
Mr proper will remove evrything

* Add dependency of figures for ebook

* Add default rules you expect

make will build the pdf
make all will build all

* Add a make help command

Gives list of useful targets and their action

* Use latexmk to build TikZ pictures

* Use latexmk for building ebooks

* Let latexmk handle dependencies

would get it wrong otherwise...

* Add rule for sans serif ebook

* Add dependencies on TikZ figures for ebooks

* add mk4 file for the sans_serif version of ebook

symlink to the other one as they should be the same.

* Reorder the makefile variables declaration

Looks like I did not fully understood how it works..

Also added some PHONY targets and comments

* Add missing actions in clean target

Some file got forgotten... clean the makefile as well.

* Split the clean in a clean ebook section

* Clean the ebook before building the pdf

Not idel but I have no idea how to have the intermediate files in
another directory with tex4ebook
2023-06-06 17:45:57 +02:00
cedounet
50bf7f1de4 Nicer tables episode II (#111)
* Make headrow in tables bold

* Simplify tables markup

- Markup is definitely simpler.
- Will not be built separately in a pdf anymore.
- Fixed some typo as well
- Relatively coherent look
- Can be better, some sizes are relatively arbitrary

* Remove horizontal separation inside tables

Not very nice if you ask me..

* Fix some tables for the ebook

The alignement trick to have nicely alignment on = sign or on unit (g)
used broke the html. Reverting to a less optimal version on pdf while
not breaking the html.

* Simplify table for html output

* Revert "Simplify table for html output"

This reverts commit f85d65adb7.

* Revert pancake table

This way it builds ebook correctly.
2023-06-03 00:02:39 +02:00
Hendrik Kleinwaechter
0d1602cc17 Revert "Nicer/Simpler tables (#107)"
This reverts commit 037ae6d7fd.
2023-06-01 18:49:38 +02:00
cedounet
037ae6d7fd Nicer/Simpler tables (#107)
* Make headrow in tables bold

* Simplify tables markup

- Markup is definitely simpler.
- Will not be built separately in a pdf anymore.
- Fixed some typo as well
- Relatively coherent look
- Can be better, some sizes are relatively arbitrary

* Remove horizontal separation inside tables

Not very nice if you ask me..
2023-06-01 14:38:37 +02:00
Hendrik Kleinwaechter
5412aa6e50 Ebook improvements (#103)
* Ebook improvements

Removes fixed height and width from the resulting HTML and adds an
additional css for the ebook formats.

* Update gitignore

* Strip tags
2023-05-26 13:35:04 +02:00
Hendrik Kleinwaechter
6c8839da87 🤡 Add "make bake" command (#97)
I feel like since this is bread related, release should be renamed to
"bake". So `make bake` will bake you the final book versions.
2023-05-21 20:19:56 +02:00
Hendrik Kleinwaechter
c2d5e88377 Accessibility Sans Serif Option (#90)
* Accessibility Sans Serif Option

This adds another build processs where the book is built using a sans
serif font. This can facilitate reading the book for some users.

* Update readme
2023-05-21 12:19:59 +02:00
Hendrik Kleinwaechter
e0d5422041 Export figures feature (#70)
This adds a `make export_figures` command which exports all the flow
charts into nicely looking pngs. The command requires that you have
docker running locally.
2023-03-30 15:09:56 +02:00
Hendrik Kleinwaechter
43391f1369 Improvements grammar/spelling sourdough works (#63)
* improve clean

* Grammar improvements
2023-03-24 09:56:19 +01:00
Hendrik Kleinwaechter
201d0872e6 Adjust image names 2023-03-02 16:34:50 -05:00
Hendrik Kleinwaechter
6e97f9bbd0 Screen Readers (#53)
* add tikzcache

* ignore files

* add latexmkrc file

* Move figures to new files

* rename images

* Fix build commands

* Release as epub3 and mobi

* Add cover-image support

* use older epub

* Externalize all tables

* change gh actions command

* fix linux xargs rm
2023-03-02 20:33:25 +01:00
Hendrik Kleinwaechter
8617acc687 Release book to S3 (#38)
This will automatically release the book to S3 after merging pull
requests
2023-01-12 15:49:47 +01:00
Hendrik Kleinwaechter
7ef372c98f Update makefile 2022-12-28 12:03:39 +01:00
Robert Schadek
0485e0c490 A tiny makefile (#22)
the makefile has three targets

* all, which does the complete build
* fast, which only runs pdflatex once
* clean, that removes files generated by the makefile
2022-12-16 14:12:47 +01:00