summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/physconst
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-01-27 21:54:22 +0000
committerKarl Berry <karl@freefriends.org>2020-01-27 21:54:22 +0000
commit800da9abca2f37f70e8719fc8b5dc705770785a9 (patch)
tree8b72eebaec8c31a784e8a966db5e29d748161d49 /Master/texmf-dist/doc/latex/physconst
parent3ba805154319fdf4d2d329da360ba7f6780bc932 (diff)
physconst (27jan20)
git-svn-id: svn://tug.org/texlive/trunk@53570 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/physconst')
-rw-r--r--Master/texmf-dist/doc/latex/physconst/CHANGELOG.md13
-rw-r--r--Master/texmf-dist/doc/latex/physconst/README.md80
-rw-r--r--Master/texmf-dist/doc/latex/physconst/makefile122
-rw-r--r--Master/texmf-dist/doc/latex/physconst/physconst.pdfbin135381 -> 135843 bytes
4 files changed, 181 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/latex/physconst/CHANGELOG.md b/Master/texmf-dist/doc/latex/physconst/CHANGELOG.md
index 964bf35aa66..059256090c9 100644
--- a/Master/texmf-dist/doc/latex/physconst/CHANGELOG.md
+++ b/Master/texmf-dist/doc/latex/physconst/CHANGELOG.md
@@ -23,5 +23,18 @@
## [1.0.2] - 2020/01/25
### Changed
- Switch compression of tarball to gzip to match requirement for CTAN
+## [1.0.2.a] - 2020/01/25
+- Same as 1.0.2
+## [1.0.2.b] - 2020/01/25
+### Added
+- Add changelog to distribution
+- Add disribution specific readme
+- Add disribution specific makefile
+### Changed
+- Update README to have clearer build, distribute, install, and uninstall instructions.
+- Distribute with .dtx instead of .sty
+- Reordered build, install, distribute, and uninstall sections of the README
+- Pulled build up one level of headings in the README
+- fix some typos in README
diff --git a/Master/texmf-dist/doc/latex/physconst/README.md b/Master/texmf-dist/doc/latex/physconst/README.md
index 67dd9a8073c..8a43c78f495 100644
--- a/Master/texmf-dist/doc/latex/physconst/README.md
+++ b/Master/texmf-dist/doc/latex/physconst/README.md
@@ -16,57 +16,69 @@ and version 1.3c or later is part of all distributions of LaTeX
version 2006/05/20 or later.
# Dependencies
-- [`physunits` package](https://github.com/astrobit/physunits)
+- [`physunits` package](https://github.com/astrobit/physunits) also available at [CTAN](https://ctan.org)
# Build Dependencies
-- the `xastro-1` library (part of [xlibs][https://github.com/astrobit/xlibs])
-- some LaTeX distribution with `xelatex`. The makefile assumes you have texlive.
-- `pkg-config`
-- GNU c++ compiler (`g++`) with at least c++11
+- some LaTeX distribution.
- `hyperref` package for LaTeX
- `xcolor` package for LaTeX
- `mdframed` package for LaTeX
- `imakeidx` package for LaTeX
-- GNU `make`
# Files
```
+ makefile GNU makefile to simplify building and installation on linux
README.md This file.
CHANGELOG.md List of changes
physconst.ins The installer file
- makefile GNU makefile to create and install the package
- generator/makefile GNU makefile to create the generator
- generator/physconst.cpp c++ source code that will generate the .dtx for the
- package
+ physconst.dtx The package code and documentation
+ physconst.pdf The package user manual
```
-# Distributable Files
-The following distributable files can be created as described below.
-```
- physconst.sty The actual package
- physconst.pdf Usage documentation
- physconst.tar.bz2 Tarball containing package, documentation, and
- this README
- physconst.zip Zip file containing package, documentation, and
- this README
-```
-To create a disribution on linux (or mac?)
-- `make dist`
+# Building the Package
+## Linux / Mac using make and xelatex
+1. `make`
+
+## Otherwise
+1. Run `latex` on `physconst.ins` to create the `.sty` file. e.g. `latex physconst.ins`.
+1. The following steps apply only if you want the documentation (recommended).
+ 1. Run `latex` on `physconst.dtx` to create the `.pdf` file. e.g. `xelatex physconst.pdf`.
+ 1. Run `makeindex` to create the index, e.g. `makeindex -s gind.ist -o physconst.ind physconst.idx`.
+ 1. Run `makeindex` to create the change log, e.g. `makeindex -s gglo.ist -o physconst.gls physconst.glo`.
+ 1. Run `latex` on `physconst.dtx` to create the `.pdf` file with index and change log. e.g. `xelatex physconst.pdf`.
+ 1. Run `latex` on `physconst.dtx` to get the labels sorted out. e.g. `xelatex physconst.pdf`.
+
+Instructions that might help can be for windows can be found at [this post on StackExchange](https://tex.stackexchange.com/questions/369921/loading-packages-with-ins-and-dtx-files).
# Installation
-For linux, run `make` to generate the package (.sty file) and documentation.
-If you are using texlive (most modern linux distributions use texlive), you may
-then run `sudo make localinstall` to install the package to your latex
-distribution. If you are not using texlive, you will need to manually
-copy the .sty file into either the folder where your .tex files reside that
-require the package, or manually install the package in your latex distribution.
+First build the project as described above.
+
+## For a single project
+1. Copy the `physconst.sty` into your project where your `.tex` files are located.
+
+## for all users and projects
+### Linux / Mac using make and xelatex
+1. `make localinstall`
+
+### Otherwise
+Instructions that might help can be for windows can be found at [this post on StackExchange](https://tex.stackexchange.com/questions/369921/loading-packages-with-ins-and-dtx-files).
+1. Figure out where your LaTeX local packages are installed.
+1. Create a directory named `physconst` in that location.
+1. Copy the `.sty` file into the directory you just created.
+1. Figure out where your LaTeX local package documentation is installed.
+1. Create a directory named `physconst` in that location.
+1. Copy the `.pdf` file into the directory you just created.
+1. Run `texhash` or the equivalent to let LaTeX know the package is there.
-For mac, the instructions above for linux might work. Otherwise you're sort of
-on your own. Most likely your latex disrubution is somewhere in /usr/share.
-You will need to figure out the name and where the package files are stored,
-then run `texhash` so that latex knows that they are there.
-For windows, you're kind of on your own. Instructions that might help can be
-found at [this post on StackExchange](https://tex.stackexchange.com/questions/369921/loading-packages-with-ins-and-dtx-files).
+# Uninstallation
+### Linux / Mac using make
+1. `make localuninstall`
+### Otherwise
+1. Figure out where your LaTeX local packages are installed.
+1. Delete the directory named `physconst` in that location.
+1. Figure out where your LaTeX local package documentation is installed.
+1. Delete the directory named `physconst` in that location.
+1. Run `texhash` or the equivalent to let LaTeX know the package is gone.
diff --git a/Master/texmf-dist/doc/latex/physconst/makefile b/Master/texmf-dist/doc/latex/physconst/makefile
new file mode 100644
index 00000000000..ca48c701ecf
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/physconst/makefile
@@ -0,0 +1,122 @@
+pkgname=$(patsubst %.ins,%,$(wildcard *.ins))
+TEXMFLOCAL = $(shell kpsewhich -var-value TEXMFLOCAL)
+TEXMFDIST = $(shell kpsewhich -var-value TEXMFDIST)
+
+.PHONY: all clean localinstall localuninstall localinstallcheck distinstall distuninstall distinstallcheck installcheck
+
+all: $(pkgname).pdf
+
+.PRECIOUS: %.sty %.dtx %.pdf
+.DELETE_ON_ERROR:
+.NOTPARALLEL:
+
+%.sty: %.dtx %.ins
+ latex $(pkgname).ins
+
+%.pdf: %.sty
+ xelatex $(pkgname).dtx
+ makeindex -s gind.ist -o $(pkgname).ind $(pkgname).idx
+ makeindex -s gglo.ist -o $(pkgname).gls $(pkgname).glo
+ xelatex $(pkgname).dtx
+ xelatex $(pkgname).dtx
+
+clean:
+ -rm *.pdf
+ -rm *.log
+ -rm *.out
+ -rm *.aux
+ -rm *.bib
+ -rm *.snm
+ -rm *.toc
+ -rm *.nav
+ -rm *.idx
+ -rm *.sty
+ -rm *.gls
+ -rm *.ilg
+ -rm *.ind
+ -rm *.glo
+ -rm $(pkgname).zip
+ -rm $(pkgname).tar
+ -rm $(pkgname).tar.gz
+ -rm -r $(pkgname)
+ -rm -r tmptar
+ -rm -r tmpzip
+
+$(TEXMFLOCAL)/tex/latex/$(pkgname):
+ mkdir -p $(TEXMFLOCAL)/tex/latex/$(pkgname)
+
+$(TEXMFLOCAL)/doc/latex/$(pkgname):
+ mkdir -p $(TEXMFLOCAL)/doc/latex/$(pkgname)
+
+$(TEXMFLOCAL)/tex/latex/$(pkgname)/$(pkgname).sty: $(pkgname).sty $(TEXMFLOCAL)/tex/latex/$(pkgname)
+ cp $(pkgname).sty $(TEXMFLOCAL)/tex/latex/$(pkgname)/.
+
+$(TEXMFLOCAL)/doc/latex/$(pkgname)/$(pkgname).pdf: $(pkgname).pdf $(TEXMFLOCAL)/doc/latex/$(pkgname)
+ cp $(pkgname).pdf $(TEXMFLOCAL)/doc/latex/$(pkgname)/.
+
+localinstall: $(pkgname).pdf $(pkgname).sty $(TEXMFLOCAL)/tex/latex/$(pkgname) $(TEXMFLOCAL)/doc/latex/$(pkgname) $(TEXMFLOCAL)/tex/latex/$(pkgname)/$(pkgname).sty $(TEXMFLOCAL)/doc/latex/$(pkgname)/$(pkgname).pdf
+ @echo Installing to $(TEXMFLOCAL)/tex/latex/$(pkgname)
+ texhash
+ make localinstallcheck
+
+localuninstall:
+ @echo Removing from $(TEXMFLOCAL)/tex/latex/$(pkgname)
+ -rm -r $(TEXMFLOCAL)/tex/latex/$(pkgname)
+ -rm -r $(TEXMFLOCAL)/doc/latex/$(pkgname)
+ texhash
+
+
+$(TEXMFDIST)/tex/latex/$(pkgname):
+ mkdir -p $(TEXMFDIST)/tex/latex/$(pkgname)
+
+$(TEXMFDIST)/doc/latex/$(pkgname):
+ mkdir -p $(TEXMFDIST)/doc/latex/$(pkgname)
+
+$(TEXMFDIST)/tex/latex/$(pkgname)/$(pkgname).sty: $(pkgname).sty $(TEXMFDIST)/tex/latex/$(pkgname)
+ cp $(pkgname).sty $(TEXMFDIST)/tex/latex/$(pkgname)/.
+
+$(TEXMFDIST)/doc/latex/$(pkgname)/$(pkgname).pdf: $(pkgname).pdf $(TEXMFDIST)/doc/latex/$(pkgname)
+ cp $(pkgname).pdf $(TEXMFDIST)/doc/latex/$(pkgname)/.
+
+distinstall: $(pkgname).pdf $(pkgname).sty $(TEXMFDIST)/tex/latex/$(pkgname) $(TEXMFDIST)/doc/latex/$(pkgname) $(TEXMFDIST)/tex/latex/$(pkgname)/$(pkgname).sty $(TEXMFDIST)/doc/latex/$(pkgname)/$(pkgname).pdf
+ @echo Installing to $(TEXMFDIST)/tex/latex/$(pkgname)
+ texhash
+ make distinstallcheck
+
+distuninstall:
+ @echo Removing from $(TEXMFDIST)/tex/latex/$(pkgname)
+ -rm -r $(TEXMFDIST)/tex/latex/$(pkgname)
+ -rm -r $(TEXMFDIST)/doc/latex/$(pkgname)
+ texhash
+
+#######################################################
+# checks - will be called recursively
+#######################################################
+
+localinstallcheck:
+ifeq (0,$(shell test -d $(TEXMFLOCAL)/tex/latex/$(pkgname); echo $$?))
+ @echo $(pkgname) installed as local: $(TEXMFLOCAL)/tex/latex/$(pkgname)
+else
+ $(error $(pkgname) is not installed as local)
+endif
+
+distinstallcheck:
+ifeq (0,$(shell test -d $(TEXMFDIST)/tex/latex/$(pkgname); echo $$?))
+ @echo $(pkgname) installed as dist: $(TEXMFDIST)/tex/latex/$(pkgname)
+else
+ $(error $(pkgname) is not installed as dist)
+endif
+
+installcheck:
+ifeq (0,$(shell test -d $(TEXMFDIST)/tex/latex/$(pkgname); echo $$?))
+ @echo $(pkgname) installed as dist: $(TEXMFDIST)/tex/latex/$(pkgname)
+else
+ifeq (0,$(shell test -d $(TEXMFLOCAL)/tex/latex/$(pkgname); echo $$?))
+ @echo $(pkgname) installed as local: $(TEXMFLOCAL)/tex/latex/$(pkgname)
+else
+ $(error $(pkgname) is not installed)
+endif
+endif
+
+
+
diff --git a/Master/texmf-dist/doc/latex/physconst/physconst.pdf b/Master/texmf-dist/doc/latex/physconst/physconst.pdf
index b8949005283..67867850bce 100644
--- a/Master/texmf-dist/doc/latex/physconst/physconst.pdf
+++ b/Master/texmf-dist/doc/latex/physconst/physconst.pdf
Binary files differ