I have a strange issue with some macros that are creating extraspaces between 
paragraphs. Note these macros shouldn’t create anycontent, as they define 
content that will be sent to registers andcontent that is used for page 
references. Its more like invisibledata, perhaps the word is “metadata” and 
other parts of thedocument need to know it and refer to it, but nothing should 
berendered there.



 As best as I canunderstand, when ConTeXt sees one of these macros, it creates 
avertical space after the paragraph, draws nothing, then createsanother 
vertical space after that, before drawing the next paragraph,so the result is 
something close to three lines of space. Whenappearing after a section title, 
its also as if there is an emptyline, then blank space, then the first 
paragraph of content appears.
Sample of what the rendered document looks like:

-----
Section Title
.<--if the macro is placed here, a huge empty space after thesection title is 
there 

.<-- I’m using these dots to represent empty lines

Loremipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmodtempor 
incididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, quis 
nostrud exercitation ullamco laboris nisi ut aliquip exea commodo consequat. 
Duis aute irure dolor in reprehenderit involuptate velit esse cillum dolore eu 
fugiat nulla pariatur.Excepteur sint occaecat cupidatat non proident, sunt in 
culpa quiofficia deserunt mollit anim id est laborum.\mymacro{}<--even ifthe 
macro is placed here, still in the paragraph, it creates a break

.

.<--the macro appears here, there is an empty space above and before

.

Loremipsum odor amet, consectetuer adipiscing elit. Imperdiet 
suspendisseporttitor tempus arcu turpis cras posuere varius. Volutpat 
posueresemper nunc metus fermentum egestas? Aenean diam nisl tortor 
fuscefacilisis hendrerit dolor penatibus. Lectus interdum platea rhoncusat leo; 
ut mi duis. Nisi vehicula morbi curabitur mus urna sodalessuspendisse sodales. 
Viverra inceptos sem aenean ultricies congueligula condimentum maecenas. 
Convallis in elementum risus nec tacitibibendum faucibus ac nascetur. Nulla 
ligula auctor placerat dignissiminceptos. Felis nulla quam viverra augue 
maximus hendrerit ipsum.
. <--where the macro doesn’t appear, the spacing between paragraphs isfine 
(here, no macro, so one line of empty space, not three)

Loremipsum odor amet, consectetuer adipiscing elit. Turpis himenaeosconubia 
neque fringilla neque class. Elementum per fermentum nostraullamcorper lacinia 
tortor pellentesque facilisis. Himenaeos sociosqutellus aptent rhoncus 
dignissim himenaeos aliquam? Nisi sagittiseuismod tincidunt penatibus eget 
tristique? Sed nam elit sapientellus mus libero. Consectetur nascetur nec metus 
pretium hacmolestie. Convallis lacinia quam efficitur convallis; metus 
purusaliquet.



-----




I’ve analyzed themacros carefully, even rebuilt them. Yet, no matter my 
attempts torecreate and rewrite the code from scratch, they always create 
thisvertical space. They shouldn’t create any content, nor should anyevidence 
of their existence be visible to readers.




I’ve tried formonths to find a way to hide these macros, rewriting the code 
itselfmany times, as I can’t see any reason why its creating anything atall, 
and also trying to find ways to hide the “blank” contentthat gets rendered:




\starteffect[hidden]\mymacro{}\stopeffect

\color[white]{\mymacro}

\setbox\scratchbox=\vbox{\mymacro}
\startnointerference\mymacro\stopnointerference
\inmargin{\mymacro}



Thesesolutions either entirely don’t remove the extra page break, orlead to the 
actual content within breaking: for instance, if there’san \index{} entry 
inside the macro, its page number won’t renderproperly in the end-of-document 
index. Or if there’s a \reference,other code attempting to display the page 
number just shows “page,??”.




Isthere a way to completely hide content, such that nothing at all isrendered 
on the page and nothing occupies extra blank space, but thatdoesn’t brak 
indexes, cross-references, registers, etc.?




--Joel

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to