ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] (ConTeXt LMTX 2024, monospace font) Why does monospaced text go out of the margin for me? is this supposed to happen?
@ 2024-09-14  4:40 Felix 
  2024-09-14 11:28 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Felix  @ 2024-09-14  4:40 UTC (permalink / raw)
  To: ntg-context

https://pastebin.com/2ce1xSYf

The code linked above has 3 paragraphs. One in TImes New Roman, the other in Aptos and the last in Aptos Mono. 

The paragraph with \tt seems to go over my margin of .5 inches for the left and right side of my doc., but the serif and sans serif text doesn't. I can't seem to figure out why exactly this is.

Did I set up \setuplayout incorrectly? I wanted .5in margins but I kind of 'hacked' the way I got things. Is there a better way that I could have gotten .5 inch margins and a.5in header/footer? I can't seem to understand why the output is what it is. I would greatly appreciate any help!

Feel free to switch out the fonts if you'd like
___________________________________________________________________________________
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] 2+ messages in thread

* [NTG-context] Re: (ConTeXt LMTX 2024, monospace font) Why does monospaced text go out of the margin for me? is this supposed to happen?
  2024-09-14  4:40 [NTG-context] (ConTeXt LMTX 2024, monospace font) Why does monospaced text go out of the margin for me? is this supposed to happen? Felix 
@ 2024-09-14 11:28 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2024-09-14 11:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Felix

Felix schrieb am 14.09.2024 um 06:40:
> https://pastebin.com/2ce1xSYf
>
> The code linked above has 3 paragraphs. One in TImes New Roman, the other in Aptos and the last in Aptos Mono.
>
> The paragraph with \tt seems to go over my margin of .5 inches for the left and right side of my doc., but the serif and sans serif text doesn't. I can't seem to figure out why exactly this is.
>
> Did I set up \setuplayout incorrectly? I wanted .5in margins but I kind of 'hacked' the way I got things. Is there a better way that I could have gotten .5 inch margins and a.5in header/footer? I can't seem to understand why the output is what it is. I would greatly appreciate any help!
>
> Feel free to switch out the fonts if you'd like

You're trying to justify a text with a fixed width font which fails 
because the often have a fixed width space. When you have a space a 
fixed width TeX can stretch or shrink the space between the word to 
align them with the right margin.

The best solution is to disable justification and use ragged text on the 
right side. An alternative is to allow bigger spaces between words but 
as you can see in the following example the gaps between words can be 
quite large.

%%%% begin example
\showframe

\setupbodyfont[tt]

\starttext

\samplefile{zapf}

\blank

\start \setuptolerance[space]
\samplefile{zapf}
\par \stop

\stoptext
%%%% end example

Wolfgang

___________________________________________________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2024-09-14 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-14  4:40 [NTG-context] (ConTeXt LMTX 2024, monospace font) Why does monospaced text go out of the margin for me? is this supposed to happen? Felix 
2024-09-14 11:28 ` [NTG-context] " Wolfgang Schuster

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).