-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from JuliaGNI/make_mac_docs
Simplified Makefile and created tests for latex docs on ubuntu and macos.
- Loading branch information
Showing
7 changed files
with
299 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: PDF | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
LatexDocs: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- if: matrix.os == 'ubuntu-latest' | ||
name: install imagemagick and poppler-utils | ||
run: | | ||
sudo apt-get install imagemagick | ||
sudo apt-get install poppler-utils | ||
- if: matrix.os == 'macos-latest' | ||
run: | | ||
pip3 install Pygments | ||
- name: install texlive | ||
run: | | ||
wget --no-check-certificate https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | ||
zcat < install-tl-unx.tar.gz | tar xf - | ||
rm install-tl-unx.tar.gz | ||
cd install-tl-* | ||
sudo perl ./install-tl --no-interaction | ||
cd .. | ||
- name: add texlive to path | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
echo "/usr/local/texlive/2024/bin/x86_64-linux" >> $GITHUB_PATH | ||
- name: add texlive to path | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
echo "/usr/local/texlive/2024/bin/universal-darwin" >> $GITHUB_PATH | ||
- name: Make images | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
make linux -C docs/src/tikz | ||
- name: Make images | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
make mac -C docs/src/tikz | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: '1' | ||
- name: install BrenierTwoFluid | ||
run: | | ||
cd docs | ||
make install_brenier_two_fluid test_docs | ||
cd .. | ||
- name: make tex document | ||
run: julia --project=docs --threads=2 docs/make.jl latex_output_no_pdf | ||
- name: compile tex document | ||
run: | | ||
cd docs/build | ||
xelatex -shell-escape GeometricMachineLearning.jl.tex | ||
- name: Upload PDF file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os }} | ||
path: docs/build/GeometricMachineLearning.jl.pdf | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,94 @@ | ||
\usepackage{fontspec} | ||
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} | ||
|
||
% colours | ||
\usepackage{xcolor} | ||
|
||
\definecolor{light-blue}{HTML}{6b85dd} | ||
\definecolor{dark-blue}{HTML}{4266d5} | ||
\definecolor{light-red}{HTML}{d66661} | ||
\definecolor{dark-red}{HTML}{c93d39} | ||
\definecolor{light-green}{HTML}{6bab5b} | ||
\definecolor{dark-green}{HTML}{3b972e} | ||
\definecolor{light-purple}{HTML}{aa7dc0} | ||
\definecolor{dark-purple}{HTML}{945bb0} | ||
\definecolor{codeblock-background}{gray}{0.96} | ||
\definecolor{codeblock-border}{gray}{0.8} | ||
% | ||
|
||
% maths | ||
\usepackage{amsmath, amssymb} | ||
% | ||
|
||
% listings | ||
\usepackage{minted} | ||
\setminted{ | ||
breaklines = true, | ||
fontsize = \small, | ||
frame = none, | ||
bgcolor = codeblock-background, | ||
rulecolor=codeblock-border, | ||
} | ||
% | ||
|
||
% tables | ||
\usepackage{tabulary} | ||
% | ||
|
||
% hyperref | ||
\usepackage{hyperref} | ||
\hypersetup{ | ||
pdfpagelabels, | ||
bookmarks, | ||
hyperindex, | ||
unicode = true, | ||
linkcolor = dark-blue, | ||
urlcolor = dark-purple, | ||
colorlinks = true, | ||
} | ||
% | ||
|
||
% table of contents | ||
\maxtocdepth{subsection} | ||
% | ||
|
||
% paragraphs | ||
\setlength{\parindent}{0pt} | ||
\nonzeroparskip | ||
% | ||
|
||
% adjust margins | ||
\setulmarginsandblock{1.5in}{1in}{*} | ||
\setlrmarginsandblock{1.5in}{1in}{*} | ||
\setheaderspaces{1in}{*}{*} | ||
\checkandfixthelayout | ||
% | ||
|
||
% images etc. | ||
\usepackage{graphicx} | ||
\usepackage[export]{adjustbox} | ||
% | ||
|
||
% Some internal link targets are implemented with \label, some with \hypertarget, | ||
% but they require different links. This inserts a \hyperref if a corresponding label exists, | ||
% and \hyperlink if it doesn't. | ||
\def\hyperlinkref#1#2{\@ifundefined{r@#1}{\hyperlink{#1}{#2}}{\hyperref[#1]{#2}}} | ||
% | ||
|
||
% styling of admonitions. tcolorbox is available in the texlive-latex-extra | ||
% package | ||
\usepackage{tcolorbox} | ||
% These colors are taken from documenter-light.css in the HTML assets. | ||
\definecolor{admonition-default}{HTML}{363636} | ||
\definecolor{admonition-danger}{HTML}{da0b00} | ||
\definecolor{admonition-warning}{HTML}{ffdd57} | ||
\definecolor{admonition-note}{HTML}{209cee} | ||
\definecolor{admonition-info}{HTML}{209cee} | ||
\definecolor{admonition-tip}{HTML}{22c35b} | ||
\definecolor{admonition-compat}{HTML}{1db5c9} | ||
% | ||
|
||
% Styling of tables. | ||
\usepackage{booktabs} | ||
% | ||
\usepackage{arydshln} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
%% Default preamble BEGIN | ||
\documentclass[oneside]{memoir} | ||
|
||
\usepackage{./custom} | ||
|
||
%% Title Page | ||
\title{ | ||
{\HUGE \DocMainTitle }\\ | ||
{\Large \DocVersion } | ||
} | ||
\author{ \DocAuthors } | ||
|
||
%% TOC settings | ||
% -- TOC depth | ||
% value: [part, chapter, section, subsection, | ||
% subsubsection, paragraph, subparagraph] | ||
\settocdepth{section} % show "part+chapter+section" in TOC | ||
% -- TOC spacing | ||
% ref: https://tex.stackexchange.com/questions/60317/toc-spacing-in-memoir | ||
% doc: memoir/memman.pdf | ||
% - Figure 9.2: Layout of a ToC | ||
% - Table 9.3: Value of K in macros for styling entries | ||
\makeatletter | ||
% {part} to {chapter} | ||
\setlength{\cftbeforepartskip}{1.5em \@plus \p@} | ||
% {chapter} to {chapter} | ||
\setlength{\cftbeforechapterskip}{0.0em \@plus \p@} | ||
% Chapter num to chapter title spacing (Figure 9.2@memman) | ||
\setlength{\cftchapternumwidth}{2.5em \@plus \p@} | ||
% indent before section number | ||
\setlength{\cftsectionindent}{2.5em \@plus \p@} | ||
% Section num to section title spacing (Figure 9.2@memman) | ||
\setlength{\cftsectionnumwidth}{4.0em \@plus \p@} | ||
\makeatother | ||
|
||
%% Main document begin | ||
\begin{document} | ||
|
||
\frontmatter | ||
\maketitle | ||
\clearpage | ||
\tableofcontents | ||
|
||
\mainmatter | ||
%% preamble END |
Oops, something went wrong.