ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez via ntg-context <ntg-context@ntg.nl>
To: Steffen Wolfrum via ntg-context <ntg-context@ntg.nl>
Cc: Pablo Rodriguez <oinos@gmx.es>
Subject: Re: never add a hyphen to break a URL
Date: Mon, 24 Oct 2022 20:04:11 +0200	[thread overview]
Message-ID: <699c7b11-3bd0-058a-671c-ee74355b7bb0@gmx.es> (raw)
In-Reply-To: <027D89D2-3178-4AD0-9072-14B3238323A6@st.estfiles.de>

On 10/24/22 18:54, Steffen Wolfrum via ntg-context wrote:
> Hi,
>
> according to the Chicago Manual of Style we should «never add a hyphen to break a URL»:
>
> (https://www.chicagomanualofstyle.org/qanda/data/faq/topics/URLs/faq0008.html)

Hi Steffen,

I think this is not even a question of style.

myhouse.com and my-house.com are different domains.

> Is there a switch to forbid \useURL adding hyphens?

\hyphenatedurl{} is the way to go. Although you add a hyphen (and a
blank space [spaces as part of urls need to be escaped) to your url.

I would also enclose the url inside \startasciimode...\stopasciimode to
avoid escaping the percent sign.

The percent sign has to be escaped as \letterpercent (otherwise, you get
\%) in text.

A simpler approach would read (there is a single url, instead of two
[less typos in the end]):

\setupinteraction[state=start]

\starttext

\def\MyURL[#1]{\goto{\tt\hyphenatedurl{#1}}[url(#1)]}

\MyURL[https://litteraturbanken.se/författare/CollijnI/titlar/ActaEtProcessusCanon/sida/614/faksimil?show_search_work&s_query=retractata&s_lbworkid=lb487378&s_mediatype=faksimil&s_word_form_only]
\stoptext

But https://wiki.contextgarden.net/URL has more info.

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://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
___________________________________________________________________________________

  reply	other threads:[~2022-10-24 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 16:54 Steffen Wolfrum via ntg-context
2022-10-24 18:04 ` Pablo Rodriguez via ntg-context [this message]
2022-10-25  9:05   ` Steffen Wolfrum via ntg-context
2022-10-25  9:47     ` Hans Hagen via ntg-context
2022-10-25 10:11       ` Steffen Wolfrum via ntg-context
2022-10-25 16:15         ` Pablo Rodriguez via ntg-context

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=699c7b11-3bd0-058a-671c-ee74355b7bb0@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).