Skip to content

Commit 5ccef13

Browse files
committed
up
1 parent 8c56220 commit 5ccef13

File tree

11 files changed

+358
-55
lines changed

11 files changed

+358
-55
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Crypto Collectibles Series -
1414

1515
# Programming (Crypto) Pixel Punk Profile Pictures & (Generative) Art - Step-by-Step Book / Guide
1616

17-
_Inside Unique 24×24 Pixel Art on the Blockchain..._
17+
_Inside Unique 24×24 Pixel Art on (and off) the Blockchain..._
1818

1919
by [Gerald Bauer](https://github.com/geraldb), et al
2020

book/00_meta.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Programming (Crypto) Pixel Punk Profile Pictures & (Generative) Art
3+
subtitle: A Step-by-Step Book / Guide - Inside Unique 24×24 Pixel Art on (and off) the Blockchain
4+
author: Gerald Bauer
5+
date: March 2024
6+
## or use only 2024 - why? why not?
7+
8+
## add more variable here - why? why not?
9+
---

book/Makefile

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
TARGET = programming-cryptopunks
2+
SRC = book/00_meta.md \
3+
01_crop.md \
4+
02_attributes.md \
5+
03_generate.md \
6+
05_alien_invasion.md \
7+
06_palette_8bit.md \
8+
07_humans.md \
9+
08_composite.md \
10+
09_monalisa.md \
11+
10_hair.md \
12+
A1_special_effects.md
13+
14+
15+
16+
PANDOC = c:/prg/pandoc3.1.11.1/pandoc.exe
17+
18+
19+
20+
all: pdf pdf_std
21+
22+
23+
pdf_std: $(SRC) build
24+
$(PANDOC) --verbose $(SRC) \
25+
-f gfm \
26+
--toc \
27+
--number-sections \
28+
--pdf-engine=xelatex \
29+
-o build/$(TARGET)_std.pdf
30+
31+
32+
pdf: $(SRC) build
33+
$(PANDOC) --verbose $(SRC) \
34+
-f gfm \
35+
--lua-filter book/numbering.lua \
36+
--toc \
37+
--number-sections \
38+
--include-in-header book/fonts.tex \
39+
--include-in-header book/chapter_break.tex \
40+
--include-in-header book/inline_code.tex \
41+
--highlight-style book/pygments.theme \
42+
-V linkcolor:blue \
43+
-V geometry:a4paper \
44+
-V geometry:margin=2cm \
45+
--pdf-engine=xelatex \
46+
-o build/$(TARGET).pdf
47+
48+
build:
49+
mkdir build
50+

book/NOTES.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Build Scripts Notes
2+
3+
let's try to build a pdf booklet via pandoc (and latex).
4+
run / try:
5+
6+
7+
$ make -f book/Makefile pdf
8+
9+
and
10+
11+
$ make -f book/Makefile pdf_std
12+
13+
gets you a "vanilla" booklet with no pandoc/latex customizations
14+
15+
16+
17+

book/chapter_break.tex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
%% Adds pagebreak between chapters
2+
% from comments of accepted answer
3+
% https://superuser.com/questions/601469/getting-chapters-to-start-on-a-new-page-in-a-pandoc-generated-pdf
4+
\usepackage{sectsty}
5+
\sectionfont{\clearpage}
6+
7+
% accepted answer gave error
8+
%\usepackage{titlesec}
9+
%\newcommand{\sectionbreak}{\clearpage}
10+

book/fonts.tex

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
\usepackage{fontspec}
3+
4+
5+
\setmainfont{DejaVuSerif}[
6+
Path=/sites/tex/dejavu-fonts-ttf-2.37/ttf/,
7+
Extension = .ttf,
8+
UprightFont=*,
9+
BoldFont=*-Bold,
10+
ItalicFont=*-Italic,
11+
BoldItalicFont=*-BoldItalic
12+
]
13+
14+
\setsansfont{DejaVuSans}[
15+
Path=/sites/tex/dejavu-fonts-ttf-2.37/ttf/,
16+
Extension = .ttf,
17+
UprightFont=*,
18+
BoldFont=*-Bold,
19+
ItalicFont=*-Oblique,
20+
BoldItalicFont=*-BoldOblique
21+
]
22+
23+
\setmonofont{DejaVuSansMono}[
24+
Path=/sites/tex/dejavu-fonts-ttf-2.37/ttf/,
25+
Extension = .ttf,
26+
UprightFont=*,
27+
BoldFont=*-Bold,
28+
ItalicFont=*-Oblique,
29+
BoldItalicFont=*-BoldOblique
30+
]
31+
32+
33+
% Oblique characters follow the structure of the upright styles,
34+
% while italics have a different structure, informed by cursive writing.
35+
% Obliques are not merely digitally slanted—optical corrections
36+
% are made to avoid distortions and an incorrect distribution of weight.

book/inline_code.tex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
%% https://stackoverflow.com/questions/40975004/pandoc-latex-change-backtick-highlight
2+
\usepackage{fancyvrb,newverbs,xcolor}
3+
4+
%\definecolor{Light}{gray}{.90}
5+
%% https://martin-thoma.com/colors-in-latex/
6+
%% https://en.wikibooks.org/wiki/LaTeX/Colors
7+
\definecolor{Light}{HTML}{F4F4F4}
8+
9+
\let\oldtexttt\texttt
10+
\renewcommand{\texttt}[1]{
11+
\colorbox{Light}{\oldtexttt{#1}}
12+
}
13+

book/numbering.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- adjust as needed
2+
-- turn off numbering for sections below max treshhold
3+
local max_numbering_level = 1
4+
5+
function Header(h)
6+
if h.level > max_numbering_level then
7+
h.classes:insert 'unnumbered'
8+
end
9+
return h
10+
end
11+

book/pygments.theme

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
{
2+
"text-color": null,
3+
"background-color": "#f8f8f8",
4+
"line-number-color": "#aaaaaa",
5+
"line-number-background-color": null,
6+
"text-styles": {
7+
"Alert": {
8+
"text-color": "#ff0000",
9+
"background-color": null,
10+
"bold": true,
11+
"italic": false,
12+
"underline": false
13+
},
14+
"Annotation": {
15+
"text-color": "#60a0b0",
16+
"background-color": null,
17+
"bold": true,
18+
"italic": true,
19+
"underline": false
20+
},
21+
"Attribute": {
22+
"text-color": "#7d9029",
23+
"background-color": null,
24+
"bold": false,
25+
"italic": false,
26+
"underline": false
27+
},
28+
"BaseN": {
29+
"text-color": "#40a070",
30+
"background-color": null,
31+
"bold": false,
32+
"italic": false,
33+
"underline": false
34+
},
35+
"BuiltIn": {
36+
"text-color": "#008000",
37+
"background-color": null,
38+
"bold": false,
39+
"italic": false,
40+
"underline": false
41+
},
42+
"Char": {
43+
"text-color": "#4070a0",
44+
"background-color": null,
45+
"bold": false,
46+
"italic": false,
47+
"underline": false
48+
},
49+
"Comment": {
50+
"text-color": "#60a0b0",
51+
"background-color": null,
52+
"bold": false,
53+
"italic": true,
54+
"underline": false
55+
},
56+
"CommentVar": {
57+
"text-color": "#60a0b0",
58+
"background-color": null,
59+
"bold": true,
60+
"italic": true,
61+
"underline": false
62+
},
63+
"Constant": {
64+
"text-color": "#880000",
65+
"background-color": null,
66+
"bold": false,
67+
"italic": false,
68+
"underline": false
69+
},
70+
"ControlFlow": {
71+
"text-color": "#007020",
72+
"background-color": null,
73+
"bold": true,
74+
"italic": false,
75+
"underline": false
76+
},
77+
"DataType": {
78+
"text-color": "#902000",
79+
"background-color": null,
80+
"bold": false,
81+
"italic": false,
82+
"underline": false
83+
},
84+
"DecVal": {
85+
"text-color": "#40a070",
86+
"background-color": null,
87+
"bold": false,
88+
"italic": false,
89+
"underline": false
90+
},
91+
"Documentation": {
92+
"text-color": "#ba2121",
93+
"background-color": null,
94+
"bold": false,
95+
"italic": true,
96+
"underline": false
97+
},
98+
"Error": {
99+
"text-color": "#ff0000",
100+
"background-color": null,
101+
"bold": true,
102+
"italic": false,
103+
"underline": false
104+
},
105+
"Extension": {
106+
"text-color": null,
107+
"background-color": null,
108+
"bold": false,
109+
"italic": false,
110+
"underline": false
111+
},
112+
"Float": {
113+
"text-color": "#40a070",
114+
"background-color": null,
115+
"bold": false,
116+
"italic": false,
117+
"underline": false
118+
},
119+
"Function": {
120+
"text-color": "#06287e",
121+
"background-color": null,
122+
"bold": false,
123+
"italic": false,
124+
"underline": false
125+
},
126+
"Import": {
127+
"text-color": "#008000",
128+
"background-color": null,
129+
"bold": true,
130+
"italic": false,
131+
"underline": false
132+
},
133+
"Information": {
134+
"text-color": "#60a0b0",
135+
"background-color": null,
136+
"bold": true,
137+
"italic": true,
138+
"underline": false
139+
},
140+
"Keyword": {
141+
"text-color": "#007020",
142+
"background-color": null,
143+
"bold": true,
144+
"italic": false,
145+
"underline": false
146+
},
147+
"Operator": {
148+
"text-color": "#666666",
149+
"background-color": null,
150+
"bold": false,
151+
"italic": false,
152+
"underline": false
153+
},
154+
"Other": {
155+
"text-color": "#007020",
156+
"background-color": null,
157+
"bold": false,
158+
"italic": false,
159+
"underline": false
160+
},
161+
"Preprocessor": {
162+
"text-color": "#bc7a00",
163+
"background-color": null,
164+
"bold": false,
165+
"italic": false,
166+
"underline": false
167+
},
168+
"SpecialChar": {
169+
"text-color": "#4070a0",
170+
"background-color": null,
171+
"bold": false,
172+
"italic": false,
173+
"underline": false
174+
},
175+
"SpecialString": {
176+
"text-color": "#bb6688",
177+
"background-color": null,
178+
"bold": false,
179+
"italic": false,
180+
"underline": false
181+
},
182+
"String": {
183+
"text-color": "#4070a0",
184+
"background-color": null,
185+
"bold": false,
186+
"italic": false,
187+
"underline": false
188+
},
189+
"Variable": {
190+
"text-color": "#19177c",
191+
"background-color": null,
192+
"bold": false,
193+
"italic": false,
194+
"underline": false
195+
},
196+
"VerbatimString": {
197+
"text-color": "#4070a0",
198+
"background-color": null,
199+
"bold": false,
200+
"italic": false,
201+
"underline": false
202+
},
203+
"Warning": {
204+
"text-color": "#60a0b0",
205+
"background-color": null,
206+
"bold": true,
207+
"italic": true,
208+
"underline": false
209+
}
210+
}
211+
}

script/NOTES.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)