A smallish Android RSS reader http://capyreader.com/
  • Kotlin 99%
  • Ruby 0.5%
  • Python 0.2%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Josiah Campbell 7639ad3099
feat(reader): render math with a KaTeX port (#2405)
* feat(mallet): port KaTeX to Kotlin

Add com.jocmp.mallet.tex, a port of KaTeX's lexer, macro expander,
macros, parser, symbol tables, and HTML builder, so formulas parse and
lay out exactly as KaTeX does.

KaTeX leaves horizontal layout to the browser through katex.css.
TexLayout emulates the parts of the stylesheet the builders rely on
and emits positioned glyphs, rules, and SVG paths in ems. makeVList
resolves row offsets directly instead of building pstrut spans.

Glyph metrics come from KaTeX's fontMetricsData, regenerated with
scripts/katex_metrics.mjs, and the app ships KaTeX's TTFs.

* feat(reader): render math with the KaTeX port

Recover TeX from KaTeX, MathML, Pandoc, and MathJax markup so math no
longer flattens into three garbled copies. By default the reader shows
the source as code; "Render math formulas" typesets it with
com.jocmp.mallet.tex and draws the result with KaTeX's fonts.

Extraction, the setting, and plain-text summaries come from the
earlier jc/mallet-math work; the typesetting is new.

* fix(mallet): read KaTeX source after full-content extraction

Full-content extraction keeps only whitelisted attributes, so the
annotation's encoding="application/x-tex" is stripped and the KaTeX
span flattened into its MathML, TeX, and visual copies. KaTeX emits a
single annotation, so inside KaTeX markup a bare annotation is still
the TeX source.

* fix(mallet): size multiple integrals by their glyph advance

KaTeX's metrics reuse \int's width for \iint and \iiint, but the
glyphs are about twice as wide. Browsers size the span by the font
advance, so KaTeX looks right there; TexLayout used the metric width
and drew the subscript and following atoms over the integral.

* feat(settings): flag math rendering as experimental with a beaker icon

Co-authored-by: Josiah Campbell <9521010+jocmp@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* perf(mallet): cut per-formula allocation in the KaTeX port

Round em values with integer math instead of BigDecimal, parse "Nem"
strings without a regex, and share the default catcode table until a
lexer changes it, since KaTeX makes a lexer per macro expansion.

Median allocation per formula drops from 91 KB to 76 KB and CPU from
47us to 41us on the coverage corpus.

* test(mallet): pin KaTeX layouts with a golden snapshot

Records every item's position and size for the coverage corpus in
display and inline mode plus every symbol command (320 layouts), and
fails on any change beyond 1e-6em. Generated from the layout before
the allocation work, so it also confirms that change was neutral.

* perf(mallet): lay out KaTeX items in place instead of copying

TexLayout copied every item into a new list at each nesting level as
it translated children into place. Nodes now lay out into one shared
buffer of mutable items that are shifted, scaled, and mirrored in
place, then published once as TexItems. Margins no longer box a Pair,
the multiple-integral advance check no longer allocates a Pair per
glyph, two regexes are compiled once, and parseSymbol skips its \verb
and combining-mark regexes unless the symbol could match.

Median allocation per formula drops from 76 KB to 53 KB (91 KB before
the previous change); CPU is unchanged within noise. The layout golden
snapshot is identical.

* chore(mallet): mark the KaTeX layout golden as generated

* perf(mallet): check KaTeX span classes through a cached bitmask

TexLayout asked each span about its classes dozens of times, as
linear hasClass scans and hash lookups over class sets. A span now
maps its classes to a bitmask once, on first check, and every later
check is a bit test. Margin and padding sums are skipped for spans
with no class that contributes one.

Median CPU per formula drops from 49.7us to 38.9us and allocation
from 54.9 KB to 52.0 KB (median of five runs). The layout golden
snapshot is identical.

* perf(mallet): skip items in KaTeX natural-width passes

A vlist lays each row out once to find its natural width and throws
the result away. That pass now returns a span's width before making
background, border, absolute, or glyph items, since none of them
change it.

Median allocation per formula drops from 52.0 KB to 49.8 KB; CPU is
unchanged within noise. The layout golden snapshot is identical.

* fix(settings): mark math rendering experimental in its title

Replace the beaker icon and the subtitle with a plain title, "Render
math formulas (Experimental)". The subtitle only repeated the title.
TextSwitch goes back to having no title icon.
2026-11-20 10:45:04 -05:00
.bundle Consolidate article forge (#1943) 2026-03-23 22:50:48 -05:00
.claude/skills Add review-translations skill (#2304) 2026-10-19 09:02:53 -04:00
.github ci: remove automatic Claude code review workflow (#2400) 2026-11-09 20:18:09 -05:00
.idea Pad end of article search field (#2277) 2026-10-05 21:36:24 -04:00
.vscode Update github issue templates 2024-12-06 21:29:05 -06:00
app feat(reader): render math with a KaTeX port (#2405) 2026-11-20 10:45:04 -05:00
bench Lazily resolve WebView user agent 2026-06-14 13:06:51 -05:00
capy feat(reader): render math with a KaTeX port (#2405) 2026-11-20 10:45:04 -05:00
fastlane docs: prep release notes for 1217 (#2402) 2026-11-09 21:27:23 -05:00
feedbinclient Update deps (#2044) 2026-04-19 14:45:53 -05:00
feedfinder Update deps (#2258) 2026-09-28 20:41:21 -04:00
gradle chore(deps): update plugin com.google.devtools.ksp to v2.3.14 (#2415) 2026-11-17 09:12:44 -05:00
mallet feat(reader): render math with a KaTeX port (#2405) 2026-11-20 10:45:04 -05:00
mercuryparser fix(mercuryparser): keep real Rosa image credits (#2356) 2026-10-28 09:30:18 -04:00
minifluxclient Improve Miniflux sync performance (#1946) 2026-03-24 20:55:20 -05:00
openapi Add Miniflux support (#1536) 2026-01-31 15:40:58 -06:00
readerclient fix(bazqux): Wrap reader item IDs in tag URI (#2084) 2026-04-29 22:23:11 -05:00
rssparser Encode unescaped characters in local feed links (#2280) 2026-10-05 22:26:09 -04:00
scripts Prep release notes for 1213 (#2302) 2026-10-19 08:52:13 -04:00
site [skip ci] Update README image 2024-08-11 16:35:53 -05:00
technotes feat(reader): render math with a KaTeX port (#2405) 2026-11-20 10:45:04 -05:00
.gitattributes feat(reader): render math with a KaTeX port (#2405) 2026-11-20 10:45:04 -05:00
.gitignore Update deploy env vars 2026-09-28 21:44:47 -04:00
.tool-versions build(ci): bump Ruby to 4.0.9 (#2345) 2026-10-26 21:05:27 -04:00
AGENTS.md [skip ci] Prep 1203 release notes 2026-03-23 21:08:53 -05:00
build.gradle.kts chore(deps): update android gradle plugin to v9.5.1 (#2382) 2026-11-06 09:00:31 -05:00
bumpver.yml Bump version 2026.11.1216 to 2026.11.1217 2026-11-10 02:46:40 +00:00
CLAUDE.md chore(deps): update android gradle plugin to v9.5.1 (#2382) 2026-11-06 09:00:31 -05:00
CONTRIBUTING.md Create CONTRIBUTING.md 2025-07-01 18:18:48 -05:00
debug.keystore Fix up article list (#80) 2024-04-06 14:26:23 -05:00
Gemfile Update deps (#2044) 2026-04-19 14:45:53 -05:00
Gemfile.lock Update deps (#2044) 2026-04-19 14:45:53 -05:00
gradle.properties Speed up test CI (#2246) 2026-09-20 14:28:50 -04:00
gradlew Update deps (#2258) 2026-09-28 20:41:21 -04:00
gradlew.bat chore(deps): update gradle to v9.8.2 (#2381) 2026-11-06 08:47:54 -05:00
LICENSE Update animated pane behavior (#1564) 2025-11-05 23:45:26 -06:00
Makefile chore(deps): update android gradle plugin to v9.5.1 (#2382) 2026-11-06 09:00:31 -05:00
README.md [skip ci] Update README 2026-08-02 10:16:37 -05:00
renovate.json build: add Renovate config (#2378) 2026-11-05 10:54:02 -05:00
settings.gradle.kts build(mercuryparser): vendor mercury-parser-kt as a module (#2340) 2026-10-26 13:56:37 -04:00

Capy Reader

A smallish RSS reader with support for Feedbin, FreshRSS, Miniflux and local feeds.

Tests Translation status

Download

Capy Reader is free across all sources. It is available for devices running Android 11 or later.

Releases

  • Google Play and F-Droid releases happen every week or so depending on new features, bugfixes and translations.
  • Nightly releases are a separate package marked with a "-nightly" suffix. These are unstable, untested builds.

Reporting a bug

Bug reports are always welcome and are a top priority. Please search the discussions first and issues to make sure the bug is new and hasn't been reported yet.

If you're in doubt or run into an unreported issue, go ahead and submit a bug report. Please include details like app version, OS version, and steps to reproduce the bug. Screenshots are also useful!

Report a bug

Feature Requests

If you have questions or a general feature request, please post them to discussions as a feature request.

Full Content Support

Sometimes Capy's full content mode doesn't work as expected on a site due to the chaos of the web.

When this happens, please submit a separate issue to support full content for that site: Full Content Request form

Writing and verifying full content parsers can be time consuming. If you find this useful, consider donating to show your support.

Roadmap

Check out the project roadmap to see what's currently in progress and on deck.

Contributing

Translations

Translations are hosted on Weblate and are open to everyone to add or update translations. If you don't see your language, feel free to add it!

Pull Requests

If you want to create a pull request please ask first. This will save time in review, and save your time writing code if it doesn't fit for the app.

Building the app

Getting Started

  1. Clone this repository
  2. Install Android Studio if you don't have it already
  3. Sync Gradle
  4. In the toolbar, go to Run > Run 'app'

Build a signed release (Optional)

By default the app will build with a debug keystore. Follow the instructions below to build a signed release.

  1. Ensure you have a keystore with the name release.keystore in the root directory.

  2. Next, create a file called secrets.properties, also in the root directory, with the following values

    key_alias=
    store_password=
    key_password=