ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* space between headings
@ 2019-10-10 17:17 Pablo Rodriguez
  2019-10-11 15:12 ` Michelle Weidling
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez @ 2019-10-10 17:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I have the following sample:

    \showframe\showgrid
    \starttext
    \section{Section}
    \subsection{Subsection}
    A sentence.
    \section{Section}
    Another sentence.
    \subsection{Subsection}
    Even another sentence.
    \stoptext

Is there any way to setup the space after of \section when it is
followed by another heading?

I mean, is there no way to decrease the space between two headings?

Many thanks for your help,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: space between headings
  2019-10-10 17:17 space between headings Pablo Rodriguez
@ 2019-10-11 15:12 ` Michelle Weidling
  2019-10-11 17:26   ` Pablo Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Michelle Weidling @ 2019-10-11 15:12 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1.1: Type: text/plain, Size: 2282 bytes --]

Dear Pablo,


I'm not sure if this is the best way to solve it, but you could define
custom headers for this situation that toss the spaces:


 \definehead[modifiedSection][section]
  \setuphead[modifiedSection]
  	[after={\blank[none]}]
 	
 \definehead[modifiedSubsection][subsection]
 \setuphead[modifiedSubsection]
 	[before={\blank[none]}] 	

\showframe\showgrid
\starttext
  \modifiedSection{Section}
  \modifiedSubsection{Subsection}
  A sentence.
  \section{Section}
  Another sentence.
  \subsection{Subsection}
  Even another sentence.
\stoptext


When doing this it's important to modify both the section and the
subsection heading, otherwise the space will still appear.

(This approach feels a bit brute force to me and I'd be happy to see a
more elegant solution.)


Best,
Michelle



Am 10.10.19 um 19:17 schrieb Pablo Rodriguez:
> Dear list,
> 
> I have the following sample:
> 
>     \showframe\showgrid
>     \starttext
>     \section{Section}
>     \subsection{Subsection}
>     A sentence.
>     \section{Section}
>     Another sentence.
>     \subsection{Subsection}
>     Even another sentence.
>     \stoptext
> 
> Is there any way to setup the space after of \section when it is
> followed by another heading?
> 
> I mean, is there no way to decrease the space between two headings?
> 
> Many thanks for your help,
> 
> Pablo
> --
> http://www.ousia.tk
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

-- 
Michelle Weidling
Digital Humanities

Georg-August-Universität Göttingen
Niedersächsische Staats- und Universitätsbibliothek Göttingen
D-37073 Göttingen

Papendiek (Historisches Gebäude, Raum 2.408)
+49 551 39-25842 (Tel.)

weidling@sub.uni-goettingen.de
http://www.sub.uni-goettingen.de




[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: space between headings
  2019-10-11 15:12 ` Michelle Weidling
@ 2019-10-11 17:26   ` Pablo Rodriguez
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez @ 2019-10-11 17:26 UTC (permalink / raw)
  To: ntg-context

On 10/11/19 5:12 PM, Michelle Weidling wrote:
>> Am 10.10.19 um 19:17 schrieb Pablo Rodriguez:
>>> [...]
>>> Is there any way to setup the space after of \section when it is
>>> followed by another heading?
>>>
>>> I mean, is there no way to decrease the space between two headings?> > I'm not sure if this is the best way to solve it, but you could
define> custom headers for this situation that toss the spaces:> >
\definehead[modifiedSection][section]>   \setuphead[modifiedSection]>
[after={\blank[none]}]>  \definehead[modifiedSubsection][subsection]>
\setuphead[modifiedSubsection]>  	[before={\blank[none]}] 	> > (This
approach feels a bit brute force to me and I'd be happy to see a> more
elegant solution.)

Dear Michelle,

many thanks for your help.

This is a way of solving it, but I don’t even know how the lpath for
that (to compile XML sources) would have to be written.

I wonder whether ConTeXt has a more powerful way to solve this.

I’m thinking of something similar to:

  \blank[powerful] = \blank
  \blank[powerful] + \blank[powerful] = \blank[none]

spac-ver.mkiv might contain an explanation to that, »aber es kommt mir
Spanisch vor« (pun intended 😅).

Best wishes,

Pablo
--
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-11 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 17:17 space between headings Pablo Rodriguez
2019-10-11 15:12 ` Michelle Weidling
2019-10-11 17:26   ` Pablo Rodriguez

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