commit 3bfe7dfdc848c90f72bcfa52dadc9e3e26f20c3d Author: Gurully Tech Date: Mon Mar 31 09:48:59 2025 +0000 Initial commit diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8156c29 --- /dev/null +++ b/.drone.yml @@ -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 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..cde4ac6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,10 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..096f260 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +.PHONY: all paper clean + +all: paper + +paper: + @$(MAKE) -C ./paper pdf + +clean: + @$(MAKE) -C ./paper clean \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ba44c9 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# latex-paper + +Un template pour faire des dépôts d'articles de recherche en LaTeX \ No newline at end of file diff --git a/paper/.gitignore b/paper/.gitignore new file mode 100644 index 0000000..5cfb4d6 --- /dev/null +++ b/paper/.gitignore @@ -0,0 +1,13 @@ +# Latex stuff +*.bbl +*.aux +*.bcf +*.blg +*.log +*.run.xml +*.synctex.gz + +# The build folder +build/ +# The output +main.pdf \ No newline at end of file diff --git a/paper/Makefile b/paper/Makefile new file mode 100644 index 0000000..b19ad89 --- /dev/null +++ b/paper/Makefile @@ -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 + diff --git a/paper/bib/introduction.bib b/paper/bib/introduction.bib new file mode 100644 index 0000000..a2709c7 --- /dev/null +++ b/paper/bib/introduction.bib @@ -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} +} diff --git a/paper/figures/.placeholder b/paper/figures/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/paper/header.tex b/paper/header.tex new file mode 100644 index 0000000..1caa35d --- /dev/null +++ b/paper/header.tex @@ -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}} diff --git a/paper/introduction.tex b/paper/introduction.tex new file mode 100644 index 0000000..2c4c846 --- /dev/null +++ b/paper/introduction.tex @@ -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...} \ No newline at end of file diff --git a/paper/main.tex b/paper/main.tex new file mode 100644 index 0000000..56f5015 --- /dev/null +++ b/paper/main.tex @@ -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} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..5bfe8ad --- /dev/null +++ b/shell.nix @@ -0,0 +1,12 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = [ + (pkgs.texlive.combine { + inherit(pkgs.texlive) + scheme-medium + biber + biblatex; + }) + pkgs.gnumake + ]; +}