first commit

This commit is contained in:
ADRN 2022-04-08 14:32:44 +02:00
commit b6284f745e
10 changed files with 199 additions and 0 deletions

45
.drone.yml Normal file
View file

@ -0,0 +1,45 @@
---
# see https://docs.drone.io/pipeline/configuration/
kind: pipeline
name: build and upload the paper
volumes:
- name: nix_store
host:
path: /var/lib/drone/nix
node:
nix: 1
environment:
NIX_PATH: nixpkgs=channel:nixos-unstable
steps:
- name: build
image: nixpkgs/nix:nixos-21.05
volumes:
- name: nix_store
path: /nix
commands:
- nix-shell --run "make paper"
- name: upload
image: plugins/s3
settings:
bucket: XXXXXXX
access_key:
from_secret: aws_access_key_id
secret_key:
from_secret: aws_secret_access_key
source: paper/build/main.pdf
strip_prefix: paper/build/
target: /
path_style: true
endpoint: XXXXXXXX
region: garage
trigger:
event:
- push
branch:
- main

9
Makefile Normal file
View file

@ -0,0 +1,9 @@
.PHONY: all paper clean
all: paper
paper:
@$(MAKE) -C ./paper pdf
clean:
@$(MAKE) -C ./paper clean

13
paper/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
# Latex stuff
*.bbl
*.aux
*.bcf
*.blg
*.log
*.run.xml
*.synctex.gz
# The build folder
build/
# The output
main.pdf

38
paper/Makefile Normal file
View file

@ -0,0 +1,38 @@
.PHONY: all pdf clean
# name of the main TeX file and the output PDF
TARGET = main
# Where to find the paper's stuff
BUILD_PATH = build
FIGS_PATH = figures
BIB_PATH = bib
SOURCE_FILES = $(shell find . -type f -name "*.tex" -print)
CLASS_FILES = $(shell find . -type f -name "*.cls" -print)
BIB_FILES = $(shell find $(BIB_PATH) -type f -name "*.bib" -print)
FIGURES = $(shell find $(FIGURES_PATH) -type f -print)
BUILD_FILES = $(shell find $(BUILD_PATH) -type f -print)
BIB_PROCESSOR := biber
all: pdf
pdf: $(TARGET).pdf
$(TARGET).pdf: $(SOURCE_FILES) $(BIB_FILES) $(CLASS_FILES) $(FIGURES)
@mkdir -p $(BUILD_PATH) > /dev/null 2>&1 || exit 0
@pdflatex -interaction=nonstopmode -jobname=$(TARGET) -output-directory $(BUILD_PATH) $(TARGET).tex
@#if $(BIB_PROCESSOR) == biber
@$(BIB_PROCESSOR) --output-directory $(BUILD_PATH) $(TARGET)
@#elif $(BIB_PROCESSOR) == bibtex
@#@cd $(BUILD_PATH) && $(BIB_PROCESSOR) $(TARGET)
@#fi
@pdflatex -interaction=nonstopmode -jobname=$(TARGET) -output-directory $(BUILD_PATH) $(TARGET).tex # For biber
@pdflatex -interaction=nonstopmode -jobname=$(TARGET) -output-directory $(BUILD_PATH) $(TARGET).tex # For biber
@ln -fs $(BUILD_PATH)/$(TARGET).pdf $(TARGET).pdf
clean:
@rm $(TARGET).pdf $(BUILD_FILES) > /dev/null 2>&1 || exit 0

View file

@ -0,0 +1,8 @@
@book{de_rosnay_macroscope_1975,
title = {Le {{Macroscope}}. {{Vers}} Une Vision Globale},
author = {{de Rosnay}, Jo{\"e}l},
year = {1975},
month = jan,
edition = {Le Seuil},
language = {french}
}

View file

49
paper/header.tex Normal file
View file

@ -0,0 +1,49 @@
\usepackage[english]{babel}
\usepackage{lmodern} % The best LaTeX font
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{hyperref}
\usepackage[kerning=true]{microtype} % Cool typography twiks
%\usepackage{epigraph} % Badass epigraphs
%\usepackage{csquotes} % Multi-lingual quotes
%\usepackage{booktabs} % Stylish tables
%\usepackage{pifont} % For special characters e.g. checkbox
%%%%%%%%%%%%%%%%%%
%% Bibliography %%
%%%%%%%%%%%%%%%%%%
\usepackage[
style=numeric-comp,
sorting=none,
hyperref,
singletitle=true,
backend=biber]{biblatex}
\addbibresource{bib/introduction.bib}
%%%%%%%%%%%%
%% Macros %%
%%%%%%%%%%%%
\newcommand{\annote}[3]{{%
\footnotesize\sffamily%
\colorbox{#3}{\bfseries\textcolor{white}{#2}}\hspace{-0.2ex}%
{\color{#3}%
$\blacktriangleright$%
\textit{#1}%
$\blacktriangleleft$%
}%
}}
% List of available colors:
% https://www.w3.org/TR/SVG11/types.html#ColorKeywords
\usepackage[svgnames]{xcolor}
\newcommand{\todo}[1]{\annote{#1}{Todo}{teal}}

4
paper/introduction.tex Normal file
View file

@ -0,0 +1,4 @@
\section{Introduction}
Once upon a time in the Wild Wild Net... Systemics!~\cite{de_rosnay_macroscope_1975}
\todo{Maybe change that...}

21
paper/main.tex Normal file
View file

@ -0,0 +1,21 @@
\documentclass[a4paper,12pt,twocolumn]{article}
\input{header}
\title{If only people were kinder to one another}
\author{Ambroise Croizat}
\date{}
\begin{document}
\maketitle
\begin{abstract}
It is not very fun writing an abstract for a template.
\end{abstract}
\input{introduction}
\printbibliography
\end{document}

12
shell.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = [
(pkgs.texlive.combine {
inherit(pkgs.texlive)
scheme-medium
biber
biblatex;
})
pkgs.gnumake
];
}