better ink representation in obsidian #29

Closed
opened 2026-10-20 19:05:36 +02:00 by daniel · 2 comments
Owner

would it be possible to show unconfirmed ink overlays approximately where it is rendered in the remarkable equivivalent as (half transparent?) overlay?

would it be possible to show unconfirmed ink overlays approximately where it is rendered in the remarkable equivivalent as (half transparent?) overlay?
Collaborator

✅ Agent run completed

2m43s · 36 turns · $1.04 · pushed agent/remark-ink-overlay · session saved — new comments resume this run

✅ **Agent run completed** _2m43s · 36 turns · $1.04 · pushed `agent/remark-ink-overlay` · session saved — new comments resume this run_
Collaborator

What I found

  • Yes, it's feasible, and no new data is needed. For every remark image, the plugin already saves where the ink was written: an InkStrokes.at = { text, x, below } record in reMarkable/.sync/ink/<image>.json (src/ink/inkimage.ts:69-83, written in src/main.ts:~2183). text is the printed row, x is the left edge in pt from the page edge, and below is the offset in pt under that row's baseline. Sending a note back already uses this to draw the ink in place (overlayPlacements, src/ink/inkrender.ts:181).
  • Plan: a rendering-only overlay. Find the anchor row in the note (reusing anchorAbove/wordsOf from remarkinsert.ts). Map the tablet text column onto Obsidian's column width, then draw the existing remark PNG there at about 50% opacity with pointer-events: none. This covers both reading view (post-processor) and live preview (CM6 view plugin).
  • Rules for the overlay:
    • It only shows for unconfirmed remarks, and disappears on ✓ Confirm or ⤵ Insert as text.
    • The callout and the note content stay unchanged.
    • Old remarks without a recorded position, and pages added on the tablet, get no overlay.
    • It is behind a new setting that is on by default.
  • It is approximate on purpose. Obsidian wraps text differently from the tablet's fixed page, so the overlay is anchored to the row's line and scaled horizontally to the column.

Created

  • MR !30: the full hand-off (placement module with tests, reading view, live preview, CSS, setting, README).

Follow-ups

  • Possible later: clicking an overlay scrolls to its callout or opens the correction editor (left out of !30 on purpose).
## What I found - **Yes, it's feasible, and no new data is needed.** For every remark image, the plugin already saves where the ink was written: an `InkStrokes.at = { text, x, below }` record in `reMarkable/.sync/ink/<image>.json` (`src/ink/inkimage.ts:69-83`, written in `src/main.ts:~2183`). `text` is the printed row, `x` is the left edge in pt from the page edge, and `below` is the offset in pt under that row's baseline. Sending a note back already uses this to draw the ink in place (`overlayPlacements`, `src/ink/inkrender.ts:181`). - **Plan: a rendering-only overlay.** Find the anchor row in the note (reusing `anchorAbove`/`wordsOf` from `remarkinsert.ts`). Map the tablet text column onto Obsidian's column width, then draw the existing remark PNG there at about 50% opacity with `pointer-events: none`. This covers both reading view (post-processor) and live preview (CM6 view plugin). - **Rules for the overlay:** - It only shows for **unconfirmed** remarks, and disappears on ✓ Confirm or ⤵ Insert as text. - The callout and the note content stay unchanged. - Old remarks without a recorded position, and pages added on the tablet, get no overlay. - It is behind a new setting that is on by default. - **It is approximate on purpose.** Obsidian wraps text differently from the tablet's fixed page, so the overlay is anchored to the row's line and scaled horizontally to the column. ## Created - MR !30: the full hand-off (placement module with tests, reading view, live preview, CSS, setting, README). ## Follow-ups - Possible later: clicking an overlay scrolls to its callout or opens the correction editor (left out of !30 on purpose).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
daniel/obsidian-remarkable-round-trip#29
No description provided.