From 3434337be763de639227f3ca7f1d7f20381731e0 Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 24 Feb 2021 13:40:04 +0100 Subject: [PATCH 01/10] modified install script to be run with https://github.com/scottkosty/install-tl-ubuntu --- install_linux.sh | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/install_linux.sh b/install_linux.sh index 98abca16..a43352fd 100644 --- a/install_linux.sh +++ b/install_linux.sh @@ -1,18 +1,30 @@ #!/usr/bin/env bash set -e # makes the script fail as soon as one command fails +# removed sudo as an alias was used in bash.rc and in session: alias sudo='sudo env PATH=$PATH' -sudo tlmgr install truncate -sudo tlmgr install tocloft -sudo tlmgr install wallpaper -sudo tlmgr install morefloats -sudo tlmgr install sectsty -sudo tlmgr install siunitx -sudo tlmgr install threeparttable -sudo tlmgr update l3packages -sudo tlmgr update l3kernel -sudo tlmgr update l3experimental -sudo tlmgr update l3backend +tlmgr install truncate +tlmgr install tocloft +tlmgr install wallpaper +tlmgr install morefloats +tlmgr install sectsty +tlmgr install siunitx +tlmgr install threeparttable +tlmgr update l3packages +tlmgr update l3kernel +tlmgr update l3experimental +tlmgr update l3backend +# to be installed too: +# mathspec +# xltxtra +# realscripts +# eso-pic +# ctable +# listings +# pdfpages +# bbold +# cleveref +# # Would it be simpler to just update all packages? (takes ~10m) # sudo tlmgr update --all pip install pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos pandoc-shortcaption From 0a0b7bc36ea0a4cd86861ca65be8da561ce8387c Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Thu, 25 Feb 2021 10:39:09 +0100 Subject: [PATCH 02/10] adapted install script (working version); add command in quickstart for Ubuntu --- README.md | 1 + install_linux.sh | 48 +++++++++++++++++++++++++----------------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index f611b8ee..755d36c1 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ conda create -n phd -y python=3.7 pandoc conda activate phd # Install required python and texlive packages +sudo apt install python3-pip # for Ubuntu make install ``` diff --git a/install_linux.sh b/install_linux.sh index a43352fd..7ddd555a 100644 --- a/install_linux.sh +++ b/install_linux.sh @@ -1,30 +1,32 @@ #!/usr/bin/env bash set -e # makes the script fail as soon as one command fails -# removed sudo as an alias was used in bash.rc and in session: alias sudo='sudo env PATH=$PATH' +# alias needed for tlmgr installation on Ubuntu with https://github.com/scottkosty/install-tl-ubuntu +# alias tlmgr='/opt/texbin/tlmgr' +# alias sudo='sudo env PATH=$PATH' this must be set to carry out sudo on tlmgr +# this script must be run with make install and alias tlmgr set before like above -tlmgr install truncate -tlmgr install tocloft -tlmgr install wallpaper -tlmgr install morefloats -tlmgr install sectsty -tlmgr install siunitx -tlmgr install threeparttable -tlmgr update l3packages -tlmgr update l3kernel -tlmgr update l3experimental -tlmgr update l3backend -# to be installed too: -# mathspec -# xltxtra -# realscripts -# eso-pic -# ctable -# listings -# pdfpages -# bbold -# cleveref -# +sudo env PATH=$PATH tlmgr install truncate +sudo env PATH=$PATH tlmgr install tocloft +sudo env PATH=$PATH tlmgr install wallpaper +sudo env PATH=$PATH tlmgr install morefloats +sudo env PATH=$PATH tlmgr install sectsty +sudo env PATH=$PATH tlmgr install siunitx +sudo env PATH=$PATH tlmgr install threeparttable +sudo env PATH=$PATH tlmgr update l3packages +sudo env PATH=$PATH tlmgr update l3kernel +sudo env PATH=$PATH tlmgr update l3experimental +sudo env PATH=$PATH tlmgr update l3backend +sudo env PATH=$PATH tlmgr install mathspec +sudo env PATH=$PATH tlmgr install xltxtra +sudo env PATH=$PATH tlmgr install realscripts +sudo env PATH=$PATH tlmgr install eso-pic +sudo env PATH=$PATH tlmgr install ctable +sudo env PATH=$PATH tlmgr install listings +sudo env PATH=$PATH tlmgr install pdfpages +sudo env PATH=$PATH tlmgr install bbold +sudo env PATH=$PATH tlmgr install cleveref +# # Would it be simpler to just update all packages? (takes ~10m) # sudo tlmgr update --all pip install pandoc-fignos pandoc-eqnos pandoc-tablenos pandoc-secnos pandoc-shortcaption From 5e93696deecfd36840d78712b7121c9928374b0f Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 00:54:35 +0100 Subject: [PATCH 03/10] add ubuntu quickstart, add instructions in linux install script --- README.md | 18 +++++++++++++++++- install_linux.sh | 8 ++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 755d36c1..66305008 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ If you have used this template in your work, please cite the following publicati > Tom Pollard et al. (2016). Template for writing a PhD thesis in Markdown. Zenodo. http://dx.doi.org/10.5281/zenodo.58490 ## Quickstart +### Mac If you're a mac user and you have conda and brew installed, run the following in your terminal to install and generate the example outputs: ```bash # get texlive @@ -24,10 +25,25 @@ conda create -n phd -y python=3.7 pandoc conda activate phd # Install required python and texlive packages -sudo apt install python3-pip # for Ubuntu make install ``` +### Ubuntu +On Ubuntu, texlive installed with apt is not working, use an installer like below and make sure it is not installed with apt: +```bash +# get texlive +wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu +sudo ./install-tl-ubuntu + +# update tlmgr and packages +sudo env PATH=$PATH tlmgr update --self + +# Install pip +sudo apt install python3-pip + +# Install required python and texlive packages +make install +``` ## Why write my thesis in Markdown? Markdown is a super-friendly plain text format that can be easily converted to a bunch of other formats like PDF, Word and LaTeX. You'll enjoy working in Markdown because: diff --git a/install_linux.sh b/install_linux.sh index 7ddd555a..9a8a1106 100644 --- a/install_linux.sh +++ b/install_linux.sh @@ -1,10 +1,10 @@ #!/usr/bin/env bash set -e # makes the script fail as soon as one command fails -# alias needed for tlmgr installation on Ubuntu with https://github.com/scottkosty/install-tl-ubuntu -# alias tlmgr='/opt/texbin/tlmgr' -# alias sudo='sudo env PATH=$PATH' this must be set to carry out sudo on tlmgr -# this script must be run with make install and alias tlmgr set before like above +# texlive installation necessary with: https://github.com/scottkosty/install-tl-ubuntu +# alias tlmgr='/opt/texbin/tlmgr' to be set in .bashrc file or appropriate +# sudo env PATH=$PATH' is needed to carry out sudo on tlmgr, which is not installed with apt, +# see https://github.com/scottkosty/install-tl-ubuntu/issues/13 sudo env PATH=$PATH tlmgr install truncate sudo env PATH=$PATH tlmgr install tocloft From 5af21c8f43ac7573d5065be898791481ef2558d9 Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 01:49:59 +0100 Subject: [PATCH 04/10] test for linux travis (no tlmgr alias) --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 15e4c910..409cbc0e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ language: bash os: - osx - # - linux # https://tex.stackexchange.com/questions/313768/why-getting-this-error-tlmgr-unknown-directive + - linux # https://tex.stackexchange.com/questions/313768/why-getting-this-error-tlmgr-unknown-directive # env: # global: @@ -29,8 +29,9 @@ python: addons: apt: packages: - - texlive + # - texlive - xzdec + - python3-pip update: true homebrew: casks: @@ -45,7 +46,9 @@ before_install: eval "$(/usr/libexec/path_helper)" sudo tlmgr update --self elif [ "$TRAVIS_OS_NAME" = "linux" ]; then - tlmgr init-usertree + wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu + sudo ./install-tl-ubuntu + sudo env PATH=$PATH tlmgr update --self echo MSG FROM JO: echo on linux we cannot update apt installed texlive echo next steps to fix see commit msg: https://github.com/tompollard/phd_thesis_markdown/pull/100/commits/85fd9e7ac413a34066b79f1e49b3e1d3efdeac00 From 7263c36d21f0f8f961cb21f326c1846307bb23f2 Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 15:20:02 +0100 Subject: [PATCH 05/10] added packages in install_linux.sh for fresh install with TinyTex --- install_linux.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install_linux.sh b/install_linux.sh index 9a8a1106..d29b2fca 100644 --- a/install_linux.sh +++ b/install_linux.sh @@ -26,6 +26,11 @@ sudo env PATH=$PATH tlmgr install listings sudo env PATH=$PATH tlmgr install pdfpages sudo env PATH=$PATH tlmgr install bbold sudo env PATH=$PATH tlmgr install cleveref +sudo env PATH=$PATH tlmgr install fancyhdr +sudo env PATH=$PATH tlmgr install ulem +sudo env PATH=$PATH tlmgr install setspace +sudo env PATH=$PATH tlmgr install makecell +sudo env PATH=$PATH tlmgr install pdflscape # # Would it be simpler to just update all packages? (takes ~10m) # sudo tlmgr update --all From 68632125fce22b906d95206c2caef386c30834e3 Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 15:53:51 +0100 Subject: [PATCH 06/10] adapted Ubuntu Quickstart for TinyTex and latest Pandoc --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 66305008..afd044e4 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,10 @@ make install ### Ubuntu On Ubuntu, texlive installed with apt is not working, use an installer like below and make sure it is not installed with apt: ```bash -# get texlive -wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu -sudo ./install-tl-ubuntu +# get TinyTex and make sure PATH is set +wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh +PATH="$PATH:$HOME/bin" +PATH="$PATH:$HOME/.local/bin" # update tlmgr and packages sudo env PATH=$PATH tlmgr update --self @@ -41,6 +42,12 @@ sudo env PATH=$PATH tlmgr update --self # Install pip sudo apt install python3-pip +# Install latest pandoc (apt version too old, needs at least 2.11.*) +TEMP_DEB="$(mktemp)" && +wget -O "$TEMP_DEB" 'https://github.com/jgm/pandoc/releases/download/2.11.4/pandoc-2.11.4-1-amd64.deb' && +sudo dpkg -i "$TEMP_DEB" +rm -f "$TEMP_DEB" + # Install required python and texlive packages make install ``` From c7e0936d63a725a2773f471c9323f300b8ee0a46 Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 16:09:38 +0100 Subject: [PATCH 07/10] add package caption --- install_linux.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install_linux.sh b/install_linux.sh index d29b2fca..ebc66a5e 100644 --- a/install_linux.sh +++ b/install_linux.sh @@ -31,6 +31,8 @@ sudo env PATH=$PATH tlmgr install ulem sudo env PATH=$PATH tlmgr install setspace sudo env PATH=$PATH tlmgr install makecell sudo env PATH=$PATH tlmgr install pdflscape +sudo env PATH=$PATH tlmgr install caption + # # Would it be simpler to just update all packages? (takes ~10m) # sudo tlmgr update --all From 1132ca0b5ffe7b9387f85e92cd1fce0800ce71ce Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 16:12:12 +0100 Subject: [PATCH 08/10] travis attempt to build with TinyTex --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 409cbc0e..45ced33f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,10 +13,12 @@ os: - osx - linux # https://tex.stackexchange.com/questions/313768/why-getting-this-error-tlmgr-unknown-directive -# env: - # global: +env: + global: # - PATH=$TRAVIS_BUILD_DIR/usr/bin/:$PATH # - PATH=/Library/TeX/texbin:$PATH + - PATH="$PATH:$HOME/bin" + - PATH="$PATH:$HOME/.local/bin" python: # We don't actually use the Travis Python, but this keeps it organized. @@ -46,9 +48,10 @@ before_install: eval "$(/usr/libexec/path_helper)" sudo tlmgr update --self elif [ "$TRAVIS_OS_NAME" = "linux" ]; then - wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu - sudo ./install-tl-ubuntu + wget -qO- "https://yihui.org/tinytex/install-bin-unix.sh" | sh sudo env PATH=$PATH tlmgr update --self + TEMP_DEB="$(mktemp)" && wget -O "$TEMP_DEB" 'https://github.com/jgm/pandoc/releases/download/2.11.4/pandoc-2.11.4-1-amd64.deb' && sudo dpkg -i "$TEMP_DEB" + rm -f "$TEMP_DEB" echo MSG FROM JO: echo on linux we cannot update apt installed texlive echo next steps to fix see commit msg: https://github.com/tompollard/phd_thesis_markdown/pull/100/commits/85fd9e7ac413a34066b79f1e49b3e1d3efdeac00 From b20d561ce799306dd70e807013c4bab8f4441ed9 Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 16:33:10 +0100 Subject: [PATCH 09/10] commented out travis lines --- .travis.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45ced33f..0d799b1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -101,17 +101,17 @@ install: # Installs both python and texlive dependencies - make install # For debug - - cat /usr/local/texlive/2020/texmf-var/web2c/tlmgr.log - - conda list - - pip list - - python --version - - pandoc --version - - tlmgr --version - - latex --version - - echo $PATH - - which tlmgr - - which latex - - find /usr/local/texlive/2020/ -type f -name "l3backend*" + # - cat /usr/local/texlive/2020/texmf-var/web2c/tlmgr.log + # - conda list + # - pip list + # - python --version + # - pandoc --version + # - tlmgr --version + # - latex --version + # - echo $PATH + # - which tlmgr + # - which latex + # - find /usr/local/texlive/2020/ -type f -name "l3backend*" # Attempt to create all document output types script: @@ -122,10 +122,10 @@ script: - make pdf - cat pandoc.pdf.log # Debugging the mac error - - find /usr/local/texlive/2020/ -type f -name "l3backend*" + # - find /usr/local/texlive/2020/ -type f -name "l3backend*" - make html - cat pandoc.html.log - make docx - - cat pandoc.docx.log + # - cat pandoc.docx.log - make all - - cat pandoc.*.log + # - cat pandoc.*.log From 0686bb2092e596c11317548ef24db102d009544c Mon Sep 17 00:00:00 2001 From: Robin Cremer Date: Wed, 3 Mar 2021 18:51:10 +0100 Subject: [PATCH 10/10] removed old comments --- install_linux.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/install_linux.sh b/install_linux.sh index ebc66a5e..050199e8 100644 --- a/install_linux.sh +++ b/install_linux.sh @@ -1,10 +1,6 @@ #!/usr/bin/env bash set -e # makes the script fail as soon as one command fails -# texlive installation necessary with: https://github.com/scottkosty/install-tl-ubuntu -# alias tlmgr='/opt/texbin/tlmgr' to be set in .bashrc file or appropriate -# sudo env PATH=$PATH' is needed to carry out sudo on tlmgr, which is not installed with apt, -# see https://github.com/scottkosty/install-tl-ubuntu/issues/13 sudo env PATH=$PATH tlmgr install truncate sudo env PATH=$PATH tlmgr install tocloft