* [NTG-context] (ConTeXt LMTX 2.11.05) how do I make it so that sections, descriptions, and itemizations have just a space between some of the text that they produce
@ 2024-09-16 14:24 Felix
2024-09-16 16:43 ` [NTG-context] " Wolfgang Schuster
0 siblings, 1 reply; 2+ messages in thread
From: Felix @ 2024-09-16 14:24 UTC (permalink / raw)
To: ntg-context
\setuppapersize[letter][letter]
\setupalign[normal]
\setuplayout[
backspace=0.5in,
topspace=0.0in,
header=.5in, % No headers
footer=.5in, % Space for the footer
width=middle,
height=middle,
]
\definefontfeature[timesfeatures][default][
trep=yes, % Enables single and double quotes to show up correctly in text, perhaps does more
dlig=yes,
% cpsp=yes, use for all caps only
]
\definefontfamily [myfonts] [rm] [Times New Roman] [features=timesfeatures] % dlig enables times new roman ligatures, and cpsp is used by tnr, not aptos
\setupbodyfont[myfonts,12pt]
\mainlanguage[en-us]
\setupindenting[yes,0.5in]
\definedescription[description]
\setupdescription[description][
alternative=serried,
headstyle=bold,
style=normal,
width=broad,
before=,
after=,
]
\setupheads[indentnext=yes] % To get indentation after section numbers, use this
\setuphead[section][
sectionstopper={.}, % Add period after numbers
conversion=R,
before=,
after=,
style=sc, % Small caps style
align=middle, % Center the section titles
]
\startsetups document:start
\centerline{\documentvariable{title}}
\centerline{\documentvariable{author}}
\centerline{\documentvariable{date}}
\blank[line]
\stopsetups
\startdocument[
title={Chapter 4 Quiz},
author={Author},
date={September 16, 2024}
]
\startitemgroup[itemize][n]
\startitem
I'm not a fan of the default spacing
\stopitem
\stopitemgroup
\startdescription{I'm not a fan of the}
default spacing
\stopdescription
\startsection[title={I'm not a fan of the}]
default spacing
\stopsection
\stopdocument
This code shows how I am getting the default spacing between the words from itemize, description, and the spacing between the roman numeral and the section title. I tried figuring out how to get the spacing for all of these to be set to a single space worth but it seems to not be possible with `distance`, because it asks for a dimension. How can I get a `\space`'s worth of spacing to be the default in descriptions, itemizations, and sections? for itemizations and descriptions the spacing seems to vary and I really don't like that. I would be thankful to know if there's a way to change the spacing.
___________________________________________________________________________________
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 2.11.05) how do I make it so that sections, descriptions, and itemizations have just a space between some of the text that they produce
2024-09-16 14:24 [NTG-context] (ConTeXt LMTX 2.11.05) how do I make it so that sections, descriptions, and itemizations have just a space between some of the text that they produce Felix
@ 2024-09-16 16:43 ` Wolfgang Schuster
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2024-09-16 16:43 UTC (permalink / raw)
To: mailing list for ConTeXt users, Felix
Felix schrieb am 16.09.2024 um 16:24:
> [...]
>
> This code shows how I am getting the default spacing between the words from itemize, description, and the spacing between the roman numeral and the section title. I tried figuring out how to get the spacing for all of these to be set to a single space worth but it seems to not be possible with `distance`, because it asks for a dimension. How can I get a `\space`'s worth of spacing to be the default in descriptions, itemizations, and sections? for itemizations and descriptions the spacing seems to vary and I really don't like that. I would be thankful to know if there's a way to change the spacing.
Please remove everything from your examples which isn't necessary to
show the problem, in your example you can get rid of
- the page layout,
- the font settings,
- the title page and
- all settings from \setupdescription and \setuphead unrelated to the
space between number/title and the text.
The value you're looking for is \spaceamount which can be used with the
distance-key to set the width of a space as separator.
For descriptions you have to set the value of the width to fit and use
the distance key to set a fixed
value for the space between the title and following text, to ensure the
space doesn't increase set
also the shrink and stretch values to 0.
%%%% begin example
\definedescription
[description]
[alternative=serried,
width=fit,
distance=\spaceamount,
stretch=0,
shrink=0]
\starttext
\startdescription [title={I'm not a fan of the}]
default spacing
\stopdescription
\stoptext
%%%% end example
For itemize you can use the fit keyword but be aware once you have more
than 9 entries you get
a bigger space between the number and content because the environment
set the width of all
entries to width of the widest number.
%%%% begin example
\starttext
\startitemize[n,fit][distance=\spaceamount]
\startitem
I'm not a fan of the default spacing
\stopitem
\stopitemize
\stoptext
%%%% end example
For section titles you just have to change the distance value.
%%%% begin example
\setuphead
[section]
[distance=\spaceamount]
\starttext
\startsection[title={I'm not a fan of the}]
default spacing
\stopsection
\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-16 16:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16 14:24 [NTG-context] (ConTeXt LMTX 2.11.05) how do I make it so that sections, descriptions, and itemizations have just a space between some of the text that they produce Felix
2024-09-16 16:43 ` [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).