Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor modifications to make a better tutorial #24

Merged
merged 21 commits into from
Aug 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# We test each method for building LaTeX in a separate job.
language: generic


# This is required to test texlive-docker because it searches for config options in this file
tex-config:
- build-pattern=src/main.tex,src/mwe.tex
Expand All @@ -11,22 +10,27 @@ jobs:
include:
# Each - starts a separate job
- script: travis_retry chmod +x $TRAVIS_BUILD_DIR/test/tectonic-docker-test.sh && $TRAVIS_BUILD_DIR/test/tectonic-docker-test.sh
name: "Run tectonic-docker-test"
PHPirates marked this conversation as resolved.
Show resolved Hide resolved
- script: travis_retry chmod +x $TRAVIS_BUILD_DIR/test/tectonic-miniconda-test.sh && $TRAVIS_BUILD_DIR/test/tectonic-miniconda-test.sh
name: "Run tectonic-miniconda-test"
- script: travis_retry chmod +x $TRAVIS_BUILD_DIR/test/texlive-docker-test.sh && $TRAVIS_BUILD_DIR/test/texlive-docker-test.sh
name: "Run texlive-docker-test"
- script: travis_retry chmod +x $TRAVIS_BUILD_DIR/test/texlive-docker-texliveonfly-test.sh && $TRAVIS_BUILD_DIR/test/texlive-docker-texliveonfly-test.sh
name: "Run texlive-docker-texliveonfly"
- before_install:
- sudo apt-get install python-pygments
- mkdir $HOME/.fonts
- cp -a $TRAVIS_BUILD_DIR/src/fonts/. $HOME/.fonts/
- fc-cache -f -v
script: travis_retry chmod +x $TRAVIS_BUILD_DIR/test/texlive-test.sh && $TRAVIS_BUILD_DIR/test/texlive-test.sh

name: "Run texlive-test"
cache:
directories:
- /tmp/texlive
- $HOME/.texlive
- $HOME/miniconda
- $HOME/.cache/Tectonic

# Disable this test because it's broken and nobody uses it anyway
# - stage: tinytex
# language: r
Expand All @@ -41,4 +45,4 @@ cache:
# - packages
# - /tmp/texlive
# - $HOME/.texlive
# - $HOME/.TinyTex
# - $HOME/.TinyTex
7 changes: 6 additions & 1 deletion 4-texlive/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
language: generic

# Dependency of the minted package
dist: bionic

## Uncomment the following lines if you use minted package or custom fonts
#before_install:
# - sudo apt-get install python-pygments
# - mkdir $HOME/.fonts
# - cp -a $TRAVIS_BUILD_DIR/src/fonts/. $HOME/.fonts/
# - fc-cache -f -v
install:
- source ./texlive/texlive_install.sh
cache:
Expand Down
9 changes: 2 additions & 7 deletions 4-texlive/texlive/texlive_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ fi
# Just including texlua so the cache check above works
tlmgr install luatex

# In the case you have to install packages manually, you can use an index of packages like
# http://ctan.mirrors.hoobly.com/systems/texlive/tlnet/archive/
# Or better, check https://www.ctan.org/pkg/some-package to see in which TeX Live package it is contained.

# Then you can add one package per line in the texlive_packages file
# We need to change the working directory before including a file
cd "$(dirname "${BASH_SOURCE[0]}")"
tlmgr install $(cat texlive_packages)
tlmgr install $(cat texlive_packages | grep -v -e '^[[:space:]]*$' -e '^#')

# Keep no backups (not required, simply makes cache bigger)
tlmgr option -- autobackup 0

# Update the TL install but add nothing new
tlmgr update --self --all --no-auto-install
tlmgr update --self --all --no-auto-install
15 changes: 13 additions & 2 deletions 4-texlive/texlive/texlive_packages
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
texliveonfly
latexmk
# In the case you have to install packages manually, you can use an index of packages like
# http://ctan.mirrors.hoobly.com/systems/texlive/tlnet/archive/
# Or better, check https://www.ctan.org/pkg/some-package to see in which TeX Live package it is contained.
# Or use $ tlmgr info some-package

# Base tools to compile
texliveonfly latexmk

# Collections
collection-langeuropean
collection-fontsrecommended
collection-fontsrecommended
# LuaTeX
luaotfload

# texliveonfly does not detect the following packages automatically
minted fvextra upquote lineno xstring framed caption
4 changes: 2 additions & 2 deletions src/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
\usepackage{ulem} % Provides an \ul (underline) command which will break over line ends
\usepackage{iflang}
\usepackage[margin=8em]{geometry} % Adjust page margins
\usepackage[default,osfigures]{opensans} % Open Sans typeface
\usepackage[default]{opensans} % Open Sans typeface
\usepackage{algorithm} % Algorithm environment
\usepackage[noend]{algpseudocode} % Layout for algorithmicx package
\usepackage{chngcntr} % Customise table/figure counters
Expand Down Expand Up @@ -90,4 +90,4 @@

\printindex

\end{document}
\end{document}
6 changes: 3 additions & 3 deletions test/texlive-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

# This file is used for testing this repo, replacing the corresponding .travis.yml which cannot be included.

sudo apt-get install python-pygments

cd ${TRAVIS_BUILD_DIR}/4-texlive/
source ${TRAVIS_BUILD_DIR}/4-texlive/texlive/texlive_install.sh

cd ${TRAVIS_BUILD_DIR}/src/
texliveonfly ./main.tex

texliveonfly ./biber-mwe.tex

texliveonfly fonts.tex --compiler=lualatex

#texliveonfly --arguments='-shell-escape' ./minted.tex
texliveonfly --arguments='-shell-escape' ./minted.tex