Bug 492012

Summary: Feature: Highlighter Tool: Various Options to Snap to Word
Product: [Applications] okular Reporter: Leonard Mada <leo.mada>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: wishlist CC: aacid
Priority: NOR    
Version: 23.08.1   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Leonard Mada 2024-08-21 22:55:25 UTC
Feature:
Highlighter Tool: Various Options to Snap to Word-Boundaries

SUMMARY
Implement Drop-Down list in Okular with options how to Snap selection/highlighter to word boundaries:
- No snap: selection starts/ends where user sets the cursor/mouse;
- Snap to word: snaps to first and last contiguous characters;
- Snap to word + Braces: includes the braces (if present);
- Snap to word + Space: includes surrounding space (if present);
- Snap to word with 1/2 Space: extends for half the space (if present);

STEPS TO REPRODUCE
1. Open any pdf document;
2. Select Highlighter Tool
3. Try to highlight the full words within an expression;

OBSERVED RESULT
It requires a lot of tweaking to get the start of a word right or the end of the word right.

EXPECTED RESULT
Drop-Down list in the UI for rapid selection of the type of Word-snapping.
Snap word: extends selection up to the starting character and ending character of the words in the selction. If the pointer is on a space, shrinks selection to the closest character (we do NOT want the starting letter or ending letter of the next/previous word).
Snap word + Braces: include any surrounding braces, e.g. when highlighting Math formulas;
Snap word + Space: include the surrounding space; some users like to include the space (but I do not);
Snap word + 1/2 Space: include only half of the space-width;
No snap: selection starts/ends where the pointer starts & ends (or close to these points); e.g. for difficult selections, where the options above fail;

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Issue 414474 is affected by this option.
https://bugs.kde.org/show_bug.cgi?id=414474

Double clicking a word: will honor the option described in this Feature (if any Snap word option is selected). If the "No snap" is selected, then just use the simple snap.