ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: How to make words searchable without diacritics
Date: Sun, 6 Aug 2023 20:37:55 +0200	[thread overview]
Message-ID: <1a0f27f8-42db-59cc-9305-552192658a26@gmx.es> (raw)
In-Reply-To: <CAK9ODgRt+scSa8i3t0W4vdRc+0aY3n1vZ3dVdw4W+WXYGCfJ2g@mail.gmail.com>

On 8/5/23 21:16, Marcus Vinicius Mesquita wrote:
> Dear List,
>
> I have a lot of latin words in a document with the length of the
> vowels indicated by diacritics, for example: fīlĭa.
>
> Is it possible somehow to make these words searchable without the diacritics?
> That is, if I make a search for filia in the final pdf file, fīlĭa
> would also be found?

Dear Marcus Vinicius,

in PDF (the format itself), ActualText is a way of providing a text
replacement for the displayed element.

If you use ActualText, the string you search is the text replacement you
provide. That way, you could find literally “whatever you want” (being
"filia" its ActualText).

Hans provides this jewel in back-imp-pdf.mkxl and back-pdf.mkiv (adapter
for your needs):

  \starttext
  text \pdfbackendactualtext{whatever you want}{filia} text
  \stoptext

That being said, I think this is the wrong approach to your issue.

Firefox also disables diacritics by default (at least for me, this is
not a minor issue).

In any case, the PDF viewer used to search must have ActualText implemented.

I hope it helps,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2023-08-06 18:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05 19:16 [NTG-context] " Marcus Vinicius Mesquita
2023-08-06 14:05 ` [NTG-context] " Bruce Horrocks
2023-08-06 18:37 ` Pablo Rodriguez [this message]
2023-08-07  6:11   ` Henning Hraban Ramm
2023-08-07 12:17     ` Marcus Vinicius Mesquita
2023-08-07 17:14       ` Ulrike Fischer
2023-08-07 17:19       ` Henning Hraban Ramm
2023-08-07 18:58         ` Marcus Vinicius Mesquita
2023-08-07 19:57           ` Hans Hagen
2023-08-08  1:22             ` Marcus Vinicius Mesquita

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a0f27f8-42db-59cc-9305-552192658a26@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).