Skip to content

Commit

Permalink
Merge pull request #3 from livewires/add-macro-pad-worksheet
Browse files Browse the repository at this point in the history
Added worksheet
  • Loading branch information
jdfergusson authored Jun 28, 2024
2 parents 053451a + 75f6dc8 commit 4b071be
Show file tree
Hide file tree
Showing 17 changed files with 6,039 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build LaTeX document
on:
pull_request:
branches: [ "main" ]
jobs:
build_latex:
permissions:
contents: write
pull-requests: write

runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX document
uses: dante-ev/latex-action@latest
with:
entrypoint: ./build.sh
- name: Publish PDF
uses: actions/upload-artifact@v4
with:
name: worksheets
path: worksheets
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ fp-info-cache
# Exported BOM files
*.xml
*.csv

# Latex files
*.aux
*.fdb_latexmk
*.fls
*.log
*.pdf
10 changes: 10 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
mkdir worksheets

cd macropad/worksheet/
# This is a bit of a cheat, there's probably a better way of doing it.
cp -r ../../worksheet-components/* ./
make

cd ../../worksheets
cp ../macropad/worksheet/worksheet.pdf ./macropad.pdf
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,482 changes: 3,482 additions & 0 deletions macropad/macropad-rev1/output/macropad-rev1-B_Cu_Oversized.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions macropad/worksheet/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# You want latexmk to *always* run, because make does not have all the info.
# Also, include non-file targets in .PHONY so they are run regardless of any
# file of the given name existing.
.PHONY: worksheet.pdf all clean

# This should point at the relative path where the worsksheet components are
export TEXINPUTS := .:../../worksheet-components/:

# The first rule in a Makefile is the one executed by default ("make"). It
# should always be the "all" rule, so that "make" and "make all" are identical.
all: worksheet.pdf

# CUSTOM BUILD RULES

# In case you didn't know, '$@' is a variable holding the name of the target,
# and '$<' is a variable holding the (first) dependency of a rule.
# "raw2tex" and "dat2tex" are just placeholders for whatever custom steps
# you might have.

%.tex: %.raw
./raw2tex $< > $@

%.tex: %.dat
./dat2tex $< > $@

# MAIN LATEXMK RULE

# -pdf tells latexmk to generate PDF directly (instead of DVI).
# -pdflatex="" tells latexmk to call a specific backend with specific options.
# -use-make tells latexmk to call make for generating missing files.

# -interaction=nonstopmode keeps the pdflatex backend from stopping at a
# missing file reference and interactively asking you for an alternative.

worksheet.pdf: worksheet.tex
latexmk -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make worksheet.tex

clean:
latexmk -CA
Binary file added macropad/worksheet/img/component-layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added macropad/worksheet/img/hole-colours.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4b071be

Please sign in to comment.