diff --git a/README.md b/README.md index 9021ef1f..f8ad99a8 100644 --- a/README.md +++ b/README.md @@ -1,80 +1,31 @@ # Table of Contents -1. [Requirements](#requirements) -2. [Installation](#installation) -3. [Packages](#packages) +1. [Installation](#installation) +2. [Packages](#packages) 1. [Org](#org) 2. [Multiple cursors](#multiple-cursors) 3. [Other packages](#other-packages) -4. [Information](#information) -5. [Errors](#errors) -6. [TODOs](#todos) +3. [Information](#information) +4. [Errors](#errors) +5. [TODOs](#todos) This is an ongoing evolution of Emacs configuration files, inspired by a bunch of online resources. - - -# Requirements - -external packages: - - # fonts (opensans in latex article preamble) - yay -S ttf-inconsolata ttf-opensans - # spelling flyspell-buffer - yay -S aspell aspell-de aspell-en \ - hunspell hunspell-de hunspell-en_US \ - languagetool - # org-mode latex-mode ox-latex - yay -S biber bibtex2html texlive-bibtexextra texlive-core \ - texlive-fontsextra texlive-formatsextra texlive-langgreek \ - texlive-langjapanese texlive-latexextra texlive-pgf-pie \ - texlive-pgfopts texlive-pictures texlive-pstricks \ - texlive-publishers texlive-science texlive-slashbox - # ledger-mode - yay -S ledger - # python-mode - yay -S python-pylint - # emacs-application-famework EAF - yay -S --needed git nodejs aria2 libreoffice wmctrl xdotool jre-openjdk \ - python-pyqt5 python-pyqt5-sip python-pyqtwebengine python-qrcode \ - python-feedparser python-dbus python-pyinotify python-markdown \ - python-grip filebrowser-bin python-epc - # other - yay -S ditaa plantuml r - -Optional package for EAF see in Installation. - - # Installation -Install into `~/.config/emacs` (must be empty) +Run one of the following install script commands. - git clone http://gogs.weseng.de/daniel/emacs.git ~/.config/emacs + curl sh -c "$(curl -fsSL http://gogs.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" + wget sh -c "$(wget -O- http://gogs.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" + fetch sh -c "$(fetch -o - http://gogs.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" -or copy all files of this directory into your ~/.config/emacs directory - -- for Emacs version < 27 create symbolic link to the init file -- `ln -s ~/.config/emacs/init ~/.emacs` (or `~/.emacs.el`, - `~/.emacs.d/init.el`) - -LaTeX sytling files: copy/merge the `texmf` directory into your home -directory `~/texmf` - -optional for EAF - - yay --editmenu -S mupdf python-pymupdf - -edit `PGKBUILD` file for `python-pymupdf` to: - - prepare() { - cd "${_name}-${pkgver}" - patch --forward --strip=1 --input="${HOME}/.config/emacs/scripts/fix-pymupdf-library-linking-for-arcolinux.patch" - } +Installation path is `~/.config/emacs`. See details and other +installed linux packages as requirements inside `sripts/install.sh`. diff --git a/README.org b/README.org index 1fa61134..72e35891 100644 --- a/README.org +++ b/README.org @@ -5,70 +5,20 @@ This is an ongoing evolution of Emacs configuration files, inspired by a bunch of online resources. -* Requirements - :PROPERTIES: - :CUSTOM_ID: requirements - :END: - external packages: - #+begin_src shell - # fonts (opensans in latex article preamble) - yay -S ttf-inconsolata ttf-opensans - # spelling flyspell-buffer - yay -S aspell aspell-de aspell-en \ - hunspell hunspell-de hunspell-en_US \ - languagetool - # org-mode latex-mode ox-latex - yay -S biber bibtex2html texlive-bibtexextra texlive-core \ - texlive-fontsextra texlive-formatsextra texlive-langgreek \ - texlive-langjapanese texlive-latexextra texlive-pgf-pie \ - texlive-pgfopts texlive-pictures texlive-pstricks \ - texlive-publishers texlive-science texlive-slashbox - # ledger-mode - yay -S ledger - # python-mode - yay -S python-pylint - # emacs-application-famework EAF - yay -S --needed git nodejs aria2 libreoffice wmctrl xdotool jre-openjdk \ - python-pyqt5 python-pyqt5-sip python-pyqtwebengine python-qrcode \ - python-feedparser python-dbus python-pyinotify python-markdown \ - python-grip filebrowser-bin python-epc - # other - yay -S ditaa plantuml r - #+end_src - Optional package for EAF see in Installation. - * Installation :PROPERTIES: :CUSTOM_ID: installation :END: - Install into =~/.config/emacs= (must be empty) + Run one of the following install script commands. #+begin_src sh - git clone http://gogs.weseng.de/daniel/emacs.git ~/.config/emacs + curl sh -c "$(curl -fsSL http://gogs.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" + wget sh -c "$(wget -O- http://gogs.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" + fetch sh -c "$(fetch -o - http://gogs.weseng.de/daniel/emacs/raw/master/scripts/install.sh)" #+end_src - #+RESULTS: + Installation path is =~/.config/emacs=. See details and other + installed linux packages as requirements inside =sripts/install.sh=. - or copy all files of this directory into your ~/.config/emacs directory - - for Emacs version < 27 create symbolic link to the init file - - =ln -s ~/.config/emacs/init ~/.emacs= (or =~/.emacs.el=, - =~/.emacs.d/init.el=) - - LaTeX sytling files: copy/merge the =texmf= directory into your home - directory =~/texmf= - - optional for EAF - #+begin_src shell - yay --editmenu -S mupdf python-pymupdf - #+end_src - - edit =PGKBUILD= file for =python-pymupdf= to: - #+begin_example - prepare() { - cd "${_name}-${pkgver}" - patch --forward --strip=1 --input="${HOME}/.config/emacs/scripts/fix-pymupdf-library-linking-for-arcolinux.patch" - } - #+end_example - * Packages :PROPERTIES: :CUSTOM_ID: packages diff --git a/scripts/install.sh b/scripts/install.sh new file mode 100755 index 00000000..c31cbb21 --- /dev/null +++ b/scripts/install.sh @@ -0,0 +1,137 @@ +#!/bin/sh +# Installation script for Arch and Debian (also WSL) +# run script: +# sh install.sh + +# * Manual Installation +# Install into =~/.config/emacs= (must be empty) +# git clone http://gogs.weseng.de/daniel/emacs.git ~/.config/emacs + +# or copy all files of this directory into your ~/.config/emacs directory +# - for Emacs version < 27 create symbolic link to the init file +# - =ln -s ~/.config/emacs/init ~/.emacs= (or =~/.emacs.el=, +# =~/.emacs.d/init.el=) + +# LaTeX sytling files: copy/merge the =texmf= directory into your home +# directory =~/texmf= + +# See package requirements inside the code + + +# INTERNAL +distro=$(lsb_release -is) +# echo $distro + +case $distro in + "Arch") + echo "Arch found" + echo "Emacs installation" + yay -Syu --needed emacs-git \ + yay -S ttf-inconsolata ttf-opensans noto-fonts-cjk \ + yay -S aspell aspell-de aspell-en \ + hunspell hunspell-de hunspell-en_US \ + languagetool \ + biber bibtex2html texlive-bibtexextra texlive-core \ + texlive-fontsextra texlive-formatsextra texlive-langgreek \ + texlive-langjapanese texlive-latexextra texlive-pgf-pie \ + texlive-pgfopts texlive-pictures texlive-pstricks \ + texlive-publishers texlive-science texlive-slashbox \ + ledger \ + python-pylint \ + git nodejs aria2 libreoffice wmctrl xdotool jre-openjdk \ + python-pyqt5 python-pyqt5-sip python-pyqtwebengine python-qrcode \ + python-feedparser python-dbus python-pyinotify python-markdown \ + python-grip filebrowser-bin python-epc mupdf \ + ditaa plantuml r + # TODO: python-pymupdf + # PGKBUILD with patch + # yay --editmenu -S python-pymupdf + # prepare() { + # cd "${_name}-${pkgver}" + # patch --forward --strip=1 --input="${HOME}/.config/emacs/scripts/fix-pymupdf-library-linking-for-arcolinux.patch" + # } + ;; + + "Debian") + echo "Debian found" + echo "Emacs installation" + sudo apt-get update + # sudo apt-get install emacs # version too old + # emacs-snapshot https://www.emacswiki.org/emacs/EmacsSnapshotAndDebian + # To enable adding a private repository. + sudo apt-get install -y software-properties-common wget + # To get the Apt signing key of emacs-snapshot + wget -q http://emacs.ganneff.de/apt.key -O- | sudo apt-key add + # Replace Buster with your version. check with: lsb_release -a; # repos are listed inside /etc/apt/sources.list + sudo add-apt-repository "deb http://emacs.ganneff.de/ buster main" + + echo "Packages used by Emacs" + # language tool via snap + sudo apt-get update + sudo apt-get install -y emacs-snapshot \ + fonts-inconsolata fonts-noto-cjk-extra \ + aspell aspell-en aspell-de hunspell \ + hunspell-en-us hunspell-de-de snapd \ + biber bibtex2html texlive-bibtex-extra texlive-base \ + texlive-fonts-extra texlive-formats-extra texlive-lang-greek \ + texlive-lang-japanese texlive-latex-extra \ + texlive-pictures texlive-pstricks \ + texlive-publishers texlive-science \ + ledger \ + python3-pylint-common \ + git nodejs aria2 libreoffice wmctrl xdotool default-jre \ + python3-pyqt5 python3-pyqt5.qtwebengine python3-qrcodegen \ + python3-feedparser python3-dbus python3-pyinotify python3-markdown \ + python3-epc mupdf \ + ditaa plantuml r-base + # TODO: not found: ttf-opensans + # texlive-pgf-pie texlive-pgfopts texlive-slashbox + # python-pyqt5-sip python-grip filebrowser-bin + # TODO: snap not supported for wsl + # https://wiki.ubuntuusers.de/LanguageTool/ + sudo snap install core + sudo snap install languagetool + # Update Alternatives to ensure it uses the snapshot version of emacsclient. + echo "[NOTE] you may update alternatives of emacs and emacsclient." + echo "To list run:" + echo " update-alternatives --list emacs" + echo " update-alternatives --list emacsclient" + echo "To update run:" + echo " sudo update-alternatives --config emacsclient" + ;; + *) + echo "unknown: \"${distro}\"" + ;; +esac + + + +case $distro in + Arch|Debian) + echo "Emacs configuration" + + mkdir -p ~/.config/emacs + echo "git clone" + git clone http://gogs.weseng.de/daniel/emacs.git ~/.config/emacs + + cp -r ~/.config/emacs/scripts/texmf ~/ + ;; + *) + ;; +esac + +# TODO: texmf + + +# +# Microsoft +# +# NOT NEEDED AT THE MOMENT +# kernel_release=$(uname -r) +# check if system is Microsoft and what distro is used +# if test $(echo $kernel_release | grep -i microsoft); then +# # remove control characters ^@ ^M, (otherwise will be D^@e^@b^@i^@a^@n^@^M^@ ^@) see with: echo $distro | cat -v +# # distro=$(/mnt/c/Windows/System32/wsl.exe --list --running -q | tr -d "[:cntrl:]") +# distro=$(lsb_release -is) +# fi +# echo $distro diff --git a/scripts/texmf/bibtex/bst/acmu.bst b/scripts/texmf/bibtex/bst/acmu.bst new file mode 100755 index 00000000..298f14d8 --- /dev/null +++ b/scripts/texmf/bibtex/bst/acmu.bst @@ -0,0 +1,1140 @@ +% Copyright (C) 1986, 1988, 2010 Howard Trickey and Oren Patashnik. +% Unlimited copying and redistribution of this file are permitted as long as +% it is unmodified. Modifications (and redistribution of modified versions) +% are also permitted, but only if the resulting file is renamed. +% +% ACM Transactions bibliography style (8-Dec-10 version) +% A lot like abbrv.bst, but names come out "Last, initials", and in \sc. +% Some dates are parenthesized. +% +% History +% 2/ 6/86 (HWT) Original version, by Howard Trickey. +% 3/ 5/86 (HWT) Put in pp. everywhere but articles, as per ACM style. +% 1/24/88 (OP&HWT) Updated for BibTeX version 0.99a, Oren Patashnik; +% corrected the abbreviations to "Mar." and "Sept."; +% THIS `acm' VERSION DOES NOT WORK WITH BIBTEX 0.98i. +% 12/ 8/10 (OP&HWT) Clarify license. + +ENTRY + { address + author + booktitle + chapter + edition + editor + howpublished + institution + journal + key + month + note + number + organization + pages + publisher + school + series + title + type + volume + year + } + {} + { label } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "}" * } + if$ +} + +FUNCTION {emphasizeic} +{ duplicate$ empty$ + { pop$ "" } + { "{\em " swap$ * "\/}" * } + if$ +} + +FUNCTION {scapify} +{ duplicate$ empty$ + { pop$ "" } + { "{\sc " swap$ * "}" * } + if$ +} + +INTEGERS { nameptr namesleft numnames } + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { t "others" = + { ", et~al." * } + { ", and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +% For names inside entries (e.g., editors of an "In ..."); +% this is exactly ABBRV.BST's `format.names' function. +FUNCTION {format.innames} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := + nameptr #1 > + { namesleft #1 > + { ", " * t * } + { numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ author empty$ + { "" } + { author format.names scapify } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names scapify + editor num.names$ #1 > + { ", Eds." * } + { ", Ed." * } + if$ + } + if$ +} + +FUNCTION {format.ineditors} +{ editor empty$ + { "" } + { editor format.innames + editor num.names$ #1 > + { ", Eds." * } + { ", Ed." * } + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title "t" change.case$ } + if$ +} + +FUNCTION {n.dashify} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { t #1 #2 substring$ "--" = not + { "--" * + t #2 global.max$ substring$ 't := + } + { { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.date} +{ year empty$ + { month empty$ + { "" } + { "there's a month but no year in " cite$ * warning$ + month + } + if$ + } + { month empty$ + 'year + { month " " * year * } + if$ + } + if$ +} + +FUNCTION {format.btitle} +{ title emphasize +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {format.bvolume} +{ volume empty$ + { "" } + { "vol.~" volume * + series empty$ + 'skip$ + { " of " * series emphasize * } + if$ + "volume and number" number either.or.check + } + if$ +} + +FUNCTION {format.number.series} +{ volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "no.~" } + { "No.~" } + if$ + number * + series empty$ + { "there's a number but no series in " cite$ * warning$ } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ "~ed." * } + { edition "t" change.case$ "~ed." * } + if$ + } + if$ +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages n.dashify } + if$ +} + +INTEGERS { multiresult } + +FUNCTION {multi.page.check} +{ 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { t #2 global.max$ substring$ 't := } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pp.pages} +{ pages empty$ + { "" } + { pages multi.page.check + { "pp.~" pages n.dashify * } + { "p.~" pages * } + if$ + } + if$ +} + +FUNCTION {format.journal.vol.num.date} +{ journal empty$ + { "empty journal in " cite$ * warning$ + "" + } + { journal + volume empty$ + 'skip$ + { " " * volume * } + if$ + number empty$ + 'emphasizeic + { emphasize ", " * number * } + if$ + year empty$ + { "empty year in " cite$ * warning$ } + { " (" * format.date * ")" * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ chapter empty$ + 'format.pp.pages + { type empty$ + { "ch.~" chapter * } + { type "l" change.case$ chapter tie.or.space.connect } + if$ + pages empty$ + 'skip$ + { ", " * format.pp.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ booktitle empty$ + { "" } + { "In " booktitle emphasize * + editor empty$ + 'skip$ + { ", " * format.ineditors * } + if$ + } + if$ +} + +% The proceedings title (it's on the stack) gets an (address, date) appended +FUNCTION {format.proc.date} +{ duplicate$ empty$ + { pop$ "" } + { year empty$ + { "empty year in " cite$ * warning$ + address empty$ + 'emphasize + { emphasizeic + " (" * address * ")" * + } + if$ + } + { emphasizeic + " (" * + address empty$ + 'skip$ + { address * ", " * } + if$ + format.date * + ")" * + } + if$ + } + if$ +} + +FUNCTION {format.in.proc.date} +{ booktitle empty$ + { "" } + { "In " booktitle format.proc.date * } + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ +} + +FUNCTION {format.tr.number} +{ type empty$ + { "Tech. Rep." } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {format.article.crossref} +{ key empty$ + { journal empty$ + { "need key or journal for " cite$ * " to crossref " * crossref * + warning$ + "" + } + { "In {\em " journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ volume empty$ + { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ + "In " + } + { "Vol.~" volume * + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "need editor, key, or series for " cite$ * " to crossref " * + crossref * warning$ + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "need editor, key, or booktitle for " cite$ * " to crossref " * + crossref * warning$ + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {article} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.journal.vol.num.date output + format.pages output + } + { format.article.crossref output.nonnull + format.pp.pages output + } + if$ + new.block + note output + fin.entry +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + format.edition output + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + new.block + format.title "title" output.check + howpublished address new.block.checkb + howpublished output + address output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {inbook} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull + crossref missing$ + { "author and editor" editor either.or.check } + 'skip$ + if$ + } + if$ + new.block + format.btitle "title" output.check + format.edition output + crossref missing$ + { format.bvolume output + new.block + format.number.series output + new.sentence + publisher "publisher" output.check + address output + } + { new.block + format.book.crossref output.nonnull + } + if$ + format.date "year" output.check + format.chapter.pages "chapter and pages" output.check + new.block + note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + format.edition output + format.bvolume output + format.number.series output + new.sentence + publisher "publisher" output.check + address output + format.date "year" output.check + } + { format.incoll.inproc.crossref output.nonnull } + if$ + format.chapter.pages output + new.block + note output + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + crossref missing$ + { format.in.proc.date "booktitle" output.check + format.ineditors output + format.bvolume output + format.number.series output + organization output + publisher output + } + { format.incoll.inproc.crossref output.nonnull } + if$ + format.pp.pages output + new.block + note output + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization scapify output } + { format.authors output.nonnull } + if$ + new.block + format.btitle "title" output.check + format.edition output + author empty$ + { address new.block.checka } + { organization address new.block.checkb + organization output + } + if$ + address output + format.date output + new.block + note output + fin.entry +} + +FUNCTION {mastersthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + "Master's thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {misc} +{ output.bibitem + format.authors output + title howpublished new.block.checkb + format.title output + howpublished new.block.checka + howpublished output + format.date output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {phdthesis} +{ output.bibitem + format.authors "author" output.check + new.block + format.btitle "title" output.check + new.block + "PhD thesis" format.thesis.type output.nonnull + school "school" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization scapify output } + { format.editors output.nonnull } + if$ + new.block + title format.proc.date "title" output.check + format.bvolume output + format.number.series output + editor empty$ + 'skip$ + { organization output } + if$ + publisher output + new.block + note output + fin.entry +} + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + format.tr.number output.nonnull + institution "institution" output.check + address output + format.date "year" output.check + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + note "note" output.check + format.date output + fin.entry +} + +FUNCTION {default.type} { misc } + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sept."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Softw. Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Programming"} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Gr."} + +MACRO {toms} {"ACM Trans. Math. Softw."} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Program. Lang. Syst."} + +MACRO {tcs} {"Theoretical Comput. Sci."} + +READ + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +INTEGERS { len } + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {sort.format.names} +{ 's := + #1 'nameptr := + "" + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { nameptr #1 > + { " " * } + 'skip$ + if$ + s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := + nameptr numnames = t "others" = and + { "et al" * } + { t sortify * } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {sort.format.title} +{ 't := + "A " #2 + "An " #3 + "The " #4 t chop.word + chop.word + chop.word + sortify + #1 global.max$ substring$ +} + +FUNCTION {author.sort} +{ author empty$ + { key empty$ + { "to sort, need author or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.editor.sort} +{ author empty$ + { editor empty$ + { key empty$ + { "to sort, need author, editor, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { editor sort.format.names } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {author.organization.sort} +{ author empty$ + { organization empty$ + { key empty$ + { "to sort, need author, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { author sort.format.names } + if$ +} + +FUNCTION {editor.organization.sort} +{ editor empty$ + { organization empty$ + { key empty$ + { "to sort, need editor, organization, or key in " cite$ * warning$ + "" + } + { key sortify } + if$ + } + { "The " #4 organization chop.word sortify } + if$ + } + { editor sort.format.names } + if$ +} + +FUNCTION {presort} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.sort + { type$ "proceedings" = + 'editor.organization.sort + { type$ "manual" = + 'author.organization.sort + 'author.sort + if$ + } + if$ + } + if$ + " " + * + year field.or.null sortify + * + " " + * + title field.or.null + sort.format.title + * + #1 entry.max$ substring$ + 'sort.key$ := +} + +ITERATE {presort} + +% SORT + +STRINGS { longest.label } + +INTEGERS { number.label longest.label.width } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + +EXECUTE {initialize.longest.label} + +ITERATE {longest.label.pass} + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" longest.label * "}" * write$ newline$ +} + +EXECUTE {begin.bib} + +EXECUTE {init.state.consts} + +ITERATE {call.type$} + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +EXECUTE {end.bib} diff --git a/scripts/texmf/tex/latex/dljscc.def b/scripts/texmf/tex/latex/dljscc.def new file mode 100755 index 00000000..55f0b491 --- /dev/null +++ b/scripts/texmf/tex/latex/dljscc.def @@ -0,0 +1,76 @@ +%% +%% This is file `dljscc.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% insdljs.dtx (with options: `copyright,cc4js') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% insdljs.sty package, %% +%% Copyright (C) 2001-2018 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\r{\eqesc r\ckivspace} +\def\t{\eqesc t\ckivspace} +\def\n{\eqesc n\ckivspace} +\def\f{\eqesc f\ckivspace} +\def\v{\eqesc v\ckivspace} +\def\b{\eqesc b\ckivspace} +\def\B{\eqesc B\ckivspace} +\def\d{\eqesc d\ckivspace} +\def\D{\eqesc D\ckivspace} +\def\s{\eqesc s\ckivspace} +\def\S{\eqesc S\ckivspace} +\def\w{\eqesc w\ckivspace} +\def\W{\eqesc W\ckivspace} +\begingroup +\catcode`\:=12\relax +\dljstfor\dlhex:={AA}{AB}{AC}{AD}{AE}{AF}% + {BA}{BB}{BC}{BD}{BE}{BF}{CA}{CB}{CC}{CD}{CE}{CF}% + {DA}{DB}{DC}{DD}{DE}{DF}{EA}{EB}{EC}{ED}{EE}{EF}% + {FA}{FB}{FC}{FD}{FE}{FF}\do{% + \expandafter\xdef\csname x\dlhex\endcsname{\noexpand\eqesc x\dlhex}% +} +\endgroup +\def\u{\eqesc u\ckivspace} +\def\0{\eqesc0} +\def\1{\eqesc1} +\def\2{\eqesc2} +\def\3{\eqesc3} +\definebraces +\def\({\eqesc\eqesci(} +\def\){\eqesc\eqesci)} +\def\.{\eqesc.} +\def\/{\eqesc/} +\def\[{\eqesc[} +\def\]{\eqesc]} +\def\|{\eqesc|} +\def\+{\eqesc+} +\def\*{\eqesc*} +\def\-{\eqesc-} +\def\?{\eqesc?} +\def\${\eqesc$} +\def\^{\eqesc^} +\def\\{\eqesc\eqesc} +\def\'{\eqesc'} +\catcode`\"=12 +\def\"{\eqesc"} +\catcode`\<=12 +\def\<{\eqesc<} +\catcode`\>=12 +\def\>{\eqesc>} +\catcode`\%=12 +\def\%{%} +\catcode`\%=14 +\catcode`\& = 12 +\def\&{\eqesc&} +\endinput +%% +%% End of file `dljscc.def'. diff --git a/scripts/texmf/tex/latex/eforms.sty b/scripts/texmf/tex/latex/eforms.sty new file mode 100755 index 00000000..835f5002 --- /dev/null +++ b/scripts/texmf/tex/latex/eforms.sty @@ -0,0 +1,1374 @@ +%% +%% This is file `eforms.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% eforms.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% eForms package, %% +%% Copyright (C) 2002-2018 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{eforms} + [2018/03/22 v2.9.19 Provides general eforms support (dps)] +\RequirePackage{ifpdf}[2006/02/20] +\RequirePackage{ifxetex}[2006/08/21] +\RequirePackage{ifluatex} +\RequirePackage{calc} +\let\ef@driver\@empty +\DeclareOption{dvipsone}{\def\eq@drivernum{0}% + \def\eq@drivername{0}\def\ef@driver{dvipsone}% + \PassOptionsToPackage{dvipsone}{insdljs}% + \PassOptionsToPackage{dvipsone}{hyperref}% +} +\def\eq@drivername{2} +\DeclareOption{dvips}{\def\eq@drivernum{0}% + \def\eq@drivername{1}\def\ef@driver{dvips}% + \PassOptionsToPackage{dvips}{insdljs}% + \PassOptionsToPackage{dvips}{hyperref}% +} +\DeclareOption{pdftex}{% + \def\eq@drivernum{1}\def\eq@driver{pdftex}% + \def\eq@drivercode{epdftex.def}\def\ef@driver{pdftex}% +} +\DeclareOption{luatex}{% + \def\eq@drivernum{1}\def\eq@driver{luatex}% + \def\eq@drivercode{epdftex.def}\def\ef@driver{luatex}% +} +\DeclareOption{dvipdfm}{% + \def\eq@drivernum{2}\def\eq@driver{dvipdfm}% + \def\eq@drivercode{edvipdfm.def}\def\ef@driver{dvipdfm}% + \PassOptionsToPackage{dvipdfm}{insdljs} + \PassOptionsToPackage{dvipdfm}{hyperref} +} +\DeclareOption{dvipdfmx}{% + \def\eq@drivernum{2}\def\eq@driver{dvipdfmx}% + \def\eq@drivercode{edvipdfm.def}\def\ef@driver{dvipdfmx}% + \PassOptionsToPackage{dvipdfmx}{insdljs} + \PassOptionsToPackage{dvipdfmx}{hyperref} +} +\DeclareOption{xetex}{% + \def\eq@drivernum{2}\def\eq@driver{xetex}% + \def\eq@drivercode{edvipdfm.def}\def\ef@driver{xetex}% +} +\DeclareOption{textures}{% + \def\eq@drivernum{3}\def\eq@driver{textures}% + \def\eq@drivercode{epdfmark.def}\def\ef@driver{textures}% + \PassOptionsToPackage{textures}{insdljs}% + \PassOptionsToPackage{textures}{hyperref} +} +\def\eq@driver{dvipsone/dvips} +\def\eq@drivercode{epdfmark.def} +\DeclareOption{preview}{\previewtrue} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{insdljs}} +\@ifundefined{ifpreview}{\newif\ifpreview \previewfalse}{} +\providecommand{\previewOn}{\previewtrue} +\providecommand{\previewOff}{\previewfalse} +\DeclareOption{useui}{\AtEndOfPackage{\ef@InputUIeForms}} +\def\ef@InputUIeForms{\InputIfFileExists{uieforms.def}% + {\PackageInfo{eforms}{Inputting code for useui option}}% + {\PackageInfo{eforms}{Cannot find uieforms.def.\MessageBreak + Reinstall or refresh your file name database.}}} +\DeclareOption{setcorder}{\def\inputCalcOrderJS{% + \InputIfFileExists{setcorder.def}% + {\PackageInfo{eforms}{Inputting code for setcorder option}}% + {\PackageWarning{eforms}{Cannot find setcorder.def.\MessageBreak + Reinstall or refresh your file name database.}}}} +\let\inputCalcOrderJS\relax +\@ifpackageloaded{web}{% + \ExecuteOptions{\eq@driver@name}% +}{% + \@ifpackageloaded{exerquiz}{% + \ExecuteOptions{\eq@driver}% + }{% + \ifluatex\ExecuteOptions{luatex}\else + \ifpdf\ExecuteOptions{pdftex}\else + \ifxetex\ExecuteOptions{xetex}\else + \@ifundefined{l@tex@@@@driver}{\ExecuteOptions{dvips}} + {\ExecuteOptions{dvipsone}}\fi\fi\fi + }% +} +\ProcessOptions +\ifx\ef@driver\@empty + \PackageError{eforms}% + {You have not specified dvips, dvipsone, pdftex,\MessageBreak + dvipdfm, dvipdfmx, or xetex in the option list of\MessageBreak + the eforms package} + {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm, + dvipdfmx, or xetex + \MessageBreak in the option list of the eforms package.}% +}{} +\fi +\newlength\eflength +\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse +\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi +\RequirePackage{hyperref} +\ifxetex\else\ifpdf\pdflinkmargin1bp\relax\else + \g@addto@macro\Hy@FirstPageHook{% + \headerps@out{/HyperBorder {1.00375 PDFToDvips} def}} +\fi\fi +\RequirePackage{insdljs}[2017/01/03] % incl conv-xkv +\@ifpackageloaded{exerquiz}{}{% + \AtBeginDocument{\Form} + \AtEndDocument{\csname endForm\endcsname} +} +\@ifpackageloaded{aeb_pro}{}{% + \newcommand{\taggedPDF}{% + \ifnum\eq@drivernum=0\relax + \literalps@out{[{Catalog} <<% + /MarkInfo<>% + >> /PUT pdfmark}\fi}% +} +\let\ef@YES=y \let\ef@NO=n +\let\ef@One=1 \let\ef@Zero=0 +\ifnum\eq@drivername<2 +\let\to@usepdfmark\ef@One +\RequirePackage[structure]{taborder}\else +\let\to@usepdfmark\ef@Zero +\RequirePackage{taborder} +\fi +\@ifundefined{eq@tmpbox}{\newsavebox{\eq@tmpbox}}{} +\@ifundefined{eq@tmpdima}{\newdimen\eq@tmpdima}{} +\@ifundefined{eq@tmpdimb}{\newdimen\eq@tmpdimb}{} +\newlength\ef@dimena +\newtoks\ef@scratchtoks +\newif\ifmakeXasPD \makeXasPDtrue % 12/22 +\newif\ifmakePDasX \makePDasXfalse +\def\makeXasPDOn{\makeXasPDtrue\makePDasXfalse} +\def\makeXasPDOff{\makeXasPDfalse} +\def\makePDasXOn{\makePDasXtrue\makeXasPDfalse} +\def\makePDasXOff{\makePDasXfalse} +\providecommand\ckboxColor[1]{\def\@rgi{#1}\ifx\@rgi\@empty + \let\ckbox@Color\relax\else + \def\ckbox@Color{\color{#1}}\fi}\let\ckbox@Color\relax +\def\ef@Bbox#1#2{\hbox{\ifpreview + \setlength\fboxrule{0.4pt}\setlength\fboxsep{0pt}% + \@tempdima=#1\advance\@tempdima by-\fboxrule + \@tempdimb=#2\advance\@tempdimb by-\fboxrule \ckbox@Color + \fbox{\parbox[b][\@tempdimb][c]{\@tempdima}{\hfill\vfill}}\else + \parbox[b][#2][c]{#1}{\hfill\vfill}\fi}% +} +\let\Bbox\ef@Bbox +\let\ef@passedArgs\@empty +\def\processAppArgs#1#2{% + \ifx\end#1% if #1=\end, #2=\@nil. + \let\ef@next\relax + \else + \ifx#1\@empty + \def\ef@next{\processAppArgs}% + \else + \@getCmdName{\ui}\edef\arg@ui{\@CmdName}% + \@getCmdName{#1}% + \ifx\arg@ui\@CmdName + \@ifundefined{@equi}{\PackageError{eforms}% + {The user interface '\string\ui' is not defined!% + \MessageBreak Use the useui option of eforms + and try again}{I said, use the useui option of + eforms and try again!}}{}% + \def\ef@next{\setkeys{eforms}{#2}% + \processAppArgs\presets{\ef@passedArgs}}% + \else + \@getCmdName{\Ff}\edef\arg@Ff{\@CmdName}% + \@getCmdName{#1}% + \ifx\arg@Ff\@CmdName % if \Ff, let's add arguments + \ifx\eq@Ff\@empty\def\eq@FfValue{0}\else + \expandafter\getFfValue\eq@Ff\@nil\fi + \@tempcnta=\eq@FfValue + \def\eq@arg{#2}% + \ifx\eq@arg\@empty\else + \advance\@tempcnta by#2\fi + \edef\eq@Ff{/Ff \the\@tempcnta}% + \def\ef@next{\processAppArgs}% + \else + \@getCmdName{\F}\edef\arg@F{\@CmdName}% + \@getCmdName{#1}% + \ifx\arg@F\@CmdName % if \Ff, let's add arguments + \ifx\eq@F\@empty\def\eq@FValue{0}\else + \expandafter\getFValue\eq@F\@nil\fi + \@tempcnta=\eq@FValue + \def\eq@arg{#2}% + \ifx\eq@arg\@empty\else + \advance\@tempcnta by#2\fi + \edef\eq@F{/F \the\@tempcnta}% + \def\ef@next{\processAppArgs}% + \else + \@getCmdName{\presets}% + \edef\arg@presets{\@CmdName}\@getCmdName{#1}% + \ifx\arg@presets\@CmdName + \def\ef@next{\expandafter\processAppArgs#2}% + \else + \csname @eq% + \expandafter\@gobble\string#1\endcsname{#2}% + \def\ef@next{\processAppArgs}% + \fi + \fi + \fi + \fi + \fi + \fi + \ef@next +} +\def\@processEvery{\edef\eqtemp{}\toks0={}\@@processEvery} +\def\@@processEvery#1{% + \ifx#1\end\def\ef@next{\the\toks0 }% + \else + \edef\eqtemp{\the\toks0 }% + \toks0=\expandafter{\eqtemp + \expandafter\processAppArgs#1\end\@nil}% + \def\ef@next{\@@processEvery}% + \fi + \ef@next +} +\newdimen\eqcenterWidget +\def\centerWidget#1{% + \ifeq@inlineCenter + \eqcenterWidget=#1\relax + \eqcenterWidget=.5\eqcenterWidget + \ifnum\eq@textSize=0\relax + \dimen@=-\eq@textSizeDefault bp\else + \dimen@=-\eq@textSize bp\fi + \dimen@=0.9167\dimen@ % 11/12 + \dimen@=.5\dimen@ + \advance\dimen@\eq@W@value bp + \ifx\eq@S\@empty\else + \def\eq@S@cmp{B}% + \ifx\eq@S@value\eq@S@cmp + \advance\dimen@ by \eq@W@value bp + \else + \def\eq@S@cmp{I}% + \ifx\eq@S@value\eq@S@cmp + \advance\dimen@ by \eq@W@value bp + \else\advance\dimen@ by 1bp + \fi\fi\fi + \advance\eqcenterWidget by \dimen@ + \else + \eqcenterWidget=#1\relax + \eqcenterWidget=.5\eqcenterWidget + \advance\eqcenterWidget by -4bp + \fi +} +\def\@eqF#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@F\@empty\else\def\eq@F{/F #1}\fi}\def\eq@F{} +\def\@eqBS#1{% + \let\eq@BS=0\relax + \ifx\eq@W\@empty\else\let\eq@BS=1\fi + \ifx\eq@S\@empty\else\let\eq@BS=1\fi + \ifx\eq@D\@empty\else\let\eq@BS=1\fi + \edef\link@BS{\if\eq@BS1/BS<<\eq@W\eq@S\eq@D>>\fi}% + \ifx\eq@W\@empty\let\link@BS\@empty\fi +}\def\link@BS{} +\def\@eqpresets#1{#1}% +\def\@eqW#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@W\@empty\def\eq@W@value{0}\else + \def\eq@W@value{#1}\def\eq@W{/W #1}\fi + \xdef\g@eq@W@value@bp{\eq@W@value bp}} +\def\eq@W{}\def\eq@W@value{0} +\def\g@eq@W@valu@bp{0bp} % dps 12/22 +\def\@eqS#1{\def\eq@S@value{#1}\ifx\eq@S@value\@empty + \let\eq@S\@empty\else + \def\eq@S{/S/#1}\def\eq@temp{D}% + \ifx\eq@S@value\eq@temp + \ifx\eq@D\@empty\def\eq@D{/D [3]}\fi + \fi\fi}\def\eq@S{} +\def\@eqD#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@D\@empty\else + \def\eq@D{/D [#1]}\fi}\def\eq@D{} +\def\@eqBorder#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@Border\@empty\else\def\eq@Border{/Border [#1]}\fi}% +\def\eq@Border{/Border [0 0 0]} +\def\@eqAP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AP\@empty\else\def\eq@AP{/AP<<#1>>}\fi}% + \let\eq@AP\@empty + \def\@eqOn#1{\def\eq@On{/#1}}\def\eq@On{/Yes} +\def\@eqAS#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AS\@empty\else\ifpdfmarkup\def\eq@AS{/AS(#1) cvn }\else + \def\eq@AS{/AS/#1}\fi\fi}\def\eq@AS{} +\def\ef@gobbleToendmarker#1\ef@endmarker{} +\let\ef@endmarker\relax +\def\ef@end{\end}\def\ef@true{true} +\def\ef@rPage#1{\@tempcnta=#1\relax\advance\@tempcnta-1 + \edef\rPage##1{\the\@tempcnta}} +\long\def\ef@searchrPage#1\rPage#2#3\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\rPage{#2}\fi} +\def\ef@searchmlLink#1\mlLink#2#3\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\let\ef@mlLink\ef@Zero\else + \ifx\ef@argii\ef@true\let\ef@mlLink\ef@One\else + \let\ef@mlLink\ef@Zero\fi\fi} +\def\ef@searchGoToR#1/GoToR#2\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0% + \def\ef@thislinkcolor{\@filecolor}\fi + \expandafter\ef@gobbleToendmarker\fi} +\def\ef@searchURI#1/URI#2\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0% + \def\ef@thislinkcolor{\@urlcolor}\fi + \expandafter\ef@gobbleToendmarker\fi} +\def\ef@searchCmdURI#1\URI#2\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0% + \def\ef@thislinkcolor{\@urlcolor}\fi + \expandafter\ef@gobbleToendmarker\fi} +\def\ef@searchNamed#1/Named#2\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0% + \def\ef@thislinkcolor{\@menucolor}\fi + \expandafter\ef@gobbleToendmarker\fi} +\def\ef@searchCmdNamed#1\Named#2\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0% + \def\ef@thislinkcolor{\@menucolor}\fi + \expandafter\ef@gobbleToendmarker\fi} +\def\ef@searchLaunch#1/Launch#2\@nil{\def\ef@argii{#2}% + \ifx\ef@argii\ef@end\else\ifx\ef@linktxtcolor@set0% + \def\ef@thislinkcolor{\@runcolor}\fi + \expandafter\ef@gobbleToendmarker\fi} +\def\ef@preprocessA#1{% + \let\rPage\relax\edef\ef@argi{#1}% + \ifx\annot@type\annot@type@link + \expandafter\ef@searchGoToR\ef@argi/GoToR\end\@nil + \expandafter\ef@searchURI\ef@argi/URI\end\@nil + \expandafter\ef@searchCmdURI\ef@argi\URI\end\@nil + \expandafter\ef@searchNamed\ef@argi/Named\end\@nil + \expandafter\ef@searchCmdNamed\ef@argi\Named\end\@nil + \expandafter\ef@searchLaunch\ef@argi/Launch\end\@nil + \ef@endmarker\fi + \let\rPage\ef@rPage + \expandafter\ef@searchrPage\ef@argi\rPage\end\@nil +} +\def\@eqA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@A\@empty\else\ef@preprocessA{#1}% + \def\eq@A{/A <<#1>>}\fi}\def\eq@A{} +\def\@eqmlLink#1{\def\eq@arg{#1}\ifx\eq@arg\ef@true + \let\ef@mlLink\ef@One\else\let\ef@mlLink\ef@Zero\fi} +\def\@eqLock#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@Lock\@empty\else\def\eq@Lock{/Lock <<#1>>}\fi} + \def\eq@Lock{} +\newif\ifisCalculate\isCalculatefalse +\def\ef@searchCalc#1\AACalculate#2\@nil{% + \ifx#2\end\else\aftergroup\isCalculatetrue\fi +} +\def\@eqAA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty\let\eq@AA\@empty + \else\begingroup\ef@searchCalc#1\AACalculate\end\@nil\endgroup + \def\eq@AA{/AA <<#1>>}\fi} +\def\eq@AA{/AA <<\eq@AAmouseup\eq@AAmousedown\eq@AAmouseenter% + \eq@AAmouseexit\eq@AAonfocus\eq@AAonblur\eq@AAformat% + \eq@AAkeystroke\eq@AAvalidate\eq@AAcalculate\eq@AApageopen% + \eq@AApageclose\eq@AApagevisible\eq@AApageinvisible>>} +\def\@eqAAmouseup#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAmouseup\@empty\else\def\eq@AAmouseup{/U<<\JS{#1}>>}\fi} +\let\eq@AAmouseup\@empty +\def\@eqAAmousedown#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAmousedown\@empty\else + \def\eq@AAmousedown{/D<<\JS{#1}>>}\fi} +\let\eq@AAmousedown\@empty +\def\@eqAAmouseenter#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAmouseenter\@empty\else + \def\eq@AAmouseenter{/E<<\JS{#1}>>}\fi} +\let\eq@AAmouseenter\@empty +\def\@eqAAmouseexit#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAmouseexit\@empty\else + \def\eq@AAmouseexit{/X<<\JS{#1}>>}\fi} +\let\eq@AAmouseexit\@empty +\def\@eqAAonfocus#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAonfocus\@empty\else + \def\eq@AAonfocus{/Fo<<\JS{#1}>>}\fi} +\def\@eqAAmousefocus{\@eqAAonfocus} +\let\eq@AAonfocus\@empty +\def\@eqAAonblur#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAonblur\@empty\else + \def\eq@AAonblur{/Bl<<\JS{#1}>>}\fi} +\def\@eqAAmouseblur{\def\@eqAAonblur} +\let\eq@AAonblur\@empty +\def\@eqAAformat#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAformat\@empty\else + \def\eq@AAformat{/F<<\JS{#1}>>}\fi} +\let\eq@AAformat\@empty +\def\@eqAAkeystroke#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAkeystroke\@empty\else + \def\eq@AAkeystroke{/K<<\JS{#1}>>}\fi} +\let\eq@AAkeystroke\@empty +\def\@eqAAvalidate#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAvalidate\@empty\else + \def\eq@AAvalidate{/V<<\JS{#1}>>}\fi} +\let\eq@AAvalidate\@empty +\def\@eqAAcalculate#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AAcalculate\@empty\else\isCalculatetrue + \def\eq@AAcalculate{/C<<\JS{#1}>>}\fi} +\let\eq@AAcalculate\@empty +\def\@eqAApageopen#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AApageopen\@empty\else + \def\eq@AApageopen{/PO<<\JS{#1}>>}\fi} +\let\eq@AApageopen\@empty +\def\@eqAApageclose#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AApageclose\@empty\else + \def\eq@AApageclose{/PC<<\JS{#1}>>}\fi} +\let\eq@AApageclose\@empty +\def\@eqAApagevisible#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AApagevisible\@empty\else + \def\eq@AApagevisible{/PV<<\JS{#1}>>}\fi} +\let\eq@AApagevisible\@empty +\def\@eqAApageinvisible#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AApageinvisible\@empty\else + \def\eq@AApageinvisible{/PI<<\JS{#1}>>}\fi} +\let\eq@AApageinvisible\@empty +\def\@eqDA#1{\def\eq@DA{#1}} +\def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% +\def\@eqtextFont#1{\def\eq@textFont{/#1}} +\def\eq@textFont{/Helv} +\def\@eqtextSize#1{\def\eq@textSize{#1}} +\def\eq@textSizeDefault{9} +\edef\eq@textSize{\eq@textSizeDefault} +\def\eq@RV@Body{} +\def\eq@RV@endBody{} +\def\@eqRV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@RV\@empty\else\def\eq@RV{/RV(\eq@RV@Body#1% + \eq@RV@endBody)\fi}}\def\eq@RV{} +\def\@eqDS#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@DS\@empty\else\def\eq@DS{/DS(#1)\fi}}\def\eq@DS{} +\def\@eqtextColor#1{\ef@parsePDFColor{#1}% + \HyColor@IfXcolor{% + \expandafter\HyColor@FieldColor% + \expandafter{\ef@colorSpec@out}{\eq@textColor}{}{}% + }{\edef\eq@textColor{\ef@colorSpec@out}}% +} +\def\eq@textColor{0 g} +\def\@eqQ#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@Q\@empty\else\def\eq@Q{/Q #1}\fi}\def\eq@Q{} +\def\ef@isunicode#1\unicodeStr#2\@nil{\def\argi{#1}% + \ifx\argi\@empty\def\ifbool@ef{iftrue}\else + \def\ifbool@ef{iffalse}\fi} +\def\@eqDV#1{\ef@isunicode#1\unicodeStr\@nil + \expandafter\csname\ifbool@ef\endcsname\@equDV{#1}\else + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@DV\@empty\else + \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}% + \edef\eq@DV{/DV(\ef@uni@temp)}\makespecialJS\fi\fi}\def\eq@DV{} +\def\ef@pdfCRLFTABDefns{% + \def\r{\textCR}\def\t{\textHT}\def\n{\textLF}} +\def\@eqnuDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@DV\@empty\else\def\eq@DV{/DV(#1)}\fi} +\def\@equDV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@DV\@empty\else\def\eq@DV{/DV<#1>}\fi} +\def\@eqV#1{\ef@isunicode#1\unicodeStr\@nil + \expandafter\csname\ifbool@ef\endcsname\@equV{#1}\else + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@V\@empty\else + \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}% + \edef\eq@V{/V(\ef@uni@temp)}\makespecialJS\fi\fi}\def\eq@V{} +\def\@eqnuV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@V\@empty\else\def\eq@V{/V(#1)}\fi} +\def\@equV#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@V\@empty\else\def\eq@V{/V<#1>}\fi}% +\def\@eqTU#1{\ef@isunicode#1\unicodeStr\@nil + \expandafter\csname\ifbool@ef\endcsname\@equTU{#1}\else + \def\eq@arg{#1}\let\r@save\r\let\r\textCR + \ifx\eq@arg\@empty\let\eq@TU\@empty\else + \ef@pdfCRLFTABDefns\pdfstringdef\ef@uni@temp{#1}% + \edef\eq@TU{/TU(\ef@uni@temp)}\makespecialJS\fi\fi + \let\r\r@save}\def\eq@TU{} +\def\@equTU#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@TU\@empty\else\def\eq@TU{/TU<#1>}\fi} +\def\@eqFf#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@Ff\@empty\else\def\eq@Ff{/Ff #1}\fi} + \def\eq@Ff{} +\def\@eqMaxLen#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@MaxLen\@empty\else\def\eq@MaxLen{/MaxLen #1}\fi}% + \def\eq@MaxLen{} +\def\@eqH#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@H\@empty\else\def\eq@H{/H/#1}\fi}\def\eq@H{} +\def\@eqMK#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@MK\@empty\else\def\eq@MK{/MK << #1 >> }\fi}% + \def\eq@MK{} + \let\@vertRotate=0 + \def\@eqR#1{\def\eq@R@value{#1}\ifx\eq@R@value\@empty + \let\eq@R\@empty\else + \@tempcnta=\eq@R@value\relax + \ifnum\@tempcnta<0 \@tempcnta=-\@tempcnta\fi + \ifnum\@tempcnta=0 \else\ifnum\@tempcnta=180 \else + \let\@vertRotate=1\fi\fi + \def\eq@R{/R #1}\fi} + \def\eq@R{} + \def\@eqBC#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@BC\@empty\else % 2010/07/23 + \expandafter\ef@isitnamed\eq@arg\ef@nil + \ifx\ef@latex@color\ef@y\expandafter + \HyColor@XZeroOneThreeFour\expandafter{\eq@arg}{\eq@BC}{}{}% + \edef\eq@BC{/BC [\eq@BC]}\else + \def\eq@BC{/BC [#1]}\fi + \fi} + \def\eq@BC{} + \def\@eqBG#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@BG\@empty\else % 2010/07/23 + \expandafter\ef@isitnamed\eq@arg\ef@nil + \ifx\ef@latex@color\ef@y\expandafter + \HyColor@XZeroOneThreeFour\expandafter{\eq@arg}{\eq@BG}{}{}% + \edef\eq@BG{/BG [\eq@BG]}\else + \def\eq@BG{/BG [#1]}\fi + \fi} + \def\eq@BG{} + \def\@eqCA#1{\ef@isunicode#1\unicodeStr\@nil + \expandafter\csname\ifbool@ef\endcsname\@equCA{#1}\else + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@CA\@empty\let\ef@kvCA\@empty + \else\ef@pdfCRLFTABDefns + \pdfstringdef\ef@uni@temp{#1}% + \def\eq@CA{#1}\edef\ef@kvCA{/CA(\ef@uni@temp)}% + \makespecialJS\fi\fi} + \def\eq@CA{}\def\ef@kvCA{} + \def\@equCA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@CA\@empty\let\ef@kvCA\@empty + \else\def\eq@CA{#1}\def\ef@kvCA{/CA<#1>}\fi} + \def\@eqRC#1{\ef@isunicode#1\unicodeStr\@nil + \expandafter\csname\ifbool@ef\endcsname\@equRC{#1}\else + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@RC\@empty\let\ef@kvRC\@empty + \else\ef@pdfCRLFTABDefns + \pdfstringdef\ef@uni@temp{#1}% + \def\eq@RC{#1}\edef\ef@kvRC{/RC(\ef@uni@temp)}% + \makespecialJS\fi\fi} + \def\eq@RC{}\def\ef@kvRC{} + \def\@equRC#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@RC\@empty\let\ef@kvRC\@empty + \else\def\eq@RC{#1}\def\ef@kvRC{/RC<#1>}\fi} + \def\@eqAC#1{\ef@isunicode#1\unicodeStr\@nil + \expandafter\csname\ifbool@ef\endcsname\@equAC{#1}\else + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AC\@empty\let\ef@kvAC\@empty + \else\ef@pdfCRLFTABDefns + \pdfstringdef\ef@uni@temp{#1}% + \def\eq@AC{#1}\edef\ef@kvAC{/AC(\ef@uni@temp)}% + \makespecialJS\fi\fi} + \def\eq@AC{}\def\ef@kvAC{} + \def\@equAC#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@AC\@empty\let\ef@kvAC\@empty + \else\def\eq@AC{#1}\def\ef@kvAC{/AC<#1>}\fi} +\def\eq@define@IconMK{\def\eq@IconMK{\eq@I\eq@RI\eq@IX\eq@TP + /IF<<\eq@SW\eq@ST\eq@PA\eq@FB>>}} +\let\eq@IconMK\@empty +\ifpdf\def\eq@relRef#1{0 0 R}\else %{#1\space 0 R} + \ifxetex\def\eq@relRef#1{#1}\else + \def\eq@relRef#1{{#1}}\fi\fi +\def\ef@null{null} +\def\@eqI#1{\ifx\annot@type\annot@type@button + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@I\@empty\else + \def\eq@I{/I \eq@relRef{#1}}% + \ifpdf\ifx\eq@arg\ef@null + \def\eq@I{/I 0 0 R}\fi\fi + \eq@define@IconMK\fi\fi} +\def\eq@I{} +\def\@eqRI#1{\ifx\annot@type\annot@type@button + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@RI\@empty\else + \def\eq@RI{/RI \eq@relRef{#1}}% + \ifpdf\ifx\eq@arg\ef@null + \def\eq@RI{/RI 0 0 R}\fi\fi + \eq@define@IconMK\fi\fi} +\def\eq@RI{} +\def\@eqIX#1{\ifx\annot@type\annot@type@button + \def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@IX\@empty\else + \def\eq@IX{/IX \eq@relRef{#1}}% + \ifpdf\ifx\eq@arg\ef@null + \def\eq@IX{/IX 0 0 R}\fi\fi + \eq@define@IconMK\fi\fi} +\def\eq@IX{} +\def\@eqTP#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@TP\@empty\else\def\eq@TP{/TP #1}\fi} +\def\eq@TP{/TP 0} % default 0 +\def\@eqSW#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@SW\@empty\else\def\eq@SW{/SW/#1}\fi} +\def\eq@SW{/SW/A} % the default, always scale +\def\@eqST#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@ST\@empty\else\def\eq@ST{/S/#1}\fi} +\def\eq@ST{/S/P} % the default, proportional scaling +\def\@eqPA#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@PA\@empty\else\def\eq@PA{/A [#1]}\fi} +\def\eq@PA{/A [0.5 0.5]} % the default +\def\@eqFB#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@PA\@empty\else\def\eq@FB{/FB #1}\fi} +\def\eq@FB{/FB false} % the default +\def\@eqmkIns#1{\def\eq@mkIns{#1}}\def\eq@mkIns{} +\def\@eqOpt#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@Opt\@empty\else\def\eq@Opt{/Opt [#1]}\fi} + \def\eq@Opt{} +\def\@eqTI#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@TI\@empty\else\def\eq@TI{/TI #1}\fi} + \def\eq@TI{} +\def\@eqrawPDF#1{\def\eq@rawPDF{#1}}\def\eq@rawPDF{} +\def\@eqQuadPoints#1{\def\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@QuadPoints\@empty\else + \def\eq@QuadPoints{/QuadPoints {#1}}\fi} +\def\eq@QuadPoints{} +\def\@eqColor#1{\edef\eq@arg{#1}\ifx\eq@arg\@empty + \let\eq@Color\@empty\else + \HyColor@XZeroOneThreeFour{#1}{\eq@Color}{}{}% + \edef\eq@Color{/C[\eq@Color]}\fi} +\def\eq@Color{} +\def\@eqlinktxtcolor#1{% + \def\ef@argi{#1}\ifHy@colorlinks + \ifx\ef@argi\@empty\let\ef@colorthislink\normalcolor\else + \let\ef@linktxtcolor@set=1\def\ef@thislinkcolor{#1}\fi\fi +}\let\ef@linktxtcolor@set=0 +\def\@eqrectH#1{\def\eq@rectH{#1}\ifx\eq@rectH\@empty\else + \setlength\eflength\eq@rectH\edef\eq@rectH{\the\eflength}\fi} +\def\@eqrectW#1{\def\eq@rectW{#1}\ifx\eq@rectW\@empty\else + \setlength\eflength\eq@rectW\edef\eq@rectW{\the\eflength}\fi} +\def\@eqobjdef#1{\def\ef@arg{#1}\ifx\ef@arg\@empty + \let\eq@objdef\@empty\else\def\eq@objdefName{#1}% + \def\eq@objdef{/_objdef {#1}}\fi +} +\let\eq@objdef\@empty +\def\@eqtaborder#1{\def\ef@arg{#1}\ifx\ef@arg\@empty + \let\eq@taborder\@empty\else + \def\eq@taborder{#1}\fi +} +\let\eq@taborder\@empty +\def\ef@y{y}\def\ef@n{n} +\def\@eqautoCenter#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y + \let\autoCenter\ef@y\else\ifx\ef@arg\ef@n + \let\autoCenter\ef@n\else\let\autoCenter\ef@y + \PackageWarning{eforms}{The value of '#1' is not a + supported value\MessageBreak for \string\autoCenter.\MessageBreak + Using the default of 'y'}% + \fi\fi} +\let\autoCenter\ef@y +\newif\ifeq@inlineCenter \eq@inlineCenterfalse +\let\inlineCenter=n +\def\@eqinline#1{\eq@inlineCenterfalse + \def\ef@arg{#1}\ifx\ef@arg\ef@y + \let\inlineCenter\ef@y\eq@inlineCentertrue\else + \ifx\ef@arg\ef@n\let\inlineCenter\ef@n\else\let\inlineCenter\ef@n + \PackageWarning{eforms}{The value of '#1' is not a + supported value\MessageBreak for \string\inline.\MessageBreak + Using the default of 'n'}% + \fi\fi} +\def\@eqsymbolchoice#1{\expandafter\ifx\csname eq@#1\endcsname\relax + \typeout{exerquiz: `#1' is not an acceptable option + for \string\symbolechoice, inserting default, `check'.} + \edef\symbol@choice{\eq@check}\else + \edef\symbol@choice{\csname eq@#1\endcsname}\fi +} +\newif\iffixmlinks \fixmlinkstrue +\def\mlfixOn{\fixmlinkstrue} +\def\mlfixOff{\fixmlinksfalse} +\def\@eqmlfix#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y + \mlfixOn\else\ifx\ef@arg\ef@n + \mlfixOff\else\mlfixOn + \PackageWarning{eforms}{The value of '#1' is not a + supported value\MessageBreak for \string\mlfix.\MessageBreak + Using the default of 'y'}% + \fi\fi} +\newbox\mlstrutbox +\def\@eqmlstrut#1{\setbox\mlstrutbox\hbox{#1}% + \def\ml@strut{\vrule \@height\ht\mlstrutbox + \@depth\dp\mlstrutbox + \@width\z@\relax}} +\def\ml@strut{\relax\ifmmode\copy\mlstrutbox\else + \unhbox\mlstrutbox\fi} +\@eqmlstrut{\strut} +\def\@eqmlcrackat#1{\def\eq@mlcrackat{#1}} +\let\eq@mlcrackat\@empty +\def\@eqmlhyph#1{\def\ef@arg{#1}\ifx\ef@arg\ef@y + \def\eq@mlhyph{-}\else\ifx\ef@arg\ef@n + \let\eq@mlhyph\@empty\else\let\eq@mlhyph\@empty + \PackageWarning{eforms}{The value of '#1' is not a + supported value\MessageBreak for \string\mlhyph.\MessageBreak + Using the default of 'n'}\fi\fi} +\let\eq@mlhyph\@empty +\def\@eqmlignore#1{\let\eq@mlignore\ef@YES} +\let\eq@mlignore\ef@NO +\def\@eqmlcrackinsat#1{\def\eq@mlcrackinsat{#1}} +\let\eq@mlcrackinsat\@empty +\def\eq@protect#1{\let#1\@empty} +\begingroup\catcode`\#=12 \catcode`*=6 + \ifpdfmarkup + \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\else + \gdef\ef@Hx*1*2{\@nameuse{efHex*1*2}}\fi +\endgroup +\def\efHxError{\PackageError{eforms}{The glyph is not supported}{}} +\def\HGERROR{efHxError} +\ifpdfmarkup + \def\HexGlyph#1#2{\def\arg@ii{#2}\ifx\arg@ii\HGERROR + \global\@namedef{efHex#1}{\csname#2\endcsname}\else + \global\@namedef{efHex#1}{\expandafter + \string\csname#2\endcsname}\fi} +\else + \begingroup\catcode`\#=12 \catcode`*=6 + \gdef\HexGlyph*1*2{\def\arg@ii{*2}\ifx\arg@ii\HGERROR + \global\@namedef{efHex*1}{\csname*2\endcsname}\else + \global\@namedef{efHex*1}{#*1}\fi} + \endgroup +\fi +\def\ef@inputPDFHEX{\InputIfFileExists{pdfdochex.def} + {\PackageInfo{eforms}{Inputting pdfdochex.def}}{}} +\AtEndOfPackage{\ef@inputPDFHEX} +\def\ef@semicolon{;} +\def\ef@stripsemi#1;\@nil{\def\ef@colorSpec@out{#1}} +\def\ef@isitnamed{\let\ef@latex@color\ef@y + \@ifnextchar[{\ef@gobbletonil}{% + \@tfor\mytok:=.0123456789\do{% + \if\mytok\@let@token + \let\ef@latex@color\ef@n + \@break@tfor\fi}\ef@gobbletonil}} +\def\ef@gobbletonil#1\ef@nil{} +\def\ef@parsePDFColor#1{\edef\ef@color@arg{#1}\ef@parsePDFColori} +\def\ef@parsePDFColori{% + \expandafter\ef@@parsePDFColor\ef@color@arg; ; ; ; ; ;\\} +\def\ef@@parsePDFColor#1 #2 #3 #4 #5 #6\\{% + \def\argii{#2}\def\ef@cmp{g;}% + \ifx\argii\ef@cmp + \expandafter\ifx\csname convertcolorspec\endcsname\relax + \def\ef@colorSpec@out{#1 g}\else + \def\ef@colorSpec@out{[gray]{#1}}% + \fi + \else\ifx\argii\ef@semicolon + \expandafter\ifx\csname convertcolorspec\endcsname\relax + \ef@isitnamed#1\ef@nil + \ifx\ef@latex@color\ef@n + \ef@stripsemi#1\@nil + \edef\ef@colorSpec@out{\ef@colorSpec@out\space g}% + \else + \ef@stripsemi#1\@nil + \PackageWarning{eforms}{Color specification + `\ef@colorSpec@out' not supported\MessageBreak + without xcolor, using a black color} + \def\ef@colorSpec@out{0 g}% + \fi + \else % xcolor + \ef@isitnamed#1\ef@nil + \ifx\ef@latex@color\ef@n + \ef@stripsemi#1\@nil + \edef\ef@colorSpec@out{[gray]{\ef@colorSpec@out}}% + \else + \ef@stripsemi#1\@nil + \edef\ef@colorSpec@out{\ef@colorSpec@out}% + \fi + \fi + \else % not semicolon + \def\argiv{#4}\def\ef@cmp{rg;}% + \ifx\argiv\ef@cmp + \expandafter\ifx\csname convertcolorspec\endcsname\relax + \def\ef@colorSpec@out{#1 #2 #3 rg}\else + \def\ef@colorSpec@out{[rgb]{#1,#2,#3}}\fi + \else\ifx\argiv\ef@semicolon + \expandafter\ifx\csname convertcolorspec\endcsname\relax + \ef@stripsemi#1 #2 #3\@nil + \edef\ef@colorSpec@out{\ef@colorSpec@out\space rg}\else + \ef@stripsemi#3\@nil + \edef\ef@colorSpec@out{[rgb]{#1,#2,\ef@colorSpec@out}}\fi + \else + \def\argv{#5}\edef\ef@cmp{k;} + \ifx\argv\ef@cmp + \expandafter\ifx\csname convertcolorspec\endcsname\relax + \def\ef@colorSpec@out{#1 #2 #3 #4 k}\else + \def\ef@colorSpec@out{[cmyk]{#1,#2,#3,#4}}\fi + \else + \ifx\argv\ef@semicolon + \ef@stripsemi#1 #2 #3 #4\@nil + \expandafter\ifx\csname convertcolorspec\endcsname\relax + \edef\ef@colorSpec@out{\ef@colorSpec@out\space k}\else + \ef@stripsemi#4\@nil + \edef\ef@colorSpec@out{% + [cmyk]{#1,#2,#3,\ef@colorSpec@out}}\fi + \else\ef@parseColor@iv + \fi\fi\fi\fi\fi\fi +} +\def\ef@parseColor@iv{\PackageError{AeB}{% + The number of arguments + is incorrect.\MessageBreak I was expecting + 1, 3, or 4 components of color}{Specify the correct number of + components for the color space.}} +\def\calcOrder#1{\let\efCalcOrder\@gobble + \@for\coi:=#1\do{\edef\efCalcOrder{\efCalcOrder,"\coi"}}% + \edef\efCalcOrder{[\efCalcOrder]}} +\@onlypreamble\calcOrder +\def\efCalcOrder{[]} +\def\eq@check{4} +\def\eq@circle{l} +\def\eq@cross{8} +\def\eq@diamond{u} +\def\eq@square{n} +\def\eq@star{H} +\let\symbolchoice\@eqsymbolchoice +\symbolchoice{check} +\providecommand{\JS}[1]{/S/JavaScript/JS(#1)} +\newcommand{\URI}[1]{/S/URI/URI(#1)} +\providecommand{\Named}[1]{/S/Named/N/#1} +\newcommand{\Next}[1]{/Next<<#1>>} +\providecommand{\toggleAttachmentsPanel}[2]{% + \setLink[\Border{0 0 0}\A{\Named{ShowHideFileAttachment}}] + {\textcolor{#1}{#2}}}% +\newcommand{\AAMouseUp}[1]{/U<<#1>>} +\newcommand{\AAMouseDown}[1]{/D<<#1>>} +\newcommand{\AAMouseEnter}[1]{/E<<#1>>} +\newcommand{\AAMouseExit}[1]{/X<<#1>>} +\newcommand{\AAOnFocus}[1]{/Fo<<#1>>} +\newcommand{\AAOnBlur}[1]{/Bl<<#1>>} +\newcommand{\AAFormat}[1]{/F<<\JS{#1}>>} +\newcommand{\AAKeystroke}[1]{/K<<\JS{#1}>>} +\newcommand{\AAValidate}[1]{/V<<\JS{#1}>>} +\newcommand{\AACalculate}[1]{/C<<\JS{#1}>>} +\newcommand{\AAPageOpen}[1]{/PO<<\JS{#1}>>} +\newcommand{\AAPageClose}[1]{/PC<<\JS{#1}>>} +\newcommand{\AAPageVisible}[1]{/PV<<\JS{#1}>>} +\newcommand{\AAPageInvisible}[1]{/PI<<\JS{#1}>>} +\newcommand{\definePath}[1]{\def\ef@ctrlName{#1}% + \hyper@normalise\ef@definePath} +\def\ef@definePath#1{\expandafter\xdef\ef@ctrlName{#1}} +\def\FHidden{2} % bit 2: hidden field +\def\FPrint{4} % bit 3: print (we set this bit by default) +\def\FNoPrint{-4} % bit 3: -print (this clears the bit) +\def\FNoView{32} % bit 6: no view +\def\FLock{128} % bit 8: locked field (PDF 1.4) +\def\FfReadOnly{1} % all +\def\FfRequired{2} % all +\def\FfNoExport{4} % all +\def\FfMultiline{4096} % text +\def\FfPassword{8192} % text +\def\FfNoToggleToOff{16384} % radio +\def\FfRadio{32768} % radio +\def\FfPushButton{65536} % Push button +\def\FfCombo{131072} % choice +\def\FfEdit{262144} % combo +\def\FfSort{524288} % choice +\def\FfFileSelect{1048576} % text (PDF 1.4) +\def\FfMultiSelect{2097152} % choice (PDF 1.4) +\def\FfDoNotSpellCheck{4194304} % text, combo (PDF 1.4) +\def\FfDoNotScroll{8388608} % text (PDF 1.4) +\def\FfComb{16777216} % text (PDF 1.5) +\def\FfRadiosInUnison{33554432} % radio (PDF 1.5) +\def\FfCommitOnSelChange{67108864} % choice (PDF 1.5) +\def\FfRichText{33554432} % radio (PDF 1.5) +\def\getFfValue/Ff#1\@nil{\def\eq@FfValue{#1}} +\def\getFValue/F#1\@nil{\def\eq@FValue{#1}} +\def\@getCmdName#1{\edef\@CmdName{\expandafter\@gobble\string#1}} +\newcommand{\everyTextField}[1]{\def\every@TextField{#1}} +\def\every@TextField{} +\newcommand{\everySigField}[1]{\def\every@sigField{#1}} +\def\every@sigField{} +\newcommand{\everyCheckBox}[1]{\def\every@CheckBox{#1}} +\def\every@CheckBox{} +\newcommand{\everyRadioButton}[1]{\def\every@RadioButton{#1}} +\def\every@RadioButton{} +\newcommand{\everyButtonField}[1]{\def\every@ButtonField{#1}} +\def\every@ButtonField{} +\newcommand{\everyPushButton}[1]{\def\every@PushButton{#1}} +\def\every@PushButton{} +\newcommand{\everyListBox}[1]{\def\every@listBox{#1}} +\newcommand{\everyComboBox}[1]{\def\every@comboBox{#1}} +\def\every@listBox{}\def\every@comboBox{} +\newcommand{\everyLink}[1]{\def\every@Link{#1}} +\def\every@Link{} +\def\ef@adjrectWH#1{\dimen@ii#1\relax + \ifx\eq@rectW\@empty\else + \eflength\eq@rectW\relax + \advance\eflength\dimen@ii + \edef\eq@rectW{\the\eflength}% + \eflength\eq@rectH\relax + \advance\eflength\dimen@ii + \edef\eq@rectH{\the\eflength}% + \fi +} +\def\ef@djXPD{\ifxetex\ifmakeXasPD\ef@adjrectWH{2bp}\fi + \else\ifmakePDasX\ef@adjrectWH{-2bp}\fi\fi} +\def\ef@btnspcr{} +\def\eq@setButtonProps#1#2{% + \makeJSspecials + \processAppArgs#2\end\@nil % set widget properties + \ifx\eq@BC\@empty\@eqW{}\else + \if\eq@W@value0\let\eq@BC\@empty\fi\fi + \Hy@pdfstringfalse + \ifx\eq@rectW\@empty + \ifnum\eq@textSize=0 \else + \dimen@=\eq@textSize bp + \dimen@1.00375\dimen@ + \edef\eq@textSize@pt{\strip@pt\dimen@}% + \fontsize{\eq@textSize@pt}{0}\selectfont + \fi + \dimen@\eq@W@value bp + \def\eq@S@B{B}\ifx\eq@S@value\eq@S@B + \def\eq@btn@sp{\hbox to2\dimen@{\hfill}}% + \else + \def\eq@btn@sp{\hbox to\dimen@{\hfill}}% + \fi + \expandafter\def\expandafter + \ef@btnspcr\expandafter{\ef@btnspcr\eq@btn@sp}% + \sbox{\eq@tmpbox}{\ef@btnspcr\eq@CA\ef@btnspcr}% + \eq@tmpdima=\wd\eq@tmpbox + \sbox{\eq@tmpbox}{\ef@btnspcr\eq@RC\ef@btnspcr}% + \ifdim\eq@tmpdima>\wd\eq@tmpbox\else + \eq@tmpdima=\wd\eq@tmpbox\fi% + \sbox{\eq@tmpbox}{\ef@btnspcr\eq@AC\ef@btnspcr}% + \ifdim\eq@tmpdima>\wd\eq@tmpbox\else + \eq@tmpdima=\wd\eq@tmpbox\fi + \ifmakePDasX\advance\eq@tmpdima2bp\fi + \wd\eq@tmpbox=\eq@tmpdima + \else + \wd\eq@tmpbox=\eq@rectW + \fi + \ef@djXPD#1% dps 12/22 +} +\def\eq@setWidgetProps#1#2{% + \makeJSspecials + \processAppArgs#2\end\@nil % set widget properties + \ifx\annot@type@link\annot@type\else + \ifx\eq@BC\@empty\@eqW{}\else + \if\eq@W@value0\let\eq@BC\@empty\fi\fi + \fi + \ef@djXPD#1% dps 12/22 +} +\def\ef@sanitize@toks{\@makeother\~\@makeother\#\@makeother\&% + \@makeother\"\@makeother\_} +\newcommand\efKern[2]{\ifxetex\kern#2\else\kern#1\fi} +\newcommand\olBdry{\bgroup\ifxetex % dps 12/22 + \@tempdima-\g@eq@W@value@bp\relax + \edef\@mtkern{\the\@tempdima}\else + \@tempdima2bp\relax\advance\@tempdima-\g@eq@W@value@bp\relax % 12/26 + \edef\@mtkern{\the\@tempdima}\fi\kern\@mtkern\egroup +} +\newcommand\cgBdry[1][0bp]{\bgroup\def\ef@rgi{#1}\ifx\ef@rgi\@empty + \def\ef@rgi{0bp}\fi\setlength{\@tempdima}{\ef@rgi}% + \ifxetex\else\addtolength{\@tempdima}{2bp}\fi + \kern\@tempdima\egroup\ignorespaces} +\newcommand{\efSupprIndent}{\ef@scratchtoks=\expandafter{\the\everypar}% + \everypar{{\setbox\z@\lastbox}\clubpenalty\@M + \everypar=\expandafter{\the\ef@scratchtoks}}} +\newcommand\volBdry{\bgroup\parskip0pt\relax\@@par\nointerlineskip + \olBdry\egroup\efSupprIndent} +\newcommand\vcgBdry{\@ifstar{\edef\ef@offset{\the\parskip}\vcgBdry@i} + {\def\ef@offset{0pt}\vcgBdry@i}} +\newcommand\vcgBdry@i[1][0bp]{\bgroup + \setlength{\ef@dimena}{#1-\ef@offset}\parskip0pt\relax + \par\nointerlineskip\cgBdry[\ef@dimena]% + \egroup\ignorespaces\efSupprIndent} +\def\common@choiceCode{% + /Subtype/Widget + /T (\Fld@name) + /FT/Ch + \eq@Ff + \eq@F + \eq@TU + \eq@TI + /BS << \eq@W\eq@S >> + /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>> + /DA (\eq@DA) + /Opt [\eq@Opt] + \eq@DV\eq@V + \eq@A\eq@AA + \eq@rawPDF +} +\def\eqf@setDimens#1#2{\@eqrectW{#1}\@eqrectH{#2}} +\let\ef@@nil\relax +\def\@gobbleto@@nil#1\ef@@nil{}% +\long\def\g@addto@macrogobble#1#2{\g@addto@macro{#1}{#2}\@gobbleto@@nil} +\def\passthruCLOpts{*} +\def\ef@pdfstrCLOpt{\Hy@unicodefalse\def\eq@Opt{}\ef@pdfstrCLOpti} +\def\ef@pdfstrCLOpti{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrCLOptia}} +\def\ef@pdfstrCLOptia{\@ifnextchar[{\expandafter + \ef@pdfstrOptWBii\@gobble}{\ef@pdfstrCLOptb}} +\def\ef@pdfstrCLOptb{\@ifstar{\g@addto@macrogobble\eq@Opt} + {\ef@pdfstrOptWPi}} +\def\ef@pdfstrOptWBii{% + \@ifnextchar({\ef@pdfstrOptWBiia}{\PackageError{eforms} + {Left parenthesis expected here}{}}% +} +\def\ef@pdfstrOptWBiia(#1){% + \g@addto@macro\eq@Opt{[(}% + \pdfstringdef\@optTokstemp{#1}% + \expandafter\g@addto@macro\expandafter\eq@Opt + \expandafter{\@optTokstemp}% + \@ifnextchar({\ef@pdfstrOptWBiib}{\PackageError{eforms} + {Left parenthesis expected here}{}}% +} +\def\ef@pdfstrOptWBiib(#1){% + \g@addto@macro\eq@Opt{)(}% + \pdfstringdef\@optTokstemp{#1}% + \expandafter\g@addto@macro\expandafter\eq@Opt + \expandafter{\@optTokstemp}% + \g@addto@macro\eq@Opt{)]}% + \expandafter\ef@pdfstrCLOpti\@gobble +} +\def\ef@pdfstrOptWPi{\@ifnextchar\ef@@nil{\@gobble}{\ef@pdfstrOptWPii}} +\def\ef@pdfstrOptWPii(#1){% + \g@addto@macro\eq@Opt{(}% + \pdfstringdef\@optTokstemp{#1}% + \expandafter\g@addto@macro\expandafter\eq@Opt + \expandafter{\@optTokstemp}% + \g@addto@macro\eq@Opt{)}% + \ef@pdfstrCLOpti} +\def\annot@type@listbox{listbox} +\newcommand\list@@Box[8]{\begingroup + \edef\annot@type{\annot@type@listbox}% + \pdfstringdef\Fld@name{#2}% + \expandafter\ef@pdfstrCLOpt#5\ef@@nil + \eqf@setDimens{#3}{#4}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \@processEvery#8\end\noindent#6#7{#1}% +} +\def\listBoxDefaults{% + \W{1}\S{I}\F{\FPrint}\BC{0 0 0} +} +\newcommand\listBox{\begingroup + \ef@sanitize@toks\ef@listbox +} +\newcommand{\ef@listbox}[1][]{% + \endgroup\ef@listBox[#1]% +} +\newcommand\ef@listBox[5][]{% + \mbox{\list@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps + \eq@choice@driver}{\listBoxDefaults\every@listBox}}% +} +\def\annot@type@combobox{combobox} +\newcommand\combo@@Box[8]{\begingroup + \edef\annot@type{\annot@type@combobox}% + \@eqFf{\FfCombo}\pdfstringdef\Fld@name{#2}% + \expandafter\ef@pdfstrCLOpt#5\ef@@nil + \eqf@setDimens{#3}{#4}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \@processEvery#8\end\noindent#6#7{#1}% +} +\def\comboBoxDefaults{% + \W{1}\S{I}\F{\FPrint}\BC{0 0 0} +} +\newcommand\comboBox{\begingroup + \ef@sanitize@toks\ef@combobox +} +\newcommand{\ef@combobox}[1][]{% + \endgroup\ef@comboBox[#1]% +} +\newcommand\ef@comboBox[5][]{% + \mbox{\combo@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps + \eq@choice@driver}{\comboBoxDefaults\every@comboBox}}% +} +\def\common@pushButtonCode{% + /Subtype/Widget + /T (\Fld@name) + /FT/Btn + \eq@Ff + \eq@TU + \eq@H + \eq@F + /BS <<\eq@W\eq@S >> +\ifx\eq@AP\@empty + /MK <<\eq@R\eq@BC\eq@BG% + \ef@kvCA\ef@kvRC\ef@kvAC\eq@IconMK\eq@mkIns>> +\else + \eq@AP +\fi + /DA (\eq@DA) + \eq@A\eq@AA + \eq@rawPDF +} +\def\common@RadioCheckCode{% + /Subtype/Widget + /T (\Fld@name) + /FT/Btn + \eq@Ff + \eq@F + \eq@TU + /BS <<\eq@W\eq@S>> +\ifx\eq@AP\@empty + /AP<< /N <<\eq@On<<>>>> >> + \eq@MK +\else + \eq@AP +\fi + /DA (\eq@DA) + \eq@AS + \eq@DV\eq@V + \eq@A\eq@AA + \eq@rawPDF +} +\def\annot@type@button{pushbtn} +\newcommand\push@@Button[7]{\begingroup + \edef\annot@type{\annot@type@button}% + \pdfstringdef\Fld@name{#2}%\edef\Fld@name{#2}% + \makeJSspecials\ef@preProcDefns + \def\eq@Ff{/Ff \FfPushButton}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \eqf@setDimens{#3}{#4}% + \@processEvery#7\end\noindent#5#6{#1}% +} +\def\pushButtonDefaults{% + \W{1}\S{B}\F{\FPrint}\BC{0 0 0} + \H{P}\BG{.7529 .7529 .7529} +} +\newcommand\pushButton{\begingroup + \ef@sanitize@toks\ef@pushbutton +} +\newcommand{\ef@pushbutton}[1][]{% + \endgroup\ef@pushButton[#1]% +} +\newcommand\ef@pushButton[4][]{% + \mbox{\push@@Button{#1}{#2}{#3}{#4}{}{% + \eq@setButtonProps\eq@Button@driver}% + {\pushButtonDefaults\every@PushButton}}% +} +\def\annot@type@checkbox{checkbox} +\newcommand\check@@Box[8] +{% + \begingroup\let\#\ef@Hx + \edef\annot@type{\annot@type@checkbox}% + \pdfstringdef\Fld@name{#2}\@eqAS{Off}% + \def\@eqDV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty\let\eq@DV\@empty + \else\ifpdfmarkup\def\eq@DV{/DV(##1) cvn }\else + \def\eq@DV{/DV/##1}\fi\fi}% + \def\@eqV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty + \let\eq@V\@empty\else\ifpdfmarkup\def\eq@V{/V(##1) cvn }\else + \def\eq@V{/V/##1}\fi\@eqAS{##1}\fi}% + \eqf@setDimens{#3}{#4}% + \ifpdfmarkup\def\eq@On{(#5) cvn }\else + \def\eq@On{/#5}\fi\@eqtextFont{ZaDb}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \@eqMK{\eq@R\eq@BC\eq@BG/CA(\symbol@choice)\eq@mkIns}% + \@processEvery#8\end\noindent#6#7{#1}% +} +\def\checkBoxDefaults{% + \F{\FPrint}\W{1}\S{S}\BC{0 0 0}% +} +\newcommand\checkBox{\begingroup + \ef@sanitize@toks\ef@checkbox +} +\newcommand{\ef@checkbox}[5][]{% + \endgroup\mbox{\check@@Box{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps + \eq@RadioCheck@driver}{\checkBoxDefaults\every@CheckBox}}% +} +\def\annot@type@radio{radiobtn} +\newcommand\radio@@Button[8]{\begingroup\let\#\ef@Hx + \edef\annot@type{\annot@type@radio}% + \pdfstringdef\Fld@name{#2}\@eqAS{Off}% + \def\@eqDV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty\let\eq@DV\@empty + \else\ifpdfmarkup\def\eq@DV{/DV(##1) cvn }\else + \def\eq@DV{/DV/##1}\fi\fi}% + \def\@eqV##1{\def\eq@arg{##1}\ifx\eq@arg\@empty + \let\eq@V\@empty\else\ifpdfmarkup\def\eq@V{/V(##1) cvn }\else + \def\eq@V{/V/##1}\fi\@eqAS{##1}\fi}% + \eqf@setDimens{#3}{#4}% + \ifpdfmarkup\def\eq@On{(#5) cvn }\else\def\eq@On{/#5}\fi + \def\eq@Ff{/Ff \FfRadio}\@eqtextFont{ZaDb}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \@eqMK{\eq@R\eq@BC\eq@BG/CA(\symbol@choice)\eq@mkIns}% + \@processEvery#8\end\noindent#6#7{#1}% +} +\def\radioButtonDefaults +{% + \W{1}\S{S}\BC{0 0 0}\F{\FPrint} +} +\newcommand\radioButton{\begingroup + \ef@sanitize@toks\ef@radiobutton +} +\newcommand{\ef@radiobutton}[5][]{\endgroup + \mbox{\radio@@Button{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps + \eq@RadioCheck@driver}{\radioButtonDefaults\every@RadioButton}}% +} +\newcommand\ef@radioButton[5][] +{% + \mbox{\radio@@Button{#1}{#2}{#3}{#4}{#5}{}{\eq@setWidgetProps + \eq@RadioCheck@driver}{\radioButtonDefaults\every@RadioButton}}% +} +\def\common@TextFieldCode +{% + /Subtype/Widget + /T (\Fld@name) + /FT/Tx + \eq@Ff + \eq@F + \eq@Q + \eq@TU + \eq@MaxLen + /BS <<\eq@W\eq@S>> + /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>> + /DA (\eq@DA) + \eq@DV\eq@V + \eq@RV\eq@DS + \eq@A\eq@AA + \eq@rawPDF +} +\def\annot@type@text{textfld} +\newcommand\text@@Field[7] +{% + \begingroup + \edef\annot@type{\annot@type@text}% + \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}% + \eqf@setDimens{#3}{#4}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \@processEvery#7\end\noindent#5#6{#1}% +} +\def\textFieldDefaults +{% + \F{\FPrint}\BC{0 0 0}\W{1}\S{S} +} +\newcommand\textField{\begingroup + \ef@sanitize@toks\ef@textfield +} +\newcommand{\ef@textfield}[2][]{% + \endgroup\ef@textField[#1]{#2}% +} +\newcommand\ef@textField[4][] +{% + \mbox{\text@@Field{#1}{#2}{#3}{#4}{}% + {\eq@setWidgetProps\eq@TextField}% + {\textFieldDefaults\every@TextField}}% +} +\let\eqTextField\textField +\let\calcTextField\textField +\def\common@SigFieldCode +{% + /Subtype /Widget + /T (\Fld@name) + /FT/Sig + \eq@F + \eq@TU + /BS <<\eq@W\eq@S>> + /MK <<\eq@R\eq@BC\eq@BG\eq@mkIns>> + /DA (\eq@DA) + \eq@Lock + \eq@A\eq@AA + \eq@rawPDF +} +\def\annot@type@sig{sigfld} +\newcommand\sig@@Field[7]{% + \begingroup + \edef\annot@type{\annot@type@sig}% + \pdfstringdef\Fld@name{#2}\def\eq@Title{#2}% + \eqf@setDimens{#3}{#4}% + \def\eq@DA{\eq@textFont\space\eq@textSize\space Tf \eq@textColor}% + \@processEvery#7\end\noindent#5#6{#1}% +} +\def\sigFieldDefaults +{% + \F{\FPrint}\BC{}\BG{}\W{1}\S{S} +} +\newcommand\sigField{\begingroup + \ef@sanitize@toks\ef@sigfield +} +\newcommand{\ef@sigfield}[1][]{% + \endgroup\ef@sigField[#1]% +} +\newcommand\ef@sigField[4][] +{% + \mbox{\sig@@Field{#1}{#2}{#3}{#4}{}{\eq@setWidgetProps\eq@SigField}% + {\sigFieldDefaults\every@sigField}}% +} +\def\common@LinkCode +{% + \eq@A % Action + \eq@H % Highlight + \eq@Color % Border color + \link@BS % Border styles + \eq@rawPDF % everything else +} +\def\annot@type@link{link} +\newcommand\set@@Link[7] +{% + \begingroup + \makeJSspecials + \edef\annot@type{\annot@type@link}% + \ef@preProcDefns + \eqf@setDimens{#2}{#3}% + \ifx\eq@rectW\@empty\def\link@@Box{#4}\else + \def\eq@arg{#4}\ifx\eq@arg\@empty + \def\eq@content{\hfill\vfill}\else\def\eq@content{#4}\fi + \def\link@@Box{\parbox[\eq@pos][\eq@rectH][\eq@innerpos]% + {\eq@rectW}{\centering\eq@content}}% + \fi + \@processEvery#7\end\noindent#5#6{#1}% +} +\def\defaultlinkcolor{\@linkcolor} +\def\setDef@ultLinkColor{\ifHy@colorlinks + \def\ef@thislinkcolor{\defaultlinkcolor} + \def\ef@colorthislink{\color{\ef@thislinkcolor}}\else + \let\ef@colorthislink\relax\fi +} +\AtBeginDocument{\setDef@ultLinkColor} +\def\set@LinkTextDefaults{\S{S}\Border{0 0 0}} +\newcommand\setLink{\begingroup + \ef@sanitize@toks\ef@setlinktext +} +\let\setLinkText\setLink +\newcommand{\ef@setlinktext}[1][]{% + \endgroup\ef@searchmlLink#1\mlLink\end\@nil + \ifx\ef@mlLink\ef@Zero\def\ef@next{\set@LinkText[#1]}\else + \def\ef@next{\mlhypertext[#1]}\fi\ef@next +} +\newcommand\set@LinkText[2][]{% + \set@@Link{#1}{}{}{\ef@colorthislink#2}{}% + {\eq@setWidgetProps{\ef@postProcLinkProps\setLink@driver}}% + {\set@LinkTextDefaults\every@Link}% +} +\def\ef@preProcDefns{% + \def\Win##1{/Win <<##1>>}% + \def\fitpage{\dl@fitpage}\def\actualsize{\dl@actualsize}% + \def\fitwidth{\dl@fitwidth}\def\fitheight{\dl@fitheight}% + \def\fitvisible{\dl@fitvisible}\def\inheritzoom{\dl@inheritzoom}% + \let\rPage\ef@rPage + \edef\Page##1{\ifcase\eq@drivernum + {Page##1}\or + \noexpand\pdfpageref##1\space\space 0 R\or + \noexpand @page##1\fi + }% +} +\def\ef@postProcLinkProps{} +\newcommand{\mlsetLink}{\mlhypertext} +\newcommand{\mlhypertext}[2][]{\@ifundefined{mlhypertext@i} + {\PackageWarning{eforms}{The \string\mlhypertext\space command + does nothing unless\MessageBreak the aeb_mlink package is loaded}}{}% + #2} +\def\set@LinkBboxDefaults{\S{S}\Border{0 0 0}} +\newcommand{\setLinkBbox}{\begingroup + \ef@sanitize@toks\ef@linkbbox +} +\newcommand{\ef@linkbbox}[1][]{% + \endgroup\ef@setLinkBbox[#1]% +} +\newcommand{\ef@setLinkBbox}[3][]{% + \@setLinkBbox{#1}{#2}{#3}% +} +\def\@setLinkBbox#1#2#3{\@ifnextchar[{\@@setLinkBbox{#1}{#2}{#3}}% + {\@@setLinkBbox{#1}{#2}{#3}[c]}} +\def\@@setLinkBbox#1#2#3[#4]{% + \@ifnextchar[{\@@@setLinkBbox{#1}{#2}{#3}{#4}}% + {\@@@setLinkBbox{#1}{#2}{#3}{#4}[#4]}% +} +\def\@@@setLinkBbox#1#2#3#4[#5]#6{% + \def\eq@pos{#4}\def\eq@innerpos{#5}% + \set@@Link{#1}{#2}{#3}{\ef@colorthislink#6}% + {\eq@setWidgetProps\setLink@driver}{}% + {\set@LinkBboxDefaults\every@Link}% +} +\def\set@LinkPboxDefaults{\S{S}\Border{0 0 0}} +\newcommand\setLinkPbox{\begingroup + \ef@sanitize@toks\ef@linkpbox +} +\newcommand{\ef@linkpbox}[1]{% + \endgroup\ef@setLinkPbox{#1}% +} +\newcommand\ef@setLinkPbox[1]{% + \@setLinkPbox{#1\BS{}}{}{}{\hfill\vfill}% +} +\def\@setLinkPbox#1#2#3{\@ifnextchar[{\@@setLinkPbox{#1}{#2}{#3}}% + {\@@setLinkPbox{#1}{#2}{#3}[c]}} +\def\@@setLinkPbox#1#2#3[#4]{% + \@ifnextchar[{\@@@setLinkPbox{#1}{#2}{#3}{#4}}% + {\@@@setLinkPbox{#1}{#2}{#3}{#4}[#4]} +} +\def\@@@setLinkPbox#1#2#3#4[#5]#6{% + \def\eq@pos{#4}\def\eq@innerpos{#5}% + \set@@Link{#1}{#2}{#3}{#6}{\eq@setWidgetProps\setLinkPbox@driver}% + {}{\set@LinkPboxDefaults\every@Link}% +} +\input{\eq@drivercode} +\inputCalcOrderJS +\endinput +%% +%% End of file `eforms.sty'. diff --git a/scripts/texmf/tex/latex/epdftex.def b/scripts/texmf/tex/latex/epdftex.def new file mode 100755 index 00000000..aef1ac3f --- /dev/null +++ b/scripts/texmf/tex/latex/epdftex.def @@ -0,0 +1,106 @@ +%% +%% This is file `epdftex.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% eforms.dtx (with options: `copyright,epdftex') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% eForms package, %% +%% Copyright (C) 2002-2018 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\noPeek#1#2{\global\pdfpageattr=\expandafter{\noPeekAction{#1}{#2}}} +\def\HyField@@AddToFields#1{% + \HyField@AfterAuxOpen{% + \if@filesw + \write\@mainaux{% + \string\HyField@AuxAddToFields{#1}}% + \ifisCalculate\write\@mainaux{% + \string\HyField@AuxAddToCoFields{}{#1}}\fi + \fi + }% +}% +\def\eq@choice@driver +{% + \Hy@pdfstringtrue + \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}% + \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH + \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi + \hbox{\pdfstartlink user{\common@choiceCode}% + \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}% + \HyField@AddToFields + \endgroup +} +\def\eq@Button@driver +{% + \Hy@pdfstringtrue + \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\ef@djXPD\fi + \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}% + \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH + \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi + \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi + \hbox{\pdfstartlink user{ \common@pushButtonCode }% + \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}% + \endgroup +} +\def\eq@RadioCheck@driver +{% + \Hy@pdfstringtrue + \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}% + \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH + \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi + \ifx\eq@rectW\@empty\def\eq@rectW{\wd\eq@tmpbox}\fi + \hbox{\pdfstartlink user{\common@RadioCheckCode}% + \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}% + \endgroup +} +\def\eq@l@check@driver +{% + \pdfstartlink user{\common@RadioCheckCode}% + \makebox[\eq@tmpdima]{\phantom{\link@@Content}}% + \pdfendlink\endgroup +} +\def\eq@TextField{\Hy@pdfstringtrue + \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}% + \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH + \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi + \leavevmode + \hbox{\pdfstartlink user{\common@TextFieldCode}% + \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}% + \HyField@AddToFields + \endgroup +} +\def\eq@SigField{\Hy@pdfstringtrue + \if\@vertRotate1 \let\W@temp\eq@rectW\edef\eq@rectW{\eq@rectH}% + \edef\eq@rectH{\W@temp}\fi\centerWidget\eq@rectH + \ifx\autoCenter\ef@n\eqcenterWidget=0pt\fi + \leavevmode\hbox{\pdfstartlink user{\common@SigFieldCode}% + \lower\eqcenterWidget\ef@Bbox{\eq@rectW}{\eq@rectH}\pdfendlink}% + \endgroup +} +\def\setLink@driver +{% + \@eqBS{}% + \leavevmode\pdfstartlink + attr {\eq@Border}% + user{/Subtype/Link \common@LinkCode}% + \Hy@colorlink{\@linkcolor}\link@@Box + \close@pdflink + \endgroup +} +\def\ef@setTabOrder{\ifx\ef@taborder\@empty\else + \edef\ef@tmp@toks{\the\pdfpageattr\space/Tabs/\ef@taborder}% + \global\pdfpageattr=\expandafter{\ef@tmp@toks}% + \fi\endgroup +} +\endinput +%% +%% End of file `epdftex.def'. diff --git a/scripts/texmf/tex/latex/insdljs.sty b/scripts/texmf/tex/latex/insdljs.sty new file mode 100755 index 00000000..512bc718 --- /dev/null +++ b/scripts/texmf/tex/latex/insdljs.sty @@ -0,0 +1,908 @@ +%% +%% This is file `insdljs.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% insdljs.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% insdljs.sty package, %% +%% Copyright (C) 2001-2018 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{insdljs} + [2017/09/03 v2.3g Insert Document Level JavaScripts (dps)] +\usepackage{xkeyval} +\RequirePackage{ifpdf}[2006/02/20] +\RequirePackage{ifxetex}[2006/08/21] +\RequirePackage{ifluatex} +\DeclareOptionX{dvipsone}{\def\dljs@drivernum{0}% + \AtBeginDocument{\dvips@marker}} +\DeclareOptionX{dvips}{\def\dljs@drivernum{0}% + \AtBeginDocument{\dvips@marker}} +\DeclareOptionX{textures}{\def\dljs@drivernum{0}% + \AtBeginDocument{\dvips@marker}} +\DeclareOptionX{pdftex}{\def\dljs@drivernum{1}} +\DeclareOptionX{luatex}{\def\dljs@drivernum{1}} +\DeclareOptionX{dvipdfm}{\def\dljs@drivernum{2}} +\DeclareOptionX{dvipdfmx}{\def\dljs@drivernum{2}} +\DeclareOptionX{xetex}{\def\dljs@drivernum{2}} +\let\dl@YES=y \let\dl@NO=n +\let\dl@One=1 \let\dl@Zero=0 +\let\dljs@YES=y \let\dljs@NO=n +\def\dvips@marker{\ifx\dljspresent\dl@NO\@OAction\fi} +\let\isOpenAction\dl@NO +\DeclareOptionX{nodljs}{\let\importdljs\dl@NO} +\let\importdljs\dl@YES +\let\firstdljs\dl@YES +\let\dljspresent\dl@NO +\DeclareOptionX{debug}{\let\dljs@debug\dl@YES} +\let\dljs@debug\dl@NO +\DeclareOptionX{execJS}{\let\execjs\dl@YES} +\let\execjs\dl@NO +\DeclareOptionX{nopro}{\let\dl@gopro\dl@NO} +\let\dl@gopro\dl@YES +\@ifpackageloaded{web}{% + \ExecuteOptionsX{\eq@driver@name}% +}{% + \@ifpackageloaded{eforms}{% + \ExecuteOptionsX{\ef@driver}% + }{% + \ifpdf\ExecuteOptionsX{pdftex}\else + \ifxetex\ExecuteOptionsX{xetex}\else + \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}} + {\ExecuteOptionsX{dvipsone}}\fi\fi + }% +} +\DeclareOptionX{reqjs}{\let\dl@reqJS\dl@YES} +\let\dljs@reqJS\dl@YES +\DeclareOptionX{!reqjs}{\let\dl@reqJS\dl@NO} +\DeclareOptionX{usealtadobe}{\def\inputAltAdbFncs{% + \InputIfFileExists{altadbfncs.def}% + {\PackageInfo{insdljs}{Inputting code for usealtadobe option}}% + {\PackageWarning{insdljs}{Cannot find altadbfncs.def.\MessageBreak + Reinstall or refresh your file name database.}}}} +\let\inputAltAdbFncs\relax +\ProcessOptionsX +\edef\dl@dquoteCat{\the\catcode`\"} +\catcode`\"=12\relax +\@ifundefined{dljs@drivernum}{% + \PackageError{insdljs}% + {You have not specified dvips, dvipsone, pdftex,\MessageBreak + dvipdfm, dvipdfmx, or xetex in the option list + \MessageBreak of the insdljs package} + {Place one of the drivers dvips, dvipsone, pdftex, dvipdfm, + dvipdfmx, or xetex + \MessageBreak in the option list of the insdljs package.} +}{} +\@ifundefined{ifpdfmarkup}{\newif\ifpdfmarkup}{}\pdfmarkupfalse +\ifpdf\else\ifxetex\else\pdfmarkuptrue\fi\fi +\RequirePackage{hyperref} +\ifpdf\ifx\pdfextension\@undefined\else + \protected\def\pdfnames{\pdfextension names } + \def\pdfpageref{\pdffeedback pageref}\fi\fi +\RequirePackage{verbatim} +\usepackage{conv-xkv}[2017/01/03] +\@ifundefined{dljs@drivernum}{% + \@ifundefined{eq@drivernum}{% + \PackageWarning{insdljs} + {No driver specified, will check for pdftex.} + \@ifundefined{pdfoutput}{% + \@ifundefined{@pdfm@mark}{\def\eq@drivernum{2}% + \def\dljs@drivernum{1}\let\isOpenAction\dl@NO + \PackageWarning{insdljs}{No pdftex, but detected dvipdfm}}% + {\PackageWarning{insdljs}{Neither pdftex nor dvipdfm, + assuming dvips/dvipsone.}% + \def\eq@drivernum{0}\def\dljs@drivernum{0}% + \let\isOpenAction\dl@YES} + }{% + \ifcase\pdfoutput + \def\eq@drivernum{1}\def\dljs@drivernum{1}% + \let\isOpenAction\dl@NO + \PackageInfo{insdljs}{Pdftex detected.}% + \else + \def\eq@drivernum{0}\def\dljs@drivernum{0}% + \let\isOpenAction\dl@YES + \PackageWarning{insdljs}{Pdftex engine detected, + but is outputting dvi. Assuming dvips as the driver.}% + \fi + }% + }{% + \begingroup + \count0=\eq@drivernum + \xdef\dljs@drivernum{\ifcase\count0 0\or1\or2\or0\else0\fi} + \ifnum\dljs@drivernum=0\global\let\isOpenAction\dl@YES + \else\global\let\isOpenAction\dl@NO\fi + \endgroup + }% +}{} +\ifnum\dljs@drivernum=1\relax + \RequirePackage{everyshi} +\fi +\def\AEB@psMrk{[\space} +\ifx\dl@reqJS\dl@YES + \def\dl@@reqJS{/Type/Requirement/S/EnableJavaScripts} + \ifpdf\pdfcatalog{\dl@@reqJS}\else + \ifxetex\immediate\@pdfm@mark{put @catalog <<\dl@@reqJS>>}\else + \literalps@out{\AEB@psMrk{Catalog} <<\dl@@reqJS>> /PUT pdfmark}\fi\fi +\fi +\providecommand\JS[1]{/S/JavaScript/JS(#1)} +\providecommand\Named[1]{/S/Named/N/#1} +\providecommand{\GoTo}{/S/GoTo/D} +\providecommand{\GoToD}{/S/GoTo/D} +\providecommand{\GoToR}{/S/GoToR} +\def\previewMiKTeX{\def\jsR{\string\r}\def\jsT{\string\t}} +{\obeylines % +\gdef\js@@R{\noexpand +}} +\let\dljstfor\@tfor +\def\jsR{\string\r\string\n} +\def\defineJSjsR{\string\r\eqbs^^J} +\def\jsN{\string\n} +{\catcode`\^^I\active % +\gdef^^I{\noexpand^^I}% +\gdef\js@@T{\noexpand^^I}% +}% end of \catcode`\^^I +\let\jsT=\js@@T +\newwrite\js@verbatim@out +\def\iwvo#1{\immediate\write\js@verbatim@out{#1}} +\def\dl@lparen{(}\def\dl@rparen{)} +\def\jscsDflt{\let\protect\noexpand\let\jslit\string + \let\~\dl@tilda\let\^\dl@sup + \def\\{\eqbs\eqbs}\def\cs##1{\\\\##1}% + \def\r{\\r}\def\t{\\t}\def\n{\\n}% + \let\{\dl@lBrace\let\}\dl@rBrace + \ifx\jsstr@useUni\dl@One\def\Uni{\\u}\else\def\u{\\u}\fi + \ifx\jsstr@parens\dl@One\let\l@paren\dl@lparen + \let\r@paren\dl@rparen\else + \let\l@paren\@empty\let\r@paren\@empty\fi +} +\def\jscsDLJS{\let\protect\noexpand\let\jslit\string + \let\~\dl@tilda\let\^\dl@sup + \ifxetex\def\\{\eqbs\eqbs}\else\def\\{\eqbs}\fi\def\cs##1{\\\\##1}% + \def\r{\\r}\def\t{\\t}\def\n{\\n}% + \let\{\dl@lBrace\let\}\dl@rBrace + \ifx\jsstr@useUni\dl@One\def\Uni{\\u}\else\def\u{\\u}\fi + \ifx\jsstr@parens\dl@One\let\l@paren\dl@lparen + \let\r@paren\dl@rparen\else + \let\l@paren\@empty\let\r@paren\@empty\fi +} +\ifpdf\let\jscsDLJS\jscsDflt\fi +\let\dl@JSCS\jscsDflt +\newcommand{\flJSStr}{\bgroup + \let\dl@JSCS\jscsDflt + \@ifstar{\def\isStar{*}\dl@defJSStr} + {\let\isStar\relax\dl@defJSStr}} +\let\fieldJSStr\flJSStr +\let\defineJSStr\flJSStr +\newcommand{\dlJSStr}{\bgroup + \@ifstar{\def\isStar{*}\let\dl@JSCS\jscsDLJS\dl@defJSStr} + {\let\isStar\relax\let\dl@JSCS\jscsDLJS\dl@defJSStr}} +\define@key{jsstr}{quotes}[]{\let\jsstr@quotes\dl@One} +\define@key{jsstr}{noquotes}[]{\let\jsstr@quotes\dl@Zero} +\define@key{jsstr}{parens}[]{\let\jsstr@parens\dl@One} +\define@key{jsstr}{noparens}[]{\let\jsstr@parens\dl@Zero} +\let\jsstr@quotes\dl@One\let\jsstr@parens\dl@One +\define@key{jsstr}{useUni}[]{\let\jsstr@useUni\dl@One} +\let\jsstr@useUni\dl@Zero +\newcommand{\dl@defJSStr}[3][quotes]{\def\dl@argi{#1}\ifx\dl@argi\@empty + \else\ifx\dl@JSCS\jscsDLJS\let\jsstr@parens\dl@Zero\fi + \setkeys{jsstr}{#1}\fi\dl@JSCS + \ifx\jsstr@quotes\dl@One + \xdef#2{\l@paren"#3"\r@paren}\else + \xdef#2{\l@paren#3\r@paren}\fi + \if\isStar*\gdef\dl@afterAction{{\Hy@unicodefalse\expandafter + \pdfstringdef\expandafter#2\expandafter{#2}}}\else + \global\let\dl@afterAction\relax\fi + \aftergroup\dl@afterAction\egroup} +\def\dlTC#1{try{#1}catch(e){}} +\def\js@R{\ifcase\dljs@drivernum^^J\else\jsR\fi} +\def\db#1\db{\ifx\dljs@debug\dl@YES\space\space\space#1\js@R\fi} +\newcounter{dljs@cnt} +\newcounter{dljssegs}\setcounter{dljssegs}{2} +\newenvironment{js@verbatimwrite}% writes to current \js@verbatim@out + {% + \@bsphack + \let\do\@makeother\dospecials\catcode`\^^M\active + \def\verbatim@processline{% + \immediate\write\js@verbatim@out{\the\verbatim@line}}% + \verbatim@start}{\@esphack} +\def\closejs@verbatim@out{\immediate\closeout\js@verbatim@out} +\begingroup +\catcode`\@=0 @catcode`@\=12 +@gdef@eqbs{\} +@gdef@ccpdfmark{@gdef@eqesc{\}@gdef@eqesci{}} +@endgroup +\begingroup + \catcode`<=1 \catcode`\>=2 \@makeother\{ \@makeother\} +\gdef\definebraces<\def\{<\eqesc{>\def\}<\eqesc}>> +\endgroup +\def\eqdospecials{\do\ \do\{\do\}\do\$\do\&% + \do\#\do\^\do\_\do\~} +\begingroup +\catcode`\~=\active \lccode`\~=`\^^M +\lowercase{\endgroup + \def\eqverbatim@#1~{\verbatim@@#1*end\@nil}% + \def\eqverbatim@@#1*end{% + \verbatim@addtoline{#1}% + \futurelet\dl@next\eqverbatim@@@}% + \def\eqverbatim@@@#1\@nil{% + \ifx\dl@next\@nil + \verbatim@processline + \verbatim@startline + \let\dl@next\eqverbatim@ + \else + \def\@tempa##1*end\@nil{##1}% + \@temptokena{*end}% + \def\dl@next{\expandafter\verbatim@test\@tempa#1\@nil~}% + \fi\dl@next}% +}% +\def\jsexpverbatimwrite +{% writes to current \js@verbatim@out + \@bsphack + \ccpdfmark + \catcode`\<=12 \catcode`\>=12 + \input{dljscc.def}% + \let\verbatim@=\eqverbatim@ + \let\verbatim@@=\eqverbatim@@ + \let\verbatim@@@=\eqverbatim@@@ + \let\do\@makeother\eqdospecials% + \catcode`\^^M=\active\catcode`\^^I=12% + \def\verbatim@processline{% + \edef\expVerb{\the\verbatim@line}% + \immediate\write\js@verbatim@out{\expVerb}}% + \verbatim@start% +} +\def\endjsexpverbatimwrite{\immediate\closeout\js@verbatim@out\@esphack} +\let\js@Path\@empty +\def\insPath#1{\def\js@Path{#1}} +\begingroup +\catcode`\{=12 \catcode`\}=12 \catcode`\<=1 \catcode`\>=2 +\gdef\dl@lBrace<\string\{> \gdef\dl@rBrace<\string\}> +\gdef\dl@tilda<\string~> \gdef\dl@sup<\string^> +\endgroup +\def\makeJSspecials{% + \def\\{\eqbs\eqbs}% % define \\ to be \\ + \let\jslit\string + \let\{\dl@lBrace\let\}\dl@rBrace + \let\u\@empty + \def\({\eqbs(}\def\){\eqbs)}% + \makespecialJS % make \r=\jsR and \t=\jsT +} +\def\dl@fitpage{/Fit} +\def\dl@actualsize{/XYZ null null 1.0} %{/XYZ -32768 -32768 1.0} +\def\dl@fitwidth{/FitH null} %{/FitH -32768} +\def\dl@fitheight{/FitV null} %{/FitV -32768} +\def\dl@fitvisible{/FitBH null} %{/FitBH -32768} +\def\dl@inheritzoom{/XYZ 0 0 0} +\def\dl@mag#1{/XYZ null null #1} +\edef\dl@Page#1{\ifcase\dljs@drivernum + {Page#1}\or\noexpand\pdfpageref#1\space\space 0 R\or + @page#1\fi} +\def\dl@preProcDefns{\let\Page\dl@Page\let\mag\dl@mag + \let\fitpage\dl@fitpage\let\actualsize\dl@actualsize + \let\fitwidth\dl@fitwidth\let\fitheight\dl@fitheight + \let\fitvisible\dl@fitvisible\let\inheritzoom\dl@inheritzoom +} +\let\aeb@additionalOpenAction\@empty +\let\aeb@addActionCode\@empty +\let\addActionObj\@empty +\let\aebpopentoks\@empty +\let\aebpFA\dl@NO +\def\aebp@rightDelimiters{} +\newcommand{\addToDocOpen}[1]{% + \ifx\aebpFA\dl@NO + \g@addto@macro\aebpopentoks{#1}% + \def\aeb@additionalOpenAction{/Next {pubAddToDocOpen}}% +\ifpdf + \def\aeb@addActionCode{\immediate\pdfobj{<< + \aebpopentoks\aebp@rightDelimiters >>}% + \edef\addActionObj{\the\pdflastobj\space 0 R}}% +\else\ifxetex + \def\aeb@addActionCode{\immediate + \@pdfm@mark{obj @objAddActionObj + << \aebpopentoks\aebp@rightDelimiters >> }}% + \def\addActionObj{@objAddActionObj}% +\else % postscript + \def\aeb@addActionCode{\literalps@out{% + \AEB@psMrk/_objdef {pubAddToDocOpen} + /type/dict /OBJ pdfmark^^J% + \AEB@psMrk{pubAddToDocOpen} << + \aebpopentoks\aebp@rightDelimiters >> /PUT pdfmark}}% + \def\addActionObj{{pubAddToDocOpen}}% +\fi\fi + \global\let\aebpFA\dl@YES + \let\@pdfstartview\@empty + \else + \edef\aebp@dljstmp{\aebp@rightDelimiters}% + \xdef\aebp@rightDelimiters{\aebp@dljstmp >> }% + \g@addto@macro\aebpopentoks{/Next << #1 }% + \fi +} +\def\dljs@OpenActions{/OpenAction \addActionObj} +\def\dljs@setOpenActions{\bgroup\makeJSspecials\dl@preProcDefns + \aeb@addActionCode + \ifpdf\pdfcatalog{\dljs@OpenActions}\else + \ifxetex\immediate + \@pdfm@mark{put @catalog <<\dljs@OpenActions>>}\else + \literalps@out{\AEB@psMrk + {Catalog} <<\dljs@OpenActions>> /PUT pdfmark}\fi\fi\egroup} +\@ifpackageloaded{aeb_pro}{} + {\AtBeginDocument{\ifx\aebpFA\dl@YES\expandafter + \dljs@setOpenActions\fi}} +\let\@CloseAction\@empty +\def\@OAction@pdfmark{\literalps@out{% + \AEB@psMrk{ThisPage} << /AA << /O << \theFirstAction\space + \opentoks\@rightDelimiters >> \@CloseAction >> >> /PUT pdfmark}} +\def\@POAction@pdfmark{\literalps@out{% + \AEB@psMrk{ThisPage} << /AA << \@thisOpenAction + \@thisCloseAction >> >> /PUT pdfmark}% +} +\def\@OAction@pdftex{% + \ifx\isOpenAction\dl@YES + \xdef\pdftexOAction{/AA << /O << \theFirstAction\space + \opentoks\@rightDelimiters >> \@CloseAction >>}% + \AtNextShipout{\pdfpageattr=\expandafter{\pdftexOAction}}% + \fi +} +\def\@POAction@pdftex{% + \xdef\thisPageActionpdftex{/AA << \@thisOpenAction + \@thisCloseAction >>}% + \AtNextShipout{\pdfpageattr=\expandafter{\thisPageActionpdftex}}% +} +\def\@OAction@dvipdfm{\ifx\isOpenAction\dl@YES + \@pdfm@mark{put @thispage << /AA << /O << \theFirstAction\space + \opentoks\@rightDelimiters >> \@CloseAction >> >>}\fi +} +\def\@POAction@dvipdfm{% + \@pdfm@mark{put @thispage << /AA << \@thisOpenAction + \@thisCloseAction >> >>}% +} +\ifcase\dljs@drivernum + \let\@OAction\@OAction@pdfmark + \let\@POAction\@POAction@pdfmark + \gdef\theFirstAction{/S/JavaScript/JS (\the\importfdftoks)} + \let\isOpenAction\dl@YES +\or + \let\@OAction\@OAction@pdftex + \let\@POAction\@POAction@pdftex + \AtBeginDocument{\@OAction@pdftex} +\or + \let\@OAction\@OAction@dvipdfm + \let\@POAction\@POAction@dvipdfm + \AtBeginDocument{\@OAction@dvipdfm} +\fi +\def\opentoks{} +\def\makespecialJS{% + \let\r\jsR\let\t\jsT\let\n\jsN} +\def\@rightDelimiters{} +\def\OpenAction{\@ifnextchar\Next + {\expandafter\@OpenAction\@gobble}{\@OpenAction}} +\def\@OpenAction#1{% + \ifx\isOpenAction\dl@NO + {\makespecialJS\xdef\theFirstAction{#1}}% + \global\let\isOpenAction\dl@YES + \else + \edef\dljstmp{\@rightDelimiters}% + \xdef\@rightDelimiters{\dljstmp >> }% + {\makespecialJS\xdef\dljstmp{\opentoks /Next << #1 }}% + \xdef\opentoks{\dljstmp}% + \fi + \@nextOpenAction +} +\def\@nextOpenAction{\@ifnextchar\Next{\expandafter + \@OpenAction\@gobble}{}} +\def\protectJSCtrls{\def\r{\string\r\string\n}% + \def\t{\string\t}\def\n{\string\n}} +\def\dljs@tstlp{\@ifnextchar\bgroup + {\let\dljs@multi\dl@YES\dljs@tstlpi}% + {\let\dljs@multi\dl@NO\dljs@tstlpi}} +\def\dljs@tstlpi#1\@nil{}% +\def\dljs@bldScript#1#2#3{{% + \dljs@tstlp#1\@nil + \ifx\dljs@multi\dl@NO{\protectJSCtrls\xdef#3{/#2<<#1>>}}\else + \toks0={}\let\dljs@rAngles\@empty\count0=0 + \@tfor\dljs@arg:=#1\do{% + \ifnum\count0=0 + \toks0=\expandafter{\dljs@arg}\else + \toks2=\expandafter{\dljs@arg}% + \edef\holdtokstmp{\the\toks0 + /Next<<\the\toks2 }% + \edef\dljs@rAngles{\dljs@rAngles\space>>}% + \toks0=\expandafter{\holdtokstmp}% + \fi + \advance\count0by1 + }% + {\protectJSCtrls\xdef#3{/#2<<\the\toks0 \dljs@rAngles>>}% + \xdef#3{#3}}% + \fi +}} +\newcommand{\thisPageAction}[2]{% + \let\@CloseAction\@empty + \let\@thisOpenAction\@empty + \let\@thisCloseAction\@empty + \def\dljs@argi{#1}\def\dljs@argii{#2}% + \ifnum\value{page}=1\relax + \ifx\dljs@argii\@empty\else + \dljs@bldScript{#2}{C}{\@CloseAction}\fi + \ifx\dljs@argi\@empty\else\dljs@tstlp#1\@nil + \ifx\dljs@multi\dl@NO\OpenAction{#1}\else + \@tfor\dljs@arg:=#1\do{\expandafter + \OpenAction\expandafter{\dljs@arg}% + }\fi + \fi + \else + \ifx\dljs@argi\@empty\else + \dljs@bldScript{#1}{O}{\@thisOpenAction}\fi + \ifx\dljs@argii\@empty\else + \dljs@bldScript{#2}{C}{\@thisCloseAction}\fi + \@POAction + \fi +} +\let\insdljsloadVar\@empty +\newenvironment{insDLJS}[3][] +{% + \gdef\detectdljs{#1}\gdef\dljsBase{#2}% + \ifxetex{\def\1{\string\1}\def\2{\string2}% + \def\3{\string\3}\xdef\dljsName{#3}}\else + \Hy@unicodefalse\pdfstringdef{\dljsName}{#3}\fi +\ifx\detectdljs\@empty + \stepcounter{dljs@cnt}% + \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}% + \edef\insdljsloadVar{var \detectdljs=true;}% + \addtocounter{dljs@cnt}{-1}% +\fi + \global\let\multisegments\dl@NO\setcounter{dljssegs}{2}% + \global\dljsobjtoks={}% + \expandafter\ifx\csname dljs\dljsBase\endcsname\relax + \else\@insjserrDuplicate\fi + \ifcase\dljs@drivernum + \let\insert@DLJS=\insert@DLJS@pdfmark + \let\endinsDLJS=\endinsert@DLJS@pdfmark + \let\newsegment=\newsegment@pdfmark + \let\endnewsegment=\endnewsegment@pdfmark + \or + \let\insert@DLJS=\insert@DLJS@pdftex + \let\endinsDLJS=\endinsert@DLJS@pdftex + \let\newsegment=\newsegment@pdftex + \let\endnewsegment=\endnewsegment@pdftex + \or + \let\insert@DLJS=\insert@DLJS@dvipdfm + \let\endinsDLJS=\endinsert@DLJS@dvipdfm + \let\newsegment=\newsegment@dvipdfm + \let\endnewsegment=\endnewsegment@dvipdfm + \fi + \insert@DLJS +}{} +\newenvironment{insDLJS*}[2][] +{% + \gdef\detectdljs{#1}\gdef\dljsBase{#2}% +\ifx\detectdljs\@empty + \stepcounter{dljs@cnt}% + \xdef\detectdljs{_bInsdljsload\arabic{dljs@cnt}}% + \edef\insdljsloadVar{var \detectdljs=true;}% + \addtocounter{dljs@cnt}{-1}% +\fi + \global\let\multisegments\dl@YES\setcounter{dljssegs}{2}% + \global\dljsobjtoks={}% + \expandafter\ifx\csname dljs\dljsBase\endcsname\relax + \else\@insjserrDuplicate\fi + \ifcase\dljs@drivernum + \let\insert@DLJS=\insert@DLJS@pdfmark + \expandafter + \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdfmark + \let\newsegment=\newsegment@pdfmark + \let\endnewsegment=\endnewsegment@pdfmark + \or + \let\insert@DLJS=\insert@DLJS@pdftex + \expandafter + \let\csname endinsDLJS*\endcsname\endinsert@DLJS@pdftex + \let\newsegment=\newsegment@pdftex + \let\endnewsegment=\endnewsegment@pdftex + \or + \let\insert@DLJS=\insert@DLJS@dvipdfm + \expandafter + \let\csname endinsDLJS*\endcsname\endinsert@DLJS@dvipdfm + \let\newsegment=\newsegment@dvipdfm + \let\endnewsegment=\endnewsegment@dvipdfm + \fi + \insert@DLJS +}{} +\def\@insjserrDuplicate{% + \typeout{^^J! insdljs Package error.} + \typeout{! insDLJS environment: On line number \the\inputlineno,} + \typeout{! the base name `\dljsBase' has already been chosen.} + \typeout{! A DLJS earlier defined has been overwritten!} + \typeout{! Choose another name for the first required argument} + \typeout{! of the insDLJS environment.^^J} +} +\newif\ifisdljs \isdljsfalse +\begingroup +\catcode`\~=12 \catcode`\#=12 +\gdef\efdlspecials{\catcode`\~=12 \catcode`\#=12} +\endgroup +\def\ckivspace#1{\if\noexpand#1\space\else\expandafter#1\fi} +\let\DLspecialDefs\@empty +\def\fdfAfterheader +{% + \iwvo{\string\begingroup\string\efdlspecials} + \iwvo{\string\DLspecialDefs} + \iwvo{\string\isdljstrue} + \iwvo{\string\makeatletter} + \iwvo{\string\immediate\string\openout\string +\js@verbatim@out=\string\js@Path\space\dljsBase.fdf}% + \iwvo{\string\begin{jsexpverbatimwrite}} + \iwvo{\string\firstFDFline} + \iwvo{1 0 obj} + \iwvo{<< /FDF << /JavaScript << /Doc 2 0 R /After 3 0 R >> >> >> } + \iwvo{endobj} + \iwvo{2 0 obj} +\ifpdfmarkup + \iwvo{[ (ExecJS \dljsBase) (var _\dljsBase\space = true;) ] }\else + \iwvo{[ (00 ExecJS \dljsBase) (var _\dljsBase\space = true;) ] }\fi + \iwvo{endobj} + \iwvo{3 0 obj} + \iwvo{<<>>} + \iwvo{stream} +} +\newenvironment{execJS}[1] +{% + \gdef\detectdljs{\string_#1}\gdef\dljsBase{#1}% + \global\dljsobjtoks={}% + \expandafter\gdef\csname dljs\dljsBase\endcsname{}% + \ifx\importdljs\dl@YES\ifx\execjs\dl@YES + \ifx\dl@gopro\dl@YES + \ifnum\dljs@drivernum=0\relax + \addImportAnFDF\importAnFDFTemplate + \else + \OpenAction{/S/JavaScript/JS (\importAnFDFTemplate)}% + \fi\fi + \fi\fi + \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs + \fdfAfterheader + \js@verbatimwrite +}{% + \fdfendstreamobj + \endjs@verbatimwrite + \fdftrailer + \closejs@verbatim@out + \expandafter\xdef\csname\dljsBase OBJ\endcsname{\the\dljsobjtoks}% + \edef\@dljstmp{\noexpand\AtBeginDocument{% + \noexpand\input{\js@Path\dljsBase.djs}}}\@dljstmp +} +\newtoks\JStoks +\newenvironment{defineJS}[2][] +{% + \expandafter\@ifundefined\expandafter{% + \expandafter\@gobble\string#2}{}{% + \PackageWarning{insdljs}{The command + \string#2 already defined}}% + \gdef\defineJSArg{#2}\JStoks={}% + \def\verbatim@processline + {% + \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}% + \global\JStoks=\expandafter{\JS@temp}% + }% + \let\do\@makeother\dospecials\catcode`\^^M\active + #1% + \verbatim@start +}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}% + \aftergroup\eq@JStemp} +\newenvironment{@defineJS}[2][] +{% + \gdef\defineJSArg{#2}\JStoks={}% + \def\verbatim@processline + {% + \xdef\JS@temp{\the\JStoks\the\verbatim@line\defineJSjsR}% + \global\JStoks=\expandafter{\JS@temp}% + }% + \let\do\@makeother\dospecials\catcode`\^^M\active + #1% + \verbatim@start +}{\gdef\eq@JStemp{\expandafter\edef\defineJSArg{\the\JStoks}}% + \aftergroup\eq@JStemp} +\newenvironment{localJS}[1][]{}{\ifvmode\else\unskip\fi} +\newenvironment{willClose}[1][] +{\@defineJS[#1]{\will@Close}} +{\end@defineJS} +\let\will@Close\@empty +\newenvironment{willSave}[1][] +{\@defineJS[#1]{\will@Save}} +{\end@defineJS} +\let\will@Save\@empty +\newenvironment{didSave}[1][] +{\@defineJS[#1]{\did@Save}} +{\end@defineJS} +\let\did@Save\@empty +\newenvironment{willPrint}[1][] +{\@defineJS[#1]{\will@Print}} +{\end@defineJS} +\let\will@Print\@empty +\newenvironment{didPrint}[1][] +{\@defineJS[#1]{\did@Print}} +{\end@defineJS} +\let\did@Print\@empty +\def\dljs@willDidActions{/AA << + \ifx\test@will@Close\@empty\else/WC << + \JS{\will@Close} >>\fi + \ifx\test@will@Save\@empty\else/WS << + \JS{\will@Save} >>\fi + \ifx\test@did@Save\@empty\else/DS << + \JS{\did@Save} >>\fi + \ifx\test@will@Print\@empty\else/WP << + \JS{\will@Print} >>\fi + \ifx\test@did@Print\@empty\else/DP << + \JS{\did@Print} >>\fi + >> +} +\newcommand\dljs@setDocActions{% + \edef\test@will@Close{\will@Close}% + \edef\test@will@Save{\will@Save}% + \edef\test@did@Save{\did@Save}% + \edef\test@will@Print{\will@Print}% + \edef\test@did@Print{\did@Print}% + \ifpdf\pdfcatalog{\dljs@willDidActions}\else + \ifxetex\immediate + \@pdfm@mark{put @catalog <<\dljs@willDidActions>>}\else + \literalps@out{\AEB@psMrk + {Catalog} <<\dljs@willDidActions>> /PUT pdfmark}\fi\fi +} +\@ifpackageloaded{aeb_pro}{} + {\AtBeginDocument{\dljs@setDocActions}} +\begingroup +\catcode`\%=12 +\gdef\firstFDFline{%FDF-1.2} +\gdef\lastFDFline{%%EOF} +\endgroup +\def\fdfheader +{% + \iwvo{\string\begingroup\string\efdlspecials} + \iwvo{\string\isdljstrue} + \iwvo{\string\makeatletter} + \iwvo{\string\immediate\string\openout\string + \js@verbatim@out=\string\js@Path\space\dljsBase.fdf}% + \iwvo{\string\begin{jsexpverbatimwrite}} + \iwvo{\string\firstFDFline} + \iwvo{1 0 obj} + \iwvo{<< /FDF << /JavaScript << /Doc 2 0 R >> >> >>} + \iwvo{endobj} + \iwvo{2 0 obj} + \iwvo{[ \string\csname\string\@gobble\space\dljsBase% + OBJ\string\endcsname]} + \iwvo{endobj} +} +\def\fdfbeginstreamobj +{% + \iwvo{\thedljssegs\space 0 obj} + \iwvo{<<>>} + \iwvo{stream} + \ifx\insdljsloadVar\@empty\else + \iwvo{\insdljsloadVar} + \global\let\insdljsloadVar\@empty + \fi +} +\def\fdfendstreamobj{% + \iwvo{endstream} + \iwvo{endobj} +} + \def\fdftrailer{% + \iwvo{trailer} + \iwvo{<< /Root 1 0 R >>} + \iwvo{\string\lastFDFline} + \iwvo{*end{jsexpverbatimwrite}} + \iwvo{\string\endgroup} +} +\newtoks\importfdftoks \importfdftoks={} +\newtoks\dljsobjtoks \dljsobjtoks={} +\def\importAnFDFTemplate{% +if(typeof \detectdljs\space == "undefined")\jsR\jsT + ( app.viewerVersion > 8 ) ? % + aebTrustedFunctions( this, aebImportAnFDF, % + "\js@Path\dljsBase.fdf") : % + this.importAnFDF("\js@Path\dljsBase.fdf");\jsR +} +\def\addImportAnFDF#1{% + \ifx\importdljs\dl@YES + \edef\importAnFDFtmp{\the\importfdftoks#1}% + \global\importfdftoks=\expandafter{\importAnFDFtmp}% + \fi +} +\def\importAnFDF{\ifx\importdljs\dl@YES\@OAction\fi} +\newenvironment{newsegment@pdfmark}[1]{% + \addtocounter{dljssegs}{1}% + \addtocounter{dljs@cnt}{1}% + \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}% + \edef\@dljstmp{\the\dljsobjtoks(\dljsName) + \thedljssegs\space 0 R\space} + \global\dljsobjtoks=\expandafter{\@dljstmp} + \fdfbeginstreamobj + \js@verbatimwrite +}{% + \fdfendstreamobj + \endjs@verbatimwrite +} +\def\insert@DLJS@pdfmark{% + \global\let\dljspresent\dl@YES + \expandafter\gdef\csname dljs\dljsBase\endcsname{}% + \ifx\importdljs\dl@YES\ifx\dl@gopro\dl@YES + \addImportAnFDF\importAnFDFTemplate + \fi\fi + \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs + \fdfheader + \ifx\multisegments\dl@NO\expandafter + \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi +} +\def\endinsert@DLJS@pdfmark{% + \ifx\importdljs\dl@YES + \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi + \fdftrailer + \closejs@verbatim@out + \expandafter\xdef\csname\dljsBase% + OBJ\endcsname{\the\dljsobjtoks}% + \edef\@dljstmp{\noexpand\AtBeginDocument{% + \noexpand\input{\js@Path\dljsBase.djs}}}% + \@dljstmp + \ifx\firstdljs\dl@YES + \AtBeginDocument{\edef\@dljstmp{\importAnFDF}% + \@dljstmp}\global\let\firstdljs\dl@NO + \fi + \fi +} +\begingroup +\catcode`\@=0 @catcode`@\=12 +@gdef@ccpdftex{@gdef@eqesc{\\}@gdef@eqesci{\}} +@endgroup +\def\begindljs +{% + \iwvo{\string\begingroup\string\efdlspecials} + \iwvo{\string\isdljstrue} + \iwvo{\string\makeatletter} + {\uccode`c=`\%\uppercase{% + \iwvo{\string\obeyspaces\string\obeylines + \string\let\string^\string^M=\string\jsR c}}} + {\escapechar=-1 \lccode`C=`\%\lowercase{% + \iwvo{\string\\catcode`\string\\"=12C}}} +} +\def\beginseg +{% + {\lccode`P=`\{\lccode`C=`\%\lowercase{% + \iwvo{\string\gdef\string\dljs\dljsBase\roman{dljssegs}PC}}}% +} +\def\endseg +{% + {\uccode`c=`\%\uccode`p=`\}\uppercase{\iwvo{pc}}}% +} +\def\enddljs +{% + \iwvo{\string\endgroup}% +} +\def\@roman#1{\romannumeral#1} +\def\write@objs +{% +\iwvo{\begingroup} +\iwvo{\string\catcode`\string\<=12 } +\iwvo{\string\catcode`\string\>=12 } +{\lccode`C=`\%\lowercase{\iwvo{\string\ccpdftex C}}} +{\lccode`C=`\%\lowercase{\iwvo{% + \string\input{dljscc.def}C\the\dljsobjtoks}}} +\iwvo{\endgroup} +} +\newenvironment{newsegment@pdftex}[1]{% + \addtocounter{dljssegs}{1}% + \addtocounter{dljs@cnt}{1}% + \edef\tmp{^^J\string\immediate\string\pdfobj{ << /S/JavaScript/JS% + (\string\dljs\dljsBase\roman{dljssegs}) >> }}% + \edef\@dljstmp{\the\dljsobjtoks\tmp}% + \global\dljsobjtoks=\expandafter{\@dljstmp}% + \edef\tmp{^^J\string\xdef\string\obj\dljsBase\roman{dljssegs}% + {\string\the\string\pdflastobj\string\space 0 R}}% + \edef\@dljstmp{\the\dljsobjtoks\tmp}% + \global\dljsobjtoks=\expandafter{\@dljstmp}% + \edef\curr@Cnt{\ifnum\arabic{dljs@cnt}<10 0\fi\arabic{dljs@cnt}}% + \Hy@unicodefalse\pdfstringdef{\dljsName}{#1}% + \edef\dljspdftextmp + {\the\importfdftoks (\curr@Cnt\space\dljsName) + \noexpand\csname obj\dljsBase\roman{dljssegs}% + \noexpand\endcsname\space}% + \global\importfdftoks=\expandafter{\dljspdftextmp}% + \beginseg + \js@verbatimwrite +}{% + \endjs@verbatimwrite + \endseg +} +\newenvironment{insert@DLJS@pdftex}{% + \expandafter\gdef\csname dljs\dljsBase\endcsname{}% + \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs + \begindljs + \ifx\multisegments\dl@NO\expandafter + \newsegment\expandafter{\expandafter\dljsName\expandafter}\fi +}{% + \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi + \enddljs + \write@objs + \endjs@verbatimwrite + \closejs@verbatim@out + \edef\@dljstmp{\noexpand\AtBeginDocument{% + \noexpand\input{\js@Path\dljsBase.djs}}}% + \@dljstmp + \ifx\importdljs\dl@YES + \ifx\firstdljs\dl@YES + \AtEndDocument{\edef\@dljstmp{\setDLJSRef@pdftex}\@dljstmp} + \global\let\firstdljs\dl@NO + \fi + \fi +} +\def\setDLJSRef@pdftex +{% + \noexpand\immediate\noexpand\pdfobj {% + << /Names [\the\importfdftoks] >> }% + \edef\noexpand\objNames{\noexpand\the\noexpand\pdflastobj\space 0 R}% + \pdfnames {/JavaScript \noexpand\objNames}% +} +\newenvironment{newsegment@dvipdfm}[1] +{% + \addtocounter{dljssegs}{1}% + \addtocounter{dljs@cnt}{1}% + \edef\tmp{^^J\string\immediate\string + \csname\space @pdfm@mark\string\endcsname + {obj @obj\dljsBase\roman{dljssegs}\space << /S/JavaScript% + /JS(\string\dljs\dljsBase\roman{dljssegs}) >> }}% + \edef\@dljstmp{\the\dljsobjtoks\space\tmp}% + \global\dljsobjtoks=\expandafter{\@dljstmp}% + \edef\curr@Cnt{\ifnum\arabic{dljs@cnt}<10 0\fi\arabic{dljs@cnt}}% + {\def\1{\string\1}\def\2{\string2}% + \def\3{\string\3}\xdef\dljsName{#1}}% + \edef\dljspdftextmp + {\the\importfdftoks (\curr@Cnt\space \dljsName) % + @obj\dljsBase\roman{dljssegs}\space}% + \global\importfdftoks=\expandafter{\dljspdftextmp}% + \beginseg + \js@verbatimwrite +}{% + \endjs@verbatimwrite + \endseg +} +\def\setDLJSRef@dvipdfm +{% + \immediate\@pdfm@mark{obj @objnames % + << /Names [\the\importfdftoks] >> }% + \@pdfm@mark{put @names % + << /JavaScript @objnames >> }% +} +\newenvironment{insert@DLJS@dvipdfm} +{% + \expandafter\gdef\csname dljs\dljsBase\endcsname{}% + \immediate\openout \js@verbatim@out \js@Path\dljsBase.djs + \begindljs + \ifx\multisegments\dl@NO\expandafter\newsegment\expandafter{% + \expandafter\dljsName\expandafter}\fi +}{% + \ifx\multisegments\dl@NO\expandafter\endnewsegment\fi + \enddljs + \write@objs + \endjs@verbatimwrite + \closejs@verbatim@out + \edef\@dljstmp{\noexpand\AtBeginDocument{% + \noexpand\input{\js@Path\dljsBase.djs}}}% + \@dljstmp + \ifx\importdljs\dl@YES + \ifx\firstdljs\dl@YES + \AtBeginDocument{\setDLJSRef@dvipdfm}% + \global\let\firstdljs\dl@NO + \fi + \fi +} +\catcode`\"=\dl@dquoteCat +\inputAltAdbFncs +\endinput +%% +%% End of file `insdljs.sty'. diff --git a/scripts/texmf/tex/latex/pgfsys-tex4ht.def b/scripts/texmf/tex/latex/pgfsys-tex4ht.def new file mode 100755 index 00000000..55edcafe --- /dev/null +++ b/scripts/texmf/tex/latex/pgfsys-tex4ht.def @@ -0,0 +1,485 @@ +% Copyright 2006 by Till Tantau +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Public License. +% +% See the file doc/generic/pgf/licenses/LICENSE for more details. + +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.25 2013/08/06 17:46:08 tantau Exp $ + + + +% Driver commands for tex4ht + +% +% Load common pdf commands: +% +\input pgfsys-common-svg.def + +% +% tex4ht-specific stuff: +% +\def\pgfsys@invoke#1{\pgf@sys@fail{svg code in preamble}} +\def\pgfsys@body@invoke#1{\HCode{#1}} + +\newcount\pgf@sys@svg@picnum + +\def\pgfsys@pictureboxsynced#1{% + \pgfsys@beginscope\pgflowlevelsynccm\box#1\pgfsys@endscope% +} + + +%% +%% initial support of Mathml and xhtml inside svg through the svg:foreignelement tag +%% +%% it'll allow us to have complicated text nodes in the tex4ht driver +%% + + +%Example (to improve the display, you have to use css) +% +%\tikzpicture[svg text only=false] +%\draw (0,0) node[inner sep=0pt,draw] {tight} +%(0cm,2em) node[inner sep=5pt,draw] {loose} +%(0cm,4em) node[fill=red!20] {default}; +%\draw (3,0) node[inner sep=0pt,draw] {TIGHT} +%(3cm,2em) node[inner sep=5pt,draw] {LOOSE} +%(3cm,4em) node[fill=red!20] {DEFAULT}; +%\draw (6,0) node[inner sep=0pt,draw] {$tight$} +%(6cm,2em) node[inner sep=5pt,draw] {$loose$} +%(6cm,4em) node[fill=red!20] {$default$}; +%\draw (9,0) node[inner sep=0pt,draw] {$TIGHT$} +%(9cm,2em) node[inner sep=5pt,draw] {$LOOSE$} +%(9cm,4em) node[fill=red!20] {$Default$}; +%\endtikzpicture +% +% you can use the options "svg text css=filename", "svg text id=idname", "svg text class=classname" to customize the display through the use of css +% + + + + + + + +%\def\pgfsys@beginpicture{% +% % \Configure{[]}{$}{$} these two lines aren't needed for tex4ht and moreother they produce errors with plain tex ! +% % \Configure{()}{$}{$} +% \Configure{$$}{}{}{}%$$ +% \Configure{$}{}{}{}%$ +% \Configure{SUB}{\HCode{}}{\HCode{}} +% \Configure{SUP}{\HCode{}}{\HCode{}} +% \Configure{SUBSUP}{}{}{} +% \Configure{htf} +% {0}{+}{}{} +%} + + + +%\def\pgfsys@endpicture{% +% % undo: +% \Configure{htf}{0}{+}{}{} +%} + +%\def\pgfsys@svg@newline{\Hnewline} +\def\pgfsys@svg@newline{^^J} + +% we don't want tex4ht putting

and

tags automatically in our svg code and causing invalid xhtml in our svg pictures +\newif\ifpgfsys@CssIncluded@\pgfsys@CssIncluded@false +\def\pgfsys@beginpicture{% + \EndP\HtmlParOff + \pgfkeys{/pgf/tex4ht node/escape=false}% + % text only nodes are the default. Advantage : pure svg pictures are + % the default, nicer for text only nodes. + % Disadvantages : this rendering methods produce more invalid or degraded svg pictures than with the foreignelement tag + %% we use css to control the display of foreignelement rendered text nodes + \ifpgfsys@CssIncluded@ + \else + \Css{ + .foreignobject {% + line-height:100\%; + font-size:120\%; % this is the trick....a font of size 100% in + % a box scaled down to half size makes it a + % half size font. + % you'll have to double the size of things + % that you want to have a regular size in + % this half-scaled box though + font-family:STIXgeneral,Times,Symbol,cmr10,CMSY10,CMEX10;% + % can't wait for the stix font...the cmr10, etc font are + % available from the mozilla site, times and symbols should be + % okey + padding:0; + margin:0; + % background-color:\#12ff55; usefull for debugging positioning + text-align:center; % good for centered text nodes...will have to improve that later on...with more integration with pgf options for text nodes + } + }% + \Css{% + math {%, math[mode="inline"] { + vertical-align:baseline; + line-height:100\%; + font-size:100\%; + font-family:STIXGeneral,Times,Symbol, cmr10,cmsy10,cmex10,cmmi10; + font-style: normal; + margin:0; + % background-color:\#99ff99; + padding:0; + }% + }% + \pgfsys@CssIncluded@true + \fi +}% + +\def\pgfsys@endpicture{% + \HtmlParOn + \par% FIXME : was '\Par' but that seems to be undefined!? +}% + +% this is okay for both rendering methods for text nodes (mtext or foreignelement)... +\def\pgfsys@typesetpicturebox#1{% + \global\advance\pgf@sys@svg@picnum by 1\relax% + % Ok, compute width/height + \pgf@xa=\pgf@picminx% + \pgf@ya=\pgf@picminy% + \pgf@xb=\pgf@picmaxx% + \pgf@yb=\pgf@picmaxy% + \pgf@x=\pgf@xb% + \advance\pgf@x by-\pgf@xa% + \pgf@y=\pgf@yb% + \advance\pgf@y by-\pgf@ya% + \ifdim\pgf@y<1pt% + \pgf@y=1pt% + \fi% + \pgf@xc=\pgf@x% + \pgf@yc=\pgf@y% + \pgfsysprotocol@flushcurrentprotocol% + \HCode{

SVG-Viewer needed.

}% + \special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}% + %%%%%%%% This is necessary to control the svg through css + \pgfkeys{% + /pgf/tex4ht node/css/.get=\pgfsys@foreignobject@css + }% + \pgfsys@invoke{\Hnewline% added that + \Hnewline}% added that +%%%%%%%%%%%%%%% maybee I should add an option to change the css, for the whole picture + \pgfsys@invoke{\Hnewline \Hnewline }% + % + \pgf@ya=\pgf@shift@baseline\relax% + \advance\pgf@ya by-\pgf@picminy\relax% + % + % + \advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height + \advance\pgf@picmaxx by-\pgf@picminx\relax% maxx is now the width + \setbox#1=\hbox{\hskip-\pgf@picminx\lower\pgf@picminy\box#1}% + \ht#1=\pgf@picmaxy% + \wd#1=\pgf@picmaxx% + \dp#1=0pt% + \leavevmode + \pgf@xa=\pgf@trimleft@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi + \raise-\pgf@ya\box#1% + \pgf@xa=\pgf@trimright@final\relax \ifdim\pgf@xa=0pt \else\kern\pgf@xa\fi + \pgfsys@invoke{\Hnewline \Hnewline }% + \special{t4ht<\jobname-\the\pgf@sys@svg@picnum.svg}% +}% + +%% we'll use this hbox for the mtext rendering method (the "text only=true" option) +\def\pgfsys@hbox#1{% + \pgf@x=.5\wd#1% + \ifx\tikz@textcolor\relax\else\ifx\tikz@textcolor\@undefined\else% + \ifx\tikz@textcolor\pgfutil@empty% + \pgfsetfillcolor{.}% + \else% + \pgfsetfillcolor{\tikz@textcolor}% + \fi% + \fi\fi% tweak for TikZ + \HCode{\Hnewline }% + \wd#1=0pt% + \ht#1=0pt% + \dp#1=0pt% + \box#1 + \HCode{\Hnewline }% +}% + +%% we save this definition +\let\pgfsys@mtext@hbox\pgfsys@hbox + +%% we have to use some "evil" ^^ tex4ht hackery +% tex4ht hackery +{% grouping necessary cause we change the catcode of ":" + \catcode`:=11\relax + %%% this is necessary to calculate the size of text nodes with + %%% inline maths + % (it is an improvement of tex4ht, got to ask eitan gurary if he + % could put it in the tex4ht code) + \gdef\DviMathAlt{% + \a:DviMath\leavevmode \MathClass + \ht:special{t4ht@(}\hbox\bgroup{\expandafter\ifx\csname + ht:everypar\endcsname\relax\expandafter\everypar\else + \expandafter\ht:everypar\fi{}\leavevmode\ht:special{t4ht@)}}\DviSend + }% + % these are configures for the foreignelement rendering method of text nodes : we let tex4ht write xhtml and mathml in the svg picture + % + \gdef\pgfsys@foreignobject@configure{% + \Configure{$}{\Configure{@math}{%\a:mathml + display="inline" }\DviMathAlt}{\EndDviMath}{}%%% we REALLY need to use \DviMathAlt here instead of \DviMath see above remark + \Configure{$$}{\Configure{@math}{%\a:mathml + display="block" }\IgnorePar + \ifvmode\else \HCode{}\fi\EndP + \DviMath}{\EndDviMath\ShowPar\pgfsys@foreignobject@par{\csname HCondtrue\endcsname\noindent} + }{\DisplayMathtrue}% + \Configure{SUB}{\Send{BACK}{<\a:mathml msub><\a:mathml mrow\Hnewline>}% + \Tg\Tg<\a:mathml mrow\Hnewline>\trap:base}{\Tg\TG}% + \Configure{SUP}{\Send{BACK}{<\a:mathml msup><\a:mathml mrow\Hnewline>}% + \Tg\Tg<\a:mathml mrow\Hnewline>\trap:base}{\Tg\TG}% + \Configure{SUBSUP}{\Send{BACK}{<\a:mathml msubsup><\a:mathml mrow\Hnewline>}% + \Tg\Tg<\a:mathml mrow\Hnewline>\trap:base}{\Tg\Tg<\a:mathml mrow\Hnewline>\trap:base}{\Tg\TG}% + \Configure{htf}{0}{+}{}{}% + }% + \global\let\pgfsys@foreignobject@par=\par % use this instead of \par + % -- \Configure is no \long macro (at + % least in one of the older + % versions). + + % these are the configures for the mtext rendering method of text + % nodes : we turn everything into regular character (don't want math + % modes or subsup) + % and we hope it works (it doesn't if the text nodes aren't simple) + \gdef\pgfsys@mtext@configure{% + % no configures for \(\) and \[\] those might be needed for + % context or Latex. Let me know ! + \Configure{$$}{}{}{}% no block maths + \Configure{$}{}{}{}%$ no inline maths + \Configure{SUB}{\HCode{}}{\HCode{}}% + \Configure{SUP}{\HCode{}}{\HCode{}}% + \Configure{SUBSUP}{}{}{}% not both sub and sup + \Configure{htf} {0}{+}{}{}% + }% +}% + +% a counter to produce unique ids for each text node rendered with foreign element +\newcount\pgf@sys@svg@nodenum + + +% pgfutil@minipage +% +% I had to change it to make it play nice with the way tex4ht puts

and <\p> tags +% + +\newif\ifpgfsys@textonly +\def\pgfutil@minipage[#1]#2{% + \hbox to#2\bgroup + \hsize=#2\relax + \vbox\bgroup +% though it works, I'm desabling the above mentioned hack to make tex4ht behave with

<\p>, because it blurps the positioning +% (I''l try to fix that later, it's a css thing) +% +% \ifpgfsys@textonly\else\HtmlParOn\fi +% +% \noindent is better as it doesn't produce indentation AND it makes you leave vertical mode + \noindent%\leavevmode +}% +\def\pgfutil@endminipage{% +% same thing here +% +% \ifpgfsys@textonly\else\EndP\HtmlParOff\fi + \egroup\egroup +}% + + +% I'll have to fix those names later +\newbox\pgfsys@foreignobject@Box +\newdimen\pgf@s +\newdimen\pgf@t +% this is the alternate hbox routine that renders text nodes through the foreignobject tag +\def\pgfsys@foreignobject@hbox#1{% + % Compute box y translation (x translation is correct). + \pgf@y=-\ht#1\relax + \HCode{\Hnewline}% scaling work around (damn dumb browsers !) + % Compute box size (scaled 2 times) + % this is necessary to make the browser scale the font down 50% (the STUPID browsers won't make font-size:50% happen, + % so we have to work around this by making svg scale the things down 50%, doubling the size of the text node frame (i.e. no changement there) + \pgf@x=2\wd#1\relax + \pgf@y=2\ht#1\relax + \advance\pgf@y by 2\dp#1\relax + % this is to adjust the y translation to compensate for the differences between the TeX and the Html models for lines + \setbox\pgfsys@foreignobject@Box=\hbox{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + $abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZf_1^1\overline D)_1^1\vec i\vec j$}% + \pgf@t=\ht#1\relax + \advance\pgf@t by -\ht\pgfsys@foreignobject@Box\relax + \pgf@s=\pgf@t\relax + \advance\pgf@s by \dp#1\relax + \advance\pgf@s by -\dp\pgfsys@foreignobject@Box\relax + \ifnum\pgf@s>0\relax + \pgf@s=0pt + \pgf@t=0pt + \else + \advance \pgf@y by -2\pgf@s\relax + \pgf@t=2\pgf@t\relax + \fi + % + \HCode{}% + % this is to make use of the css, class and id options through which you can control the way things display + \pgfkeys{% + /pgf/tex4ht node/css/.get=\pgfsys@foreignobject@css,% + /pgf/tex4ht node/class/.get=\pgfsys@foreignobject@class,% + /pgf/tex4ht node/id/.get=\pgfsys@foreignobject@id + }% + \HCode{\Hnewline + \Hnewline + \Hnewline + % I'll have to look into this, perhaps there are better + % doctype....  aren't recognised and produces invalid svg + % pictures a workaround (not implemented yet) would be to make + % them into entities of the svg picture. + \Hnewline +

\Hnewline + }% + \box#1% + \HCode{% +
\Hnewline + \Hnewline + \Hnewline + }% + % debug positioning not needed but it would be nice to let it there to control things later on + % \HCode{} + \HCode{\Hnewline}% + \global\advance\pgf@sys@svg@nodenum by 1\relax +}% + +% the options and the code that controls it all (switches between \pgfsys@mtext@hbox and \pgfsys@foreignelement@hbox) + +\pgfkeys{% + /pgf/.cd, + tex4ht node/escape/.is choice, + tex4ht node/escape/false/.code={\let\pgfsys@hbox\pgfsys@mtext@hbox\pgfsys@mtext@configure\pgfsys@textonlytrue}, + tex4ht node/escape/true/.code={\let\pgfsys@hbox\pgfsys@foreignobject@hbox\pgfsys@foreignobject@configure\pgfsys@textonlyfalse}, + tex4ht node/css/.initial=\jobname, + tex4ht node/class/.initial=foreignobject, + tex4ht node/id/.initial=\jobname\the\pgf@sys@svg@picnum-\the\pgf@sys@svg@nodenum +}% + + + + + + +% this might be needed +%\font\SvgText=cmr10\relax + + + + +% There is something rellay wrong with the way "%" chars are used in here... you should code "}%" to avoid unnecessary spaces +% and it is unnecessary to code \cs% +% got to be carefull with numbers though, cf the texbook...2\relax and 2 % are okey + +\def\pgfsys@outerinvoke{\ifpgfpicture\expandafter\pgfsys@invoke\else\expandafter\pgfutil@gobble\fi} + +\def\pgfsys@shadingoutsidepgfpicture#1{\pgf@sys@fail{svg code in preamble}} +\def\pgfsys@shadinginsidepgfpicture#1{\pgf@sys@fail{svg code in preamble}} + +\def\pgfsys@body@shadingoutsidepgfpicture#1{% + \begingroup% + #1% + \setbox\pgfpic=\hbox to0pt{% + \pgfsys@beginpicture% + \pgfsys@beginscope% + \pgf@sys@svg@sh@defs% + \pgf@sys@svg@sh% + \pgfsys@endscope% + \pgfsys@endpicture% + \hss% + }% + \pgf@process{\pgf@sys@svg@pos}% + \pgf@picminx=0pt% + \pgf@picminy=0pt% + \pgf@picmaxx=\pgf@x% + \pgf@picmaxy=\pgf@y% + \def\pgf@shift@baseline{0pt}% + \pgfsys@typesetpicturebox\pgfpic% + \endgroup% +} + +\def\pgfsys@body@shadinginsidepgfpicture#1{% + #1% + \pgf@sys@svg@sh@defs% hmmm.... + \pgf@process{\pgf@sys@svg@pos} + \pgf@xa=-.5\pgf@x% + \pgf@ya=-.5\pgf@y% + \pgfsysprotocol@literal{\Hnewline}% + \pgf@sys@svg@sh% + \pgfsysprotocol@literal{\Hnewline}% +} + + +\ifpgfutil@format@is@latex + % Protect against color.4ht evil meddling with xcolor: + \RequirePackage{xcolor} + \let\pgf@xcolor@declaredcolor=\@declaredcolor + \let\pgf@xcolor@undeclaredcolor=\@undeclaredcolor +\fi + +\AtBeginDocument{ + \let\pgfsys@invoke=\pgfsys@body@invoke + \let\pgfsys@shadingoutsidepgfpicture=\pgfsys@body@shadingoutsidepgfpicture + \let\pgfsys@shadinginsidepgfpicture=\pgfsys@body@shadinginsidepgfpicture + \ifpgfutil@format@is@latex + \let\pgf@texht@declaredcolor=\@declaredcolor + \let\pgf@texht@undeclaredcolor=\@undeclaredcolor + \def\@declaredcolor{\ifpgfpicture\expandafter\pgf@xcolor@declaredcolor\else\expandafter\pgf@texht@declaredcolor\fi} + \def\@undeclaredcolor{\ifpgfpicture\expandafter\pgf@xcolor@undeclaredcolor\else\expandafter\pgf@texht@undeclaredcolor\fi} + \fi + \def\pgfutil@color{\pgfsetcolor} + % \ConfigureEnv{pgfpicture}{}{}{}{} there is no environment in plain TeX and this produces errors + % this might be needed for context or latex though....let me know ! +}% + +\endinput + + +%%% Local Variables: +%%% mode: latex +%%% End: diff --git a/scripts/texmf/tex/latex/taborder.sty b/scripts/texmf/tex/latex/taborder.sty new file mode 100755 index 00000000..64abc732 --- /dev/null +++ b/scripts/texmf/tex/latex/taborder.sty @@ -0,0 +1,92 @@ +%% +%% This is file `taborder.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% taborder.dtx (with options: `copyright,package') +%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% taborder.sty package, %% +%% Copyright (C) 2009--2016 D. P. Story %% +%% dpstory@uakron.edu %% +%% %% +%% This program can redistributed and/or modified under %% +%% the terms of the LaTeX Project Public License %% +%% Distributed from CTAN archives in directory %% +%% macros/latex/base/lppl.txt; either version 1 of the %% +%% License, or (at your option) any later version. %% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\NeedsTeXFormat{LaTeX2e}[1997/12/01] +\ProvidesPackage{taborder} + [2009/09/04 v0.1 taborder: Sets the tab order, Acrobat Distiller only (dps)] +\DeclareOption{structure}{\let\to@earlyendinput\relax} +\let\to@earlyendinput\endinput +\let\setTabOrderByList\relax\let\setTabOrderByNumber\relax +\ProcessOptions +\newif\ifto@structOrder\to@structOrderfalse +\newcommand{\setTabOrder}[1]{\begingroup + \global\to@structOrderfalse + \def\to@to@C{C}\def\to@to@R{R}\def\to@to@S{S}% + \def\to@to@W{W}\def\to@to@A{A}\def\to@to@us{UNSPECIFIED}% + \uppercase{\def\ef@taborder{#1}}% + \ifx\ef@taborder\@empty + \else\ifx\ef@taborder\to@to@us + \let\ef@taborder\@empty + \else\ifx\to@to@C\ef@taborder + \else\ifx\to@to@R\ef@taborder + \else\ifx\to@to@S\ef@taborder + \ifx\to@earlyendinput\endinput + \PackageWarning{taborder}{% + The structure (S) option is supported only\MessageBreak + with Acrobat Distiller. Using the default\MessageBreak + value of 'unspecified'}\let\ef@taborder\@empty + \else\global\to@structOrdertrue\fi + \else\ifx\to@to@W\ef@taborder + \else\ifx\to@to@A\ef@taborder + \else\PackageWarning{taborder}{% + Invalid value for \string\setTabOrder. Permissible \MessageBreak + values are R, C, S, W, A, and unspecified. Using \MessageBreak + the default value of 'unspecified'}\let\ef@taborder\@empty + \fi\fi\fi\fi\fi\fi\fi\ef@setTabOrder +} +\to@earlyendinput +\def\ef@setTabOrder{% + \ifx\ef@taborder\@empty\else\literalps@out{% + [ {ThisPage} <> /PUT pdfmark}\fi + \endgroup +} +\newcommand{\setTabOrderByList}{% + \global\to@settabsbylisttrue + \global\let\setStructTabOrder\to@setStructTabOrder +} +\newcommand{\setTabOrderByNumber}{% + \global\to@settabsbylistfalse + \global\let\setStructTabOrder\@gobble +} +\newcommand{\to@setStructTabOrder}[1]{% + \@setStructTabOrder#1\end +} +\newif\ifto@settabsbylist\to@settabsbylisttrue +\let\setStructTabOrder\to@setStructTabOrder +\define@key{structOpts}{title}[]{\def\structOpts@title{#1}} +\define@key{structOpts}{type}[Form]{\def\structOpts@type{#1}} +\newcommand{\@setStructTabOrder}[2][]{% + \setkeys{structOpts}{title,type,#1} + \ifx#2\end\else\literalps@out{% + [/Subtype/\structOpts@type\ifx\structOpts@title\@empty + \else/Title (\structOpts@title)\fi/StPNE pdfmark + [/Obj {#2} /StOBJ pdfmark + [/StPop pdfmark}\expandafter\@setStructTabOrder + \fi +} +\def\to@insertStrucTabOrder#1{% + \ifto@structOrder\ifx\eq@objdef\@empty\else + \ifx\eq@taborder\@empty\else\literalps@out{% + [/Subtype/#1/At \eq@taborder/StPNE pdfmark + [/Obj {\eq@objdefName} /StOBJ pdfmark [/StPop pdfmark}% + \fi\fi\fi +} +\endinput +%% +%% End of file `taborder.sty'. diff --git a/scripts/texmf/tex/latex/tikz-dimline.sty b/scripts/texmf/tex/latex/tikz-dimline.sty new file mode 100755 index 00000000..e8d9750c --- /dev/null +++ b/scripts/texmf/tex/latex/tikz-dimline.sty @@ -0,0 +1,189 @@ +%% Dimension line for LaTeX/TikZ +%% Copyright © 2013 Sébastien Gross +%% +%% This file may be distributed and/or modified +%% +%% 1. under the LaTeX Project Public License and/or +%% 2. under the WTF Public License. +%% +%% +%% This simplify the creation drawing of dimension arrows. +%% +%% +%% To install it copy the tango directory to either: +%% - $TEXHOME/tex/latex/ +%% - ~/texmf/tex/latex/ +%% - ~/Library/texmf/tex/latex +%% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{tikz-dimline}[2013/03/13 v1.0 initial version] + +\RequirePackage{tikz} +\RequirePackage{pgfplots} +\RequirePackage{ifthen} + +\usetikzlibrary{calc,decorations.markings,arrows} + +\makeatletter + + + +\pgfkeys { + /dimline/.cd, + execute style/.style = {#1}, + execute macro/.style = {/dimline/execute style/.expand once=#1}, +} + + +\newdimen\dimline@arrow@linewidth + +\pgfarrowsdeclare{dimline}{dimline} +{ + \arrowsize=1\pgflinewidth + \pgfarrowsleftextend{0\arrowsize} + \pgfarrowsrightextend{5\arrowsize} +} { + \arrowsize=1\pgflinewidth + \pgfsetdash{}{0pt} % do not dash + % | + \pgfsetlinewidth{.5\arrowsize} + \pgfpathmoveto{\pgfpoint{4.75\arrowsize}{3\arrowsize}} + \pgfpathlineto{\pgfpoint{4.75\arrowsize}{-3\arrowsize}} + \pgfusepathqstroke + % > + \pgfsetlinewidth{0.01pt} + \pgfpathmoveto{\pgfpoint{4.5\arrowsize}{0pt}} + \pgfpathlineto{\pgfpoint{-3\arrowsize}{2\arrowsize}} + \pgfpathlineto{\pgfpoint{-3\arrowsize}{-2\arrowsize}} + \pgfpathclose + \pgfusepathqfillstroke +} + + +\pgfarrowsdeclare{dimline reverse}{dimline reverse} +{ + \arrowsize=1\pgflinewidth + \pgfarrowsleftextend{-5\arrowsize} + \pgfarrowsrightextend{0\arrowsize} +} { + \arrowsize=1\pgflinewidth + \pgfsetdash{}{0pt} % do not dash + % | + \pgfsetlinewidth{0.5\arrowsize} + \pgfpathmoveto{\pgfpoint{-0.25\arrowsize}{3\arrowsize}} + \pgfpathlineto{\pgfpoint{-0.25\arrowsize}{-3\arrowsize}} + \pgfusepathqstroke + % > + \pgfsetlinewidth{0.01pt} + \pgfpathmoveto{\pgfpoint{0pt}{0pt}} + \pgfpathlineto{\pgfpoint{7.5\arrowsize}{2\arrowsize}} + \pgfpathlineto{\pgfpoint{7.5\arrowsize}{-2\arrowsize}} + \pgfpathclose + \pgfusepathqfillstroke +} + + +% measure lenght +% http://tex.stackexchange.com/questions/123913 + + +\newcommand{\dimline@do@nothing}[1]{#1}% +% http://tex.stackexchange.com/questions/58283/tikz-how-to-determine-the-vector-between-two-co-ordinates + + +% #1: optional keys parameters +% #2: start point +% #3: end point +% #4: text +\newcommand{\dimline}[4][]{% + + \pgfplotsifinaxis{% + \let\dimline@internal\pgfplotsextra% + }{% + \let\dimline@internal\dimline@do@nothing% + }% + + \dimline@internal{ + \pgfkeys{ + dimline/.is family, + dimline, + color/.initial = black, + extension start length/.initial=1cm, + extension end length/.initial=1cm, + extension start angle/.initial=-90, + extension end angle/.initial=90, + line style/.initial = {}, + label style/.initial = {}, + extension style/.initial = {}, + extension start style/.initial = {}, + extension start path/.initial = {}, + extension end style/.initial = {}, + extension end path/.initial = {}, + #1, + line style/.get = \dimline@line@style, + label style/.get = \dimline@label@style, + extension style/.get = \dimline@extension@style, + extension start style/.get = \dimline@extension@start@style, + extension start path/.get = \dimline@extension@start@path, + extension end style/.get = \dimline@extension@end@style, + extension end path/.get = \dimline@extension@end@path, + } + + \begin{scope} [ + line/.style = { + color=\pgfkeysvalueof{/dimline/color}, + arrows=dimline-dimline, + /dimline/execute macro = \dimline@line@style, + }, + extension/.style = { + color=\pgfkeysvalueof{/dimline/color}!40, line width=0.01, + /dimline/execute macro = \dimline@extension@style, + }, + extension start/.style = { + extension, + /dimline/execute macro = \dimline@extension@start@style + }, + extension end/.style = { + extension, + /dimline/execute macro = \dimline@extension@end@style, + }, + label/.style = { + fill=white, align=center, sloped=true, pos=0.5, + /dimline/execute macro = \dimline@label@style + }, + ] + + \coordinate (a) at #2 {}; + \coordinate (b) at #3 {}; + + \ifthenelse{\equal{\dimline@extension@start@path}{}}{ + \coordinate (a to b) at ($(a)!\pgfkeysvalueof{/dimline/extension start length}!\pgfkeysvalueof{/dimline/extension start angle}:(b)$); + \draw [extension start] (a.center) -- (a to b); + } { + \draw [extension start] plot coordinates {\dimline@extension@start@path}; + } + + \ifthenelse{\equal{\dimline@extension@end@path}{}}{ + \coordinate (b to a) at ($(b)!\pgfkeysvalueof{/dimline/extension end length}!\pgfkeysvalueof{/dimline/extension end angle}:(a)$); + \draw [extension end] (b.center) -- (b to a); + } { + \draw [extension end] plot coordinates {\dimline@extension@end@path}; + } + + \draw[line] (a.center) -- (b.center) node[label] {#4}; + \end{scope} + } +} + + + +\@ifclassloaded{beamer}{% + \renewcommand<>{\dimline}[4][]{\only#5{\beameroriginal{\dimline}[#1]{#2}{#3}{#4}}} +} +\makeatother + + +\endinput +%% tikz-dimline.sty ends here. +