typst / typst/codex

Lack of ⊻ U+22BB

Open
#137 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

proposal
Dominant language
Rust
Stars
53
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Currently, in Typst, the xor symbol is mapped to ⊕ (U+2295, plus.o). I propose remapping xor to ⊻ (U+22BB, XOR in Unicode), which is currently not encoded in Typst.

Rationale

Semantic Consistency: Typst uses ∨ (or, U+2228) for the logical OR operation. In mathematical logic, if "OR" is represented by the "vee" symbol (∨), its exclusive counterpart "XOR" is standardly represented by the "vee with bar" symbol (⊻).

Unicode Alignment: The Unicode character U+22BB is explicitly named "XOR". Using this mapping aligns Typst with international standards.

Ambiguity Resolution: Currently, xor is an alias for plus.o (⊕). While ⊕ is sometimes used for XOR (especially when "OR" is represented as +), it primarily means "circled plus" or "direct sum." Decoupling these allows:

xor → ⊻ (Logical exclusive OR)

plus.o → ⊕ (Mathematical circled plus)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing xor and plus.o mappings in the symbol definitions. The change is complete when xor maps to ⊻ (U+22BB) while plus.o remains mapped to ⊕ (U+2295), with the mappings behaving consistently in the project.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.