Commit Graph

61 Commits

Author SHA1 Message Date
Hendrik Kleinwaechter
187fc1d0fc Glossary (#258)
* Glossary

This adds a glossary with common terms to the book

* Apply ordering changes

* Add PR feedback

* Move to backmatter
2023-10-22 20:18:11 +02:00
Ced
8efb48fa51 Add missing pic dependencies
The pictures inside sub-directories were not tracked as dependencies.
2023-10-09 18:47:41 +01:00
Ced
3e7815f3c4 Add Black and white epub to release 2023-10-09 18:26:05 +01:00
Ced
c34d635495 Simplify directory creation rules 2023-10-09 18:22:33 +01:00
Ced
9d0a43c58a Improve monochrome ebook generation in makefile
- Each picture is done independently
- Some comments
- Factor out commands
- Add the tools version
2023-10-09 17:48:03 +01:00
Ced
6176d8fd7b Implement proof of concept BW ebook in makefile
Dependencies are not great but shows the idea
- Resize images
- Reduce quality
- Convert to Black and white

Result:
    57M  book.epub
    17M  bw_book.epub
2023-10-08 18:58:26 +01:00
Ced
62ee9cd9e4 Simplify and fix spelling mistakes in makefile
- Factorize PHONY targets
- Add comments
2023-10-08 18:09:52 +01:00
Ced
a53698de97 Rename makefile ebook targets
serif made no sense any more.  Prepare for the black_white version.
2023-10-07 17:29:58 +01:00
Ced
bdae960144 Add latexmk diagnostic in debug mode 2023-10-03 23:52:27 +01:00
Ced
1eb305a3fe Add shell version to the show_version_target 2023-10-03 23:51:22 +01:00
Ced
97f3a044c2 Enforce bash as shell in makefile
Was not the case on my debian machine for some reason...
2023-10-03 23:51:22 +01:00
cedounet
335c5eb86b Remove azw3 (#243)
* Remove azw3 and mobi ebook format from build

they take a lot of time and are being deprecated on main branch.

* Remove kindlegen from tools version
2023-09-27 16:13:22 +02:00
cedounet
916fab0038 Remove azw3 and mobi ebook format from build (#242)
they take a lot of time and are being deprecated on main branch.
2023-09-26 15:30:38 +02:00
Ced
31b4f12ae6 Fix bug in makefile clean command 2023-09-17 14:53:36 +01:00
cedounet
e6cccde72a Makefile cleanup (#231)
* Add missing pic dependency on quick_ebook target

* Shorten Makefile clean rules

Less line mostly, should make it easier to read... and some wins from
not building sans-serif ebook anymore

* Simplify make help documentation

Was a bit tangled between ebook/ebook_serif/... should be clearer now.
2023-09-15 11:38:56 +02:00
cedounet
b403440c04 Remove sans serif ebook from makefile (#228)
* Add missing pic dependency on quick_ebook target

* Remove sans-serif ebooks from the build

* Remove sans-serif ebook from website and README

As per https://github.com/hendricius/the-sourdough-framework/issues/225
point 2.  The reader program will allow to change the font, no point
building it twice.

* Remove sans_serif mk4 file
2023-09-15 08:37:52 +02:00
cedounet
9104ee0642 Default target (#226)
* Add missing pic dependency on quick_ebook target

* Fix default target in makefile

The previous version was just lucky enough to be the first target not
starting with a .
2023-09-14 09:07:36 +02:00
cedounet
a1b661e8fb Add missing pic dependency on quick_ebook target (#224) 2023-09-12 07:25:53 +02:00
cedounet
580dab372b Quick targets (#221)
* Add quick targets in makefile

You can now runs luaLaTex or tex4ebook only once... should help run
faster while editing text/LaTeX macros

* Adds documentation for quick targets
2023-09-08 11:35:13 +02:00
cedounet
babfc618c2 Makefile updates (#205)
* Add synctex to makefile

Allows back and forthe between pdf reader adn your editor (shall they
support it)

* Add ruby and git head in show_version
2023-08-31 11:11:30 +02:00
cedounet
5574cb230c Mixins chapter (#203)
* Move mix-ins to its own chapter

I don't think it belongs to wheat one which is already packed,
Schwarzbort for once is usually with seeds added.

Once we have more pics it will be even more cramped in the wheat
chapter.

* Fix TeXnicalilities in mix-ins chapter

looooong lines, no use of sinunitx, abbreviations, etc..

* Fix typo

* Update book/book.tex

---------

Co-authored-by: Hendrik Kleinwaechter <hendrik.kleinwaechter@gmail.com>
2023-08-28 17:05:08 +02:00
cedounet
4f831be677 Makefile add missing dependencies (#199)
* Add intro to history chapter

* Improve paragraph breakdown

Hopefully slightly less dense to read.

* Add missing dependencies for Images
2023-08-27 11:01:22 +02:00
cedounet
35916c15f7 Add a flowchart environnement and its listof (#188)
* Add a flowchart environnement and its listof

So we can more easily access those flowcharts from pdf and website,
rather than looking in the crowded list of figures.

* Update book/troubleshooting/misc.tex

* Temporarily remove list of flow charts from web version

* Update clean target to deal with listofcharts

* Silent KOMA warnings (#190)

No functional change, but less warnings will help to read the logs.
Good idea anyway to use the key/value scheme

Co-authored-by: Cedric <ced@awase.ostal>

* Fix front-page for one sided printing (#189)

As it is manually placed, is prone to break on evry change of the page
geometry...  This one looks good though in today's conditions.

Co-authored-by: Cedric <ced@awase.ostal>

* Enable micro-typographical improvements (#191)

Few people will notice but this actually brings loads of improvements to
line breaking, handing punctuations etc.

* Revert "Temporarily remove list of flow charts from web version"

This reverts commit 9611b250d2.

* Implement listofflowchart for tex4ht

as per michal suggestion:
https://github.com/michal-h21/tex4ebook/issues/114#issuecomment-1688543095

---------

Co-authored-by: Cedric <ced@awase.ostal>
Co-authored-by: Hendrik Kleinwaechter <hendrik.kleinwaechter@gmail.com>
2023-08-24 09:30:38 +02:00
Hendrik Kleinwaechter
a8dc6dc210 Change flowchart color (#185)
* Change BG color to white

* Fix flowcharts where graphics overlap with text

* Increase border size

* change arrow style

* Allow standalone building of TikZ flowcharts

Useful for reference or website etc..

* Prevent manual hyphenation in TikZ diagrams

A Bit of a manual tweak.. but worth it to look nicer :D

* Add missing file for flowcharts

---------

Co-authored-by: Cedric <ced@awase.ostal>
2023-08-19 16:35:02 +02:00
cedounet
2d228841ec Fix website build with new front-cover (#174) 2023-08-15 19:22:19 +02:00
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