ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: [NTG-context] Re: incosistent output of --- dash
Date: Sat, 6 Apr 2024 13:08:43 +0200	[thread overview]
Message-ID: <8b5e6e1b-1b95-38f9-7836-0ede4fe2b1e8@gmx.es> (raw)
In-Reply-To: <171239660291.3369327.17842960041450679863@cgl.ntg.nl>

On 4/6/24 11:43, madiazm.eoicc@gmail.com wrote:
> Hi everyone,

Hi Miguel,

> […]
> Am I missing something on the use of this ligature?

I don’t think so.

In some cases you may not get the ligature for a good reason:

  \starttyping
  program --option=value file.ext
  \stoptyping

It would make no sense to get an en-dash there (but I guess you don’t
mean that).

But all OSes provide character maps to get single characters. And also
Unicodia works fine in Windows (https://mercury13.github.io/unicodia/,
just in case it might suit your needs).

Having a single character (emoji, dashes or whatever) is way more
readable than a character combination for a ligature or a TeX command.

This single-character approach also makes easier to copy and paste text
to other formats.

> (the question is just out of curiosity, since I plan to create a
> command that adds a hairspace after or before the dash, since I don't
> like it to stick to some letters like "o").
Just consider that you should add an horizontal box (or pair both space
and hyphen), otherwise you may get a line break between character and
hyphen (instead of the hair space):

  \starttext
  \startTEXpage[offset=2st]
  \hsize\zeropoint
  this —\hairspace or so\hairspace— that

  this \hbox{—\hairspace}or so\hbox{\hairspace—} that
  \stopTEXpage
  \stoptext

Just in case it might help,

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2024-04-06 11:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-06  9:43 [NTG-context] " madiazm.eoicc
2024-04-06 10:23 ` [NTG-context] " Henning Hraban Ramm
2024-04-06 11:38   ` Wolfgang Schuster
2024-04-07  5:41     ` Hans Hagen
2024-04-07  6:04       ` vm via ntg-context
2024-04-06 11:08 ` Pablo Rodriguez via ntg-context [this message]
2024-04-07 17:56   ` madiazm.eoicc

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=8b5e6e1b-1b95-38f9-7836-0ede4fe2b1e8@gmx.es \
    --to=ntg-context@ntg.nl \
    --cc=oinos@gmx.es \
    /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).