auto-permalink icons in copy-paste

22 views
Skip to first unread message

Charilaos Skiadas

unread,
May 3, 2026, 1:40:06 PMMay 3
to prete...@googlegroups.com
This is probably fairly minor, but I am a bit bothered with how auto-permalinks behave when copying. In the figure below, whose text you can find here: https://skiadas.github.io/robotics-course-site/sec-exam1-study-guide.html

Each list item has an auto-permalink entry associated with it, available when hovered over to the left, which can be clicked on to get a link to that particular location, and that’s all fine and well.
But when I try to select a particular line for copying like I did in the picture above, or maybe try to copy multiple lines, it is extremely easy to also include in the copy the permalink character 🔗   (and completely unavoidable for multiple lines with permalinks in-between them.

In my opinion those hyperlink characters should not be copyable, and I believe we can achieve that by adding to the .autopermalink css:

.autopermalink {
user-select: none;
}

This allows the autopermalinks to still be clicked but they are no longer selectable for copy-paste. Am I missing something?
Would that affect the behavior for screen readers in some way?


PastedGraphic-1.png


On a tangential note, I am a bit bothered that I cannot copy the numbers from the numbered list along with the items. But that’s a whole other topic probably, and perhaps hard to do with more custom markers etc.

Charilaos Skiadas
Department of Mathematics
Hanover College


Rob Beezer

unread,
May 3, 2026, 4:07:31 PMMay 3
to prete...@googlegroups.com
I believe we have had this problem before, and the solution was similar to what you suggest. Not in a position to dig too deep right now. We had a .unselectable class. Use the pickaxe (git log -S unselectable) for more history?

On May 3, 2026 7:39:50 PM GMT+02:00, Charilaos Skiadas <cski...@gmail.com> wrote:
>This is probably fairly minor, but I am a bit bothered with how auto-permalinks behave when copying. In the figure below, whose text you can find here: https://skiadas.github.io/robotics-course-site/sec-exam1-study-guide.html
>
>Each list item has an auto-permalink entry associated with it, available when hovered over to the left, which can be clicked on to get a link to that particular location, and that’s all fine and well.
>But when I try to select a particular line for copying like I did in the picture above, or maybe try to copy multiple lines, it is extremely easy to also include in the copy the permalink character 🔗 (and completely unavoidable for multiple lines with permalinks in-between them.
>
>In my opinion those hyperlink characters should not be copyable, and I believe we can achieve that by adding to the .autopermalink css:
>
>.autopermalink {
> user-select: none;
>}
>
>This allows the autopermalinks to still be clicked but they are no longer selectable for copy-paste. Am I missing something?
>Would that affect the behavior for screen readers in some way?
>
>
>

Andrew Scholer

unread,
May 4, 2026, 10:58:50 AMMay 4
to prete...@googlegroups.com
Sounds like a great idea. I can't see any accessibility concerns. (If anything, I think we should be doing more to suppress the permalinks for screen readers.)

As for current examples, there is no generic `.unselectable` rule. Applying the style directly to `.autopermalink` as you propose makes sense.

Andrew

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwNi5iZWV6ZXI.1777838849%40pnsh.

Charilaos Skiadas

unread,
May 4, 2026, 12:00:31 PMMay 4
to prete...@googlegroups.com
Ok pull request prepared: https://github.com/PreTeXtBook/pretext/pull/2839
I assumed that I should include a run of the cssbuilder script as part of the commit.

I did find a .prompt.unselectable in the codelikes, I think probably added when we did the console changes to include the prompts. An alternative would be to unify those two into a .unselectable and add that class to the generated permalinks, though maybe something to do if more unselectable cases come up? 

Charilaos Skiadas
Department of Mathematics
Hanover College

Rob Beezer

unread,
May 7, 2026, 12:37:39 PMMay 7
to prete...@googlegroups.com
#2839 merged, so this will appear soon via the CLI. Thanks, Haris for the work
on this one. And thanks to Andrew for his input here.

I saw the ".unselectabe" as well, during testing. Additionally, this new rule
shows up in CSS files, like for EPUB and for Kindle, where we should not even
have permalinks.

1. In #2836, Andrew is making a place for "web only" stuff, as I understand it.
Maybe everything about permalinks should/could move there?

2. I sorta like the idea of an "unselectable" class apparent in the HTML.

But I will leave the wisdom of these two suggestions for the consideration of
those who do the (great) work on the CSS.

Rob


On 5/4/26 09:00, Charilaos Skiadas wrote:
> Ok pull request prepared: https://github.com/PreTeXtBook/pretext/pull/2839
> <https://github.com/PreTeXtBook/pretext/pull/2839>
> I assumed that I should include a run of the cssbuilder script as part of the
> commit.
>
> I did find a .prompt.unselectable in the codelikes, I think probably added when
> we did the console changes to include the prompts. An alternative would be to
> unify those two into a .unselectable and add that class to the generated
> permalinks, though maybe something to do if more unselectable cases come up?
>
> Charilaos Skiadas
> Department of Mathematics
> Hanover College
>
>
>> On May 4, 2026, at 10:58 AM, Andrew Scholer <asch...@chemeketa.edu> wrote:
>>
>> Sounds like a great idea. I can't see any accessibility concerns. (If
>> anything, I think we should be doing more to suppress the permalinks for
>> screen readers.)
>>
>> As for current examples, there is no generic `.unselectable` rule. Applying
>> the style directly to `.autopermalink` as you propose makes sense.
>>
>> Andrew
>>
>> On Sun, May 3, 2026 at 1:07 PM 'Rob Beezer' via PreTeXt development <pretext-
>> d...@googlegroups.com <mailto:prete...@googlegroups.com>> wrote:
>>
>> I believe we have had this problem before, and the solution was similar to
>> what you suggest.  Not in a position to dig too deep right now.  We had
>> a .unselectable class. Use the pickaxe (git log -S unselectable) for more
>> history?
>>
>> On May 3, 2026 7:39:50 PM GMT+02:00, Charilaos Skiadas <cski...@gmail.com
>> <mailto:cski...@gmail.com>> wrote:
>> >This is probably fairly minor, but I am a bit bothered with how auto-
>> permalinks behave when copying. In the figure below, whose text you can
>> find here: https://skiadas.github.io/robotics-course-site/sec-exam1-study-
>> guide.html <https://skiadas.github.io/robotics-course-site/sec-exam1-
>> study-guide.html>
>> >
>> >Each list item has an auto-permalink entry associated with it, available
>> when hovered over to the left, which can be clicked on to get a link to
>> that particular location, and that’s all fine and well.
>> >But when I try to select a particular line for copying like I did in the
>> picture above, or maybe try to copy multiple lines, it is extremely easy
>> to also include in the copy the permalink character 🔗   (and completely
>> unavoidable for multiple lines with permalinks in-between them.
>> >
>> >In my opinion those hyperlink characters should not be copyable, and I
>> believe we can achieve that by adding to the .autopermalink css:
>> >
>> >.autopermalink {
>> >       user-select: none;
>> >}
>> >
>> >This allows the autopermalinks to still be clicked but they are no longer
>> selectable for copy-paste. Am I missing something?
>> >Would that affect the behavior for screen readers in some way?
>> >
>> >
>> >
>> >
>> >
>> >On a tangential note, I am a bit bothered that I cannot copy the numbers
>> from the numbered list along with the items. But that’s a whole other
>> topic probably, and perhaps hard to do with more custom markers etc.
>> >
>> >Charilaos Skiadas
>> >Department of Mathematics
>> >Hanover College
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PreTeXt development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pretext-dev...@googlegroups.com <mailto:pretext-
>> dev%2Bunsu...@googlegroups.com>.
>> To view this discussion visit https://groups.google.com/d/msgid/pretext-
>> dev/MTAwMDAwNi5iZWV6ZXI.1777838849%40pnsh <https://groups.google.com/d/
>> msgid/pretext-dev/MTAwMDAwNi5iZWV6ZXI.1777838849%40pnsh>.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "PreTeXt development" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pretext-dev...@googlegroups.com <mailto:pretext-
>> dev+uns...@googlegroups.com>.
>> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
>> CACm44N__nbxO12A0Axybvd3fwwLZPxd%2B19ma%2BsjZ7ueD%2Bcpyvg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/pretext-dev/
>> CACm44N__nbxO12A0Axybvd3fwwLZPxd%2B19ma%2BsjZ7ueD%2Bcpyvg%40mail.gmail.com?
>> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CFEC6D1C-6E83-487F-89E4-A19312842C4D%40gmail.com <https://groups.google.com/d/
> msgid/pretext-dev/CFEC6D1C-6E83-487F-89E4-A19312842C4D%40gmail.com?
> utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
May 7, 2026, 5:43:08 PMMay 7
to prete...@googlegroups.com
1.  In #2836, Andrew is making a place for "web only" stuff, as I understand it.
  Maybe everything about permalinks should/could move there?

Absolutely. #2836 should be extended to include permalinks and many other web only bits.

2.  I sorta like the idea of an "unselectable" class apparent in the HTML.

If they are always unselectable, adding the class is redundant.

Personally, I think it is good for us to stay away from utility classes like `unselectable` or `hidden`. They tend to cause naming conflicts with other things we bring in. And they often have specificity issues:
https://getbem.com/faq/#can-i-create-global-modifier

Andrew

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAzOC5iZWV6ZXI.1778171857%40pnsh.
Reply all
Reply to author
Forward
0 new messages