diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/MANIFEST | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/README.md | 188 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/VERSION | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/bookshelf.pdf | bin | 0 -> 1096333 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/myshelf.jpg | bin | 0 -> 861987 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/prepdata.sh | 129 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/bookshelf/test.tex | 15 |
7 files changed, 340 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/bookshelf/MANIFEST b/Master/texmf-dist/doc/latex/bookshelf/MANIFEST new file mode 100644 index 00000000000..ec750860960 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/MANIFEST @@ -0,0 +1,7 @@ +bookshelf.dtx +bookshelf.ins +bookshelf.pdf +MANIFEST +myshelf.jpg +README.md +VERSION diff --git a/Master/texmf-dist/doc/latex/bookshelf/README.md b/Master/texmf-dist/doc/latex/bookshelf/README.md new file mode 100644 index 00000000000..daa1df57dcd --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/README.md @@ -0,0 +1,188 @@ + +[//]: # (bookshelf LaTeX class) + +# bookshelf + +This is the README.md file for the bookshelf LaTeX class v0.5 (2020-05-24) +generated by ClassPack v.1.19 (2020-05-19) on 23 May 2020 at 23:33:08 + +## Summary + +The _bookshelf_ package uses _biblatex_ and _biber_ to turn a BiBTeX +bibliography file into a randomly-coloured, randomly-sized shelf of +books, with the title and author in a randomly-chosen typeface. The +image (converted to JPEG from PDF) can then be used as a background in +_Zoom_, _Teams_, _WhatsApp_ etc video calls. It requires a little +preliminary work with the supplied script to set up a list of all your +fonts, a list of colors, and a list of the BiBTeX entry names in your +`.bib` file, but otherwise should work on any modern TeX distribution. + +![Image created from the author's own files](http://latex.silmaril.ie/packages/bookshelf/myshelf.jpg) + + +## Automated installation + +If this class is distributed from CTAN, it should be in a zip file which +allows it to be installed automatically by the TeX Live Manager (tlmgr) +and similar automated installers. + +If you are using automated LaTeX package installation, no further action +is required: the package will be installed the first time you use it in +a LaTeX document. + +If you are using the TeX Live Manager (_tlmgr_) program manually, you +can install this package with the command: + + +## TDS installation + +This class is also available as a TeX Directory System (TDS) zip file +(`.tds.zip`). This is the standard directory layout for a modern TeX +installation which enables the class to be unzipped directly into your +Personal TeX Directory without the need to use _tlmgr_. If you haven’t +yet created a Personal TeX Directory, see below for details of what one +is, and how to create it. + * You can install this class on any TDS-compliant personal system (laptop, +desktop, workstation, table, smartphone, PDA, etc) by unzipping it +straight into your Personal TeX Directory. This will put all the files +into the right places, so you can start using them immediately. + * On a shared (multiuser) system like a server, the administrator can +unzip it into the `$TEXMFLOCAL` directory instead (see below), and run +your TeX directory-indexing program (eg _texhash_, _mktexlsr_, etc) so +that everyone can use it. + * If you are using an old non-TDS-compliant system, see below under Manual +Installation. + +### Your Personal TeX Directory + +This is a directory (folder) where you should put all local manual +modifications (updates, additions such as new or updated classes, +packages, and fonts) that are _not_ handled automatically by _tlmgr_. +The name and location are fixed (for all practical purposes): + * Apple Mac OS X + + ~/Library/texmf + * Unix and GNU/Linux + + ~/texmf + * MS-Windows 95/XP/NT + + C:\texmf + * MS-Windows 2007 and above + + Computer\System\YOURNAME\texmf + +Create that folder now if it does not already exist. Put (or unzip) all +additions to your system that are _not_ handled by _tlmgr_ into this +directory, following _exactly_ the subdirectory structure that is used +in your main TeX distribution (unzipping a TDS file does this for you). +This is what enables LaTeX to find stuff automatically. + + +> #### If you are a Windows user running _MiKTeX_ +> When you create the folder for your Personal TeX Directory, you MUST add it to _MiKTeX_ ’s list of supported folders. Run the _MiKTeX Maintenance/Settings_ program, select the `Roots` tab, and add the folder. You only have to do this once. +> > Each time you add or remove software in your Personal TeX Directory, you MUST then click on the `Update FNDB` button in the `General` tab of the _MiKTeX Maintenance/Settings_ program, otherwise _MiKTeX_ will not find them and nothing will work! +> + +Unix (Mac and GNU/Linux) users do not need to (indeed, should not) run +their filename database indexer program (_mktexlsr_ or _texhash_) for +files put into a personal TeX directory. + + +## Installation on shared systems + +On multi-user systems (Unix-based), identify the shared local directory +tree with the command + + kpsewhich -expand-var '$TEXMFLOCAL' + +This will give you the location of the shared `texmf` directory into +which you must unzip these files. + +Do not forget to run your local TeX filename database indexer program +(_texhash_ or _mktexlsr_) after installation, otherwise the files will +not be found by LaTeX and nothing will work! + + +## Manual installation (non-TDS systems) + +To install this software manually, download and unzip the _non-_TDS zip +file into a temporary directory and move the class and/or package +file[s] and other files to the proper locations where LaTeX will find +them on your system. This is referred to in some documentation as “the +`TEXINPUTS` directory”, although it may be called something else on your +system. + +_It is your responsibility to know where this location is._ See the +question in the TeX FAQ at https://texfaq.org/FAQ-inst-wlcf.html for +more information. If you do not know, or cannot find it, or do not have +access to it, your TeX system may be out of date and may need replacing. + + + +## Online systems and “last resort” systems + +Some online LaTeX systems use CTAN, so a package from there should be +available on demand. For other online LaTeX systems where you do not +have access to the file system, unzip the _non-_TDS zip file into a +temporary directory and upload the files to the online system. Follow +their instructions for where to put them. + +In an emergency, or as a last resort on unmanageable systems, it is +possible simply to put the class and/or package file[s] into your +current working directory (the same folder as your `.tex` file[s]). + +While this may work, it is not supported, and may lead to other +resources (packages, fonts, images etc) not being found. + + +## Usage + +Include the line shown below in the Preamble of your LaTeX document; a +`\documentclass` line should be at the top; a `\usepackage` command +normally goes anywhere in the Preamble: + + \documentclass[options]{bookshelf} + +(similarly for other classes or packages if more than one is supplied +with this package). Read the documentation for the options available, if +any. The documentation is distributed as a PDF document in the zip file. +You can also regenerate it by typesetting the `bookshelf.dtx` file with +`xelatex` (and `biber` and _makeindex_) in the normal way. + + +## Bugs and TODO + +No outstanding reported bugs at the time of this version. + +For TODO items, see the PDF documentation. + + +## Copyright + +The following statement is included in the source code: + + Transformed from bookshelf.xml by ClassPack db2dtx.xsl + version 1.19 (2020-05-19) on Saturday 23 May 2020 at 23:33:08 + + bookshelf.cls is copyright © 2020 by Peter Flynn <peter@silmaril.ie> + + This work may be distributed and/or modified under the + conditions of the LaTeX Project Public License, either + version 1.3 of this license or (at your option) any later + version. The latest version of this license is in: + + http://www.latex-project.org/lppl.txt + + and version 1.3 or later is part of all distributions of + LaTeX version 2005/12/01 or later. + + This work has the LPPL maintenance status ‘maintained’. + + The current maintainer of this work is Peter Flynn <peter@silmaril.ie> + + This work consists of the files bookshelf.dtx and bookshelf.ins, + the derived file , + and any other ancillary files listed in the MANIFEST. + + diff --git a/Master/texmf-dist/doc/latex/bookshelf/VERSION b/Master/texmf-dist/doc/latex/bookshelf/VERSION new file mode 100644 index 00000000000..3bb4be8764a --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/VERSION @@ -0,0 +1 @@ +Date of most recent change is 2020-05-24 diff --git a/Master/texmf-dist/doc/latex/bookshelf/bookshelf.pdf b/Master/texmf-dist/doc/latex/bookshelf/bookshelf.pdf Binary files differnew file mode 100644 index 00000000000..e9cd6498321 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/bookshelf.pdf diff --git a/Master/texmf-dist/doc/latex/bookshelf/myshelf.jpg b/Master/texmf-dist/doc/latex/bookshelf/myshelf.jpg Binary files differnew file mode 100644 index 00000000000..72b7dda2ef8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/myshelf.jpg diff --git a/Master/texmf-dist/doc/latex/bookshelf/prepdata.sh b/Master/texmf-dist/doc/latex/bookshelf/prepdata.sh new file mode 100644 index 00000000000..bc705d6bb00 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/prepdata.sh @@ -0,0 +1,129 @@ +#! /bin/bash + +# prepdata.sh - prepare the datasets for the bookshelf package +# which creates a bookshelf image from a BiBTeX file. +# +# Peter Flynn, 2020-05-14 <peter@silmaril.ie> +# +# Dependencies: the standard UNIX/GNU Linux text utilities +# and builtins : cat, grep, awk, mkdir, rm, echo, sed, sort +# PLUS the font-cache program fc-list (1) and the TeX utility +# kpsewhich (1). +# +# Note that if you have not updated your font-cach to take +# account of fonts added since installation (eg fonts +# distributed with TeX which are not installed in the system +# fonts directories) then you should edit /etc/fonts/conf.avail +# to add the directories where they are installed to (eg) +# 09-texlive.conf and then alias that file to conf.d, and then +# run fc-cache as root. + +if [ -z "$1" ]; then + echo You must give the full name of your BiBTeX file + exit 1 +else + if [ ! -s "$1" ]; then +echo I can\'t find the file "$1" anywhere here +exit 1 + else +BIBFILE="$1" + fi +fi + +########################################################### +# +# Make a list of all the entries in the bib file. This is +# in effect the 'driver' which creates each book spine image +# and the entries.tex file is \input in the test.tex file. + +cat "$BIBFILE" |\ + grep '^@' |\ + grep -viE '(@Preamble|@String)' |\ + awk -F\{ '{print $2}' |\ + awk -F, '{print "\\makebook{" $1 "}%"}' >entries.tex + +echo `cat entries.tex|wc -l` bibliographic entries + +########################################################## +# +# Make a list of all the fonts available: this omits PFB +# fonts (Postscript Type 1) and deduplicates the entries +# on the first token of their name. CRITICALLY it then +# applies a (typically) VERY LONG list of disallowed font +# names so as to exclude non-text fonts: math, symbols, +# display fonts, bogus and broken fonts, and fonts not +# providing the Latin alphabet. +# +# Note that the current list includes many names which +# ought not be there, because problems were encountered +# when using them, especially as they returned a value +# for the title length of 0.0pt, which is clearly a bug. + +mkdir -p fontsel +rm -f fontsel/* + +if [[ "$OSTYPE" =~ ^darwin ]]; then + + system_profiler SPFontsDataType 2>/dev/null |\ + awk -F: '/^[ ]{4}[A-Za-z0-9\;\ ]*.[ot]tf*:$/ {font=substr($1,5)} \ + /^[ ]{10}Family:/ {if(font!="") \ + {print substr($2,2);font=""}}' |\ + grep -Ev '^[\.\ ]' |\ + sort |\ + uniq |\ + grep -Evi '(Bitmap|Emoji|Dingbats|Jazz|STIX|dings|Symbol|Numeric|DIN|Ornament|OCR|CJK|Awesome|Dummy|Math)' |\ + awk '{file="fontsel/" NR ".tex";\ + print "\\newfontface{\\SILmfont}{" $0 "}" >file; + print "\\def\\SILmfontname{" $0 "}" >file; + close(file)} \ + END {print "\\setcounter{SIL@maxfont}{" NR "}"}' >pickfont.tex + +elif [[ "$OSTYPE" =~ ^linux ]]; then + + fc-list |\ + grep -v '\.[ot]tf' |\ + grep -Ev '(fontsite|bitstrea)' |\ + awk -F: '{print substr($2,2)}' |\ + awk -F, '{print $1}' |\ + awk '{print $1 "," length($0) "," $0}' |\ + sort -t, -k 1,1 -k 2n |\ + awk -F, '{if($1!=last)print $3;last=$1}' |\ + grep -Evi '(Bitmap|Emoji|Dingbats|Jazz|STIX|dings|Symbol|Numeric|DIN|Ornament|OCR|CJK|Awesome|Dummy|Math)' |\ + awk '{file="fontsel/" NR ".tex";\ + print "\\newfontface{\\SILmfont}{" $0 "}" >file; + print "\\def\\SILmfontname{" $0 "}" >file; + close(file)} \ + END {print "\\setcounter{SIL@maxfont}{" NR "}"}' >pickfont.tex + +fi + +echo `ls -1 fontsel|wc -l` fonts + +########################################################### +# +# Make a list of the colour selection from the SVG palette +# of the xcolor LaTeX package, with calculation of the +# brightness/darkness value according to +# https://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx + +PALETTE=`kpsewhich svgnam.def` +cat $PALETTE |\ + grep '^[A-Z][A-Za-z]*,[\.0-9][0-9]*,[\.0-9][0-9]*,[\.0-9][0-9]*' |\ + awk -F\; '{print $1}' |\ + awk -F, '{r=$2;g=$3;b=$4} \ + {brightness=sqrt((0.241*r*r)+(0.691*g*g)+(0.068*b*b))} \ + {print $1,r,g,b,brightness}' >svgnam.csv + cat svgnam.csv |\ + awk 'BEGIN {print "\\newcommand{\\SIL@svgcolname}[1]{\\ifcase#1 "} \ + {print $1 "\\or"} END {print "Black\\fi}\n"}' >svgnam.tex + cat svgnam.csv |\ + awk 'BEGIN {print "\\newcommand{\\SIL@svgcolval}[1]{\\ifcase#1 "} \ + {print $5 "\\or"} END {print ".666666666\\fi}\n"}' >>svgnam.tex + cat svgnam.csv | wc -l |\ + awk '{print "\\setcounter{SIL@maxcolno}{" $1 "}"}' >>svgnam.tex + +echo `cat svgnam.csv|wc -l` colors + +exit 0 + + diff --git a/Master/texmf-dist/doc/latex/bookshelf/test.tex b/Master/texmf-dist/doc/latex/bookshelf/test.tex new file mode 100644 index 00000000000..6ebe34a8dc7 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookshelf/test.tex @@ -0,0 +1,15 @@ +% !TEX TS-program = xelatex +% !TEX encoding = UTF-8 Unicode +% !BIB TS-program = biber + +\documentclass[a0paper,landscape]{bookshelf} +\addbibresource{mythesis.bib} +\begin{document}\raggedright +%%\immediate\write18{./prepdata.sh} +%%\input{entries.tex} +\nocite{*} +\par\vfill\clearpage +\printbibliography +\end{document} + + |