Compare commits

...

10 Commits

Author SHA1 Message Date
Jian Zhou
8fabcb6a18 pkgdep: fix permission 2021-04-21 09:36:29 +08:00
Jian Zhou
57338e5869 pkgdep: use sudo & update print 2021-02-09 12:32:02 +08:00
Jian Zhou
8a9285146d pkgdep: update depends 2021-02-09 12:19:56 +08:00
virgilshi
76f535cc88 auto install dep after git pull 2021-02-09 10:48:40 +08:00
virgilshi
b294eaf9c0 pkgdep: inst related dependencies 2021-02-09 10:26:36 +08:00
Jian Zhou
518f91fd42 support download and import 2021-02-03 11:00:19 +08:00
Jian Zhou
ff01cfd9c3 support imports 2021-02-02 12:57:01 +08:00
Jian Zhou
d835087c17
Merge pull request #23 from virgilshi/master
chmod +x gray
2021-01-06 22:45:22 -05:00
virgilshi
705bea64b7 chmod +x gray 2021-01-07 11:04:46 +08:00
Jian Zhou
7fbcdc02f7 example.tex/Makefile 2020-12-23 12:29:09 +08:00
6 changed files with 50 additions and 1 deletions

View File

@ -1,6 +1,7 @@
PDF_FILES = $(shell share/bin/allpdfs)
ALL_FILES = $(shell find -name '*.tex' -or -name '*.sty' -or -name '*.cls' -or -name '*.bib' -or -name '*.bst' -or -name '*.jpg' -or -name '*.png' -or -name '*.eps' | sed -e 's/ /\ /g')
MAKEFILES = $(shell share/bin/allmakefiles)
PWD=$(shell pwd)
-include .configure
@ -26,6 +27,7 @@ multicore:
.makefile:
mkdir -p .makefile
share/bin/pkgdep
.makefile/%.makefile: .makefile share/makefile.sed
sed -e "s/SED/$*/g" share/makefile.sed > $@
@ -33,4 +35,4 @@ multicore:
-include $(MAKEFILES)
echo:
echo $(PDF_FILES)
echo $(PDF_FILES)

View File

@ -145,6 +145,22 @@ Because ``.`` is included in the search path, you can include files from other s
The use of ``share/texmf`` should be avoided, as it is supposed to put some shared files.
## Import and Download
To import from other latex projects, add "imports" in the config file.
```bash
imports="latex-theme"
```
This is useful when you use other latex projects as templates or share paragraphs in multiple projects.
To download from a git project and import:
```bash
imports="latex-theme||git@source"
```
## Dependency between ``pdf``s
If you need to include files from other latex sources, it would be wise to explicitly add dependencies in the make file. So that the changes in the source ``pdf`` would cause rebuild in the destiny ``pdf``. This is done by add ``depend`` configuration in ``config`` file:

2
example.tex/Makefile Normal file
View File

@ -0,0 +1,2 @@
this:
make -C ..

0
share/bin/gray Normal file → Executable file
View File

View File

@ -9,4 +9,22 @@ do
fi
done
[ -f $*/config ] && . $*/config
for import in $imports
do
args=(${import//||/ })
target=${args[0]}
source=${args[1]}
dir="$(pwd)/${target}"
if [ ! -d $dir ];then
git clone $source $dir
fi
if [ -d $dir ]; then
TEXMF="$TEXMF$dir:"
fi
done
echo $TEXMF

11
share/bin/pkgdep Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash -e
DEPS="make texlive-full inotify-tools biber bibtool poppler-utils python-pygments"
if test -f /etc/debian_version; then
echo "pkgdep: installing dependencies - $DEPS"
sudo apt update
sudo apt install $DEPS -y
else
echo "pkgdep: can't support current system $(uname -s)"
fi