* [NTG-context] Hyphenated word in html export
@ 2024-11-07 22:35 Florent Michel
2024-11-07 22:56 ` [NTG-context] " Florent Michel
0 siblings, 1 reply; 4+ messages in thread
From: Florent Michel @ 2024-11-07 22:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 504 bytes --]
Hello,
Is there a way to preserve hyphenated words in the html export?
When exporting a document with ConTeXt, hyphens in the middle of words seem
to be replaced by soft hyphens, which are not displayed by my web browser.
Minimal example:
\setupbackend[export=yes]
\starttext
co-worker
\stoptext
The resulting .html file contains:
<div>
coworker</div>
(There is apparently a soft hyphen between ‘co’ and ‘worker’. The pdf seems
to render correctly.)
Cheers,
Florent
[-- Attachment #1.2: Type: text/html, Size: 598 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [NTG-context] Re: Hyphenated word in html export
2024-11-07 22:35 [NTG-context] Hyphenated word in html export Florent Michel
@ 2024-11-07 22:56 ` Florent Michel
2024-11-08 2:48 ` Rik Kabel
0 siblings, 1 reply; 4+ messages in thread
From: Florent Michel @ 2024-11-07 22:56 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 890 bytes --]
Apologies for the double email.
I raised just after sending the previous one that using the ‘proper’ utf-8
hyphen character (0x2010) instead of 0x002d solves the issue.
I'd be interested to hear if someone has an easier-to-type solution, though.
Le jeu. 7 nov. 2024 à 22:35, Florent Michel <florent.m42@gmail.com> a
écrit :
> Hello,
>
> Is there a way to preserve hyphenated words in the html export?
> When exporting a document with ConTeXt, hyphens in the middle of words
> seem to be replaced by soft hyphens, which are not displayed by my web
> browser.
>
> Minimal example:
>
> \setupbackend[export=yes]
> \starttext
> co-worker
> \stoptext
>
> The resulting .html file contains:
> <div>
> coworker</div>
>
> (There is apparently a soft hyphen between ‘co’ and ‘worker’. The pdf
> seems to render correctly.)
>
> Cheers,
> Florent
>
[-- Attachment #1.2: Type: text/html, Size: 1238 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [NTG-context] Re: Hyphenated word in html export
2024-11-07 22:56 ` [NTG-context] " Florent Michel
@ 2024-11-08 2:48 ` Rik Kabel
2024-11-08 7:04 ` Florent Michel
0 siblings, 1 reply; 4+ messages in thread
From: Rik Kabel @ 2024-11-08 2:48 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1337 bytes --]
On 2024-11-07 17:56, Florent Michel wrote:
> Apologies for the double email.
>
> I raised just after sending the previous one that using the ‘proper’
> utf-8 hyphen character (0x2010) instead of 0x002d solves the issue.
> I'd be interested to hear if someone has an easier-to-type
> solution, though.
>
> Le jeu. 7 nov. 2024 à 22:35, Florent Michel <florent.m42@gmail.com> a
> écrit :
>
> Hello,
>
> Is there a way to preserve hyphenated words in the html export?
> When exporting a document with ConTeXt, hyphens in the middle of
> words seem to be replaced by soft hyphens, which are not displayed
> by my web browser.
>
> Minimal example:
>
> \setupbackend[export=yes]
> \starttext
> co-worker
> \stoptext
>
> The resulting .html file contains:
> <div>
> coworker</div>
>
> (There is apparently a soft hyphen between ‘co’ and ‘worker’. The
> pdf seems to render correctly.)
>
> Cheers,
> Florent
>
If you use *\setupbackend[export=yes,hyphen=no]* you will get a hard
hyphen (hex 2D) where you show a soft hyphen (hex AD). Whether that
addresses your larger document I cannot say, but it solves the problem
for your example. See <https://wiki.contextgarden.net/Command/setupexport>.
--
Rik
[-- Attachment #1.2: Type: text/html, Size: 2941 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* [NTG-context] Re: Hyphenated word in html export
2024-11-08 2:48 ` Rik Kabel
@ 2024-11-08 7:04 ` Florent Michel
0 siblings, 0 replies; 4+ messages in thread
From: Florent Michel @ 2024-11-08 7:04 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 2011 bytes --]
Thank you Rik! I confirm this works, both on my minimal example and longer
document.
On Fri, Nov 8, 2024, 02:51 Rik Kabel <ConTeXt@rik.users.panix.com> wrote:
> On 2024-11-07 17:56, Florent Michel wrote:
>
> Apologies for the double email.
>
> I raised just after sending the previous one that using the ‘proper’ utf-8
> hyphen character (0x2010) instead of 0x002d solves the issue.
> I'd be interested to hear if someone has an easier-to-type
> solution, though.
>
> Le jeu. 7 nov. 2024 à 22:35, Florent Michel <florent.m42@gmail.com> a
> écrit :
>
>> Hello,
>>
>> Is there a way to preserve hyphenated words in the html export?
>> When exporting a document with ConTeXt, hyphens in the middle of words
>> seem to be replaced by soft hyphens, which are not displayed by my web
>> browser.
>>
>> Minimal example:
>>
>> \setupbackend[export=yes]
>> \starttext
>> co-worker
>> \stoptext
>>
>> The resulting .html file contains:
>> <div>
>> coworker</div>
>>
>> (There is apparently a soft hyphen between ‘co’ and ‘worker’. The pdf
>> seems to render correctly.)
>>
>> Cheers,
>> Florent
>>
> If you use *\setupbackend[export=yes,hyphen=no]* you will get a hard
> hyphen (hex 2D) where you show a soft hyphen (hex AD). Whether that
> addresses your larger document I cannot say, but it solves the problem for
> your example. See <https://wiki.contextgarden.net/Command/setupexport>.
>
> --
> Rik
>
>
> ___________________________________________________________________________________
> 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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 4086 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-08 7:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-07 22:35 [NTG-context] Hyphenated word in html export Florent Michel
2024-11-07 22:56 ` [NTG-context] " Florent Michel
2024-11-08 2:48 ` Rik Kabel
2024-11-08 7:04 ` Florent Michel
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).