[FEATURE]: Make it easier to copy selected formulas as LaTeX code in the Web UI

Aperta
#65,375 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Start in the Web UI's markdown/message rendering path where math is rendered with KaTeX, and find where fenced latex/math code blocks get their copy button so you can see why it is dropped for formulas. Compare against KaTeX's copy-tex extension, which annotates rendered output with the original source. Done means selecting one or several rendered formulas and pasting yields their LaTeX source, and the code-block copy button survives. Note the reporter offers to open the PR himself.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/web type/feature version/v2
Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request

I often copy formulas into my notes. Right now I have to extract the LaTeX from the whole reply or switch to the TUI. I'd like to select all or part of a rendered formula in the Web UI and copy its complete LaTeX source.

Cherry Studio already supports this via KaTeX's copy-tex extension. A review comment on #64380 also noted that latex and math code blocks lose their copy button when rendered as formulas.

The local patch shown below preserves and reads KaTeX's source annotations, which also fixes #54769. If this is welcome, I can open a single PR or split the annotation fix and the new copy behavior into two PRs.

Copying one formula
Copying one formula as LaTeX
Copying text and multiple formulas
Copying text and multiple formulas as LaTeX
Lingua principale
TypeScript
Stelle
227k
Fork
30.7k
Merge medio
3h 57m
PR unite (30g)
484

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di anomalyco/opencode

Tutte le issue di anomalyco/opencode

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.