Is there an alternative to \reference[]{} that won't interfere with the document design?
![](https://secure.gravatar.com/avatar/8b5a3ee6fe397b9fd2f13c1ae4079f99.jpg?s=120&d=mm&r=g)
I had to place \reference[]{} in various places in my document as I need to refer to page numbers of a lot of various items in the document. There are hundreds of these. When placing them, I hadn't realized it would impact the document design--I assumed such a command would be invisible. Though I've tried placing as many inside the section titles, where they become invisible, I've found just placing \reference[]{} anywhere on a page will create extra blank spaces, leading my document to expand from 440 lines to 448. It added up quite quickly to 8 whole pages. No matter how much I use % or try to hide it within the page, it still produces weird results. It isn't invisible, its doing things to the document, moving text around, leaving gaps. In addition, it makes the document look haphazard, creating random formatting "glitches". I'm assuming because \reference has a curly bracket {} that its causing something to be rendered, even it its not really something visible always, it often makes a carriage return on the page if placed say after a table, or before a section title. Sadly, the way the document was designed I don't have a way to integrate them inside the section titles everywhere, there are too many and some need to mark a specific page within a section. I haven't placed anything inside the {} and only use the square brackets to mark the reference name. Is there an alternative command that won't occupy space like this? --Joel
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Joel via ntg-context schrieb am 31.08.2024 um 16:37:
I had to place \reference[]{} in various places in my document as I need to refer to page numbers of a lot of various items in the document. There are hundreds of these. When placing them, I hadn't realized it would impact the document design--I assumed such a command would be invisible.
Though I've tried placing as many inside the section titles, where they become invisible, I've found just placing \reference[]{} anywhere on a page will create extra blank spaces, leading my document to expand from 440 lines to 448. It added up quite quickly to 8 whole pages. No matter how much I use % or try to hide it within the page, it still produces weird results. It isn't invisible, its doing things to the document, moving text around, leaving gaps. In addition, it makes the document look haphazard, creating random formatting "glitches".
I'm assuming because \reference has a curly bracket {} that its causing something to be rendered, even it its not really something visible always, it often makes a carriage return on the page if placed say after a table, or before a section title. Sadly, the way the document was designed I don't have a way to integrate them inside the section titles everywhere, there are too many and some need to mark a specific page within a section.
I haven't placed anything inside the {} and only use the square brackets to mark the reference name. Is there an alternative command that won't occupy space like this?
Did you learn anything from the answers of your last question [1] with similar content? Hint: Minimal example! [1] https://www.mail-archive.com/ntg-context@ntg.nl/msg108092.html Wolfgang
![](https://secure.gravatar.com/avatar/e0f8d84b235b67d60a3c7fd0e326db8d.jpg?s=120&d=mm&r=g)
On 31 Aug 2024, at 15:37, Joel via ntg-context
wrote: I've found just placing \reference[]{} anywhere on a page will create extra blank spaces,
In the following MWE you should get two spaces, no spaces and one space respectively. If you get spaces with some other combination then please try and produce a short example. \starttext This is my text \reference[a]{} and more following. This is my text\reference[b]{}and more following. This is my text\reference[c]{} and more following. \stoptext Regards, — Bruce Horrocks Hampshire, UK
![](https://secure.gravatar.com/avatar/01583cfbc1853c3ff30744cbeedf1b8c.jpg?s=120&d=mm&r=g)
I recently learned not to leave a space before and after \reference ,
but have not seen
further complex problems as you describe so far. Can you give more
specific examples for these,
I have to check, because I am also finalising a book at the moment.
Best wishes,
Jürgen
----- Nachricht von Bruce Horrocks
On 31 Aug 2024, at 15:37, Joel via ntg-context
wrote: I've found just placing \reference[]{} anywhere on a page will create extra blank spaces,
In the following MWE you should get two spaces, no spaces and one space respectively. If you get spaces with some other combination then please try and produce a short example.
\starttext This is my text \reference[a]{} and more following.
This is my text\reference[b]{}and more following.
This is my text\reference[c]{} and more following.
\stoptext
Regards, — Bruce Horrocks Hampshire, UK
___________________________________________________________________________________ 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 ___________________________________________________________________________________
----- Ende der Nachricht von Bruce Horrocks
participants (4)
-
Bruce Horrocks
-
hanneder@staff.uni-marburg.de
-
Joel
-
Wolfgang Schuster