From 3b4a242af88203c2f3f551d46161bdd037c0d127 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 3 Apr 2023 03:04:19 +0000 Subject: CTAN sync 202304030304 --- graphics/emo/README.md | 60 ++- graphics/emo/config/emo.py | 305 ++++++++++--- graphics/emo/emo-graphics/YHWH.pdf | Bin 2244 -> 0 bytes graphics/emo/emo-graphics/balance-scale.pdf | Bin 3499 -> 0 bytes graphics/emo/emo-graphics/biohazard.pdf | Bin 4271 -> 0 bytes graphics/emo/emo-graphics/busts.pdf | Bin 1935 -> 0 bytes graphics/emo/emo-graphics/check-mark.pdf | 71 --- graphics/emo/emo-graphics/classical-building.pdf | Bin 2758 -> 0 bytes graphics/emo/emo-graphics/currency-exchange.pdf | Bin 3410 -> 0 bytes graphics/emo/emo-graphics/desert-island.pdf | Bin 4431 -> 0 bytes graphics/emo/emo-graphics/detective.pdf | Bin 20689 -> 0 bytes graphics/emo/emo-graphics/emo-YHWH.pdf | Bin 0 -> 2244 bytes graphics/emo/emo-graphics/emo-balance-scale.pdf | Bin 0 -> 3499 bytes graphics/emo/emo-graphics/emo-biohazard.pdf | Bin 0 -> 4271 bytes graphics/emo/emo-graphics/emo-busts.pdf | Bin 0 -> 1935 bytes graphics/emo/emo-graphics/emo-check-mark.pdf | 71 +++ .../emo/emo-graphics/emo-classical-building.pdf | Bin 0 -> 2758 bytes graphics/emo/emo-graphics/emo-collision.pdf | Bin 0 -> 1590 bytes .../emo/emo-graphics/emo-currency-exchange.pdf | Bin 0 -> 3410 bytes graphics/emo/emo-graphics/emo-desert-island.pdf | Bin 0 -> 4431 bytes graphics/emo/emo-graphics/emo-detective.pdf | Bin 0 -> 20689 bytes graphics/emo/emo-graphics/emo-enraged-face.pdf | Bin 0 -> 3283 bytes graphics/emo/emo-graphics/emo-eu.pdf | Bin 0 -> 2019 bytes graphics/emo/emo-graphics/emo-exploding-head.pdf | Bin 0 -> 6550 bytes graphics/emo/emo-graphics/emo-eye.pdf | Bin 0 -> 1765 bytes graphics/emo/emo-graphics/emo-floppy-disk.pdf | 36 ++ graphics/emo/emo-graphics/emo-foggy.pdf | 455 +++++++++++++++++++ .../emo/emo-graphics/emo-globe-africa-europe.pdf | Bin 0 -> 12291 bytes graphics/emo/emo-graphics/emo-handshake.pdf | Bin 0 -> 3868 bytes graphics/emo/emo-graphics/emo-judge.pdf | Bin 0 -> 35445 bytes graphics/emo/emo-graphics/emo-keycap-one.pdf | Bin 0 -> 1808 bytes graphics/emo/emo-graphics/emo-label.pdf | Bin 0 -> 2765 bytes graphics/emo/emo-graphics/emo-lingchi.pdf | Bin 0 -> 3096 bytes graphics/emo/emo-graphics/emo-loupe-left.pdf | Bin 0 -> 5415 bytes graphics/emo/emo-graphics/emo-pager.pdf | Bin 0 -> 12525 bytes graphics/emo/emo-graphics/emo-parrot.pdf | Bin 0 -> 3218 bytes graphics/emo/emo-graphics/emo-rainbow-flag.pdf | Bin 0 -> 12941 bytes graphics/emo/emo-graphics/emo-receipt.pdf | Bin 0 -> 1763 bytes graphics/emo/emo-graphics/emo-robot.pdf | Bin 0 -> 6546 bytes graphics/emo/emo-graphics/emo-roll-of-paper.pdf | Bin 0 -> 2086 bytes graphics/emo/emo-graphics/emo-stadium.pdf | Bin 0 -> 4317 bytes graphics/emo/emo-graphics/emo-stop-sign.pdf | Bin 0 -> 1454 bytes graphics/emo/emo-graphics/emo-triangular-ruler.pdf | Bin 0 -> 13238 bytes graphics/emo/emo-graphics/emo-wastebasket.pdf | Bin 0 -> 4292 bytes graphics/emo/emo-graphics/enraged-face.pdf | Bin 3283 -> 0 bytes graphics/emo/emo-graphics/eu.pdf | Bin 2019 -> 0 bytes graphics/emo/emo-graphics/eye.pdf | Bin 1765 -> 0 bytes graphics/emo/emo-graphics/floppy-disk.pdf | 36 -- graphics/emo/emo-graphics/foggy.pdf | 455 ------------------- graphics/emo/emo-graphics/globe-africa-europe.pdf | Bin 12291 -> 0 bytes graphics/emo/emo-graphics/handshake.pdf | Bin 3868 -> 0 bytes graphics/emo/emo-graphics/judge.pdf | Bin 35445 -> 0 bytes graphics/emo/emo-graphics/keycap-one.pdf | Bin 1808 -> 0 bytes graphics/emo/emo-graphics/label.pdf | Bin 2765 -> 0 bytes graphics/emo/emo-graphics/lingchi.pdf | Bin 3096 -> 0 bytes graphics/emo/emo-graphics/loupe-left.pdf | Bin 5415 -> 0 bytes graphics/emo/emo-graphics/pager.pdf | Bin 12525 -> 0 bytes graphics/emo/emo-graphics/parrot.pdf | Bin 3218 -> 0 bytes graphics/emo/emo-graphics/rainbow-flag.pdf | Bin 12941 -> 0 bytes graphics/emo/emo-graphics/receipt.pdf | Bin 1763 -> 0 bytes graphics/emo/emo-graphics/robot.pdf | Bin 6546 -> 0 bytes graphics/emo/emo-graphics/roll-of-paper.pdf | Bin 2086 -> 0 bytes graphics/emo/emo-graphics/stadium.pdf | Bin 4317 -> 0 bytes graphics/emo/emo-graphics/stop-sign.pdf | Bin 1454 -> 0 bytes graphics/emo/emo-graphics/triangular-ruler.pdf | Bin 13238 -> 0 bytes graphics/emo/emo-graphics/wastebasket.pdf | Bin 4292 -> 0 bytes graphics/emo/emo-lingchi.ttf | Bin 0 -> 2312 bytes graphics/emo/emo.def | 3 + graphics/emo/emo.dtx | 502 +++++++++++++-------- graphics/emo/emo.pdf | Bin 201775 -> 212523 bytes graphics/emo/lingchi.otf | Bin 2716 -> 0 bytes .../tikz-ext-manual-en-library-calendar-plus.tex | 10 +- .../doc/tikz-ext-manual-en-library-misc.tex | 2 +- .../doc/tikz-ext-manual-en-library-nodes.tex | 15 +- ...tikz-ext-manual-en-library-positioning-plus.tex | 4 +- .../tikz-ext/doc/tikz-ext-manual-en-main-body.tex | 13 +- .../doc/tikz-ext-manual-en-main-preamble.tex | 65 ++- .../tikz-ext/doc/tikz-ext-manual-en-pgf-arrows.tex | 268 +++++++++++ .../tikz-ext-manual-en-pgf-shapes-circlearrow.tex | 6 +- .../tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex | 4 +- .../pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib | 103 +++++ .../pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf | Bin 649739 -> 676321 bytes .../pgfkeyslibraryext.pgfkeys-plus.code.tex | 2 +- .../tex/generic/pgflibraryext.arrows.code.tex | 288 ++++++++++++ .../generic/pgflibraryext.pgfkeys-plus.code.tex | 11 - .../tex/generic/tikzlibraryext.misc.code.tex | 2 +- graphics/pstricks/contrib/pst-hsb/Changes | 5 +- graphics/pstricks/contrib/pst-hsb/README | 7 +- .../pstricks/contrib/pst-hsb/doc/pst-hsb-doc.pdf | Bin 200014 -> 225159 bytes .../pstricks/contrib/pst-hsb/doc/pst-hsb-doc.tex | 28 +- .../pstricks/contrib/pst-hsb/latex/pst-hsb.sty | 2 +- graphics/pstricks/contrib/pst-hsb/tex/pst-hsb.tex | 94 +++- 92 files changed, 2021 insertions(+), 902 deletions(-) delete mode 100644 graphics/emo/emo-graphics/YHWH.pdf delete mode 100644 graphics/emo/emo-graphics/balance-scale.pdf delete mode 100644 graphics/emo/emo-graphics/biohazard.pdf delete mode 100644 graphics/emo/emo-graphics/busts.pdf delete mode 100644 graphics/emo/emo-graphics/check-mark.pdf delete mode 100644 graphics/emo/emo-graphics/classical-building.pdf delete mode 100644 graphics/emo/emo-graphics/currency-exchange.pdf delete mode 100644 graphics/emo/emo-graphics/desert-island.pdf delete mode 100644 graphics/emo/emo-graphics/detective.pdf create mode 100644 graphics/emo/emo-graphics/emo-YHWH.pdf create mode 100644 graphics/emo/emo-graphics/emo-balance-scale.pdf create mode 100644 graphics/emo/emo-graphics/emo-biohazard.pdf create mode 100644 graphics/emo/emo-graphics/emo-busts.pdf create mode 100644 graphics/emo/emo-graphics/emo-check-mark.pdf create mode 100644 graphics/emo/emo-graphics/emo-classical-building.pdf create mode 100644 graphics/emo/emo-graphics/emo-collision.pdf create mode 100644 graphics/emo/emo-graphics/emo-currency-exchange.pdf create mode 100644 graphics/emo/emo-graphics/emo-desert-island.pdf create mode 100644 graphics/emo/emo-graphics/emo-detective.pdf create mode 100644 graphics/emo/emo-graphics/emo-enraged-face.pdf create mode 100644 graphics/emo/emo-graphics/emo-eu.pdf create mode 100644 graphics/emo/emo-graphics/emo-exploding-head.pdf create mode 100644 graphics/emo/emo-graphics/emo-eye.pdf create mode 100644 graphics/emo/emo-graphics/emo-floppy-disk.pdf create mode 100644 graphics/emo/emo-graphics/emo-foggy.pdf create mode 100644 graphics/emo/emo-graphics/emo-globe-africa-europe.pdf create mode 100644 graphics/emo/emo-graphics/emo-handshake.pdf create mode 100644 graphics/emo/emo-graphics/emo-judge.pdf create mode 100644 graphics/emo/emo-graphics/emo-keycap-one.pdf create mode 100644 graphics/emo/emo-graphics/emo-label.pdf create mode 100644 graphics/emo/emo-graphics/emo-lingchi.pdf create mode 100644 graphics/emo/emo-graphics/emo-loupe-left.pdf create mode 100644 graphics/emo/emo-graphics/emo-pager.pdf create mode 100644 graphics/emo/emo-graphics/emo-parrot.pdf create mode 100644 graphics/emo/emo-graphics/emo-rainbow-flag.pdf create mode 100644 graphics/emo/emo-graphics/emo-receipt.pdf create mode 100644 graphics/emo/emo-graphics/emo-robot.pdf create mode 100644 graphics/emo/emo-graphics/emo-roll-of-paper.pdf create mode 100644 graphics/emo/emo-graphics/emo-stadium.pdf create mode 100644 graphics/emo/emo-graphics/emo-stop-sign.pdf create mode 100644 graphics/emo/emo-graphics/emo-triangular-ruler.pdf create mode 100644 graphics/emo/emo-graphics/emo-wastebasket.pdf delete mode 100644 graphics/emo/emo-graphics/enraged-face.pdf delete mode 100644 graphics/emo/emo-graphics/eu.pdf delete mode 100644 graphics/emo/emo-graphics/eye.pdf delete mode 100644 graphics/emo/emo-graphics/floppy-disk.pdf delete mode 100644 graphics/emo/emo-graphics/foggy.pdf delete mode 100644 graphics/emo/emo-graphics/globe-africa-europe.pdf delete mode 100644 graphics/emo/emo-graphics/handshake.pdf delete mode 100644 graphics/emo/emo-graphics/judge.pdf delete mode 100644 graphics/emo/emo-graphics/keycap-one.pdf delete mode 100644 graphics/emo/emo-graphics/label.pdf delete mode 100644 graphics/emo/emo-graphics/lingchi.pdf delete mode 100644 graphics/emo/emo-graphics/loupe-left.pdf delete mode 100644 graphics/emo/emo-graphics/pager.pdf delete mode 100644 graphics/emo/emo-graphics/parrot.pdf delete mode 100644 graphics/emo/emo-graphics/rainbow-flag.pdf delete mode 100644 graphics/emo/emo-graphics/receipt.pdf delete mode 100644 graphics/emo/emo-graphics/robot.pdf delete mode 100644 graphics/emo/emo-graphics/roll-of-paper.pdf delete mode 100644 graphics/emo/emo-graphics/stadium.pdf delete mode 100644 graphics/emo/emo-graphics/stop-sign.pdf delete mode 100644 graphics/emo/emo-graphics/triangular-ruler.pdf delete mode 100644 graphics/emo/emo-graphics/wastebasket.pdf create mode 100644 graphics/emo/emo-lingchi.ttf delete mode 100644 graphics/emo/lingchi.otf create mode 100644 graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-arrows.tex create mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.arrows.code.tex delete mode 100644 graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.pgfkeys-plus.code.tex (limited to 'graphics') diff --git a/graphics/emo/README.md b/graphics/emo/README.md index 34a7541a3a..a7c65083c8 100644 --- a/graphics/emo/README.md +++ b/graphics/emo/README.md @@ -1,42 +1,56 @@ -# Emo: emoji for all (LaTeX engines) +# emo•ji for all (LaTeX engines) This package defines the `\emo{}` macro for including color emoji in -a document no matter the input encoding or LaTeX engine. It uses the Noto color -emoji font if the engine supports doing so and falls back onto PDF graphics -otherwise. I wrote this package to use emoji in an academic paper subject to -[The ACM Publishing -System](https://authors.acm.org/proceedings/production-information/accepted-latex-packages), -which prohibits the use of most LaTeX packages but has only minimal support for -non-Latin scripts. 🎉 +a document no matter the LaTeX engine. It uses the Noto color emoji font if the +engine supports doing so and falls back onto PDF graphics otherwise. In either +case, `\emo{desert-island}` results in 🏝 and `\emo{parrot}` results in 🦜. Emo +may come in particularly handy when dealing with academic publishers that +provide only minimal support for non-Latin scripts (cough, +[ACM](https://www.acm.org), cough). + +Emo's source repository is . It also is +available [through CTAN](https://ctan.org/pkg/emo). Emo supports conversion +to HTML [with LaTeXML](https://github.com/brucemiller/LaTeXML). + +## Package Options When emo is used with the `extra` option, this package also defines the `\lingchi` and `\YHWH` macros for 凌遲 and יהוה, respectively. Both macros -preserve a subsequent space as space, no backslash needed. When used with the -`index` option, this package also emits a raw index entry for each use of an -emoji into an emo index or `.edx` file. +preserve a subsequent space as space, no backslash needed. + +When used with the `index` option, this package also emits a raw index entry for +each use of an emoji into an emo index or `.edx` file. + +## Installation + +To **extract files** embedded in [emo.dtx](emo.dtx), run `pdftex emo.dtx`. Note +that plain old `tex` won't do, since it mangles this README. `pdflatex` works, +but also generates the package documentation. The embedded files are `build.sh`, +`emo.ins`, `emo.sty`, `emo.sty.ltxml`, and `README.md`. -To **extract files** embedded in [emo.dtx](emo.dtx) and also rebuild the -[documentation](emo.pdf), run `pdflatex emo.dtx`. +To **build the documentation** embedded in `emo.dtx`, run `source build.sh`. The +shell script invokes `pdflatex emo.dtx` thrice and `makeindex` once each for the +change and the symbol indices, resulting in [emo.pdf](emo.pdf). To **configure the emoji**, run `python3 config/emo.py` with appropriate arguments. The [package documentation](emo.pdf) explains the configuration tool in detail, but you may find the `-h` for help option sufficient to get started. -To **install this package**, place `emo.def`, `emo.sty`, `lingchi.otf`, and the -contents of the `emo-graphics` directory somewhere where LaTeX can find them. In -a pinch, your project directory will do just fine. +To **install this package**, place `emo.def`, `emo.sty`, `emo.sty.ltxml`, +`emo-lingchi.ttf`, and the `emo-graphics` directory with the fallback PDF files +somewhere where LaTeX can find them. In a pinch, your project directory will do. ## Supported Emoji By default, emo supports only a few emoji: -1️⃣ ☣️ ⚖️ ✔️ 🇪🇺 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️‍🌈 🏷️ 👁️ 👥 💱 💾 📐 📟 🔍 🕵️ 🗑️ 😡 🛑 🤖 🤝 🦜 🧑‍⚖️ 🧻 🧾 +1️⃣ ☣️ ⚖️ ✔️ 🇪🇺 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️‍🌈 🏷️ 👁️ 👥 💥 💱 💾 📐 📟 🔍 🕵️ 🗑️ 😡 🛑 🤖 🤝 🤯 🦜 🧑‍⚖️ 🧻 🧾 Their names are keycap-one, biohazard, balance-scale, check-mark, eu, foggy, globe-africa-europe, classical-building, desert-island, stadium, rainbow-flag, -label, eye, busts, currency-exchange, floppy-disk, triangular-ruler, pager, -loupe-left, detective, wastebasket, enraged-face, stop-sign, robot, handshake, -parrot, judge, roll-of-paper, and receipt. +label, eye, busts, collision, currency-exchange, floppy-disk, triangular-ruler, +pager, loupe-left, detective, wastebasket, enraged-face, stop-sign, robot, +handshake, exploding-head, parrot, judge, roll-of-paper, and receipt. The [package's documentation](emo.pdf) explains the underlying naming scheme and also how to reconfigure which emoji are supported. The [emo.py](config/emo.py) @@ -45,8 +59,8 @@ into PDF files and generating an updated `emo.def` file. ## Copyright and Licensing -This package combines code written in LaTeX and Python with Unicode data about -emoji as well as graphics and fonts derived from Google's Noto fonts. As a +This package combines code written in LaTeX, Python, and Perl with Unicode data +about emoji as well as graphics and fonts derived from Google's Noto fonts. As a result, a number of different licenses apply, all of which are [OSI approved](https://opensource.org/licenses/) and non-copyleft: @@ -59,7 +73,7 @@ approved](https://opensource.org/licenses/) and non-copyleft: * The [emoji-test.txt](config/emoji-test.txt) configuration file is a data file from [Unicode TR-51](https://unicode.org/reports/tr51/) and hence subject to the [Unicode License](https://www.unicode.org/license.txt). - * The `lingchi.otf` font is a two-glyph subset of the serif traditional + * The `emo-lingchi.ttf` font is a two-glyph subset of the serif traditional Chinese version of Google's [Noto fonts](https://github.com/notofonts/noto-cjk) and hence subject to the [SIL Open Font License v1.1](https://scripts.sil.org/ofl). diff --git a/graphics/emo/config/emo.py b/graphics/emo/config/emo.py index 70fad3bc65..7d45b98307 100755 --- a/graphics/emo/config/emo.py +++ b/graphics/emo/config/emo.py @@ -13,8 +13,11 @@ if sys.version_info < (3,7): from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from dataclasses import dataclass, field +from datetime import datetime from enum import Enum +from itertools import chain import json +import os from pathlib import Path import re import shutil @@ -26,8 +29,9 @@ from typing import ( from urllib.request import urlopen # -------------------------------------------------------------------------------------- +# Provide a simple console logger -class Log: +class Logger: def __init__(self, out: TextIO = sys.stderr) -> None: self._out = out self._first_header = True @@ -59,10 +63,154 @@ class Log: def info(self, text: str) -> None: self.pln(self.sgr('1;34', f'INFO: {text}', '0;39')) -log = Log() +logger = Logger() # -------------------------------------------------------------------------------------- -# Emoji Names +# Build a self-contained `demo.html` + +STYLE_LINK = re.compile( + f'' +) + +def make_demo(): + # Write extra styles to file. + logger.info('Writing auxiliary style sheet "demo.css"') + with open('demo.css', mode='w', encoding='utf8') as file: + file.write(""" +:root { + font-size: 300%; +} + """) + + # Convert to HTML and read in result. + logger.info('Converting LaTeX source in "demo.tex" to HTML in "demo.tmp.html"') + subprocess.run([ + 'latexmlc', + '--css=demo.css', + '--destination=demo.tmp.html', + 'demo.tex'] + ) + with open('demo.tmp.html', mode='r', encoding='utf8') as file: + content = file.read() + + # Find all links to style sheets and replace them with CSS content. + style_sheets = [] + fragments = [] + + last_index = 0 + for link in STYLE_LINK.finditer(content): + fragments.append(content[last_index:link.start()]) + + style_sheet = link.group('sheet') + style_sheets.append(style_sheet) + + logger.info(f'Loading style sheet "{style_sheet}"') + with open(style_sheet, mode='r', encoding='utf8') as file: + css = file.read() + if not css.startswith('\n'): + css = f'\n{css}' + + fragments.append(f'') + last_index = link.end() + + fragments.append(content[last_index:]) + + # Write result and clean up. + logger.info(f'Writing self-contained HTML document "demo.html"') + with open('demo.html', mode='w', encoding='utf8') as file: + for fragment in fragments: + file.write(fragment) + + os.unlink('demo.tmp.html') + for style_sheet in style_sheets: + os.unlink(style_sheet) + +# -------------------------------------------------------------------------------------- +# Build an archive for release + +EMO_FILES = ( + 'emo.def', + 'emo.dtx', + 'emo.pdf', + 'emo-lingchi.ttf', + 'README.md', + 'config/emo.py', + 'config/emoji-test.txt' +) + +EMO_GRAPHICS = 'emo-graphics' + +EMO_METADATA = re.compile( + r""" + ^[ ]{4}\[ + (?P\d{4}/\d{1,2}/\d{1,2}) + [ ] + v(?P\d+\.\d+) + [ ] + (?P[^\]]+) + \] + """, + re.VERBOSE | re.MULTILINE +) + +def make_release() -> None: + # Determine repository root. + source = Path(__file__).parent.parent + + # Determine package metadata. + metadata = EMO_METADATA.search((source / 'emo.dtx').read_text(encoding='utf8')) + if metadata is None: + raise ValueError(f'Package metadata missing from "{source / "emo.dtx"}"') + + version = metadata.group('version') + logger.info(f'Preparing release {version} for "{source}"') + + # Make sure no archive exists. + archive = source / f'emo-{version}.zip' + if archive.exists(): + raise ValueError( + f'Archive file "{archive}" already exists, please move out of way.' + ) + + # Set up staging directory. + staging = source / 'emo' + if staging.exists(): + raise ValueError( + f'Staging directory "{staging}" already exists, please move out of way.' + ) + logger.info(f'Creating staging directory "{staging}"') + staging.mkdir() + + # Process all files belonging into release. + for path in chain(map(Path, EMO_FILES), source.glob('emo-graphics/emo-*.pdf')): + path = source / path + + # To stage a file in the repository root, just copy it. + if path.parent == source: + logger.info(f'Staging "{path.name}"') + shutil.copy(path, staging) + continue + + # To stage a file in a subdirectory, get relative path and, if necessary, + # recreate path in staging area. Then copy into that subdirectory. + nested_staging = staging / path.parent.relative_to(source) + if not nested_staging.exists(): + logger.info(f'Creating nested staging directory "{nested_staging}"') + nested_staging.mkdir(parents=True) + + logger.info(f'Staging "{path.relative_to(source)}"') + shutil.copy(path, nested_staging) + + # Create archive. + shutil.make_archive( + str(archive.with_suffix('')), + 'zip', + root_dir=staging.parent, + base_dir=staging.name, + ) + +# -------------------------------------------------------------------------------------- +# Normalize emoji names PUNCTUATION = re.compile(r"""["'’“”&!(),:]""") SEPARATORS = re.compile(r'[ _\-]+') @@ -135,7 +283,7 @@ def to_name(value: str) -> str: # -------------------------------------------------------------------------------------- -# Emoji Codepoints +# Handle emoji codepoints def to_codepoint(cp: Union[int, str]) -> int: if isinstance(cp, int): @@ -161,7 +309,7 @@ def regional_indicator_to_letter(cp: int) -> str: # -------------------------------------------------------------------------------------- -# Emoji Groups +# Normalize emoji group and subgroup names AMPERSAND = re.compile('[ ]*&[ ]*') @@ -198,7 +346,7 @@ def split_subgroup_selector(identifier: str) -> List[str]: # -------------------------------------------------------------------------------------- -# Emoji Status +# Define emoji status class Status(str, Enum): COMPONENT = 'component' @@ -208,7 +356,7 @@ class Status(str, Enum): # -------------------------------------------------------------------------------------- -# Emoji Descriptor +# Define emoji descriptor @dataclass(frozen=True, order=True) class Emoji: @@ -291,6 +439,10 @@ class Emoji: return f'third_party/regional-flags/svg/{self.svg_file}' return f'svg/{self.svg_file}' + @property + def pdf_file(self) -> str: + return f'emo-{self.name}.pdf' + @property def latex_table_entry(self) -> str: if self.has_compound_name: @@ -302,7 +454,7 @@ class Emoji: # -------------------------------------------------------------------------------------- -# Parser for Unicode TR-51's 'emoji-test.txt' File +# Parse Unicode TR-51's `emoji-test.txt` NameTable = Mapping[str, Emoji] CodepointTable = Mapping[Tuple[int, ...], Emoji] @@ -478,7 +630,7 @@ class RegistryParser: # -------------------------------------------------------------------------------------- -# Emoji Registry +# Maintain emoji registry class Registry: def __init__( @@ -589,7 +741,7 @@ class Registry: # -------------------------------------------------------------------------------------- -# Noto Emoji Sources +# Download Noto emoji sources NOTO_REPOSITORY = 'https://github.com/googlefonts/noto-emoji/archive/refs/heads/main.zip' @@ -620,26 +772,26 @@ def is_valid_noto_emoji(noto_path: Path) -> bool: def ensure_local_noto_emoji(noto_path: Path, verbose: bool = False) -> None: if is_valid_noto_emoji(noto_path): if verbose: - log.info(f'Seemingly valid Noto emoji sources at "{noto_path}"') + logger.info(f'Seemingly valid Noto emoji sources at "{noto_path}"') return noto_zip = noto_path.with_name('noto-emoji.zip') if not noto_zip.exists(): if verbose: - log.info(f'Downloading Noto emoji sources from "{NOTO_REPOSITORY}"') + logger.info(f'Downloading Noto emoji sources from "{NOTO_REPOSITORY}"') with urlopen(NOTO_REPOSITORY) as response, open(noto_zip, mode='wb') as file: shutil.copyfileobj(response, file) # With archive representing main branch, it is unpacked into # noto-emoji-main. We fix that after unpacking. if verbose: - log.info(f'Unpacking Noto emoji sources into "{noto_path}"') + logger.info(f'Unpacking Noto emoji sources into "{noto_path}"') shutil.unpack_archive(noto_zip, noto_path.parent, 'zip') noto_path.with_name('noto-emoji-main').rename(noto_path) # -------------------------------------------------------------------------------------- -# SVG to PDF Conversion +# Convert SVG to PDF def remove_page_group_object(document: dict) -> Optional[dict]: """Remove the /Page /Group object from the document in qpdf's JSON format.""" @@ -733,18 +885,19 @@ class Converter: def __call__(self, emoji: 'Emoji', verbose: bool = False) -> Path: source = self.source_dir / emoji.svg_path - target = self.target_dir / f'{emoji.name}.pdf' + target = self.target_dir / emoji.pdf_file if not target.exists(): if verbose: - log.info(f'Converting "{source}" to "{target}"') + logger.info(f'Converting "{source}" to "{target}"') convert_svg_to_pdf(self.rsvg_convert, source, target) if verbose: - log.info(f'Fixing /Page /Group in "{target}"') + logger.info(f'Fixing /Page /Group in "{target}"') fix_pdf(self.qpdf, target) return target # -------------------------------------------------------------------------------------- +# Provide tool help and command line options DESCRIPTION = """ Generate emoji table and PDF files for the given selectors. A selector may be a @@ -761,32 +914,11 @@ but included in the emoji table. def resolved_path(path: str) -> Path: return Path(path).resolve() - def create_parser() -> ArgumentParser: parser = ArgumentParser( description=DESCRIPTION, formatter_class=ArgumentDefaultsHelpFormatter, ) - parser.add_argument( - '--show-group-names', - action='store_true', - help='show supported group, subgroup names and exit', - ) - parser.add_argument( - '--show-emoji-names', - action='store_true', - help='show supported emoji names and exit', - ) - parser.add_argument( - '--show-special-names', - action='store_true', - help='show map from (simplified) Unicode names to emoji names and exit' - ) - parser.add_argument( - '--show-names', - action='store_true', - help='show group, emoji, as well as special names and exit' - ) parser.add_argument( '--dry-run', action='store_true', @@ -825,6 +957,39 @@ def create_parser() -> ArgumentParser: metavar='PATH', help='use path for file with LaTeX emoji table', ) + + group = parser.add_mutually_exclusive_group() + group.add_argument( + '--show-group-names', + action='store_true', + help='show supported group, subgroup names and exit', + ) + group.add_argument( + '--show-emoji-names', + action='store_true', + help='show supported emoji names and exit', + ) + group.add_argument( + '--show-special-names', + action='store_true', + help='show map from (simplified) Unicode names to emoji names and exit' + ) + group.add_argument( + '--show-names', + action='store_true', + help='show group, emoji, as well as special names and exit' + ) + group.add_argument( + '--make-demo', + action='store_true', + help='make the demo document and exit', + ) + group.add_argument( + '-r', '--make-release', + action='store_true', + help='make a release and exit', + ) + parser.add_argument( 'selectors', nargs='*', @@ -832,31 +997,36 @@ def create_parser() -> ArgumentParser: ) return parser +# -------------------------------------------------------------------------------------- +# Show group, emoji, and special names + def show_names(registry: Registry, options: Any) -> bool: showed_something = False if options.show_group_names or options.show_names: - log.header('Supported groups and subgroups:') + logger.header('Supported groups and subgroups:') for group in registry.group_names(): for subgroup in registry.subgroup_names(group): - log.detail(f'{group}::{subgroup}') + logger.detail(f'{group}::{subgroup}') showed_something = True if options.show_emoji_names or options.show_names: - log.header('Supported emoji names:') + logger.header('Supported emoji names:') names = list(registry.emoji_names()) names.sort() for name in names: - log.detail(f'{name}') + logger.detail(f'{name}') showed_something = True if options.show_special_names or options.show_names: - log.header('Map from (simplified) Unicode to (special) emoji names:') + logger.header('Map from (simplified) Unicode to (special) emoji names:') for unicode, selector in RENAMING.items(): - log.detail(f'{unicode:40s} ▶ {selector}') + logger.detail(f'{unicode:40s} ▶ {selector}') showed_something = True return showed_something +# -------------------------------------------------------------------------------------- +# Create emoji inventory -SPECIAL_FILES = ('lingchi.pdf', 'YHWH.pdf') +SPECIAL_FILES = ('emo-lingchi.pdf', 'emo-YHWH.pdf') def create_inventory(registry: Registry, options: Any) -> List[Emoji]: inventory: List[Emoji] = [] @@ -864,20 +1034,22 @@ def create_inventory(registry: Registry, options: Any) -> List[Emoji]: if options.graphics.exists() and options.graphics.is_dir(): for entry in options.graphics.iterdir(): if ( - not entry.is_file() or - entry.suffix != '.pdf' or - entry.name in SPECIAL_FILES + not entry.is_file() + or not entry.match('emo-*.pdf') + or entry.name in SPECIAL_FILES ): continue - emoji = registry.lookup(entry.stem) + emoji = registry.lookup(entry.stem[4:]) if emoji is not None: inventory.append(emoji) elif options.verbose: - log.warning(f'"{entry.name}" is not an emoji') + logger.warning(f'"{entry.name}" does not depict an emoji') return inventory +# -------------------------------------------------------------------------------------- +# Write emoji table def write_emoji_table( requested_emoji: List[Emoji], existing_emoji: List[Emoji], options: Any @@ -888,6 +1060,8 @@ def write_emoji_table( tmp_table = options.latex_table.with_suffix('.latest.def') if not options.dry_run: with open(tmp_table, mode='w', encoding='utf8') as file: + today = datetime.today().strftime('%Y-%m-%d') + file.write(f'\\ProvidesFile{{emo.def}}[{today}]\n') for emoji in all_emoji: file.write(emoji.latex_table_entry) file.write('\n') @@ -895,14 +1069,29 @@ def write_emoji_table( return all_emoji +# -------------------------------------------------------------------------------------- +# Run this script def main() -> None: - options = create_parser().parse_args() - registry = Registry.from_file(options.registry) - if show_names(registry, options): - return - try: + # Parse command line options. + options = create_parser().parse_args() + + # Create release. + if (options.make_release or options.make_demo) and options.dry_run: + raise ValueError('Unable to dry run selected build function') + elif options.make_release: + make_release() + return + elif options.make_demo: + make_demo() + return + + # Populate registry, maybe list names. + registry = Registry.from_file(options.registry) + if show_names(registry, options): + return + # Determine requested emoji. requested_emoji = registry.select(*options.selectors) @@ -914,7 +1103,7 @@ def main() -> None: # Create inventory of existing emoji. existing_emoji = create_inventory(registry, options) - # Noto emoji. + # Download Noto emoji sources if they haven't been before. if not options.dry_run: ensure_local_noto_emoji(options.noto_emoji, options.verbose) @@ -927,10 +1116,10 @@ def main() -> None: all_emoji = write_emoji_table(requested_emoji, existing_emoji, options) if options.verbose: - log.info('Supported emoji: ' + ' '.join(e.display for e in all_emoji)) + logger.info('Supported emoji: ' + ' '.join(e.display for e in all_emoji)) except Exception as x: - log.error(str(x)) + logger.error(str(x)) if __name__ == '__main__': diff --git a/graphics/emo/emo-graphics/YHWH.pdf b/graphics/emo/emo-graphics/YHWH.pdf deleted file mode 100644 index cfa72b4865..0000000000 Binary files a/graphics/emo/emo-graphics/YHWH.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/balance-scale.pdf b/graphics/emo/emo-graphics/balance-scale.pdf deleted file mode 100644 index 612cfc69a2..0000000000 Binary files a/graphics/emo/emo-graphics/balance-scale.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/biohazard.pdf b/graphics/emo/emo-graphics/biohazard.pdf deleted file mode 100644 index e994c0a97c..0000000000 Binary files a/graphics/emo/emo-graphics/biohazard.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/busts.pdf b/graphics/emo/emo-graphics/busts.pdf deleted file mode 100644 index a6aced9f0e..0000000000 Binary files a/graphics/emo/emo-graphics/busts.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/check-mark.pdf b/graphics/emo/emo-graphics/check-mark.pdf deleted file mode 100644 index eb2e3dd30e..0000000000 --- a/graphics/emo/emo-graphics/check-mark.pdf +++ /dev/null @@ -1,71 +0,0 @@ -%PDF-1.5 -% -1 0 obj -<< /Pages 3 0 R /Type /Catalog >> -endobj -2 0 obj -<< /CreationDate (D:20230118223322-05'00) /Producer (cairo 1.16.0 \(https://cairographics.org\)) >> -endobj -3 0 obj -<< /Count 1 /Kids [ 4 0 R ] /Type /Pages >> -endobj -4 0 obj -<< /Contents 5 0 R /MediaBox [ 0 0 96 96 ] /Parent 3 0 R /Resources 6 0 R /Type /Page >> -endobj -5 0 obj -<< /Filter /FlateDecode /Length 281 >> -stream -xeKNC1 EY7y7%T(V| .1& -DPByykp$b;jNeRTrjkTh,n+[*myd]VT -TNLUODsq$դ-7mۆZ7ȉSHT7b%h=n"EngMk4ԩMuUmg#ޞڛ;wo8S$fendstream -endobj -6 0 obj -<< /ExtGState << /a0 << /CA 1 /ca 1 >> /a1 << /CA 0.35 /ca 0.35 >> >> /XObject << /x6 7 0 R /x7 8 0 R /x8 9 0 R >> >> -endobj -7 0 obj -<< /BBox [ 0 0 96 96 ] /Filter /FlateDecode /Group << /CS /DeviceRGB /I true /S /Transparency /Type /Group >> /Resources 10 0 R /Subtype /Form /Type /XObject /Length 179 >> -stream -xem1 {O ##~ wI"h}D}A;na UQendstream -endobj -8 0 obj -<< /BBox [ 0 0 96 96 ] /Filter /FlateDecode /Group << /CS /DeviceRGB /I true /S /Transparency /Type /Group >> /Resources 11 0 R /Subtype /Form /Type /XObject /Length 118 >> -stream -x]A -B1 }N1'&RqTJV0Eǎù`]+*nXpWbo)ZjŲ;YFݑtNݾW'z)ufEN,Eendstream -endobj -9 0 obj -<< /BBox [ 0 0 96 96 ] /Filter /FlateDecode /Group << /CS /DeviceRGB /I true /S /Transparency /Type /Group >> /Resources 12 0 R /Subtype /Form /Type /XObject /Length 165 >> -stream -x]Mj1 D>Ŝ@cფ,* ^'{0y>En +bNY(*sXTL) q#STafNJ] --mm* eSF`\dMI- -b)lq}pUVօϞq4cendstream -endobj -10 0 obj -<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> -endobj -11 0 obj -<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> -endobj -12 0 obj -<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> -endobj -xref -0 13 -0000000000 65535 f -0000000015 00000 n -0000000064 00000 n -0000000179 00000 n -0000000238 00000 n -0000000342 00000 n -0000000694 00000 n -0000000827 00000 n -0000001211 00000 n -0000001534 00000 n -0000001904 00000 n -0000001965 00000 n -0000002026 00000 n -trailer << /Info 2 0 R /Root 1 0 R /Size 13 /ID [<7ef91409225e0e8ff664408ae0d23f75><7ef91409225e0e8ff664408ae0d23f75>] >> -startxref -2087 -%%EOF diff --git a/graphics/emo/emo-graphics/classical-building.pdf b/graphics/emo/emo-graphics/classical-building.pdf deleted file mode 100644 index d25e5679ab..0000000000 Binary files a/graphics/emo/emo-graphics/classical-building.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/currency-exchange.pdf b/graphics/emo/emo-graphics/currency-exchange.pdf deleted file mode 100644 index a01a8b42a7..0000000000 Binary files a/graphics/emo/emo-graphics/currency-exchange.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/desert-island.pdf b/graphics/emo/emo-graphics/desert-island.pdf deleted file mode 100644 index d1fb99c146..0000000000 Binary files a/graphics/emo/emo-graphics/desert-island.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/detective.pdf b/graphics/emo/emo-graphics/detective.pdf deleted file mode 100644 index 9a6eb934f9..0000000000 Binary files a/graphics/emo/emo-graphics/detective.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/emo-YHWH.pdf b/graphics/emo/emo-graphics/emo-YHWH.pdf new file mode 100644 index 0000000000..cfa72b4865 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-YHWH.pdf differ diff --git a/graphics/emo/emo-graphics/emo-balance-scale.pdf b/graphics/emo/emo-graphics/emo-balance-scale.pdf new file mode 100644 index 0000000000..612cfc69a2 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-balance-scale.pdf differ diff --git a/graphics/emo/emo-graphics/emo-biohazard.pdf b/graphics/emo/emo-graphics/emo-biohazard.pdf new file mode 100644 index 0000000000..e994c0a97c Binary files /dev/null and b/graphics/emo/emo-graphics/emo-biohazard.pdf differ diff --git a/graphics/emo/emo-graphics/emo-busts.pdf b/graphics/emo/emo-graphics/emo-busts.pdf new file mode 100644 index 0000000000..a6aced9f0e Binary files /dev/null and b/graphics/emo/emo-graphics/emo-busts.pdf differ diff --git a/graphics/emo/emo-graphics/emo-check-mark.pdf b/graphics/emo/emo-graphics/emo-check-mark.pdf new file mode 100644 index 0000000000..eb2e3dd30e --- /dev/null +++ b/graphics/emo/emo-graphics/emo-check-mark.pdf @@ -0,0 +1,71 @@ +%PDF-1.5 +% +1 0 obj +<< /Pages 3 0 R /Type /Catalog >> +endobj +2 0 obj +<< /CreationDate (D:20230118223322-05'00) /Producer (cairo 1.16.0 \(https://cairographics.org\)) >> +endobj +3 0 obj +<< /Count 1 /Kids [ 4 0 R ] /Type /Pages >> +endobj +4 0 obj +<< /Contents 5 0 R /MediaBox [ 0 0 96 96 ] /Parent 3 0 R /Resources 6 0 R /Type /Page >> +endobj +5 0 obj +<< /Filter /FlateDecode /Length 281 >> +stream +xeKNC1 EY7y7%T(V| .1& +DPByykp$b;jNeRTrjkTh,n+[*myd]VT +TNLUODsq$դ-7mۆZ7ȉSHT7b%h=n"EngMk4ԩMuUmg#ޞڛ;wo8S$fendstream +endobj +6 0 obj +<< /ExtGState << /a0 << /CA 1 /ca 1 >> /a1 << /CA 0.35 /ca 0.35 >> >> /XObject << /x6 7 0 R /x7 8 0 R /x8 9 0 R >> >> +endobj +7 0 obj +<< /BBox [ 0 0 96 96 ] /Filter /FlateDecode /Group << /CS /DeviceRGB /I true /S /Transparency /Type /Group >> /Resources 10 0 R /Subtype /Form /Type /XObject /Length 179 >> +stream +xem1 {O ##~ wI"h}D}A;na UQendstream +endobj +8 0 obj +<< /BBox [ 0 0 96 96 ] /Filter /FlateDecode /Group << /CS /DeviceRGB /I true /S /Transparency /Type /Group >> /Resources 11 0 R /Subtype /Form /Type /XObject /Length 118 >> +stream +x]A +B1 }N1'&RqTJV0Eǎù`]+*nXpWbo)ZjŲ;YFݑtNݾW'z)ufEN,Eendstream +endobj +9 0 obj +<< /BBox [ 0 0 96 96 ] /Filter /FlateDecode /Group << /CS /DeviceRGB /I true /S /Transparency /Type /Group >> /Resources 12 0 R /Subtype /Form /Type /XObject /Length 165 >> +stream +x]Mj1 D>Ŝ@cფ,* ^'{0y>En +bNY(*sXTL) q#STafNJ] +-mm* eSF`\dMI- +b)lq}pUVօϞq4cendstream +endobj +10 0 obj +<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> +endobj +11 0 obj +<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> +endobj +12 0 obj +<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> +endobj +xref +0 13 +0000000000 65535 f +0000000015 00000 n +0000000064 00000 n +0000000179 00000 n +0000000238 00000 n +0000000342 00000 n +0000000694 00000 n +0000000827 00000 n +0000001211 00000 n +0000001534 00000 n +0000001904 00000 n +0000001965 00000 n +0000002026 00000 n +trailer << /Info 2 0 R /Root 1 0 R /Size 13 /ID [<7ef91409225e0e8ff664408ae0d23f75><7ef91409225e0e8ff664408ae0d23f75>] >> +startxref +2087 +%%EOF diff --git a/graphics/emo/emo-graphics/emo-classical-building.pdf b/graphics/emo/emo-graphics/emo-classical-building.pdf new file mode 100644 index 0000000000..d25e5679ab Binary files /dev/null and b/graphics/emo/emo-graphics/emo-classical-building.pdf differ diff --git a/graphics/emo/emo-graphics/emo-collision.pdf b/graphics/emo/emo-graphics/emo-collision.pdf new file mode 100644 index 0000000000..5c2c036906 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-collision.pdf differ diff --git a/graphics/emo/emo-graphics/emo-currency-exchange.pdf b/graphics/emo/emo-graphics/emo-currency-exchange.pdf new file mode 100644 index 0000000000..a01a8b42a7 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-currency-exchange.pdf differ diff --git a/graphics/emo/emo-graphics/emo-desert-island.pdf b/graphics/emo/emo-graphics/emo-desert-island.pdf new file mode 100644 index 0000000000..d1fb99c146 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-desert-island.pdf differ diff --git a/graphics/emo/emo-graphics/emo-detective.pdf b/graphics/emo/emo-graphics/emo-detective.pdf new file mode 100644 index 0000000000..9a6eb934f9 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-detective.pdf differ diff --git a/graphics/emo/emo-graphics/emo-enraged-face.pdf b/graphics/emo/emo-graphics/emo-enraged-face.pdf new file mode 100644 index 0000000000..57a4ad3dd3 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-enraged-face.pdf differ diff --git a/graphics/emo/emo-graphics/emo-eu.pdf b/graphics/emo/emo-graphics/emo-eu.pdf new file mode 100644 index 0000000000..a51b0c4378 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-eu.pdf differ diff --git a/graphics/emo/emo-graphics/emo-exploding-head.pdf b/graphics/emo/emo-graphics/emo-exploding-head.pdf new file mode 100644 index 0000000000..a18108c654 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-exploding-head.pdf differ diff --git a/graphics/emo/emo-graphics/emo-eye.pdf b/graphics/emo/emo-graphics/emo-eye.pdf new file mode 100644 index 0000000000..06f42101a7 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-eye.pdf differ diff --git a/graphics/emo/emo-graphics/emo-floppy-disk.pdf b/graphics/emo/emo-graphics/emo-floppy-disk.pdf new file mode 100644 index 0000000000..f6bd1561f1 --- /dev/null +++ b/graphics/emo/emo-graphics/emo-floppy-disk.pdf @@ -0,0 +1,36 @@ +%PDF-1.5 +% +1 0 obj +<< /Pages 3 0 R /Type /Catalog >> +endobj +2 0 obj +<< /CreationDate (D:20230117175937-05'00) /Producer (cairo 1.16.0 \(https://cairographics.org\)) >> +endobj +3 0 obj +<< /Count 1 /Kids [ 4 0 R ] /Type /Pages >> +endobj +4 0 obj +<< /Contents 5 0 R /MediaBox [ 0 0 96 96 ] /Parent 3 0 R /Resources 6 0 R /Type /Page >> +endobj +5 0 obj +<< /Filter /FlateDecode /Length 485 >> +stream +xmKn1 :/VD:FPu/9"i\?6A cvX2Vux>|¯?^?ӬHeB8;##xf?F,J%_ePlpw~~7coxXR9A;HE LC$ҁ˰ JEFP,x{-G;:NtWG+[?Z9M\Ul lBF-Xg .,-FoC7Jzi;biڻTvnW${) Y{LX4 Pš)7ӱLNSڄ]"4< +>Hg~$fuM|:Jע.MU8u @ҷlh ªVⰪ:4+0+[mW0 reNvvl5@ì`[Bޞ+:[ƣDPOvl!J 8wendstream +endobj +6 0 obj +<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> +endobj +xref +0 7 +0000000000 65535 f +0000000015 00000 n +0000000064 00000 n +0000000179 00000 n +0000000238 00000 n +0000000342 00000 n +0000000898 00000 n +trailer << /Info 2 0 R /Root 1 0 R /Size 7 /ID [] >> +startxref +958 +%%EOF diff --git a/graphics/emo/emo-graphics/emo-foggy.pdf b/graphics/emo/emo-graphics/emo-foggy.pdf new file mode 100644 index 0000000000..73b594548c --- /dev/null +++ b/graphics/emo/emo-graphics/emo-foggy.pdf @@ -0,0 +1,455 @@ +%PDF-1.4 +% +1 0 obj +<> +endobj +3 0 obj +<> +endobj +4 0 obj +<> <> <> <>]>> +/Extend [true true] +/Coords [77.844597 113.1856 0 77.844597 113.1856 101.844902] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +5 0 obj +<> <> <> <> <> <> <>]>> +/Extend [true true] +/Coords [66.473099 139.576004 0 66.473099 139.576004 86.3946] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +6 0 obj +<> <> <>]>> +/Extend [true true] +/Coords [68.785004 149.251602 0 68.785004 149.251602 135.889694] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +7 0 obj +<> <> <>]>> +/Extend [true true] +/Coords [68.785004 149.251602 0 68.785004 149.251602 135.889694] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +8 0 obj +<>>> +/BBox [0 0 96 96] +/Group <> +/Length 53>> stream +/Pattern CS/Pattern cs/P7 SCN/P7 scn +0 0 96 96 re +f* + +endstream +endobj +9 0 obj +<>>> +endobj +10 0 obj +<> +/Pattern <>>> +/Length 60>> stream +/G9 gs +/Pattern CS/Pattern cs/P6 SCN/P6 scn +0 0 96 96 re +f* + +endstream +endobj +11 0 obj +<> <> <>]>> +/Extend [true true] +/Coords [17.719999 130.794403 0 17.719999 130.794403 81.634804] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +12 0 obj +<> <> <>]>> +/Extend [true true] +/Coords [17.719999 130.794403 0 17.719999 130.794403 81.634804] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +13 0 obj +<>>> +/BBox [0 0 96 96] +/Group <> +/Length 55>> stream +/Pattern CS/Pattern cs/P12 SCN/P12 scn +0 0 96 96 re +f* + +endstream +endobj +14 0 obj +<>>> +endobj +15 0 obj +<> +/Pattern <>>> +/Length 63>> stream +/G14 gs +/Pattern CS/Pattern cs/P11 SCN/P11 scn +0 0 96 96 re +f* + +endstream +endobj +16 0 obj +<> <> <> <> <>]>> +/Extend [true true] +/Coords [70.553001 51.230598 0 70.553001 51.230598 79.851799] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +17 0 obj +<> <> <> <> <>]>> +/Extend [true true] +/Coords [70.553001 51.230598 0 70.553001 51.230598 79.851799] +/ShadingType 3 +/ColorSpace /DeviceRGB>>>> +endobj +18 0 obj +<>>> +/BBox [0 0 96 96] +/Group <> +/Length 55>> stream +/Pattern CS/Pattern cs/P17 SCN/P17 scn +0 0 96 96 re +f* + +endstream +endobj +19 0 obj +<>>> +endobj +20 0 obj +<> +/Pattern <>>> +/Length 63>> stream +/G19 gs +/Pattern CS/Pattern cs/P16 SCN/P16 scn +0 0 96 96 re +f* + +endstream +endobj +21 0 obj +<> stream +xYˮW:(k/ xu0pX@$osNUIڲ$ Hօ>MqbyQAϷx4x8x僌b執󕃻c>\wN2ѧ4j'̛] ..\'|ֻ=9vc=6(c͕6k} ~hNk> 26nva?P5|vyۿ?o?w|yy|_Ӄ|.1F ӄ:!th&h6A|uDx &c]û!1уYۚ\\sr +-ա 7UqSb4FE7, Y6^-y?*"= +&VKHˋYfb,fRf٪+A#%uۏQ׃|_9'bLiwr~@l@ kk^A]&NC p Jpz& R0'T+_9ro09!u'aEzՌњ&hh\DTGS/&) X@Ho^GXχc(4e:޽%aX;drzK3Gr+05FeƎ'L:$mI*42%wK@J2ȂquJ[ +jၕcBf_U|i&(٢u9 +\Tt^>% %$ (ŲA@4)e[8ᷘ&_CgHE%vU?"tjVN i^#Վ4`o1i:Ai#պ$%n[]:լBA{ex2j˶_9!]U%'h7aGY#Oy:y%]EaZFJϺY NbࡔQl@Pc:)kΥè1c7x^| 麞xbQ >&ذ0\0UjCw\VrNioBqWʯlM8}RU'*mTЄY]7.Sh F죜 +-s8MgCVzƄ)Z\Z{Zen* +FkJfZPRbv%d0fəa|ek]A6|5)5pcCJɲDH[gYa35TMT`L50i@bWXTs*Y)uiZg{|4̾ttS-|H'Me,M|i- lհs.8RPUp+]Εg}k 3/7Tg=>t ˔;ܴ4Ѫϲڔ-Q,]ʙm:^Q//-`1ګN- .MY2:a5] 6Ȅ!s m=tafwR-!q +œfږЩ!/8v' r]{둅/շ?E7z HIR?Rc>ٰ8]loxx,yv2Ǻܗ5JV2 Qߜ^;";wͶe_ +1$V +ִ$fGBc&s;65m1 aw +`KɦuTQV+ t +ъ rVl,_{ vvczźV+٫|Ы7(9TI1-/^F.YlMv)NBd2ڞSz$ugH*/$LѢ Җm IP){X 9|t)-[ cUD8+5#Dj~Y(&,ח\HIWjY4dҰrL!}Pds0ۂ^Ӊj@ν&0[{SF|;EĮpp9߼@DDeVVcoWhiyd^𚅄ŠZ\zP򌆇ۄu|V+mSx{72_9fZ7% +%Jk85]JqVA6Q!0{hƋ>A).G([QHC@hįzcH0Y +endstream +endobj +2 0 obj +<> +/Pattern <>>> +/MediaBox [0 0 96 96] +/Contents 21 0 R +/StructParents 0 +/Parent 22 0 R>> +endobj +22 0 obj +<> +endobj +23 0 obj +<> +endobj +xref +0 24 +0000000000 65535 f +0000000015 00000 n +0000010171 00000 n +0000000303 00000 n +0000000340 00000 n +0000001007 00000 n +0000001970 00000 n +0000002526 00000 n +0000003082 00000 n +0000003379 00000 n +0000003462 00000 n +0000003775 00000 n +0000004377 00000 n +0000004928 00000 n +0000005230 00000 n +0000005315 00000 n +0000005635 00000 n +0000006377 00000 n +0000007037 00000 n +0000007339 00000 n +0000007424 00000 n +0000007744 00000 n +0000010428 00000 n +0000010484 00000 n +trailer +<> +startxref +10533 +%%EOF \ No newline at end of file diff --git a/graphics/emo/emo-graphics/emo-globe-africa-europe.pdf b/graphics/emo/emo-graphics/emo-globe-africa-europe.pdf new file mode 100644 index 0000000000..3b7803cd6f Binary files /dev/null and b/graphics/emo/emo-graphics/emo-globe-africa-europe.pdf differ diff --git a/graphics/emo/emo-graphics/emo-handshake.pdf b/graphics/emo/emo-graphics/emo-handshake.pdf new file mode 100644 index 0000000000..339711e4c4 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-handshake.pdf differ diff --git a/graphics/emo/emo-graphics/emo-judge.pdf b/graphics/emo/emo-graphics/emo-judge.pdf new file mode 100644 index 0000000000..4b61e53752 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-judge.pdf differ diff --git a/graphics/emo/emo-graphics/emo-keycap-one.pdf b/graphics/emo/emo-graphics/emo-keycap-one.pdf new file mode 100644 index 0000000000..8988600ff6 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-keycap-one.pdf differ diff --git a/graphics/emo/emo-graphics/emo-label.pdf b/graphics/emo/emo-graphics/emo-label.pdf new file mode 100644 index 0000000000..5ad631f606 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-label.pdf differ diff --git a/graphics/emo/emo-graphics/emo-lingchi.pdf b/graphics/emo/emo-graphics/emo-lingchi.pdf new file mode 100644 index 0000000000..273264dc1d Binary files /dev/null and b/graphics/emo/emo-graphics/emo-lingchi.pdf differ diff --git a/graphics/emo/emo-graphics/emo-loupe-left.pdf b/graphics/emo/emo-graphics/emo-loupe-left.pdf new file mode 100644 index 0000000000..49d2d0f36a Binary files /dev/null and b/graphics/emo/emo-graphics/emo-loupe-left.pdf differ diff --git a/graphics/emo/emo-graphics/emo-pager.pdf b/graphics/emo/emo-graphics/emo-pager.pdf new file mode 100644 index 0000000000..42e47b5c44 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-pager.pdf differ diff --git a/graphics/emo/emo-graphics/emo-parrot.pdf b/graphics/emo/emo-graphics/emo-parrot.pdf new file mode 100644 index 0000000000..6419b0792f Binary files /dev/null and b/graphics/emo/emo-graphics/emo-parrot.pdf differ diff --git a/graphics/emo/emo-graphics/emo-rainbow-flag.pdf b/graphics/emo/emo-graphics/emo-rainbow-flag.pdf new file mode 100644 index 0000000000..0f67f2d2d4 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-rainbow-flag.pdf differ diff --git a/graphics/emo/emo-graphics/emo-receipt.pdf b/graphics/emo/emo-graphics/emo-receipt.pdf new file mode 100644 index 0000000000..8e9ddee62f Binary files /dev/null and b/graphics/emo/emo-graphics/emo-receipt.pdf differ diff --git a/graphics/emo/emo-graphics/emo-robot.pdf b/graphics/emo/emo-graphics/emo-robot.pdf new file mode 100644 index 0000000000..33f9b91e75 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-robot.pdf differ diff --git a/graphics/emo/emo-graphics/emo-roll-of-paper.pdf b/graphics/emo/emo-graphics/emo-roll-of-paper.pdf new file mode 100644 index 0000000000..27d21a0dde Binary files /dev/null and b/graphics/emo/emo-graphics/emo-roll-of-paper.pdf differ diff --git a/graphics/emo/emo-graphics/emo-stadium.pdf b/graphics/emo/emo-graphics/emo-stadium.pdf new file mode 100644 index 0000000000..dc01d805c6 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-stadium.pdf differ diff --git a/graphics/emo/emo-graphics/emo-stop-sign.pdf b/graphics/emo/emo-graphics/emo-stop-sign.pdf new file mode 100644 index 0000000000..cab7fa60b3 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-stop-sign.pdf differ diff --git a/graphics/emo/emo-graphics/emo-triangular-ruler.pdf b/graphics/emo/emo-graphics/emo-triangular-ruler.pdf new file mode 100644 index 0000000000..062e896f28 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-triangular-ruler.pdf differ diff --git a/graphics/emo/emo-graphics/emo-wastebasket.pdf b/graphics/emo/emo-graphics/emo-wastebasket.pdf new file mode 100644 index 0000000000..5bd631e944 Binary files /dev/null and b/graphics/emo/emo-graphics/emo-wastebasket.pdf differ diff --git a/graphics/emo/emo-graphics/enraged-face.pdf b/graphics/emo/emo-graphics/enraged-face.pdf deleted file mode 100644 index 57a4ad3dd3..0000000000 Binary files a/graphics/emo/emo-graphics/enraged-face.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/eu.pdf b/graphics/emo/emo-graphics/eu.pdf deleted file mode 100644 index a51b0c4378..0000000000 Binary files a/graphics/emo/emo-graphics/eu.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/eye.pdf b/graphics/emo/emo-graphics/eye.pdf deleted file mode 100644 index 06f42101a7..0000000000 Binary files a/graphics/emo/emo-graphics/eye.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/floppy-disk.pdf b/graphics/emo/emo-graphics/floppy-disk.pdf deleted file mode 100644 index f6bd1561f1..0000000000 --- a/graphics/emo/emo-graphics/floppy-disk.pdf +++ /dev/null @@ -1,36 +0,0 @@ -%PDF-1.5 -% -1 0 obj -<< /Pages 3 0 R /Type /Catalog >> -endobj -2 0 obj -<< /CreationDate (D:20230117175937-05'00) /Producer (cairo 1.16.0 \(https://cairographics.org\)) >> -endobj -3 0 obj -<< /Count 1 /Kids [ 4 0 R ] /Type /Pages >> -endobj -4 0 obj -<< /Contents 5 0 R /MediaBox [ 0 0 96 96 ] /Parent 3 0 R /Resources 6 0 R /Type /Page >> -endobj -5 0 obj -<< /Filter /FlateDecode /Length 485 >> -stream -xmKn1 :/VD:FPu/9"i\?6A cvX2Vux>|¯?^?ӬHeB8;##xf?F,J%_ePlpw~~7coxXR9A;HE LC$ҁ˰ JEFP,x{-G;:NtWG+[?Z9M\Ul lBF-Xg .,-FoC7Jzi;biڻTvnW${) Y{LX4 Pš)7ӱLNSڄ]"4< ->Hg~$fuM|:Jע.MU8u @ҷlh ªVⰪ:4+0+[mW0 reNvvl5@ì`[Bޞ+:[ƣDPOvl!J 8wendstream -endobj -6 0 obj -<< /ExtGState << /a0 << /CA 1 /ca 1 >> >> >> -endobj -xref -0 7 -0000000000 65535 f -0000000015 00000 n -0000000064 00000 n -0000000179 00000 n -0000000238 00000 n -0000000342 00000 n -0000000898 00000 n -trailer << /Info 2 0 R /Root 1 0 R /Size 7 /ID [] >> -startxref -958 -%%EOF diff --git a/graphics/emo/emo-graphics/foggy.pdf b/graphics/emo/emo-graphics/foggy.pdf deleted file mode 100644 index 73b594548c..0000000000 --- a/graphics/emo/emo-graphics/foggy.pdf +++ /dev/null @@ -1,455 +0,0 @@ -%PDF-1.4 -% -1 0 obj -<> -endobj -3 0 obj -<> -endobj -4 0 obj -<> <> <> <>]>> -/Extend [true true] -/Coords [77.844597 113.1856 0 77.844597 113.1856 101.844902] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -5 0 obj -<> <> <> <> <> <> <>]>> -/Extend [true true] -/Coords [66.473099 139.576004 0 66.473099 139.576004 86.3946] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -6 0 obj -<> <> <>]>> -/Extend [true true] -/Coords [68.785004 149.251602 0 68.785004 149.251602 135.889694] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -7 0 obj -<> <> <>]>> -/Extend [true true] -/Coords [68.785004 149.251602 0 68.785004 149.251602 135.889694] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -8 0 obj -<>>> -/BBox [0 0 96 96] -/Group <> -/Length 53>> stream -/Pattern CS/Pattern cs/P7 SCN/P7 scn -0 0 96 96 re -f* - -endstream -endobj -9 0 obj -<>>> -endobj -10 0 obj -<> -/Pattern <>>> -/Length 60>> stream -/G9 gs -/Pattern CS/Pattern cs/P6 SCN/P6 scn -0 0 96 96 re -f* - -endstream -endobj -11 0 obj -<> <> <>]>> -/Extend [true true] -/Coords [17.719999 130.794403 0 17.719999 130.794403 81.634804] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -12 0 obj -<> <> <>]>> -/Extend [true true] -/Coords [17.719999 130.794403 0 17.719999 130.794403 81.634804] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -13 0 obj -<>>> -/BBox [0 0 96 96] -/Group <> -/Length 55>> stream -/Pattern CS/Pattern cs/P12 SCN/P12 scn -0 0 96 96 re -f* - -endstream -endobj -14 0 obj -<>>> -endobj -15 0 obj -<> -/Pattern <>>> -/Length 63>> stream -/G14 gs -/Pattern CS/Pattern cs/P11 SCN/P11 scn -0 0 96 96 re -f* - -endstream -endobj -16 0 obj -<> <> <> <> <>]>> -/Extend [true true] -/Coords [70.553001 51.230598 0 70.553001 51.230598 79.851799] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -17 0 obj -<> <> <> <> <>]>> -/Extend [true true] -/Coords [70.553001 51.230598 0 70.553001 51.230598 79.851799] -/ShadingType 3 -/ColorSpace /DeviceRGB>>>> -endobj -18 0 obj -<>>> -/BBox [0 0 96 96] -/Group <> -/Length 55>> stream -/Pattern CS/Pattern cs/P17 SCN/P17 scn -0 0 96 96 re -f* - -endstream -endobj -19 0 obj -<>>> -endobj -20 0 obj -<> -/Pattern <>>> -/Length 63>> stream -/G19 gs -/Pattern CS/Pattern cs/P16 SCN/P16 scn -0 0 96 96 re -f* - -endstream -endobj -21 0 obj -<> stream -xYˮW:(k/ xu0pX@$osNUIڲ$ Hօ>MqbyQAϷx4x8x僌b執󕃻c>\wN2ѧ4j'̛] ..\'|ֻ=9vc=6(c͕6k} ~hNk> 26nva?P5|vyۿ?o?w|yy|_Ӄ|.1F ӄ:!th&h6A|uDx &c]û!1уYۚ\\sr --ա 7UqSb4FE7, Y6^-y?*"= -&VKHˋYfb,fRf٪+A#%uۏQ׃|_9'bLiwr~@l@ kk^A]&NC p Jpz& R0'T+_9ro09!u'aEzՌњ&hh\DTGS/&) X@Ho^GXχc(4e:޽%aX;drzK3Gr+05FeƎ'L:$mI*42%wK@J2ȂquJ[ -jၕcBf_U|i&(٢u9 -\Tt^>% %$ (ŲA@4)e[8ᷘ&_CgHE%vU?"tjVN i^#Վ4`o1i:Ai#պ$%n[]:լBA{ex2j˶_9!]U%'h7aGY#Oy:y%]EaZFJϺY NbࡔQl@Pc:)kΥè1c7x^| 麞xbQ >&ذ0\0UjCw\VrNioBqWʯlM8}RU'*mTЄY]7.Sh F죜 --s8MgCVzƄ)Z\Z{Zen* +FkJfZPRbv%d0fəa|ek]A6|5)5pcCJɲDH[gYa35TMT`L50i@bWXTs*Y)uiZg{|4̾ttS-|H'Me,M|i- lհs.8RPUp+]Εg}k 3/7Tg=>t ˔;ܴ4Ѫϲڔ-Q,]ʙm:^Q//-`1ګN- .MY2:a5] 6Ȅ!s m=tafwR-!q -œfږЩ!/8v' r]{둅/շ?E7z HIR?Rc>ٰ8]loxx,yv2Ǻܗ5JV2 Qߜ^;";wͶe_ -1$V -ִ$fGBc&s;65m1 aw -`KɦuTQV+ t -ъ rVl,_{ vvczźV+٫|Ы7(9TI1-/^F.YlMv)NBd2ڞSz$ugH*/$LѢ Җm IP){X 9|t)-[ cUD8+5#Dj~Y(&,ח\HIWjY4dҰrL!}Pds0ۂ^Ӊj@ν&0[{SF|;EĮpp9߼@DDeVVcoWhiyd^𚅄ŠZ\zP򌆇ۄu|V+mSx{72_9fZ7% -%Jk85]JqVA6Q!0{hƋ>A).G([QHC@hįzcH0Y -endstream -endobj -2 0 obj -<> -/Pattern <>>> -/MediaBox [0 0 96 96] -/Contents 21 0 R -/StructParents 0 -/Parent 22 0 R>> -endobj -22 0 obj -<> -endobj -23 0 obj -<> -endobj -xref -0 24 -0000000000 65535 f -0000000015 00000 n -0000010171 00000 n -0000000303 00000 n -0000000340 00000 n -0000001007 00000 n -0000001970 00000 n -0000002526 00000 n -0000003082 00000 n -0000003379 00000 n -0000003462 00000 n -0000003775 00000 n -0000004377 00000 n -0000004928 00000 n -0000005230 00000 n -0000005315 00000 n -0000005635 00000 n -0000006377 00000 n -0000007037 00000 n -0000007339 00000 n -0000007424 00000 n -0000007744 00000 n -0000010428 00000 n -0000010484 00000 n -trailer -<> -startxref -10533 -%%EOF \ No newline at end of file diff --git a/graphics/emo/emo-graphics/globe-africa-europe.pdf b/graphics/emo/emo-graphics/globe-africa-europe.pdf deleted file mode 100644 index 3b7803cd6f..0000000000 Binary files a/graphics/emo/emo-graphics/globe-africa-europe.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/handshake.pdf b/graphics/emo/emo-graphics/handshake.pdf deleted file mode 100644 index 339711e4c4..0000000000 Binary files a/graphics/emo/emo-graphics/handshake.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/judge.pdf b/graphics/emo/emo-graphics/judge.pdf deleted file mode 100644 index 4b61e53752..0000000000 Binary files a/graphics/emo/emo-graphics/judge.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/keycap-one.pdf b/graphics/emo/emo-graphics/keycap-one.pdf deleted file mode 100644 index 8988600ff6..0000000000 Binary files a/graphics/emo/emo-graphics/keycap-one.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/label.pdf b/graphics/emo/emo-graphics/label.pdf deleted file mode 100644 index 5ad631f606..0000000000 Binary files a/graphics/emo/emo-graphics/label.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/lingchi.pdf b/graphics/emo/emo-graphics/lingchi.pdf deleted file mode 100644 index 273264dc1d..0000000000 Binary files a/graphics/emo/emo-graphics/lingchi.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/loupe-left.pdf b/graphics/emo/emo-graphics/loupe-left.pdf deleted file mode 100644 index 49d2d0f36a..0000000000 Binary files a/graphics/emo/emo-graphics/loupe-left.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/pager.pdf b/graphics/emo/emo-graphics/pager.pdf deleted file mode 100644 index 42e47b5c44..0000000000 Binary files a/graphics/emo/emo-graphics/pager.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/parrot.pdf b/graphics/emo/emo-graphics/parrot.pdf deleted file mode 100644 index 6419b0792f..0000000000 Binary files a/graphics/emo/emo-graphics/parrot.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/rainbow-flag.pdf b/graphics/emo/emo-graphics/rainbow-flag.pdf deleted file mode 100644 index 0f67f2d2d4..0000000000 Binary files a/graphics/emo/emo-graphics/rainbow-flag.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/receipt.pdf b/graphics/emo/emo-graphics/receipt.pdf deleted file mode 100644 index 8e9ddee62f..0000000000 Binary files a/graphics/emo/emo-graphics/receipt.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/robot.pdf b/graphics/emo/emo-graphics/robot.pdf deleted file mode 100644 index 33f9b91e75..0000000000 Binary files a/graphics/emo/emo-graphics/robot.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/roll-of-paper.pdf b/graphics/emo/emo-graphics/roll-of-paper.pdf deleted file mode 100644 index 27d21a0dde..0000000000 Binary files a/graphics/emo/emo-graphics/roll-of-paper.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/stadium.pdf b/graphics/emo/emo-graphics/stadium.pdf deleted file mode 100644 index dc01d805c6..0000000000 Binary files a/graphics/emo/emo-graphics/stadium.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/stop-sign.pdf b/graphics/emo/emo-graphics/stop-sign.pdf deleted file mode 100644 index cab7fa60b3..0000000000 Binary files a/graphics/emo/emo-graphics/stop-sign.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/triangular-ruler.pdf b/graphics/emo/emo-graphics/triangular-ruler.pdf deleted file mode 100644 index 062e896f28..0000000000 Binary files a/graphics/emo/emo-graphics/triangular-ruler.pdf and /dev/null differ diff --git a/graphics/emo/emo-graphics/wastebasket.pdf b/graphics/emo/emo-graphics/wastebasket.pdf deleted file mode 100644 index 5bd631e944..0000000000 Binary files a/graphics/emo/emo-graphics/wastebasket.pdf and /dev/null differ diff --git a/graphics/emo/emo-lingchi.ttf b/graphics/emo/emo-lingchi.ttf new file mode 100644 index 0000000000..3bae825582 Binary files /dev/null and b/graphics/emo/emo-lingchi.ttf differ diff --git a/graphics/emo/emo.def b/graphics/emo/emo.def index 61539c1e0b..8e578056b5 100644 --- a/graphics/emo/emo.def +++ b/graphics/emo/emo.def @@ -1,3 +1,4 @@ +\ProvidesFile{emo.def}[2023-04-01] \expandafter\def\csname emo@emoji@keycap-one\endcsname{1️⃣} \def\emo@emoji@biohazard{☣️} \expandafter\def\csname emo@emoji@balance-scale\endcsname{⚖️} @@ -12,6 +13,7 @@ \def\emo@emoji@label{🏷️} \def\emo@emoji@eye{👁️} \def\emo@emoji@busts{👥} +\def\emo@emoji@collision{💥} \expandafter\def\csname emo@emoji@currency-exchange\endcsname{💱} \expandafter\def\csname emo@emoji@floppy-disk\endcsname{💾} \expandafter\def\csname emo@emoji@triangular-ruler\endcsname{📐} @@ -23,6 +25,7 @@ \expandafter\def\csname emo@emoji@stop-sign\endcsname{🛑} \def\emo@emoji@robot{🤖} \def\emo@emoji@handshake{🤝} +\expandafter\def\csname emo@emoji@exploding-head\endcsname{🤯} \def\emo@emoji@parrot{🦜} \def\emo@emoji@judge{🧑‍⚖️} \expandafter\def\csname emo@emoji@roll-of-paper\endcsname{🧻} diff --git a/graphics/emo/emo.dtx b/graphics/emo/emo.dtx index 05fa1b155f..e6940d46c2 100644 --- a/graphics/emo/emo.dtx +++ b/graphics/emo/emo.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% emo: emoji for all (LaTeX engines) +% emo•ji for all (LaTeX engines) % (C) Copyright 2023 by Robert Grimm % Released under LPPL v1.3c or later % @@ -8,61 +8,67 @@ % \fi % ^^A ---------------------------------------------------------------------------------- % \iffalse -% The option with date and version below applies to both \Provides -% declarations; see https://tug.org/TUGboat/tb29-2/tb92pakin.pdf. -%<*scaffold> -\ProvidesFile{emo.dtx} -% -%\NeedsTeXFormat{LaTeX2e} -%\ProvidesPackage{emo} -%<*package> - [2023/03/20 v0.1 emoji for all] -% -% ====================================================================================== %<*scaffold> \iffalse % +% ====================================================================================== %<*readme> -# Emo: emoji for all (LaTeX engines) +# emo•ji for all (LaTeX engines) This package defines the `\emo{}` macro for including color emoji in -a document no matter the input encoding or LaTeX engine. It uses the Noto color -emoji font if the engine supports doing so and falls back onto PDF graphics -otherwise. I wrote this package to use emoji in an academic paper subject to -[The ACM Publishing -System](https://authors.acm.org/proceedings/production-information/accepted-latex-packages), -which prohibits the use of most LaTeX packages but has only minimal support for -non-Latin scripts. 🎉 +a document no matter the LaTeX engine. It uses the Noto color emoji font if the +engine supports doing so and falls back onto PDF graphics otherwise. In either +case, `\emo{desert-island}` results in 🏝 and `\emo{parrot}` results in 🦜. Emo +may come in particularly handy when dealing with academic publishers that +provide only minimal support for non-Latin scripts (cough, +[ACM](https://www.acm.org), cough). + +Emo's source repository is . It also is +available [through CTAN](https://ctan.org/pkg/emo). Emo supports conversion +to HTML [with LaTeXML](https://github.com/brucemiller/LaTeXML). + + +## Package Options When emo is used with the `extra` option, this package also defines the `\lingchi` and `\YHWH` macros for 凌遲 and יהוה, respectively. Both macros -preserve a subsequent space as space, no backslash needed. When used with the -`index` option, this package also emits a raw index entry for each use of an -emoji into an emo index or `.edx` file. +preserve a subsequent space as space, no backslash needed. -To **extract files** embedded in [emo.dtx](emo.dtx) and also rebuild the -[documentation](emo.pdf), run `pdflatex emo.dtx`. +When used with the `index` option, this package also emits a raw index entry for +each use of an emoji into an emo index or `.edx` file. + + +## Installation + +To **extract files** embedded in [emo.dtx](emo.dtx), run `pdftex emo.dtx`. Note +that plain old `tex` won't do, since it mangles this README. `pdflatex` works, +but also generates the package documentation. The embedded files are `build.sh`, +`emo.ins`, `emo.sty`, `emo.sty.ltxml`, and `README.md`. + +To **build the documentation** embedded in `emo.dtx`, run `source build.sh`. The +shell script invokes `pdflatex emo.dtx` thrice and `makeindex` once each for the +change and the symbol indices, resulting in [emo.pdf](emo.pdf). To **configure the emoji**, run `python3 config/emo.py` with appropriate arguments. The [package documentation](emo.pdf) explains the configuration tool in detail, but you may find the `-h` for help option sufficient to get started. -To **install this package**, place `emo.def`, `emo.sty`, `lingchi.otf`, and the -contents of the `emo-graphics` directory somewhere where LaTeX can find them. In -a pinch, your project directory will do just fine. +To **install this package**, place `emo.def`, `emo.sty`, `emo.sty.ltxml`, +`emo-lingchi.ttf`, and the `emo-graphics` directory with the fallback PDF files +somewhere where LaTeX can find them. In a pinch, your project directory will do. ## Supported Emoji By default, emo supports only a few emoji: -1️⃣ ☣️ ⚖️ ✔️ 🇪🇺 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️‍🌈 🏷️ 👁️ 👥 💱 💾 📐 📟 🔍 🕵️ 🗑️ 😡 🛑 🤖 🤝 🦜 🧑‍⚖️ 🧻 🧾 +1️⃣ ☣️ ⚖️ ✔️ 🇪🇺 🌁 🌍 🏛️ 🏝️ 🏟️ 🏳️‍🌈 🏷️ 👁️ 👥 💥 💱 💾 📐 📟 🔍 🕵️ 🗑️ 😡 🛑 🤖 🤝 🤯 🦜 🧑‍⚖️ 🧻 🧾 Their names are keycap-one, biohazard, balance-scale, check-mark, eu, foggy, globe-africa-europe, classical-building, desert-island, stadium, rainbow-flag, -label, eye, busts, currency-exchange, floppy-disk, triangular-ruler, pager, -loupe-left, detective, wastebasket, enraged-face, stop-sign, robot, handshake, -parrot, judge, roll-of-paper, and receipt. +label, eye, busts, collision, currency-exchange, floppy-disk, triangular-ruler, +pager, loupe-left, detective, wastebasket, enraged-face, stop-sign, robot, +handshake, exploding-head, parrot, judge, roll-of-paper, and receipt. The [package's documentation](emo.pdf) explains the underlying naming scheme and also how to reconfigure which emoji are supported. The [emo.py](config/emo.py) @@ -72,8 +78,8 @@ into PDF files and generating an updated `emo.def` file. ## Copyright and Licensing -This package combines code written in LaTeX and Python with Unicode data about -emoji as well as graphics and fonts derived from Google's Noto fonts. As a +This package combines code written in LaTeX, Python, and Perl with Unicode data +about emoji as well as graphics and fonts derived from Google's Noto fonts. As a result, a number of different licenses apply, all of which are [OSI approved](https://opensource.org/licenses/) and non-copyleft: @@ -86,7 +92,7 @@ approved](https://opensource.org/licenses/) and non-copyleft: * The [emoji-test.txt](config/emoji-test.txt) configuration file is a data file from [Unicode TR-51](https://unicode.org/reports/tr51/) and hence subject to the [Unicode License](https://www.unicode.org/license.txt). - * The `lingchi.otf` font is a two-glyph subset of the serif traditional + * The `emo-lingchi.ttf` font is a two-glyph subset of the serif traditional Chinese version of Google's [Noto fonts](https://github.com/notofonts/noto-cjk) and hence subject to the [SIL Open Font License v1.1](https://scripts.sil.org/ofl). @@ -99,30 +105,38 @@ approved](https://opensource.org/licenses/) and non-copyleft: %<*buildscript> pdflatex emo.dtx makeindex -s gind.ist -o emo.ind emo.idx -# makeindex -s gglo.ist -o emo.gls emo.glo # For tracking changes +makeindex -s gglo.ist -o emo.gls emo.glo +pdflatex emo.dtx pdflatex emo.dtx % +% ====================================================================================== %<*scaffold> \fi -% ====================================================================================== -\begingroup +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi % +% -------------------------------------------------------------------------------------- %<*install> \input docstrip.tex \keepsilent \askforoverwritefalse \preamble -emo: emoji for all (LaTeX engines) +emo•ji for all (LaTeX engines) (C) Copyright 2023 by Robert Grimm Released under LPPL v1.3c or later \endpreamble \usedir{tex/latex/emo} -\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}}} +\generate{ + \nopreamble\nopostamble + \file{\jobname.sty.ltxml}{\from{\jobname.dtx}{latexml-binding}}} % -% Don't stop processing the .dtx file; only stop processing the install file. %\endbatchfile % -------------------------------------------------------------------------------------- %<*scaffold> @@ -133,27 +147,44 @@ Released under LPPL v1.3c or later \generate{\file{build.sh}{\from{\jobname.dtx}{buildscript}}} \usedir{doc/latex/emo} \generate{\file{README.md}{\from{\jobname.dtx}{readme}}} -\endgroup +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi % % ====================================================================================== +% See https://tug.org/TUGboat/tb29-2/tb92pakin.pdf. +%<*scaffold> +\ProvidesFile{emo.dtx} +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{emo} +%<*scaffold,package> + [2023/04/01 v0.2 emo•ji for all (LaTeX engines)] +% +% ====================================================================================== %<*driver> \PassOptionsToPackage{utf8}{inputenc} \documentclass{ltxdoc} -% Override the default \small, which looks odd with Inconsolata. +% Override the default \small, which looks odd typeset in Inconsolata. \renewcommand{\MacroFont}{\normalsize\ttfamily} \usepackage[extra]{\jobname} \usepackage{enumitem} \usepackage{parskip} \usepackage{inconsolata} -% Use BlackFoundry's Inria fonts; see +% Use BlackFoundry's Inria \usepackage[T1]{fontenc} \usepackage[lining]{InriaSerif} \renewcommand*\oldstylenums[1]{{\fontfamily{InriaSerif-OsF}\selectfont #1}} \let\oldnormalfont\normalfont \def\normalfont{\oldnormalfont\mdseries} +\usepackage{xcolor} \usepackage{hyperref} +\definecolor{spot}{HTML}{353598} +\hypersetup{allcolors=spot} \EnableCrossrefs \CodelineIndex \RecordChanges @@ -161,29 +192,34 @@ Released under LPPL v1.3c or later \DocInput{\jobname.dtx} \end{document} % +% ====================================================================================== % \fi % -% \newlist{inlinenum}{enumerate*}{1} -% \setlist[inlinenum]{label=(\alph{inlinenumi})} -% \newenvironment{verbaish}{% -% \ttfamily% -% \obeylines% -% \obeyspaces% -% \vspace{\the\parskip}% -% \setlength{\parskip}{0pt}% -% \setlength{\parindent}{2em}% -% }{} +% \changes{0.1}{}{Initial release} +% \changes{0.2}{}{Prefix PDF and font files with ``emo-''} +% \changes{0.2}{}{Support pdftex for extracting emo.dtx} % % \GetFileInfo{\jobname.dtx} % -% \DoNotIndex{\{,\}} +% \DoNotIndex{\{,\},\x,\\} % \DoNotIndex{\begingroup,\char,\csname,\def} % \DoNotIndex{\else,\endcsname,\endgroup,\expandafter} % \DoNotIndex{\fi,\ifcsname,\ifluatex,\index} % \DoNotIndex{\newcommand,\newif,\newindex} % \DoNotIndex{\relax,\string,\textbackslash,\textsf,\texttt} % -% \title{emo: emoji for all\\(LaTeX engines)} +% \newlist{inlinenum}{enumerate*}{1} +% \setlist[inlinenum]{label=(\alph{inlinenumi})} +% \newenvironment{verbatimish}{% +% \ttfamily% +% \obeylines% +% \obeyspaces% +% \vspace{\the\parskip}% +% \setlength{\parskip}{0pt}% +% \setlength{\parindent}{1em}% +% }{} +% +% \title{emo•ji for all\\(LaTeX engines)} % \author{\href{https://apparebit.com}{Robert Grimm}} % \date{Version \fileversion\ (\filedate)} % @@ -191,14 +227,14 @@ Released under LPPL v1.3c or later % % \begin{abstract} % \noindent{}Emo implements the |\emo|\marg{emoji-name} command for including -% color emoji such as \emo{desert-island} or \emo{parrot} in your documents -% independent of input encoding or LaTeX engine. The implementation uses the -% Noto color emoji font if the engine supports it and includes PDF graphics -% otherwise. The latter are automatically derived from Noto's SVG sources, so -% the visual appearance is very similar. The source repository is at -% \url{https://github.com/apparebit/emo}. Emo may come in particularly handy -% when dealing with academic publishers that provide only minimal support for -% non-Latin scripts (cough, +% color emoji such as |\emo{desert-island}| for \emo{desert-island} or +% |\emo{parrot}| for \emo{parrot} in your documents independent of LaTeX engine. +% The implementation uses the Noto color emoji font if the engine supports it +% and includes PDF graphics otherwise. The latter are automatically derived from +% Noto's SVG sources, so the visual appearance is very similar. The source +% repository is at \url{https://github.com/apparebit/emo}. Emo may come in +% particularly handy when dealing with academic publishers that provide only +% minimal support for non-Latin scripts (cough, % \href{https://authors.acm.org/proceedings/production-information/accepted-latex-packages}{ACM}, % cough). % \end{abstract} @@ -209,34 +245,52 @@ Released under LPPL v1.3c or later % ^^A ================================================================================== % \section{Installation} % -% Installation of the emo package is fairly straightforward, though it does -% involve a lot more files than usual. +% The emo package is available through its +% \href{https://github.com/apparebit/emo}{source repository} or through +% \href{https://ctan.org/pkg/emo}{CTAN}. Installation is fairly +% straightforward, though it does involve a lot more files than usual. % % \begin{enumerate} % \item Start by extracting this package's files from |emo.dtx| by running: -% \begin{verbaish} -% \$ pdflatex emo.dtx -% \end{verbaish} -% -% \item Build the package documentation with indices by running: -% \begin{verbaish} -% \$ source build.sh -% \end{verbaish} -% -% \item If you want to reconfigure the supported emoji, see \S\ref{sec:config} -% below. -% -% \item Put the following files somewhere LaTeX can find them. While your current -% project's directory will do, emo's installation potentially comprises -% thousands of files. Hence it may be preferrable to adhere to the -% \href{https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages}{TeX -% Directory Structure}, with dedicated directories for the following files: +% \begin{verbatimish} +% \$ pdftex emo.dtx +% \end{verbatimish} +% Do \emph{not} use |tex|; it mangles the embedded |README.md|. |pdflatex| also +% extracts the files and then builds the documentation. Embedded files are +% |build.sh|, |emo.ins|, |emo.sty|, |emo.sty.ltxml|, and |README.md|. Extraction +% will overwrite existing files with the same name without asking. +% +% \item Build the package documentation with change and symbol indices by +% running: +% \begin{verbatimish} +% \$ source build.sh +% \end{verbatimish} +% The shell script invokes |pdflatex emo.dtx| thrice and |makeindex| once each +% for the change and symbol indices to produce |emo.pdf|. +% +% \item Get started reconfiguring supported emoji by running: +% \begin{verbatimish} +% \$ python config/emo.py -h +% \end{verbatimish} +% For more detailed instructions, see \S\ref{sec:config} below. +% +% \item Put the following files somewhere LaTeX can find them. In a pinch, your +% current project's directory will do. However, emo's installation potentially +% comprises thousands of files. So, you probably want to use a dedicated +% directory and add that to the search path for LaTeX, e.g., by setting the +% |TEXINPUTS| environment variable. % \begin{enumerate} % \item |emo.sty| with the package implementation; +% \item |emo.sty.ltxml| with the binding for +% \href{https://github.com/brucemiller/LaTeXML}{LaTeXML}; % \item |emo.def| with the emoji table; -% \item |lingchi.otf| for |\lingchi|; -% \item \emph{all} PDF files in the |emo-graphics| directory. +% \item |emo-lingchi.ttf| with the two glyphs for |\lingchi|; +% \item |emo-graphics| with the fallback PDF graphics. % \end{enumerate} +% TeX Live requires that each package's files have unique names. For that +% reason, the PDF graphics in the |emo-graphics| directory start with the |emo-| +% prefix as well. +% % \end{enumerate} % % When running on the LuaLaTeX engine, the emo package also uses the Noto color @@ -244,9 +298,9 @@ Released under LPPL v1.3c or later % with the latter used for rendering |\YHWH| only. Neither file is included with % emo's distribution, since both of them are distributed with major TeX % distributions already. If they are not included with your LaTeX distribution, -% you can find them on CTAN. The |lingchi.otf| font distributed with emo is a -% two glyph subset of |NotoSerifTC-Regular.otf|, i.e., the serif traditional -% Chinese version of Noto. +% you can find them on CTAN. The |emo-lingchi.ttf| font distributed with emo is +% a two glyph subset of |NotoSerifTC-Regular.otf|, i.e., the traditional Chinese +% version of Noto serif. % % % ^^A ================================================================================== @@ -378,23 +432,25 @@ Released under LPPL v1.3c or later % \section{Configuration} % \label{sec:config} % -% Emo's implementation is split over two files, |emo.sty| and |emo.def|. The -% former file defines the substance of the package, its options, its helper -% macros, and the user-visible |\emo|, |\lingchi|, and |\YHWH| macros. The -% latter file defines the table of supported emoji. For each such emoji, the -% table contains a command |\emo@emoji@|\meta{emoji-name} with the emoji's -% codepoints as value. |emo.sty| includes the table during loading and -% thereafter relies on it for validating emoji names and rendering emoji in -% LuaLaTeX. It may be possible to combine the two files into one, but that -% avoids at most a few disc reads and hence doesn't seem worth the trouble. +% Emo's implementation is actually split over two files: |emo.sty| is extracted +% from |emo.dtx| and defines the substance of the package, its options, its +% helper macros, and the user-visible |\emo|, |\lingchi|, and |\YHWH| macros. +% Currently supported emoji are defined by the emoji table in the second file, +% |emo.def|. For every supported emoji, the file contains a command +% |\emo@emoji@|\meta{emoji-name} with the emoji's codepoints as value. % +% Configuration automates the regeneration of the emoji table for arbitrary +% numbers of emoji. |config/emo.py| is the script and |config/emoji-test.txt| is +% the list of all emoji from the Unicode standard. % -% \subsection{Update Configuration} % -% Invoke |config/emo.py| to automatically reconfigure emo's supported emoji: -% \begin{verbaish} -% \$ python3 config/emo.py \meta{selector} \meta{selector} $\ldots$ -% \end{verbaish} +% ^^A ---------------------------------------------------------------------------------- +% \subsection{Running the Configuration Script} +% +% To update emo's configuration, invoke the |config/emo.py| script: +% \begin{verbatimish} +% \$ python3 config/emo.py \meta{selector} \meta{selector} $\ldots$ +% \end{verbatimish} % % Each selector may be: % \begin{itemize} @@ -412,9 +468,9 @@ Released under LPPL v1.3c or later % either of the two nouns as a shortcut, e.g., ``smileys'' or ``emotion.'' % % For data safety, |emo.py| does not overwrite PDF graphics and hence can only -% add emoji to the configuration. To remove emoji, simply remove their PDF -% graphics from |emo-graphics| and then run |emo.py|, which updates the emoji -% table accordingly. +% \emph{add} emoji to the configuration. To remove emoji, simply remove their +% PDF graphics from |emo-graphics| and then run |emo.py| without selector +% arguments, which updates the emoji table accordingly. % % |emo.py| effectively treats |emoji-test.txt| as registry of all emoji and the % filenames of PDF graphics in |emo-graphics| as emo's current inventory. For @@ -433,18 +489,19 @@ Released under LPPL v1.3c or later % from Google's Noto project, a number of different licenses apply. All of them % are \href{https://opensource.org/licenses/}{OSI approved} and non-copyleft: % \begin{itemize} -% \item This package's LaTeX code is © Copyright 2023 by Robert Grimm and has -% been released under the -% \href{https://www.latex-project.org/lppl/lppl-1-3c/}{LPPL v1.3c} or later. +% \item This package's LaTeX and also Perl code extracted from |emo.dtx| +% is © Copyright 2023 by Robert Grimm and has been released +% under the \href{https://www.latex-project.org/lppl/lppl-1-3c/}{LPPL v1.3c} +% or later. % \item The |config/emo.py| script also is © Copyright 2023 by Robert Grimm but % has been released under the % \href{https://www.apache.org/licenses/LICENSE-2.0}{Apache 2.0 license}. % \item The [config/emoji-test.txt] configuration file is a data file from % \href{https://unicode.org/reports/tr51/}{Unicode TR-51} and hence subject % to the \href{https://www.unicode.org/license.txt}{Unicode License}. -% \item The |lingchi.otf| font is a two-glyph subset of the serif traditional +% \item The |emo-lingchi.ttf| font is a two-glyph subset of the traditional % Chinese version of Google's -% \href{https://github.com/notofonts/noto-cjk}{Noto fonts} and hence subject +% \href{https://github.com/notofonts/noto-cjk}{Noto serif} and hence subject % to the \href{https://scripts.sil.org/ofl}{SIL Open Font License v1.1}. % \item The PDF graphics in the |emo-graphics| directory are derived from the % sources for \href{https://github.com/googlefonts/noto-emoji}{Noto's color @@ -452,38 +509,42 @@ Released under LPPL v1.3c or later % \end{itemize} % % -% \StopEventually{\PrintIndex} +% \StopEventually{^^A +% \PrintChanges^^A +% \setcounter{IndexColumns}{2}^^A +% \columnsep = 20pt^^A +% \PrintIndex} % % % ^^A ================================================================================== % \section{Implementation} % -% Now that we understand how to configure emo, we are ready for exploring the -% implementation in detail. Let's get started: +% Let's get started with emo's implementation: % \begin{macrocode} %<*package> % \end{macrocode} % % Except, the package implementation started near the top of the |emo.dtx| file, -% so that version number and date are more visible and declared only once. But -% that's also well before the documentation preamble and hence cannot be -% included in the annotated implementation. Nonetheless, we can simulate the -% lines: +% before the documentation preamble. We repeat it here for completeness: % -% \begingroup\obeylines -% |\NeedsTeXFormat{LaTeX2e}|\setlength{\parskip}{0pt} -% |\ProvidesPackage{emo}[|\texttt{\filedate}| |\texttt{\fileversion}| emo for all]| -% \endgroup +% \begin{verbatimish} +% |\NeedsTeXFormat{LaTeX2e}| +% |\ProvidesPackage{emo}| +% | |[\filedate\space\fileversion\space\fileinfo] +% \end{verbatimish} % -% And no, I didn't repeat the version number and date. Check |emo.dtx|. +% And no, I didn't repeat the version number, date, or package information. +% Check |emo.dtx|. % % % ^^A ---------------------------------------------------------------------------------- % \subsection{Package Options} % -% Emo's \textsf{extra} and \textsf{index} options are simple flags. So, we -% declare a |\newif| for each option and, if the package use includes an option, -% it just toggles the conditional's state: +% \begin{macro}{\ifemo@extra} +% \begin{macro}{\ifemo@index} +% Emo's \textsf{extra} and \textsf{index} options are simple flags. So we +% declare a new conditional for each and, if |\usepackage| includes an option, +% toggle the conditional's state. % \begin{macrocode} \newif\ifemo@extra\emo@extrafalse \DeclareOption{extra}{\emo@extratrue} @@ -491,10 +552,12 @@ Released under LPPL v1.3c or later \DeclareOption{index}{\emo@indexingtrue} \ProcessOptions\relax % \end{macrocode} +% \end{macro} +% \end{macro} % % % ^^A ---------------------------------------------------------------------------------- -% \subsection{Dependencies} +% \subsection{Setup Including Dependencies} % % The dependency on |inputenc| effectively declares this file's encoding to be % UTF-8. The XeTeX and LuaTeX engines already expect files to be encoded that @@ -504,12 +567,23 @@ Released under LPPL v1.3c or later \RequirePackage[utf8]{inputenc} % \end{macrocode} % -% Depending on TeX engine, this package requires either |fontspec| or |graphicx| -% as the emoji-emitting backend. In turn, to tell the engines apart, it requires -% |iftex|. +% \begin{macro}{\ifemo@usefont} +% Define a third conditional for selecting the backend. Originally, I didn't +% bother with this, simply required |iftex|, and used |\ifluatex| throughout the +% package. But that unnecessarily complicates support for other LaTeX-like +% engines. +% \changes{0.2}{}{Abstract over backend selection} % \begin{macrocode} +\newif\ifemo@usefont\emo@usefontfalse \RequirePackage{iftex} -\ifluatex +\ifluatex\emo@usefonttrue\fi +% \end{macrocode} +% \end{macro} +% +% By now |\ifemo@usefont| should be correctly set up. So we use it for loading +% the right emoji-emitting backend, |fontspec| or |graphicx|: +% \begin{macrocode} +\ifemo@usefont \RequirePackage{fontspec} \else \RequirePackage{graphicx} @@ -540,6 +614,7 @@ Released under LPPL v1.3c or later % ^^A ---------------------------------------------------------------------------------- % \subsection{The Emoji Table} % +% \begin{macro}{\emo@emoji@} % For each emoji with a PDF graphic in the |emo-graphics| directory, a macro % named |\emo@emoji@|\meta{emoji-name} expands to its Unicode sequence. With % over 3,000 distinct emoji in Unicode 15, emo relies on a Python script for @@ -552,14 +627,15 @@ Released under LPPL v1.3c or later % \begin{macrocode} \input{emo.def} % \end{macrocode} +% \end{macro} % % % ^^A ---------------------------------------------------------------------------------- % \subsection{Internal Macros} % -% \begin{macro}{emo@error@fg} -% \begin{macro}{emo@error@bg} -% \begin{macro}{emo@error} +% \begin{macro}{\emo@error@fg} +% \begin{macro}{\emo@error@bg} +% \begin{macro}{\emo@error} % Define two colors and a function that uses the two colors for formatting an % attention-grabbing error message. If you use an invalid emoji name and % overlook the warning in the console, you \emph{will} notice the error messsage @@ -579,7 +655,7 @@ Released under LPPL v1.3c or later % \end{macro} % \end{macro} % -% \begin{macro}{emo@ifdef} +% \begin{macro}{\emo@ifdef} % Validate the emoji name given as first argument. The macro expands to the % second argument if the name is valid and an error message otherwise. Its % implementation relies on the |emo@emoji| table. @@ -593,7 +669,7 @@ Released under LPPL v1.3c or later % \end{macrocode} % \end{macro} % -% \begin{macro}{emo@index} +% \begin{macro}{\emo@index} % If indexing is enabled, record the use of an emoji. Otherwise, do nothing. % \begin{macrocode} \ifemo@indexing @@ -609,7 +685,7 @@ Released under LPPL v1.3c or later % ^^A ---------------------------------------------------------------------------------- % \subsection{User Macros} % -% \begin{macro}{emo} +% \begin{macro}{\emo} % Emit the named color emoji. Both the font-based version for LuaTeX and the % graphics-based fallback validate the emoji name and then invoke the % |\emo@index| macro. But they differ in how they actually display the emoji. @@ -617,7 +693,7 @@ Released under LPPL v1.3c or later % that in a group that also uses the previously declared Noto color emoji font. % The fallback version instead includes a suitably sized PDF graphic. % \begin{macrocode} -\ifluatex +\ifemo@usefont \newfontface\emo@font[Renderer=Harfbuzz]{NotoColorEmoji.ttf} \newcommand\emo[1]{% \emo@ifdef{#1}{% @@ -629,15 +705,16 @@ Released under LPPL v1.3c or later \newcommand\emo[1]{% \emo@ifdef{#1}{% \emo@index{#1}% - \raisebox{-0.2ex}{\includegraphics[height=1em]{./emo-graphics/#1}}% + \raisebox{-0.2ex}{% + \includegraphics[height=1em]{emo-graphics/emo-#1}}% }% } \fi % \end{macrocode} % \end{macro} % -% \begin{macro}{lingchi} -% \begin{macro}{YHWH} +% \begin{macro}{\lingchi} +% \begin{macro}{\YHWH} % The definitions for the optional |\lingchi| and |\YHWH| macros follow from % that of |\emo|, except that % \begin{inlinenum} @@ -648,12 +725,12 @@ Released under LPPL v1.3c or later % \item subsequent space should be preserved and hence both macros end % with |\xspace|. % \end{inlinenum} -% While it would be nice to use Unicode inside the groups for the LuaTeX macros, -% doing so breaks the package documentation. So |\char| it is. +% While it would be nice to use Unicode inside the groups for font-using +% versions, this version is more robust given TeX pre-Unicode heritage. % \begin{macrocode} \ifemo@extra -\ifluatex -\newfontface\emo@chinese{lingchi.otf} +\ifemo@usefont +\newfontface\emo@chinese{emo-lingchi.ttf} \newfontface\emo@hebrew{LinLibertine_R.otf} \newcommand\lingchi{% \emo@index{lingchi}% @@ -661,16 +738,21 @@ Released under LPPL v1.3c or later \xspace} \newcommand\YHWH{% \emo@index{YHWH}% - \begingroup\textdir TRT\emo@hebrew \char"5D9\char"5D4\char"5D5\char"5D4\endgroup% + \begingroup% + \textdir TRT% + \emo@hebrew \char"5D9\char"5D4\char"5D5\char"5D4% + \endgroup% \xspace} \else \newcommand\lingchi{% \emo@index{lingchi}% - \raisebox{-0.2ex}{\includegraphics[height=1em]{./emo-graphics/lingchi}}% + \raisebox{-0.2ex}{% + \includegraphics[height=1em]{emo-graphics/emo-lingchi}}% \xspace} \newcommand\YHWH{% \emo@index{YHWH}% - \raisebox{-0.2ex}{\includegraphics[height=1em]{./emo-graphics/YHWH}}% + \raisebox{-0.2ex}{% + \includegraphics[height=1em]{emo-graphics/emo-YHWH}}% \xspace} \fi \fi @@ -684,34 +766,100 @@ Released under LPPL v1.3c or later % % \end{macrocode} % -% \Finale % -% ^^A ---------------------------------------------------------------------------------- -% \obeyspaces -% \typeout{} -% \typeout{╔═════════════════════emo══⊰} -% \typeout{║} -% \typeout{║ To extract build.sh, emo.ins, emo.sty, and README.md, run:} -% \typeout{║} -% \typeout{║ $ pdflatex emo.dtx} -% \typeout{║} -% \typeout{║} -% \typeout{║ To build emo's documentation with indices, run:} -% \typeout{║} -% \typeout{║ $ source build.sh} -% \typeout{║} -% \typeout{║} -% \typeout{║ To reconfigure supported emoji, run:} -% \typeout{║} -% \typeout{║ $ python3 config/emo.py -h} -% \typeout{║} -% \typeout{║} -% \typeout{║ To install emo, put these files somewhere LaTeX can find them:} -% \typeout{║} -% \typeout{║ emo.def} -% \typeout{║ emo.sty} -% \typeout{║ NotoSerifTC-Regular.otf} -% \typeout{║ emo-graphics/*.pdf} -% \typeout{║} -% \typeout{╚═════════════════════emo══⊰} -% \typeout{} +% ^^A ================================================================================== +% \section{LaTeXML Binding} +% \changes{0.2}{}{Add LaTeXML binding} +% +% To support conversion from LaTeX to HTML, emo includes a so-called binding for +% \href{https://github.com/brucemiller/LaTeXML}{LaTeXML}. It effectively is a +% (much simplified) re-implementation of emo's core functionality, only written +% in Perl against LaTeXML's API. The binding ignores the \textsf{index} option +% and does not perform error checking on emoji names. If either is important to +% you, please compile the document with LaTeX first. Furthermore, the binding +% emits necessary Unicode codepoints only, without font annotations. If you want +% to specify fonts, please use a CSS fontstack. +% +% Asking package authors to reimplement their packages for LaTeXML seems +% unreasonable to me. It leads to code duplication and places the maintenance +% burden on package authors. Yet, right after announcing emo, the question of +% LaTeXML support came up. LaTeXML includes the |latexml.sty| package, which +% defines |\iflatexml|. I would have used that command to make the three-line +% change to |emo.sty| necessary for LaTeX support, except |latexml.sty| contains +% lots of other stuff that isn't needed. Always loading that only to detect +% LaTeXML seems like a bad idea. Since reimplementing |\iflatexml| would require +% a binding anyways, I just wrote a minimal binding. As I said, LaTeXML's +% approach is broken. +% +% With that out of the way, let's get started: +% \begin{macrocode} +%<*latexml-binding> +% \end{macrocode} +% +% The binding starts with an explicit preamble because |docstrip| does not +% alllow for a redefinition of the starting characters of a line comment. It is +% followed by the Perl dependencies. +% \begin{macrocode} +## emo's LaTeXML binding. +## (C) 2023 by Robert Grimm. +## Released under LPPL v1.3c or later. +use strict; +use warnings; +use LaTeXML::Package; +% \end{macrocode} +% +% \begin{macro}{\ifemo@extra} +% Next, we use raw TeX to declare the LaTeX package and define the |emo@extra| +% conditional. There is no need to define the |emo@indexing| conditional, since +% it corresponds to the unsupported \textsf{index} option. +% \begin{macrocode} +RawTeX(<<'EOTeX'); +\ProvidesPackage{emo} + [2023/03/21 v0.2a1 emo•ji for all (LaTeX engines)] +\newif\ifemo@extra\emo@extrafalse +EOTeX +% \end{macrocode} +% \end{macro} +% +% Option prcessing is almost trivial: +% \begin{macrocode} +DeclareOption('extra', '\emo@extratrue'); +DeclareOption('index', ''); +ProcessOptions(); +% \end{macrocode} +% +% \begin{macro}{\emo@emoji@} +% \begin{macro}{\emo} +% Just like the actual package implementation, the binding reads the emoji table +% from |emo.def|. Similar to the actual implementation of the |\emo| macro when +% running under LuaLaTeX, the binding expands the named entry from the emoji +% table, producing the emoji's Unicode codepoints. +% \begin{macrocode} +InputDefinitions('emo', type => 'def', noltxml => 1); +DefMacro('\emo{}', '\csname emo@emoji@#1\endcsname'); +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% \begin{macro}{\lingchi} +% \begin{macro}{\YHWH} +% If the |emo@extra| conditional is enabled, require the |xspace| package and then +% provide minimal re-definitions of the |\lingchi| and |\YHWH| macros. Both simply +% expand to the necessary Unicode codepoints. +% \begin{macrocode} +if (IfCondition(T_CS('\ifemo@extra'))) { + RequirePackage('xspace'); + DefMacro('\lingchi', "\x{51cc}\x{9072}\\xspace"); + DefMacro('\YHWH', "\x{05D9}\x{05D4}\x{05D5}\x{05D4}\\xspace"); +} +% \end{macrocode} +% \end{macro} +% \end{macro} +% +% That's it for the binding, too. +% \begin{macrocode} +% +% \end{macrocode} +% +% +% \Finale diff --git a/graphics/emo/emo.pdf b/graphics/emo/emo.pdf index 5ac83c4240..74d69b83d5 100644 Binary files a/graphics/emo/emo.pdf and b/graphics/emo/emo.pdf differ diff --git a/graphics/emo/lingchi.otf b/graphics/emo/lingchi.otf deleted file mode 100644 index 568bee864b..0000000000 Binary files a/graphics/emo/lingchi.otf and /dev/null differ diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex index bdfd225f3c..a9b4802adc 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-calendar-plus.tex @@ -69,10 +69,12 @@ The actual week number algorithm is implemented by the |pgfcalendar-ext| package % \begin{codeexample}[preamble={\usetikzlibrary{ext.calendar-plus}}] \tikz - \calendar [week list, month label above centered, - dates=2022-07-01 to 2022-07-31, - week label left, - every week/.append style={gray!50!black,font=\sffamily}]; + \calendar[ + week list, month label above centered, + dates=2022-07-01 to 2022-07-31, + week label left, + every week/.append style={ + gray!50!black, font=\sffamily}]; \end{codeexample} % \end{stylekey} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex index 227317e765..87891a3dc2 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-misc.tex @@ -294,7 +294,7 @@ not all of them are. \begin{multicols}{2} \begin{key}{/tikz/reverse clip=\meta{direction} (default counter clockwise)} This key installs a very big rectangle which is either constructed -|counter clockwise| (like the \referencePathOperationandIndexO{circle} +\texttt{counter clockwise} (like the \referencePathOperationandIndexO{circle} path operation) or |clockwise|. \end{key} \begin{key}{/tikz/clip rule=\meta{direction} (default even odd)} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-nodes.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-nodes.tex index 37d4f79de6..e30accfdae 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-nodes.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-nodes.tex @@ -22,13 +22,14 @@ This key allows one to use a pic where usually only nodes are accepted, for example as a label. \begin{codeexample}[preamble=\usetikzlibrary{ext.nodes, ext.misc}] \begin{tikzpicture}[ - slsl/.pic={\draw (-2pt, 1.5pt) -- (2pt, .5pt) - (2pt, -1.5pt) -- (-2pt, -.5pt);}] -\node[draw, minimum width=3cm, minimum height=1cm, - label={[pic ] east:slsl}, - label={[pic, rotate=90] north:slsl}, - label={[pic ] west:slsl}, - label={[pic, rotate=-90]south:slsl}]{}; + slsl/.pic={\draw(-2pt, 1.5pt)--( 2pt, .5pt) + ( 2pt,-1.5pt)--(-2pt,-.5pt);}] +\node[ + draw, minimum width=3cm, minimum height=1cm, + label={[pic ] east:slsl}, + label={[pic, rotate= 90]north:slsl}, + label={[pic ] west:slsl}, + label={[pic, rotate=-90]south:slsl}]{}; \end{tikzpicture} \end{codeexample} \end{key} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex index 56c81376aa..a44041c02d 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-library-positioning-plus.tex @@ -164,12 +164,12 @@ This functionality is also available without the placement: \end{stylekey} \begin{stylekey}{/tikz/span vertical=\meta{list of coordinates}} Creates a rectangular node with the name |fit bounding box| that encompasses - the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum height} to + the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf/]{minimum height} to the height of this bounding box. \end{stylekey} \begin{stylekey}{/tikz/span horizontal=\meta{list of coordinates}} Creates a rectangular node with the name |fit bounding box| that encompasses - the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf]{minimum width} to + the \meta{list of coordinates} \emph{and} sets the \referenceKeyandIndexO[/pgf/]{minimum width} to the width of this bounding box. \end{stylekey} \begin{stylekey}{/tikz/span=\meta{list of coordinates}} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex index 12d96ca7c5..198245b277 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-body.tex @@ -8,10 +8,11 @@ % 2. under the GNU Free Documentation License. % \newcommand*\tikzextname{Ti\textit kZ-Extensions} -\newcommand*\tikzextversion{0.5} +\newcommand*\tikzextversion{0.5.1} %\includeonly{ -% tikz-ext-manual-en-library-misc, -% tikz-ext-manual-en-library-nodes, +%% tikz-ext-manual-en-library-misc, +%% tikz-ext-manual-en-library-nodes, +% tikz-ext-manual-en-pgf-arrows, %} \begin{document} {\colorlet{blue}{black}% links shall be black @@ -126,6 +127,7 @@ These libraries (should) work with both \pgfname\space and \tikzname. \end{codeexample} \end{center} +\tikzsetfigurename{PGF.arrows}\include{tikz-ext-manual-en-pgf-arrows} \tikzsetfigurename{PGF.trans}\include{tikz-ext-manual-en-pgf-trans} \tikzsetfigurename{PGF.shapes}% \include{tikz-ext-manual-en-pgf-shapes-circlearrow} @@ -180,6 +182,11 @@ These libraries (should) work with both \pgfname\space and \tikzname. \section*{Changelog}\addcontentsline{toc}{section}{Changelog} \begin{multicols}{2}\raggedright \noindent +Version 0.5.1 +\begin{itemize} +\item \addPGF{arrows} +\item Bugfix to |ext.pgfkeys-plus|. \cite{GH6} +\end{itemize} Version 0.5 \begin{itemize} \item \addPackage{pgffor} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex index 30b21dee6a..91b9565b97 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-main-preamble.tex @@ -41,21 +41,6 @@ \tracinglostchars=3 \input{pgfmanual-en-macros} -\newenvironment{pgfkeyslibrary}[1]{% from pgfmanual-en-macros - \begin{pgfmanualentry}% - \pgfmanualentryheadline{% - \pgfmanualpdflabel{#1}{}% - \textbf{pgfkeys Library} \texttt{\declare{#1}}}% - \index{#1@\protect\texttt{#1} pgfkeys library}% - \index{pgfkeys Libraries!#1@\protect\texttt{#1}}% - \vskip.25em - {{\ttfamily\char`\\usepgfkeyslibrary\char`\{\declare{#1}\char`\}\space\space \char`\%\space\space \LaTeX\space and plain \TeX}}\\ - {{\ttfamily\char`\\usepgfkeyslibrary[\declare{#1}]\space \char`\%\space\space Con\TeX t}}\\[.5em]% - \pgfmanualbody -}% -{% - \end{pgfmanualentry}% -} \usepackage{unicode-math} \setmathfont[Scale=MatchUppercase]{libertinusmath-regular.otf} @@ -104,8 +89,9 @@ \@tempswatrue \fi} \makeatother - +\usepgfkeyslibrary{ext.pgfkeys-plus} \usetikzlibrary{ + ext.arrows, ext.calendar-plus, ext.misc, ext.node-families, @@ -408,6 +394,12 @@ \index{#1@\originalprefix\protect\texttt{\original{#1}} environment\originalsuffix}% \index{Environments!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% } + +\newcommand*{\indexArrowtipO}[1]{% + \index{#1@\originalprefix\protect\texttt{\original{#1}} arrow tip\originalsuffix}% + \index{Arrow tips!#1@\originalprefix\protect\texttt{\original{#1}}\originalsuffix}% +} +\newcommand*{\referenceArrowtipandIndexO}[1]{\texttt{#1}\indexArrowtipO{#1}} \newcommand*{\referenceEnvironmentandIndexO}[1]{\texttt{#1}\indexEnvironmentO{#1}} \newcommand*{\referenceDecorationandIndexO}[1]{\texttt{#1}\indexDecorationO{#1}} \newcommand*{\referenceKeyandIndexO}[2][/tikz/]{\texttt{#1#2}\indexKeyO[#1]{#2}} @@ -500,4 +492,43 @@ } { \end{pgfmanualentry} -} \ No newline at end of file +} + +\usepackage{booktabs} + +\renewenvironment{arrowtip}[4]{ + \begin{pgfmanualentry} + \pgfmanualentryheadline{\textbf{Arrow Tip Kind} {\ttfamily#1}} + \index{#1@\protect\texttt{#1} arrow tip}% + \index{Arrow tips!#1@\protect\texttt{#1}}% + \pgfmanualbody + \def\currentarrowtype{#1} + \begin{minipage}[t]{\dimexpr\linewidth-5cm\relax} + #2 + \end{minipage}\hskip5mm\begin{minipage}[t]{4.75cm} + \leavevmode\vskip-2em + \tikz{ + \draw [black!50,line width=5mm,-{#1[#3,color=black]}] (-4,0) -- (0,0); + \foreach \action in {#4} + { \expandafter\processaction\action\relax } + } + \end{minipage}\par\smallskip + } +{ + \end{pgfmanualentry} +} +\makeatletter +\def\arrowexample@#1[#2]{% + {\sfcode`\.1000\scriptsize\texttt{#1[#2]}} \> + \tikz [baseline,>={#1[#2]}] \draw [line + width=0.4pt,->] (0,.5ex) -- (2em,.5ex); thin \> + \tikz [baseline,>={#1[#2]}] \draw [line + width=0.8pt,->] (0,.5ex) -- (2em,.5ex); \textbf{thick} \> + \tikz [baseline,>={#1[#2]}] \draw [line + width=1.6pt,->] (0,.5ex) -- (3em,.5ex); \\ +} +\def\manual@action@radius#1/#2/#3\relax{% + \draw [red,|<->|,semithick] ([xshift=-#1,yshift=#1]current bounding + box.north east) -- node [above, overlay] {\texttt{radius}} ++(-#1,0); +} +\makeatother \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-arrows.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-arrows.tex new file mode 100644 index 0000000000..d330360ed6 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-arrows.tex @@ -0,0 +1,268 @@ +% !TeX spellcheck = en_US +% !TeX root = tikz-ext-manual.tex +% Copyright 2023 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\section{Arrow Tips} +\label{pgflibrary:arrows} +\tikzset{external/export/.try=false}% +\begin{pgflibrary}{ext.arrows} + This library adds arrows to \pgfname/\tikzname. + + \inspiration{ArrowLoop-Q,ArrowHug-Q,ArrowUntipped1-Q,ArrowUntipped2-Q} + {ArrowLoop-A,ArrowHug-A,ArrowUntipped1-A,ArrowUntipped2-A} +\end{pgflibrary} +\begin{multicols}{2} +The arrow tips of the \referenceLibraryandIndexO{arrows.meta} library always +just touch the end of original line -- which is usually +what you want. + +But for some arrow tips (and when they lie along a path) it makes sense +that these tips shoot a bit over the end of the line. +This is why these arrow tips exist. +They can be categorized into three groups: +\begin{enumerate} +\item Centered +\item Untipped +\item Overtipped\footnote{The Overtipped arrow tips aren't yet implemented.} +\end{enumerate} +Not all original arrow tips got all variants. +For a summary, refer to table on the right side. +As with the original tips of the \referenceLibraryandIndexO{arrows.meta} library +these can be organized in the following categories. +\newcolumn +\begin{center} +\newcommand*\tip[2][]{% + \tikzset{external/export/.try=false}% + \tikz[arrows={#2 \arrowtiprow[reversed] - \arrowtiprow[sep] . #2 \arrowtiprow[]}, baseline=+-.5ex, + trim left=+-3mm, trim right=+13mm] + \draw[line width=+.5mm, postaction={draw, gray, thin,-}] (0,0) -- + (right:1);% +}% +\def\tiprow#1 &{#1\gdef\arrowtiprow{#1} &}% +\def\Tiprow#1 &{\quad#1\gdef\arrowtiprow{#1} &}% +%\centering +%\caption{Variants of the original \texttt{arrows.meta} arrow tips. +% For each example, the order is 1. reversed variant, 2. original, 3. variant. +% They gray line shows where the path actually ends. +%}\label{tab:tips} +\begin{tabular}{ll ccc} + \toprule + Group & Original & Centered & Untipped & Overtipped \\ \midrule + Barbed & \tiprow Arc Barb & \tip{Centered} & \tip{Untipped} & -- \\ + & \Tiprow Parenthesis & \tip{Centered} & \tip{Untipped} & -- \\ + & \tiprow Hooks & \tip{Centered} & -- & -- \\ + & \tiprow Straight Barb & \tip{Centered} & -- & -- \\ + & \tiprow Tee Barb & \tip{Centered} & \tip{Untipped} & -- \\ + & \Tiprow Bar & \tip{Centered} & \tip{Untipped} & -- \\ + & \Tiprow Bracket & \tip{Centered} & \tip{Untipped} & -- \\ \midrule +% Mathematical & Classical TikZ Rightarrow & -- & -- & -- \\ +% & Computer Modern Rightarrow & -- & -- & -- \\ +% & \quad To & -- & -- & -- \\ +% & Implies & -- & -- & -- \\ \midrule + Geometric & \tiprow Circle & \tip{Centered} & \tip{Untipped} & -- \\ + & \Tiprow Ellipse & \tip{Centered} & \tip{Untipped} & -- \\ + & \tiprow Kite & \tip{Centered} & -- & -- \\ + & \Tiprow Diamond & \tip{Centered} & -- & -- \\ + & \Tiprow Turned Square & \tip{Centered} & -- & -- \\ + & \tiprow LaTeX & -- & -- & -- \\ + & \tiprow Square & \tip{Centered} & -- & -- \\ + & \Tiprow Rectangle & \tip{Centered} & -- & -- \\ + & \tiprow Stealth & \tip{Centered} & -- & -- \\ + & \Tiprow Triangle & \tip{Centered} & -- & -- \\ \midrule +% Caps & & -- & -- & -- \\ + Rays & \tiprow Rays & \tip{Centered} & -- & -- \\ \bottomrule +\end{tabular} +\end{center} +\newcolumn + +\subsection{Centered} +\subsubsection{Barbed Arrow Tips} +\begin{arrowtipsimple}{Centered Arc Barb} + This is a variant of the \referenceArrowtipandIndexO{Arc Barb} tip. + The center of the arc lies on the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Bar} + A variant of the simple \referenceArrowtipandIndexO{Bar} tip. + This is a simple instance of |Centered Tee Barb| for length zero. + + The middle of the line will lie on original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Bracket} + This is a variant of the \referenceArrowtipandIndexO{Bracket} tip and + therefore an instance of the |Centered Tee Barb| arrow tip that results in something + resembling a bracket. + + The middle of the vertical part will lie on the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Hooks} + A variant of the \referenceArrowtipandIndexO{Hooks} tip. + The starting point of the hooks will lie on the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Parenthesis} + This is a variant of the \referenceArrowtipandIndexO{Parenthesis} tip and + thus an instance of the |Centered Arc Barb| arrow tip. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Straight Barb} + A variant of the \referenceArrowtipandIndexO{Straight Barb} tip. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Tee Barb} + A variant of the \referenceArrowtipandIndexO{Tee Barb} tip. + + The middle of the vertical part will lie on the original end of the path. +\end{arrowtipsimple} + +\subsubsection{Geometric Arrow Tips} +\begin{arrowtipsimple}{Centered Circle} + A variant of the \referenceArrowtipandIndexO{Circle} tip. + The center of the circle will lie on the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Diamond} + This is a variant of the \referenceArrowtipandIndexO{Diamond} tip and + thus an instance of |Centered Kite| where the length is larger than the width. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Ellipse} + This is a variant of the \referenceArrowtipandIndexO{Ellipse} tip + and thus another name for the |Centered Circle| tip + that is twice as wide as high. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Kite} + A variant of the \referenceArrowtipandIndexO{Kite} tip. + + The widest part will lie on the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Rectangle} + A variant of the \referenceArrowtipandIndexO{Rectangle} tip. + By default, it is twice as long as high. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Square} + A variant of the \referenceArrowtipandIndexO{Square} tip. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Stealth} + This is a variant of the \referenceArrowtipandIndexO{Stealth} tip. + + The weighted center will lie at the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Triangle} + This is a variant of the \referenceArrowtipandIndexO{Triangle} tip and + thus an instance of the |Centered Kite| tip with zero inset. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Centered Turned Square} + This is a variant of the \referenceArrowtipandIndexO{Turned Square} tip and + thus an instance of the |Centered Kite| tip with identical width and height and mid-inset. +\end{arrowtipsimple} + +\subsubsection{Special Arrow Tips} +\begin{arrowtipsimple}{Centered Rays} + A variant of the \referenceArrowtipandIndexO{Rays} tip. + The origin of the rays will lie on the original end of the path. +\end{arrowtipsimple} + +\subsection{Untipped} +\subsubsection{Barbed Arrow Tips} +\begin{arrowtipsimple}{Centered Arc Barb} + This is a variant of the \referenceArrowtipandIndexO{Arc Barb} tip. + The arrow tip will protrude half its line width over the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Untipped Bar} + A variant of the simple \referenceArrowtipandIndexO{Bar} tip. + This is a simple instance of |Untipped Tee Barb| for length zero. + + The middle of the line will lie on original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Untipped Bracket} + This is a variant of the \referenceArrowtipandIndexO{Bracket} tip and + therefore an instance of the |Untipped Tee Barb| arrow tip that results in something + resembling a bracket. + + The arrow tip will protrude half its line width over the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Untipped Parenthesis} + This is a variant of the \referenceArrowtipandIndexO{Parenthesis} tip and + thus an instance of the |Untipped Arc Barb| arrow tip. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Untipped Tee Barb} + A variant of the \referenceArrowtipandIndexO{Tee Barb} tip. + + The middle of the vertical part will lie on the original end of the path. +\end{arrowtipsimple} + +\subsubsection{Geometric Arrow Tips} +\begin{arrowtipsimple}{Untipped Circle} + A variant of the \referenceArrowtipandIndexO{Circle} tip. + This tip will protrude half its line width over the original end of the path. +\end{arrowtipsimple} + +\begin{arrowtipsimple}{Untipped Ellipse} + This is a variant of the \referenceArrowtipandIndexO{Ellipse} tip + and thus another name for the |Untipped Circle| tip + that is twice as wide as high. +\end{arrowtipsimple} + +\subsection{Original Arrow Tips} +\begin{arrowtipsimple}{Hug Cap} +This arrow tips will hug a circle that would touch the end of the path. + +Use the \referenceKeyandIndexO[/pgf/arrow keys/]{length} key to set up the radius of that circle. + +\begin{codeexample}[preamble=\usepgflibrary{ext.arrows}] +\begin{tikzpicture}[ + dot/.style 2 args={ + shape=circle, outer sep=+0pt, fill={#1}, minimum size={#2}}] +\node[dot={red} {2cm}] (A) {}; +\node[dot={blue}{3cm}] (B) at (6,0) {}; +\draw[ + line width=1.5cm, + arrows={Hug Cap[length=1cm]-Hug Cap[length=1.5cm]} +] (A) to[out=45, in=180] (B); +\end{tikzpicture} +\end{codeexample} +\end{arrowtipsimple} + +\begin{arrowtip}{Loop}{ + This arrow tip attaches a one-sided loop to the end of the line. + The |length| refers to the length of the whole tip while the |radius| + specifies the radius of the three rounded corners. + The width of the tip is twice the |length| (but can't specified independently). +}{length=1.5cm,radius=3.5mm}{length=1.5cm,radius=3.5mm} + \begin{arrowexamples} + \arrowexample[] + \arrowexampledup[sep] + \arrowexampledupdot[sep] + \arrowexample[open] + \arrowexample[open, swap] + \arrowexample[length=5pt,radius=0pt] + \arrowexample[reversed] + \arrowexample[slant=.3] + \arrowexample[red] + \end{arrowexamples} + % + The following options have no effect: |harpoon|, |round|, |line width|. + + On |double| lines, the arrow tip will not look correct. +\end{arrowtip} +\end{multicols} +\tikzset{external/export/.try=true}% +\endinput diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex index e26711bb35..0d6340a75a 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-shapes-circlearrow.tex @@ -79,11 +79,13 @@ circle arrow turn left west, shape example] {Circle Arrow\vrule width 1pt height 2cm}; \foreach \anchor/\placement in - {north west/above left, north/above, north east/above right, + {north west/above left, north/above, + north east/above right, west/left, center/above, east/right, mid west/right, mid/above, mid east/left, base west/left, base/below, base east/right, - south west/below left, south/below, south east/below right, + south west/below left, south/below, + south east/below right, text/left, 10/right, 130/above} \draw[shift=(s.\anchor)] plot[mark=x] coordinates{(0,0)} node[\placement] {\scriptsize\texttt{(s.\anchor)}}; diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex index ccd378a6e7..1250fd8216 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual-en-pgf-trans.tex @@ -61,7 +61,7 @@ only the |m| in |mirror| is capitalized. \begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] \begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[help lines] (-.25, -.25) grid (3.25, 1.25); \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); \draw[dashed] (1.5, -.25) -- (1.5, 1.25); @@ -79,7 +79,7 @@ only the |m| in |mirror| is capitalized. \begin{codeexample}[preamble=\usepgflibrary{transformations.mirror}] \begin{tikzpicture} -\draw[help lines] (-0.25, -.25) grid (3.25, 1.25); +\draw[help lines] (-.25, -.25) grid (3.25, 1.25); \draw[-latex] (0,0) .. controls (.5,1) .. (1,1); \draw[dashed] (1.5, -.25) -- (1.5, 1.25); diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib index 25c736c7cd..721837bbea 100644 --- a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib +++ b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.bib @@ -494,4 +494,107 @@ year = {2022}, } +' +@Software{GH6, + abstract = {{Latest version of ext.misc on CTAN appears to have a typo}}, + author = {marmotghost}, + month = mar, + title = {Latest version of ext.misc on CTAN appears to have a typo}, + url = {https://github.com/Qrrbrbirlbel/tikz-extensions/issues/6}, + urldate = {2023-04-01}, + year = {2023}, +} + +' +@Online{ArrowLoop-Q, + author = {{IV}, Edgar A. Bering}, + file = {Snapshot:https\://tex.stackexchange.com/questions/565010/set-the-color-of-a-tikz-cd-glyph-arrow-tip-with-xelatex/681474#681474:text/html}, + month = oct, + title = {Set the color of a tikz-cd Glyph arrow tip with xelatex}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/565010/16595}, + urldate = {2023-04-01}, + year = {2020}, +} + +@Online{ArrowLoop-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/565010/set-the-color-of-a-tikz-cd-glyph-arrow-tip-with-xelatex/681474#681474:text/html}, + month = apr, + title = {Answer to \enquote{Set the color of a tikz-cd Glyph arrow tip with xelatex}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/681474/16595}, + urldate = {2023-04-01}, + year = {2023}, +} + +' +@Online{ArrowHug-Q, + author = {{DC}, Alejandro}, + file = {Snapshot:https\://tex.stackexchange.com/questions/241074/better-fitting-line-to-node-in-tikz/241303#241303:text/html}, + month = apr, + title = {Better fitting line to node in {TiKZ}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/241074/16595}, + urldate = {2023-04-01}, + year = {2015}, +} + +@Online{ArrowHug-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/241074/better-fitting-line-to-node-in-tikz/241303#241303:text/html}, + month = apr, + title = {Answer to \enquote{Better fitting line to node in {TiKZ}}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/241303/16595}, + urldate = {2023-04-01}, + year = {2015}, +} + +' +@Online{ArrowUntipped1-Q, + author = {Christian}, + file = {Snapshot:https\://tex.stackexchange.com/questions/111051/tikz-arrow-tip-is-displaced?noredirect=1&lq=1:text/html}, + month = apr, + title = {{TikZ} arrow tip is displaced}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/111051/16595}, + urldate = {2023-04-02}, + year = {2013}, +} + +@Online{ArrowUntipped1-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/111051/tikz-arrow-tip-is-displaced?noredirect=1&lq=1:text/html}, + month = apr, + title = {Answer to \enquote{{TikZ} arrow tip is displaced}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/111053/16595}, + urldate = {2023-04-02}, + year = {2013}, +} + +' +@Online{ArrowUntipped2-Q, + author = {Hlavacek, Jan}, + file = {Snapshot:https\://tex.stackexchange.com/questions/11871/modifying-and-o-style-tikz-arrows-so-that-they-are-centered-at-the-end-of?noredirect=1&lq=1:text/html}, + month = feb, + title = {Modifying \texttt{*} and \texttt{o} style tikz arrows so that they are centered at the end of line}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/q/11871/16595}, + urldate = {2023-04-02}, + year = {2011}, +} + +@Online{ArrowUntipped2-A, + author = {Qrrbrbirlbel}, + file = {Snapshot:https\://tex.stackexchange.com/questions/11871/modifying-and-o-style-tikz-arrows-so-that-they-are-centered-at-the-end-of?noredirect=1&lq=1:text/html}, + month = sep, + title = {Answer to \enquote{Modifying \texttt{*} and \texttt{o} style tikz arrows so that they are centered at the end of line}}, + titleaddon = {{TeX} - {LaTeX} Stack Exchange}, + url = {https://tex.stackexchange.com/a/656241/16595}, + urldate = {2023-04-02}, + year = {2022}, +} + @Comment{jabref-meta: databaseType:bibtex;} diff --git a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf index c04e209f81..57ac4faf19 100644 Binary files a/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf and b/graphics/pgf/contrib/tikz-ext/doc/tikz-ext-manual.pdf differ diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/pgfkeyslibraryext.pgfkeys-plus.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/pgfkeyslibraryext.pgfkeys-plus.code.tex index 50cbe7a60c..b78bc60f2c 100644 --- a/graphics/pgf/contrib/tikz-ext/tex/generic/pgfkeyslibraryext.pgfkeys-plus.code.tex +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/pgfkeyslibraryext.pgfkeys-plus.code.tex @@ -103,7 +103,7 @@ {\the\numexpr\pgfkeysvalueof{\pgfkeyscurrentpath}+1\relax}, .value/.code=% copies the value of one key to another w/o expanding it \pgfkeysgetvalue{#1}\pgfkeys@temp - \expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@temp}} + \expandafter\pgfkeys@exp@call\expandafter{\pgfkeys@temp}% } \pgfqkeys{/utils}{ diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.arrows.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.arrows.code.tex new file mode 100644 index 0000000000..f1181e9f86 --- /dev/null +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.arrows.code.tex @@ -0,0 +1,288 @@ +% Copyright 2023 by Qrrbrbirlbel +% +% This file may be distributed and/or modified +% +% 1. under the LaTeX Project Public License and/or +% 2. under the GNU Free Documentation License. +% + +\usepgflibrary{arrows.meta} + +\pgfqkeys{/pgf/@arrows decl}{ + clone/.code={% + \pgfutil@namelet{pgf@decl@arrow@code}{pgf@ar@code@#1}% + \pgfutil@namelet{pgf@decl@arrow@defaults}{pgf@ar@defaults@#1}% + \pgfutil@namelet{pgf@decl@arrow@setup}{pgf@ar@setup@#1}% + \pgfutil@namelet{pgf@decl@arrow@bending@mode}{pgf@ar@bending@mode@#1}% + \pgfutil@namelet{pgf@decl@arrow@par}{pgf@ar@par@#1}% + \pgfutil@namelet{pgf@decl@arrow@cache}{pgf@ar@do@cache@#1}% + }, + append setup code/.code= + \begingroup + \pgfutil@toks@\expandafter{\pgf@decl@arrow@setup#1}% + \expandafter\endgroup + \expandafter\def\expandafter\pgf@decl@arrow@setup\expandafter + {\the\pgfutil@toks@ }, + % append parameters/.code= + % \begingroup + % \show\pgf@decl@arrow@par + % \pgfutil@toks@\expandafter{\pgf@decl@arrow@par#1}% + % \expandafter\endgroup + % \expandafter\def\expandafter\pgf@decl@arrow@par\expandafter + % {\the\pgfutil@toks@ } +} +% \pgfkeyssetvalue{/pgf/arrow keys/weight}{true} + +%%% Barbed +% Arc Barb, Parenthesis +\pgfdeclarearrow{ + clone = Arc Barb, + name = Centered Arc Barb, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{0pt} + \else + \pgfarrowssettipend{0pt} + \fi +} +\pgfdeclarearrow{ + clone = Arc Barb, + name = Untipped Arc Barb, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{\pgfarrowlength} + \else + \pgfarrowssettipend{\pgfarrowlength} + \fi +} + +% Hooks +\pgfdeclarearrow{ + clone = Hooks, + name = Centered Hooks, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{0pt} + \else + \pgfarrowssettipend{0pt} + \fi +} + +% Straight Barb +\pgfdeclarearrow{ + clone = Straight Barb, + name = Centered Straight Barb, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{.5\pgfarrowlength} + \else + \pgfarrowssettipend{.5\pgfarrowlength} + \fi +} + +% Tee Barb, Bar, Bracket +\pgfdeclarearrow{ + clone = Tee Barb, + name = Centered Tee Barb, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{0pt} + \else + \pgfarrowssettipend{0pt} + \fi +} +\pgfdeclarearrow{ + clone = Tee Barb, + name = Untipped Tee Barb, + append setup code = + \ifpgfarrowreversed\expandafter\pgfarrowssetbackend\else\expandafter\pgfarrowssettipend\fi + {\pgfutil@tempdima + \ifpgfutil@tempswa % does it not extend to the right? + \advance\pgf@x-.5\pgfarrowlinewidth + \else + \ifpgfutil@tempswb + \else + \pgf@x=.5\pgfarrowlength + \fi + \ifpgfarrowroundcap\else + \advance\pgf@x-.5\pgfarrowlinewidth + \fi + \fi + } +} +%%% Mathematical +% Classical TikZ Rightarrow +% Computer Modern Rightarrow, To +% Implies + +%%% Geometric +% Circle, Ellipse +\pgfdeclarearrow{ + clone = Circle, + name = Centered Circle, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{.5\pgfarrowlength} + \else + \pgfarrowssettipend{.5\pgfarrowlength} + \fi +} +\pgfdeclarearrow{ + clone = Circle, + name = Untipped Circle, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{\pgfarrowlength \advance\pgf@x -.5\pgfarrowlinewidth} + \else + \pgfarrowssettipend{\pgfarrowlength \advance\pgf@x -.5\pgfarrowlinewidth} + \fi +} + +% Kite, Diamond, Turned Square +\pgfdeclarearrow{ + clone = Kite, + name = Centered Kite, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{\pgfarrowinset} + \else + \pgfarrowssettipend{\pgfarrowinset} + \fi +} + +% LaTeX +% Square, Rectangle +\pgfdeclarearrow{ + clone = Square, + name = Centered Square, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{.5\pgfarrowlength} + \else + \pgfarrowssettipend{.5\pgfarrowlength} + \fi +} + +% Stealth, Triangle +\pgfdeclarearrow{ + clone = Stealth, + name = Centered Stealth, + append setup code = + % \pgfkeysgetvalue{/pgf/arrow keys/weight}\pgf@temp + % \ifx\pgf@temp\pgf@truetext + \ifpgfarrowreversed + \pgfarrowssetbackend{.25\pgfarrowlength \advance\pgf@x .25\pgfarrowinset} + \else + \pgfarrowssettipend{.25\pgfarrowlength \advance\pgf@x .25\pgfarrowinset} + \fi + % \else + % \ifpgfarrowreversed + % \pgfarrowssetbackend{\pgf@temp\pgfarrowlength} + % \else + % \pgfarrowssettipend{\pgf@temp\pgfarrowlength} + % \fi + % \fi + , + % append parameters = {,\pgfkeysvalueof{/pgf/arrow keys/weight}}, + % parameters = { + % \the\pgfarrowlinewidth,% + % \the\pgfarrowlength,% + % \the\pgfarrowwidth,% + % \the\pgfarrowinset,% + % \pgfkeysvalueof{/pgf/arrow keys/weight},% + % \ifpgfarrowharpoon h\fi% + % \ifpgfarrowopen o\fi% + % \ifpgfarrowroundjoin j\fi% + % }, +} +%%% Caps + +%%% Rays +\pgfdeclarearrow{ + clone = Rays, + name = Centered Rays, + append setup code = + \ifpgfarrowreversed + \pgfarrowssetbackend{0pt} + \else + \pgfarrowssettipend{0pt}%\pgfarrowssetvisualtipend{\pgf@xa} + \fi +} + +%%% Variants +\pgfkeys{ + Centered Ellipse /.tip = {Centered Circle[length=+3.3pt +4.95, width'=+0pt +0.5]}, + Centered Parenthesis /.tip = {Centered Arc Barb[arc=+120,length=+1.725pt +2.3]}, + Centered Bar /.tip = {Centered Tee Barb[length=+0pt]}, + Centered Bracket /.tip = {Centered Tee Barb[inset'=+0pt +1,length=+0.75pt +1]}, + Centered Diamond /.tip = {Centered Kite[inset'=+0pt .5]}, + Centered Turned Square /.tip = {Centered Kite[length=+3pt 4,width'= +0pt 1,inset'= +0pt 0.5]}, + Centered Rectangle /.tip = {Centered Square[length=+3pt +4.5,width'=+0pt +.5]}, + Centered Triangle /.tip = {Centered Stealth[inset=+0pt, angle=+60:+2.7pt +3.6]}, + Untipped Ellipse /.tip = {Untipped Circle[length=+3.3pt +4.95, width'=+0pt +0.5]}, + Untipped Parenthesis /.tip = {Untipped Arc Barb[arc=+120,length=+1.725pt +2.3]}, + Untipped Bar /.tip = {Untipped Tee Barb[length=+0pt]}, + Untipped Bracket /.tip = {Untipped Tee Barb[inset'=+0pt +1,length=+0.75pt +1]}, +} + +%%% New Arrows +\pgfdeclarearrow{ + name = Hug Cap, + parameters = \the\pgfarrowlength, + defaults = { + length = +0pt +1 + }, + setup code={ + % h = r - .5 sqrt(4 r^2 - s^2) + \ifdim2\pgfarrowlength<\pgflinewidth + \pgfarrowlength=.51\pgflinewidth + \fi + \pgfmathsetlengthmacro\pgfarrowh{\pgfarrowlength-.5*sqrt(4*\pgfarrowlength*\pgfarrowlength-\pgflinewidth*\pgflinewidth} + % a = asin(s / (2 r)) + \pgfmathsetmacro\pgfarrowangle{asin(\the\pgflinewidth/(2*\the\pgfarrowlength))} + \pgfarrowssavethe\pgfarrowlength % radius + \pgfarrowssave\pgfarrowh % h + \pgfarrowssave\pgfarrowangle % a + \pgfarrowsupperhullpoint{0pt}{.5\pgflinewidth} + \pgfarrowsupperhullpoint{\pgfarrowh}{.5\pgflinewidth} + }, + drawing code={ + \pgfpathmoveto{\pgfqpoint{\pgfarrowh}{-.5\pgflinewidth}} + \pgfpatharc{180+\pgfarrowangle}{180-\pgfarrowangle}{\pgfarrowlength} + \pgfpathlineto{\pgfqpoint{-.1pt}{.5\pgflinewidth}} + \pgfpathlineto{\pgfqpoint{-.1pt}{-.5\pgflinewidth}} + \pgfpathclose + \pgfusepathqfill + } +} + +\pgfqkeys{/pgf/arrow keys}{radius/.style={/pgf/arrow keys/inset={#1}}} +\pgfdeclarearrow{ + name = Loop, + parameters = {\the\pgfarrowlength,\the\pgfarrowinset,\ifpgfarrowopen o\fi}, + defaults = {length = +3pt +1 +0, inset = +.75pt +1 +0}, + setup code = + \ifdim\pgfarrowlength<\dimexpr2\pgfarrowinset+\pgflinewidth\relax + \pgfarrowlength\dimexpr2\pgfarrowinset+\pgflinewidth\relax + \fi + \pgfarrowssettipend{\pgfarrowlength}% + \pgfarrowssetlineend{.5\pgflinewidth}% + \pgfarrowssavethe\pgfarrowlength + \pgfarrowssavethe\pgfarrowinset, + drawing code={% + \pgfsetroundcap + \pgfpathmoveto{\pgfqpoint{.5\pgflinewidth}{0pt}}% + \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowlength-.5\pgflinewidth-\pgfarrowinset} + {0pt}}% + \pgfpatharc{+-90}{+0}{+\pgfarrowinset}% + \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowlength-.5\pgflinewidth} + {\dimexpr\pgfarrowlength-.5\pgflinewidth-\pgfarrowinset}}% + \pgfpatharc{+0}{+90}{+\pgfarrowinset}% + \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowinset+.5\pgflinewidth} + {\dimexpr\pgfarrowlength-.5\pgflinewidth}}% + \pgfpatharc{+90}{+180}{+\pgfarrowinset}% + \pgfpathlineto{\pgfqpoint{\dimexpr\pgfarrowinset+.5\pgflinewidth-\pgfarrowinset} + {\dimexpr-\pgfarrowlength+.5\pgflinewidth}}% + \ifpgfarrowopen\pgfusepathqstroke\else\pgfusepathqfillstroke\fi + } +} \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.pgfkeys-plus.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.pgfkeys-plus.code.tex deleted file mode 100644 index 6101ca8cad..0000000000 --- a/graphics/pgf/contrib/tikz-ext/tex/generic/pgflibraryext.pgfkeys-plus.code.tex +++ /dev/null @@ -1,11 +0,0 @@ -% Copyright 2022 by Qrrbrbirlbel -% -% This file may be distributed and/or modified -% -% 1. under the LaTeX Project Public License and/or -% 2. under the GNU Free Documentation License. -% - -\input pgfkeyslibraryext.pgfkeys-plus.code.tex - -\endinput \ No newline at end of file diff --git a/graphics/pgf/contrib/tikz-ext/tex/generic/tikzlibraryext.misc.code.tex b/graphics/pgf/contrib/tikz-ext/tex/generic/tikzlibraryext.misc.code.tex index 0f06079e74..5b020751df 100644 --- a/graphics/pgf/contrib/tikz-ext/tex/generic/tikzlibraryext.misc.code.tex +++ b/graphics/pgf/contrib/tikz-ext/tex/generic/tikzlibraryext.misc.code.tex @@ -5,7 +5,7 @@ % 1. under the LaTeX Project Public License and/or % 2. under the GNU Free Documentation License. % -\usepgflibrary{ext.pgfkeys-plus}% +\usepgfkeyslibrary{ext.pgfkeys-plus}% %% full arc %% https://tex.stackexchange.com/a/144297/16595 diff --git a/graphics/pstricks/contrib/pst-hsb/Changes b/graphics/pstricks/contrib/pst-hsb/Changes index 8a38b6c68a..23c89e48a1 100644 --- a/graphics/pstricks/contrib/pst-hsb/Changes +++ b/graphics/pstricks/contrib/pst-hsb/Changes @@ -1,5 +1,8 @@ ..... pst-hsb.tex -0.02 2017-12-17 - small fixes +0.03 2023-04-02 - added saturation and brightness options + for the macros +0.02 2021-12-16 - small fixes + - updated doc 0.01 2012-01-01 - first version diff --git a/graphics/pstricks/contrib/pst-hsb/README b/graphics/pstricks/contrib/pst-hsb/README index cd130d90cc..5ad999238d 100644 --- a/graphics/pstricks/contrib/pst-hsb/README +++ b/graphics/pstricks/contrib/pst-hsb/README @@ -1,3 +1,7 @@ +pst-hsb is a PSTricks related package for plotting lines and +curves with continous colors. Only colors in the hsb modell +are supported. + If you have one of the official TeX distribution installed, then all files are still present or can be installed by using the file manager. Otherwise save the files pst-hsb.sty|tex in a directory, which is part of your @@ -15,5 +19,6 @@ with pdftex, use the sequence latex->dvips->ps2pdf or simply lualatex. %% of the LaTeX Project Public License Distributed from CTAN archives %% in directory macros/latex/base/lppl.txt. +hvoss@tug.org -%% $Id: README 350 2021-12-16 10:20:18Z herbert $ +%% $Id: README 380 2021-12-29 15:23:25Z herbert $ diff --git a/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.pdf b/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.pdf index 013dc6d181..883546606e 100644 Binary files a/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.pdf and b/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.pdf differ diff --git a/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.tex b/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.tex index 08bbc20527..62b5c0073f 100644 --- a/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.tex +++ b/graphics/pstricks/contrib/pst-hsb/doc/pst-hsb-doc.tex @@ -1,7 +1,7 @@ -%% $Id: pst-hsb-doc.tex 351 2021-12-16 10:37:40Z herbert $ +%% $Id: pst-hsb-doc.tex 686 2023-04-02 13:03:12Z herbert $ \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{} -% $Id: pst-hsb-doc.tex 351 2021-12-16 10:37:40Z herbert $ +% $Id: pst-hsb-doc.tex 686 2023-04-02 13:03:12Z herbert $ \documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small, headinclude=false,footinclude=false,twoside]{pst-doc} \usepackage{pst-hsb} @@ -26,7 +26,7 @@ \title{\texttt{pst-hsb}} \subtitle{Curves with continoues color; v.\psthsbFV} -\author{Denis Girout\\Manuel Luque\\Herbert Voß} +\author{Denis Girou\\Manuel Luque\\Herbert Voß} \docauthor{} %\date{\today} \settitle @@ -48,6 +48,20 @@ Thanks to: \newpage +\section{Options} +The macros uses the hsb color model for the continuing setting of the +colors. hsb is Hue, Saturation and Brightness. All three can be defined by the +beginning and end value of the sequence. If the values for beginning and end are the +same then the value will be constant for the whole line and/or curve. The options +are preset to + +\begin{verbatim} + HueBegin=0,HueEnd=1, + SaturationBegin=1, SaturationEnd=1, + BrightnessBegin=1, BrightnessEnd=1, +\end{verbatim} + + \section{Examples} @@ -56,9 +70,11 @@ Thanks to: \begin{pspicture}(-0.5,-0.5)(11,5) % \psgrid(0,-4)(10,4) \psaxes{->}(0,0)(11,5) -\pslineHSB[linewidth=1mm,HueBegin=0,HueEnd=0.5](0,0)(10,1) -\pslineHSB[linewidth=1mm,HueBegin=0.5,HueEnd=0.7](0,1)(10,3) -\pslineHSB[linewidth=1mm,HueBegin=0.8,HueEnd=1](0,2)(10,5) +\pslineHSB[linewidth=1mm,HueBegin=0,HueEnd=0.5](0,0)(10,1)\rput[l](10,1){ 1} +\pslineHSB[linewidth=1mm,HueBegin=0,HueEnd=0.5,SaturationBegin=0](0,0.5)(10,2)\rput[l](10,2){ 2} +\pslineHSB[linewidth=1mm,HueBegin=0.5,HueEnd=0.7](0,1)(10,3)\rput[l](10,3){ 3} +\pslineHSB[linewidth=1mm,HueBegin=0.5,HueEnd=0.7,BrightnessBegin=0](0,1.5)(10,4)\rput[l](10,4){ 4} +\pslineHSB[linewidth=1mm,HueBegin=0.8,HueEnd=1](0,2)(10,5)\rput[l](10,5){ 5} \end{pspicture} \end{LTXexample} diff --git a/graphics/pstricks/contrib/pst-hsb/latex/pst-hsb.sty b/graphics/pstricks/contrib/pst-hsb/latex/pst-hsb.sty index 0a8996be21..a5a398fb74 100644 --- a/graphics/pstricks/contrib/pst-hsb/latex/pst-hsb.sty +++ b/graphics/pstricks/contrib/pst-hsb/latex/pst-hsb.sty @@ -8,4 +8,4 @@ % \@addtofilelist{pst-hsb.pro}}{}% \endinput -%% $Id: pst-hsb.sty 350 2021-12-16 10:20:18Z herbert $ +%% $Id: pst-hsb.sty 352 2021-12-16 17:14:59Z herbert $ diff --git a/graphics/pstricks/contrib/pst-hsb/tex/pst-hsb.tex b/graphics/pstricks/contrib/pst-hsb/tex/pst-hsb.tex index 975e054fc2..fe889cda45 100644 --- a/graphics/pstricks/contrib/pst-hsb/tex/pst-hsb.tex +++ b/graphics/pstricks/contrib/pst-hsb/tex/pst-hsb.tex @@ -1,4 +1,4 @@ -%% $Id: pst-hsb.tex 350 2021-12-16 10:20:18Z herbert $ +%% $Id: pst-hsb.tex 686 2023-04-02 13:03:12Z herbert $ %% %% This is file `pst-hsb.tex', %% @@ -6,7 +6,7 @@ %% %% Package `pst-hsb.tex' %% -%% Denis Girout +%% Denis Girou %% Manuel Luque %% Herbert Voss %% @@ -29,16 +29,26 @@ % interface to the `xkeyval' package \pst@addfams{pst-hsb} % -\def\fileversion{0.02} -\def\filedate{2021/12/16} +\def\fileversion{0.03} +\def\filedate{2023/04/02} \message{`PST-hsb' v\fileversion, \filedate\space (hv)} % -\define@key[psset]{pst-hsb}{HueBegin}{\def\psparametricplotHSB@HueBegin{#1}}% Between 0 and 1 -\define@key[psset]{pst-hsb}{HueEnd}{\def\psparametricplotHSB@HueEnd{#1}}% Between 0 and 1 +\define@key[psset]{pst-hsb}{HueBegin}{\def\psHSB@HueBegin{#1}}% 0..1 H +\define@key[psset]{pst-hsb}{HueEnd}{\def\psHSB@HueEnd{#1}}% 0..1 H +\define@key[psset]{pst-hsb}{SaturationBegin}{\def\psHSB@SaturationBegin{#1}}% 0..1 S +\define@key[psset]{pst-hsb}{SaturationEnd}{\def\psHSB@SaturationEnd{#1}}% 0..1 S +\define@key[psset]{pst-hsb}{BrightnessBegin}{\def\psHSB@BrightnessBegin{#1}}% 0..1 B +\define@key[psset]{pst-hsb}{BrightnessEnd}{\def\psHSB@BrightnessEnd{#1}}% 0..1 B +\define@key[psset]{pst-hsb}{ColorBegin}{\pst@getcolor{#1}\ps@ColorBegin} +\define@key[psset]{pst-hsb}{ColorEnd}{\pst@getcolor{#1}\ps@ColorEnd} \define@boolkey[psset]{pst-hsb}[Pst@]{HSB}[true]{} % Default values -\psset[pst-hsb]{HueBegin=0,HueEnd=1,HSB=true} -\psset{dimen=outer} +\psset[pst-hsb]{ + HueBegin=0,HueEnd=1, + SaturationBegin=1, SaturationEnd=1, + BrightnessBegin=1, BrightnessEnd=1, + HSB=true,ColorBegin=white,ColorEnd=black} +\psset{dimen=outer,variableColor=false} \def\psparametricplotHSB{\pst@object{psparametricplotHSB}} \def\psparametricplotHSB@i#1#2#3{{% @@ -69,11 +79,23 @@ {\ifPst@HSB % Other points than the first one /PointY exch def /PointX exch def - Counter \psk@plotpoints\space div - \psparametricplotHSB@HueEnd\space - \psparametricplotHSB@HueBegin\space sub mul - \psparametricplotHSB@HueBegin\space add - 1 1 sethsbcolor + Counter \psk@plotpoints\space div /Factor ED + \psHSB@HueEnd\space + \psHSB@HueBegin\space sub % HueEnd-HueBegin + dup 0 eq { pop \psHSB@HueBegin\space } + { Factor mul \psHSB@HueBegin\space add } ifelse + /H_hsb ED + \psHSB@SaturationEnd\space + \psHSB@SaturationBegin\space sub + dup 0 eq { pop \psHSB@SaturationBegin\space } + { Factor mul \psHSB@SaturationBegin\space add } ifelse + /S_hsb ED + \psHSB@BrightnessEnd\space + \psHSB@BrightnessBegin\space sub + dup 0 eq { pop \psHSB@BrightnessBegin\space } + { Factor mul \psHSB@BrightnessBegin\space add } ifelse + /B_hsb ED + H_hsb S_hsb B_hsb sethsbcolor % H S B was on stack OldX OldY PointX PointY lineto lineto stroke PointX PointY moveto @@ -88,6 +110,12 @@ \begin@OpenObj \pst@getcoor{#1}\pst@tempA \pst@getcoor{#2}\pst@tempB +% \typeout{\psHSB@HueEnd~ +% \psHSB@HueBegin~ +% \psHSB@SaturationBegin~ +% \psHSB@SaturationEnd~ +% \psHSB@BrightnessBegin~ +% \psHSB@BrightnessEnd}% \addto@pscode{% \pst@tempA /y0 ED /x0 ED @@ -97,6 +125,11 @@ /m y1 y0 sub x1 x0 sub div def /t x0 dx sub def /Counter 0 def + \ifPst@variableColor + /startWave + lambda dColor add dup /lambda ED + tx@addDict begin wavelengthToRGB Red Green Blue end setrgbcolor + \fi gsave x0 y0 translate \psk@plotpoints { @@ -105,20 +138,37 @@ t dup m mul 1 Counter eq { moveto currentpoint /OldY ED /OldX ED } % First point - {\ifPst@HSB % Other points than the first one + {\ifPst@HSB % Other points than the first one /PointY exch def /PointX exch def - Counter \psk@plotpoints\space div - \psparametricplotHSB@HueEnd\space - \psparametricplotHSB@HueBegin\space sub mul - \psparametricplotHSB@HueBegin\space add - 1 1 sethsbcolor + Counter \psk@plotpoints\space div /Factor ED + \psHSB@HueEnd\space + \psHSB@HueBegin\space sub % HueEnd-HueBegin + dup 0 eq { pop \psHSB@HueBegin\space } + { Factor mul \psHSB@HueBegin\space add } ifelse + /H_hsb ED + \psHSB@SaturationEnd\space + \psHSB@SaturationBegin\space sub + dup 0 eq { pop \psHSB@SaturationBegin\space } + { Factor mul \psHSB@SaturationBegin\space add } ifelse + /S_hsb ED + \psHSB@BrightnessEnd\space + \psHSB@BrightnessBegin\space sub + dup 0 eq { pop \psHSB@BrightnessBegin\space } + { Factor mul \psHSB@BrightnessBegin\space add } ifelse + /B_hsb ED + H_hsb S_hsb B_hsb sethsbcolor % H S B was on stack OldX OldY PointX PointY lineto lineto stroke PointX PointY moveto - /OldX PointX def /OldY PointY def - \else lineto \fi - } ifelse + /OldX PointX def /OldY PointY def + \else + \ifPst@variableColor + \else + lineto + \fi + \fi + } ifelse } repeat grestore }% -- cgit v1.2.3