utilities: Add a script for automated latex package install
PATCH 1/2 utilities: Add a script for automated latex package install
Installing version mismatch latex packages one by one in manual, as described in #10.A in FAQ-BUILD.txt is cumbersome. This commit adds a script for automation of the work.
--- utilities/install_latex_package.sh | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 utilities/install_latex_package.sh
utilities/install_latex_package.sh new file +44 -0
@@ -0,0 +1,44 @@ +#!/bin/bash + +if [ $# -ne 1 ] +then + echo "Usage: $0 <package name>" + exit 1 +fi + +package=$1 + +packages="titlesec cleveref listings draftwatermark epigraph fvextra" +supported="false" +for p in $packages +do + if [ "$package" == "$p" ] + then + supported="true" + break + fi +done +if [ "$supported" == "false" ] +then + echo "$package is not supported" + exit 1 +fi + +wget "http://mirrors.ctan.org/macros/latex/contrib/$package.zip" +unzip "$package.zip" +cd "$package" || exit 1 + +latex "$package.ins" +if [ ! -e "$package.sty" ] +then + echo "$package.sty creation failed" + exit 1 +fi + +install_dir=~/texmf/tex/latex/"$package" +mkdir -p "$install_dir" +cp "$package.sty" "$install_dir/" +texhash ~/texmf + +cd .. || exit 1 +rm -fr "$package" "$package.zip"
Signature · 1 line
2.17.1
PATCH 2/2 FAQ-BUILD: Add a description for the automated latex package install script
This commit adds a description for the automated latex package install script, 'utilities/install_latex_package.sh'.
--- FAQ-BUILD.txt | 6 ++++++ 1 file changed, 6 insertions(+)
FAQ-BUILD.txt +6 -0
@@ -210,6 +210,12 @@ 2. Install it by following instructions at: https://help.ubuntu.com/community/LaTeX#Installing_packages_manually + B. Instead of above manual steps, you could install the package + using a script in this repository, + './utilities/install_latex_package.sh'. For example: + + $ ./utilities/install_latex_package.sh epigraph + 11. Is it possible to generate SyncTeX database file? A. Yes, it is. Setting an environment variable:
Signature · 1 line
2.17.1
Re: [PATCH 2/2] FAQ-BUILD: Add a description for the automated latex package install script
Quoted 16 lines · SeongJae Park
This commit adds a description for the automated latex package install script, '
utilities/install_latex_package.sh'.Signed-off-by SeongJae Park <[email protected]>--- FAQ-BUILD.txt | 6 ++++++ 1 file changed, 6 insertions(+)FAQ-BUILD.txt +0
-0@@ -210,6 +210,12 @@ 2. Install it by following instructions at: https://help.ubuntu.com/community/LaTeX#Installing_packages_manually
FAQ-BUILD.txt line 221
Quoted 10 lines
FAQ-BUILD.txt +6
-0+ B. Instead of above manual steps, you could install the package + using a script in this repository, + './utilities/install_latex_package.sh'. For example: + + $ ./utilities/install_latex_package.sh epigraph + 11. Is it possible to generate SyncTeX database file? A. Yes, it is. Setting an environment variable:
For both 1/2 and 2/2,
Thanks, Akira
Paul E. McKenney
AppliedRe: [PATCH 2/2] FAQ-BUILD: Add a description for the automated latex package install script
Quoted 25 lines · Akira Yokosawa
Quoted 24 lines · SeongJae Park
This commit adds a description for the automated latex package install script, '
utilities/install_latex_package.sh'.Signed-off-by SeongJae Park <[email protected]>--- FAQ-BUILD.txt | 6 ++++++ 1 file changed, 6 insertions(+)FAQ-BUILD.txt +6
-0@@ -210,6 +210,12 @@ 2. Install it by following instructions at: https://help.ubuntu.com/community/LaTeX#Installing_packages_manually + B. Instead of above manual steps, you could install the package + using a script in this repository, + './utilities/install_latex_package.sh'. For example: + + $ ./utilities/install_latex_package.sh epigraph + 11. Is it possible to generate SyncTeX database file?
Quoted 6 lines
FAQ-BUILD.txt line 221
Quoted 2 lines
FAQ-BUILD.txt +0
-0A. Yes, it is. Setting an environment variable:For both 1/2 and 2/2,
Acked-by Akira Yokosawa <[email protected]>
Applied, thank you both!
Thanx, Paul