ConTeXt: MetaPost graphic in overlay setups shifts between pagesHow to debug METAPOST inlined in ConTeXt? (Or “message” primitive and “loggingall;” in inlined METAPOST)Use fancy page numbering using Metapost graphicConTeXt+MetaPost: Non-conflicting random background and foreground coloursparametric overlay in contextHow include MetaPost from ConTeXt to LaTeX?Metapost error related with ConTeXtMetapost graphics not aligned in ConTeXt TABLEConTeXt and Metafun: Using environment variables inside overlayvertically center all slides in ConTeXt with minimal setupsConTeXt: What are alternatives and rendering setups?

how to interpret this t result?

Single Colour Mastermind Problem

How can Republicans who favour free markets, consistently express anger when they don't like the outcome of that choice?

What does KSP mean?

Realistic Necromancy?

How to make a pipeline wait for end-of-file or stop after an error?

What is the relationship between spectral sequences and obstruction theory?

Is creating your own "experiment" considered cheating during a physics exam?

How to back up a running remote server?

Will this character get back his Infinity Stone?

Will a top journal at least read my introduction?

Pulling the rope with one hand is as heavy as with two hands?

Phrase for the opposite of "foolproof"

How can I practically buy stocks?

Why was the Spitfire's elliptical wing almost uncopied by other aircraft of World War 2?

How can the Zone of Truth spell be defeated without the caster knowing?

How could Tony Stark make this in Endgame?

Examples of non trivial equivalence relations , I mean equivalence relations without the expression " same ... as" in their definition?

Was there a shared-world project before "Thieves World"?

How much cash can I safely carry into the USA and avoid civil forfeiture?

How exactly does Hawking radiation decrease the mass of black holes?

Packing rectangles: Does rotation ever help?

How to stop co-workers from teasing me because I know Russian?

Error message with tabularx



ConTeXt: MetaPost graphic in overlay setups shifts between pages


How to debug METAPOST inlined in ConTeXt? (Or “message” primitive and “loggingall;” in inlined METAPOST)Use fancy page numbering using Metapost graphicConTeXt+MetaPost: Non-conflicting random background and foreground coloursparametric overlay in contextHow include MetaPost from ConTeXt to LaTeX?Metapost error related with ConTeXtMetapost graphics not aligned in ConTeXt TABLEConTeXt and Metafun: Using environment variables inside overlayvertically center all slides in ConTeXt with minimal setupsConTeXt: What are alternatives and rendering setups?













3















Background



A line is being drawn using MetaPost on an overlay, which is used as the background for a framed layer. The layer is embedded within a setups so that a dot's position on the timeline is recalculated each time. The calculation is based on the value of the current section's title text.



Problem



The horizontal bars at the each end of the timeline shifts a slight amount. Compare:



Chapter 1



Chapter 2



When shown overlapped, the difference is apparent, albeit subtle:



Shifted Bars



Code



The minimal working example is reasonably straightforward. The bulk of the code is taken up by parsing the number from the section title within startuseMPgraphic.



definepapersize[BookPaperSize][
width=8in,
height=6in,
]

setuppapersize[BookPaperSize]

% Specify the width and height here because the inline figures need to
% maintain aspect ratio while setting a pleasing width.
startsetups[BookIllustrationSetups]
setlayerframed[BookIllustrationLayer][
frame=off,
x=zeropoint,
y=1.25in,
width=makeupwidth,
background=BookTimelineOverlay,
]
stopsetups

setupbackgrounds[page][
background=BookIllustrationLayer,
setups=BookIllustrationSetups
]

definelayer[BookIllustrationLayer][
width=paperwidth,
height=paperheight,
]

defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

startuseMPgraphicBookTimelineGraphic
% Define constants
numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
EVENT_BEGAN := 13799;
TIME_OFFSET := 1.25in;
PATH_THICKNESS := 2pt;

% The book timeline title macro contains a number representing when the
% event transpired and additional information.
string sectionTitle, sectionTitleDigits;
sectionTitle := "getspecificstructuretitle3";
sectionTitleDigits := "";

% Extract only digits and decimals from the book timeline title macro.
for i = 0 upto length( sectionTitle ):
string sectionChar;
sectionChar := substring( i, i + 1 ) of sectionTitle;

% A space indicates that the number has no more digits.
if sectionChar = " ":
break;
fi;

% Concatentate all the digits together.
if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
sectionTitleDigits := sectionTitleDigits & sectionChar;
fi;
endfor;

% Convert the digits from a string to a numeric value.
numeric eventTime;
eventTime := 0;

for i = scantokens( sectionTitleDigits ):
eventTime := i;
endfor;

numeric eventX;
eventX := 1 - (eventTime / EVENT_BEGAN);

% Draw the line.
draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw starting |.
draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw ending |.
draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw the timeline's dot relative to the event on the timeline.
filldraw fullcircle scaled 9
shifted(
TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
);
stopuseMPgraphic

starttext
chapter[title=Inflation Theory,reference=inflation-theory]
section[title=13,799 ± 0.021,reference=section]
input ward

chapter[title=First Stars,reference=first-stars]
section[title=13,689 ± 70,reference=section-1]
input ward
stoptext


Questions



I'm wondering:



  • Why does the timeline bar shift slightly?

  • How can the shifting be eliminated such that the timeline bars precisely overlap regardless of the timeline's dot's location?

Bonus question:



  • How can the code be simplified, especially parsing the title?









share|improve this question



















  • 1





    Why don't you draw the rule as part of setuphead? Why do you try use for line continuation? MetaPost scans until a semicolon and is actually a TeX control sequence which expands to a blank space.

    – Henri Menke
    4 hours ago















3















Background



A line is being drawn using MetaPost on an overlay, which is used as the background for a framed layer. The layer is embedded within a setups so that a dot's position on the timeline is recalculated each time. The calculation is based on the value of the current section's title text.



Problem



The horizontal bars at the each end of the timeline shifts a slight amount. Compare:



Chapter 1



Chapter 2



When shown overlapped, the difference is apparent, albeit subtle:



Shifted Bars



Code



The minimal working example is reasonably straightforward. The bulk of the code is taken up by parsing the number from the section title within startuseMPgraphic.



definepapersize[BookPaperSize][
width=8in,
height=6in,
]

setuppapersize[BookPaperSize]

% Specify the width and height here because the inline figures need to
% maintain aspect ratio while setting a pleasing width.
startsetups[BookIllustrationSetups]
setlayerframed[BookIllustrationLayer][
frame=off,
x=zeropoint,
y=1.25in,
width=makeupwidth,
background=BookTimelineOverlay,
]
stopsetups

setupbackgrounds[page][
background=BookIllustrationLayer,
setups=BookIllustrationSetups
]

definelayer[BookIllustrationLayer][
width=paperwidth,
height=paperheight,
]

defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

startuseMPgraphicBookTimelineGraphic
% Define constants
numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
EVENT_BEGAN := 13799;
TIME_OFFSET := 1.25in;
PATH_THICKNESS := 2pt;

% The book timeline title macro contains a number representing when the
% event transpired and additional information.
string sectionTitle, sectionTitleDigits;
sectionTitle := "getspecificstructuretitle3";
sectionTitleDigits := "";

% Extract only digits and decimals from the book timeline title macro.
for i = 0 upto length( sectionTitle ):
string sectionChar;
sectionChar := substring( i, i + 1 ) of sectionTitle;

% A space indicates that the number has no more digits.
if sectionChar = " ":
break;
fi;

% Concatentate all the digits together.
if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
sectionTitleDigits := sectionTitleDigits & sectionChar;
fi;
endfor;

% Convert the digits from a string to a numeric value.
numeric eventTime;
eventTime := 0;

for i = scantokens( sectionTitleDigits ):
eventTime := i;
endfor;

numeric eventX;
eventX := 1 - (eventTime / EVENT_BEGAN);

% Draw the line.
draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw starting |.
draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw ending |.
draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw the timeline's dot relative to the event on the timeline.
filldraw fullcircle scaled 9
shifted(
TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
);
stopuseMPgraphic

starttext
chapter[title=Inflation Theory,reference=inflation-theory]
section[title=13,799 ± 0.021,reference=section]
input ward

chapter[title=First Stars,reference=first-stars]
section[title=13,689 ± 70,reference=section-1]
input ward
stoptext


Questions



I'm wondering:



  • Why does the timeline bar shift slightly?

  • How can the shifting be eliminated such that the timeline bars precisely overlap regardless of the timeline's dot's location?

Bonus question:



  • How can the code be simplified, especially parsing the title?









share|improve this question



















  • 1





    Why don't you draw the rule as part of setuphead? Why do you try use for line continuation? MetaPost scans until a semicolon and is actually a TeX control sequence which expands to a blank space.

    – Henri Menke
    4 hours ago













3












3








3








Background



A line is being drawn using MetaPost on an overlay, which is used as the background for a framed layer. The layer is embedded within a setups so that a dot's position on the timeline is recalculated each time. The calculation is based on the value of the current section's title text.



Problem



The horizontal bars at the each end of the timeline shifts a slight amount. Compare:



Chapter 1



Chapter 2



When shown overlapped, the difference is apparent, albeit subtle:



Shifted Bars



Code



The minimal working example is reasonably straightforward. The bulk of the code is taken up by parsing the number from the section title within startuseMPgraphic.



definepapersize[BookPaperSize][
width=8in,
height=6in,
]

setuppapersize[BookPaperSize]

% Specify the width and height here because the inline figures need to
% maintain aspect ratio while setting a pleasing width.
startsetups[BookIllustrationSetups]
setlayerframed[BookIllustrationLayer][
frame=off,
x=zeropoint,
y=1.25in,
width=makeupwidth,
background=BookTimelineOverlay,
]
stopsetups

setupbackgrounds[page][
background=BookIllustrationLayer,
setups=BookIllustrationSetups
]

definelayer[BookIllustrationLayer][
width=paperwidth,
height=paperheight,
]

defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

startuseMPgraphicBookTimelineGraphic
% Define constants
numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
EVENT_BEGAN := 13799;
TIME_OFFSET := 1.25in;
PATH_THICKNESS := 2pt;

% The book timeline title macro contains a number representing when the
% event transpired and additional information.
string sectionTitle, sectionTitleDigits;
sectionTitle := "getspecificstructuretitle3";
sectionTitleDigits := "";

% Extract only digits and decimals from the book timeline title macro.
for i = 0 upto length( sectionTitle ):
string sectionChar;
sectionChar := substring( i, i + 1 ) of sectionTitle;

% A space indicates that the number has no more digits.
if sectionChar = " ":
break;
fi;

% Concatentate all the digits together.
if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
sectionTitleDigits := sectionTitleDigits & sectionChar;
fi;
endfor;

% Convert the digits from a string to a numeric value.
numeric eventTime;
eventTime := 0;

for i = scantokens( sectionTitleDigits ):
eventTime := i;
endfor;

numeric eventX;
eventX := 1 - (eventTime / EVENT_BEGAN);

% Draw the line.
draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw starting |.
draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw ending |.
draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw the timeline's dot relative to the event on the timeline.
filldraw fullcircle scaled 9
shifted(
TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
);
stopuseMPgraphic

starttext
chapter[title=Inflation Theory,reference=inflation-theory]
section[title=13,799 ± 0.021,reference=section]
input ward

chapter[title=First Stars,reference=first-stars]
section[title=13,689 ± 70,reference=section-1]
input ward
stoptext


Questions



I'm wondering:



  • Why does the timeline bar shift slightly?

  • How can the shifting be eliminated such that the timeline bars precisely overlap regardless of the timeline's dot's location?

Bonus question:



  • How can the code be simplified, especially parsing the title?









share|improve this question
















Background



A line is being drawn using MetaPost on an overlay, which is used as the background for a framed layer. The layer is embedded within a setups so that a dot's position on the timeline is recalculated each time. The calculation is based on the value of the current section's title text.



Problem



The horizontal bars at the each end of the timeline shifts a slight amount. Compare:



Chapter 1



Chapter 2



When shown overlapped, the difference is apparent, albeit subtle:



Shifted Bars



Code



The minimal working example is reasonably straightforward. The bulk of the code is taken up by parsing the number from the section title within startuseMPgraphic.



definepapersize[BookPaperSize][
width=8in,
height=6in,
]

setuppapersize[BookPaperSize]

% Specify the width and height here because the inline figures need to
% maintain aspect ratio while setting a pleasing width.
startsetups[BookIllustrationSetups]
setlayerframed[BookIllustrationLayer][
frame=off,
x=zeropoint,
y=1.25in,
width=makeupwidth,
background=BookTimelineOverlay,
]
stopsetups

setupbackgrounds[page][
background=BookIllustrationLayer,
setups=BookIllustrationSetups
]

definelayer[BookIllustrationLayer][
width=paperwidth,
height=paperheight,
]

defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

startuseMPgraphicBookTimelineGraphic
% Define constants
numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
EVENT_BEGAN := 13799;
TIME_OFFSET := 1.25in;
PATH_THICKNESS := 2pt;

% The book timeline title macro contains a number representing when the
% event transpired and additional information.
string sectionTitle, sectionTitleDigits;
sectionTitle := "getspecificstructuretitle3";
sectionTitleDigits := "";

% Extract only digits and decimals from the book timeline title macro.
for i = 0 upto length( sectionTitle ):
string sectionChar;
sectionChar := substring( i, i + 1 ) of sectionTitle;

% A space indicates that the number has no more digits.
if sectionChar = " ":
break;
fi;

% Concatentate all the digits together.
if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
sectionTitleDigits := sectionTitleDigits & sectionChar;
fi;
endfor;

% Convert the digits from a string to a numeric value.
numeric eventTime;
eventTime := 0;

for i = scantokens( sectionTitleDigits ):
eventTime := i;
endfor;

numeric eventX;
eventX := 1 - (eventTime / EVENT_BEGAN);

% Draw the line.
draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw starting |.
draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw ending |.
draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw the timeline's dot relative to the event on the timeline.
filldraw fullcircle scaled 9
shifted(
TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
);
stopuseMPgraphic

starttext
chapter[title=Inflation Theory,reference=inflation-theory]
section[title=13,799 ± 0.021,reference=section]
input ward

chapter[title=First Stars,reference=first-stars]
section[title=13,689 ± 70,reference=section-1]
input ward
stoptext


Questions



I'm wondering:



  • Why does the timeline bar shift slightly?

  • How can the shifting be eliminated such that the timeline bars precisely overlap regardless of the timeline's dot's location?

Bonus question:



  • How can the code be simplified, especially parsing the title?






context framed calculations metapost






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 hours ago







Dave Jarvis

















asked 5 hours ago









Dave JarvisDave Jarvis

4,77184084




4,77184084







  • 1





    Why don't you draw the rule as part of setuphead? Why do you try use for line continuation? MetaPost scans until a semicolon and is actually a TeX control sequence which expands to a blank space.

    – Henri Menke
    4 hours ago












  • 1





    Why don't you draw the rule as part of setuphead? Why do you try use for line continuation? MetaPost scans until a semicolon and is actually a TeX control sequence which expands to a blank space.

    – Henri Menke
    4 hours ago







1




1





Why don't you draw the rule as part of setuphead? Why do you try use for line continuation? MetaPost scans until a semicolon and is actually a TeX control sequence which expands to a blank space.

– Henri Menke
4 hours ago





Why don't you draw the rule as part of setuphead? Why do you try use for line continuation? MetaPost scans until a semicolon and is actually a TeX control sequence which expands to a blank space.

– Henri Menke
4 hours ago










1 Answer
1






active

oldest

votes


















3














The placement of the dot modifies the bounding box. The most ad-hoc solution to this problem is



  1. Save the bounding box before drawing the dot

  2. Draw the dot

  3. Restore the bounding box without dot

The dot will then leak out of the bounding box but that is only a tiny bit.



definepapersize[BookPaperSize][
width=8in,
height=6in,
]

setuppapersize[BookPaperSize]

% Specify the width and height here because the inline figures need to
% maintain aspect ratio while setting a pleasing width.
startsetups[BookIllustrationSetups]
setlayerframed[BookIllustrationLayer][
frame=off,
x=zeropoint,
y=1.25in,
width=makeupwidth,
background=BookTimelineOverlay,
]
stopsetups

setupbackgrounds[page][
background=BookIllustrationLayer,
setups=BookIllustrationSetups
]

definelayer[BookIllustrationLayer][
width=paperwidth,
height=paperheight,
]

defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

startuseMPgraphicBookTimelineGraphic
% Define constants
numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
EVENT_BEGAN := 13799;
TIME_OFFSET := 1.25in;
PATH_THICKNESS := 2pt;

% The book timeline title macro contains a number representing when the
% event transpired and additional information.
string sectionTitle, sectionTitleDigits;
sectionTitle := "getspecificstructuretitle3";
sectionTitleDigits := "";

% Extract only digits and decimals from the book timeline title macro.
for i = 0 upto length( sectionTitle ):
string sectionChar;
sectionChar := substring( i, i + 1 ) of sectionTitle;

% A space indicates that the number has no more digits.
if sectionChar = " ":
break;
fi;

% Concatentate all the digits together.
if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
sectionTitleDigits := sectionTitleDigits & sectionChar;
fi;
endfor;

% Convert the digits from a string to a numeric value.
numeric eventTime;
eventTime := 0;

for i = scantokens( sectionTitleDigits ):
eventTime := i;
endfor;

numeric eventX;
eventX := 1 - (eventTime / EVENT_BEGAN);

% Draw the line.
draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw starting |.
draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% Draw ending |.
draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
withpen pencircle scaled PATH_THICKNESS;

% The dot will change the size of bounding box, so we will just save the
% bounding box without the dot for later
path p ; p := bbox currentpicture ;

% Draw the timeline's dot relative to the event on the timeline.
filldraw fullcircle scaled 9
shifted(
TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
);

% Restore the bounding box without dot
setbounds currentpicture to p ;
stopuseMPgraphic

starttext
chapter[title=Inflation Theory,reference=inflation-theory]
section[title=13,799 ± 0.021,reference=section]
input ward

chapter[title=First Stars,reference=first-stars]
section[title=13,689 ± 70,reference=section-1]
input ward
stoptext


Here is a little shorter version of your code, using Lua to parse the chapter title and using the MetaPost drawing as a background for the text layer of the page directly.



definepapersize
[BookPaperSize]
[width=8in,
height=6in]

setuppapersize[BookPaperSize]

defineoverlay
[BookTimelineOverlay]
[useMPgraphicBookTimelineGraphic]

setupbackgrounds
[text]
[background=BookTimelineOverlay]


startluacode
function userdata.parsetitle(title)
local a, b = string.match(title, "(%d+),(%d+)")
return table.concat( a, b , "")
end
stopluacode

startuseMPgraphicBookTimelineGraphic
% Define constants
numeric EVENT_BEGAN;
EVENT_BEGAN := 13799;

% Convert the digits from a string to a numeric value.
numeric eventX;
eventX := lua("mp.print(userdata.parsetitle('getspecificstructuretitle3'))") ;
eventX := 1 - (eventX / EVENT_BEGAN);

numeric wb, hb ; wb := 3.33in ; hb := .33in ;
pickup pencircle scaled 2pt;
picture p ; p := image(
% Draw the line.
draw (0, .5*hb) -- (wb, .5*hb) ;
% Draw starting |.
draw (0, 0) -- (0, hb) ;
% Draw ending |.
draw (wb, 0) -- (wb, hb) ;
% Draw the timeline's dot relative to the event on the timeline.
filldraw fullcircle scaled 9 shifted (eventX * wb, .5*hb);
);

numeric h ; h := OverlayHeight ;
draw p shifted (-.33in, h - hb - .33in);

setbounds currentpicture to OverlayBox ;
stopuseMPgraphic

starttext
chapter[title=Inflation Theory,reference=inflation-theory]
section[title=13,799 ± 0.021,reference=section]
input ward

chapter[title=First Stars,reference=first-stars]
section[title=13,689 ± 70,reference=section-1]
input ward
stoptext





share|improve this answer

























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f488034%2fcontext-metapost-graphic-in-overlay-setups-shifts-between-pages%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    The placement of the dot modifies the bounding box. The most ad-hoc solution to this problem is



    1. Save the bounding box before drawing the dot

    2. Draw the dot

    3. Restore the bounding box without dot

    The dot will then leak out of the bounding box but that is only a tiny bit.



    definepapersize[BookPaperSize][
    width=8in,
    height=6in,
    ]

    setuppapersize[BookPaperSize]

    % Specify the width and height here because the inline figures need to
    % maintain aspect ratio while setting a pleasing width.
    startsetups[BookIllustrationSetups]
    setlayerframed[BookIllustrationLayer][
    frame=off,
    x=zeropoint,
    y=1.25in,
    width=makeupwidth,
    background=BookTimelineOverlay,
    ]
    stopsetups

    setupbackgrounds[page][
    background=BookIllustrationLayer,
    setups=BookIllustrationSetups
    ]

    definelayer[BookIllustrationLayer][
    width=paperwidth,
    height=paperheight,
    ]

    defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

    startuseMPgraphicBookTimelineGraphic
    % Define constants
    numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
    EVENT_BEGAN := 13799;
    TIME_OFFSET := 1.25in;
    PATH_THICKNESS := 2pt;

    % The book timeline title macro contains a number representing when the
    % event transpired and additional information.
    string sectionTitle, sectionTitleDigits;
    sectionTitle := "getspecificstructuretitle3";
    sectionTitleDigits := "";

    % Extract only digits and decimals from the book timeline title macro.
    for i = 0 upto length( sectionTitle ):
    string sectionChar;
    sectionChar := substring( i, i + 1 ) of sectionTitle;

    % A space indicates that the number has no more digits.
    if sectionChar = " ":
    break;
    fi;

    % Concatentate all the digits together.
    if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
    sectionTitleDigits := sectionTitleDigits & sectionChar;
    fi;
    endfor;

    % Convert the digits from a string to a numeric value.
    numeric eventTime;
    eventTime := 0;

    for i = scantokens( sectionTitleDigits ):
    eventTime := i;
    endfor;

    numeric eventX;
    eventX := 1 - (eventTime / EVENT_BEGAN);

    % Draw the line.
    draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
    withpen pencircle scaled PATH_THICKNESS;

    % Draw starting |.
    draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
    withpen pencircle scaled PATH_THICKNESS;

    % Draw ending |.
    draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
    withpen pencircle scaled PATH_THICKNESS;

    % The dot will change the size of bounding box, so we will just save the
    % bounding box without the dot for later
    path p ; p := bbox currentpicture ;

    % Draw the timeline's dot relative to the event on the timeline.
    filldraw fullcircle scaled 9
    shifted(
    TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
    );

    % Restore the bounding box without dot
    setbounds currentpicture to p ;
    stopuseMPgraphic

    starttext
    chapter[title=Inflation Theory,reference=inflation-theory]
    section[title=13,799 ± 0.021,reference=section]
    input ward

    chapter[title=First Stars,reference=first-stars]
    section[title=13,689 ± 70,reference=section-1]
    input ward
    stoptext


    Here is a little shorter version of your code, using Lua to parse the chapter title and using the MetaPost drawing as a background for the text layer of the page directly.



    definepapersize
    [BookPaperSize]
    [width=8in,
    height=6in]

    setuppapersize[BookPaperSize]

    defineoverlay
    [BookTimelineOverlay]
    [useMPgraphicBookTimelineGraphic]

    setupbackgrounds
    [text]
    [background=BookTimelineOverlay]


    startluacode
    function userdata.parsetitle(title)
    local a, b = string.match(title, "(%d+),(%d+)")
    return table.concat( a, b , "")
    end
    stopluacode

    startuseMPgraphicBookTimelineGraphic
    % Define constants
    numeric EVENT_BEGAN;
    EVENT_BEGAN := 13799;

    % Convert the digits from a string to a numeric value.
    numeric eventX;
    eventX := lua("mp.print(userdata.parsetitle('getspecificstructuretitle3'))") ;
    eventX := 1 - (eventX / EVENT_BEGAN);

    numeric wb, hb ; wb := 3.33in ; hb := .33in ;
    pickup pencircle scaled 2pt;
    picture p ; p := image(
    % Draw the line.
    draw (0, .5*hb) -- (wb, .5*hb) ;
    % Draw starting |.
    draw (0, 0) -- (0, hb) ;
    % Draw ending |.
    draw (wb, 0) -- (wb, hb) ;
    % Draw the timeline's dot relative to the event on the timeline.
    filldraw fullcircle scaled 9 shifted (eventX * wb, .5*hb);
    );

    numeric h ; h := OverlayHeight ;
    draw p shifted (-.33in, h - hb - .33in);

    setbounds currentpicture to OverlayBox ;
    stopuseMPgraphic

    starttext
    chapter[title=Inflation Theory,reference=inflation-theory]
    section[title=13,799 ± 0.021,reference=section]
    input ward

    chapter[title=First Stars,reference=first-stars]
    section[title=13,689 ± 70,reference=section-1]
    input ward
    stoptext





    share|improve this answer





























      3














      The placement of the dot modifies the bounding box. The most ad-hoc solution to this problem is



      1. Save the bounding box before drawing the dot

      2. Draw the dot

      3. Restore the bounding box without dot

      The dot will then leak out of the bounding box but that is only a tiny bit.



      definepapersize[BookPaperSize][
      width=8in,
      height=6in,
      ]

      setuppapersize[BookPaperSize]

      % Specify the width and height here because the inline figures need to
      % maintain aspect ratio while setting a pleasing width.
      startsetups[BookIllustrationSetups]
      setlayerframed[BookIllustrationLayer][
      frame=off,
      x=zeropoint,
      y=1.25in,
      width=makeupwidth,
      background=BookTimelineOverlay,
      ]
      stopsetups

      setupbackgrounds[page][
      background=BookIllustrationLayer,
      setups=BookIllustrationSetups
      ]

      definelayer[BookIllustrationLayer][
      width=paperwidth,
      height=paperheight,
      ]

      defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

      startuseMPgraphicBookTimelineGraphic
      % Define constants
      numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
      EVENT_BEGAN := 13799;
      TIME_OFFSET := 1.25in;
      PATH_THICKNESS := 2pt;

      % The book timeline title macro contains a number representing when the
      % event transpired and additional information.
      string sectionTitle, sectionTitleDigits;
      sectionTitle := "getspecificstructuretitle3";
      sectionTitleDigits := "";

      % Extract only digits and decimals from the book timeline title macro.
      for i = 0 upto length( sectionTitle ):
      string sectionChar;
      sectionChar := substring( i, i + 1 ) of sectionTitle;

      % A space indicates that the number has no more digits.
      if sectionChar = " ":
      break;
      fi;

      % Concatentate all the digits together.
      if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
      sectionTitleDigits := sectionTitleDigits & sectionChar;
      fi;
      endfor;

      % Convert the digits from a string to a numeric value.
      numeric eventTime;
      eventTime := 0;

      for i = scantokens( sectionTitleDigits ):
      eventTime := i;
      endfor;

      numeric eventX;
      eventX := 1 - (eventTime / EVENT_BEGAN);

      % Draw the line.
      draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
      withpen pencircle scaled PATH_THICKNESS;

      % Draw starting |.
      draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
      withpen pencircle scaled PATH_THICKNESS;

      % Draw ending |.
      draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
      withpen pencircle scaled PATH_THICKNESS;

      % The dot will change the size of bounding box, so we will just save the
      % bounding box without the dot for later
      path p ; p := bbox currentpicture ;

      % Draw the timeline's dot relative to the event on the timeline.
      filldraw fullcircle scaled 9
      shifted(
      TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
      );

      % Restore the bounding box without dot
      setbounds currentpicture to p ;
      stopuseMPgraphic

      starttext
      chapter[title=Inflation Theory,reference=inflation-theory]
      section[title=13,799 ± 0.021,reference=section]
      input ward

      chapter[title=First Stars,reference=first-stars]
      section[title=13,689 ± 70,reference=section-1]
      input ward
      stoptext


      Here is a little shorter version of your code, using Lua to parse the chapter title and using the MetaPost drawing as a background for the text layer of the page directly.



      definepapersize
      [BookPaperSize]
      [width=8in,
      height=6in]

      setuppapersize[BookPaperSize]

      defineoverlay
      [BookTimelineOverlay]
      [useMPgraphicBookTimelineGraphic]

      setupbackgrounds
      [text]
      [background=BookTimelineOverlay]


      startluacode
      function userdata.parsetitle(title)
      local a, b = string.match(title, "(%d+),(%d+)")
      return table.concat( a, b , "")
      end
      stopluacode

      startuseMPgraphicBookTimelineGraphic
      % Define constants
      numeric EVENT_BEGAN;
      EVENT_BEGAN := 13799;

      % Convert the digits from a string to a numeric value.
      numeric eventX;
      eventX := lua("mp.print(userdata.parsetitle('getspecificstructuretitle3'))") ;
      eventX := 1 - (eventX / EVENT_BEGAN);

      numeric wb, hb ; wb := 3.33in ; hb := .33in ;
      pickup pencircle scaled 2pt;
      picture p ; p := image(
      % Draw the line.
      draw (0, .5*hb) -- (wb, .5*hb) ;
      % Draw starting |.
      draw (0, 0) -- (0, hb) ;
      % Draw ending |.
      draw (wb, 0) -- (wb, hb) ;
      % Draw the timeline's dot relative to the event on the timeline.
      filldraw fullcircle scaled 9 shifted (eventX * wb, .5*hb);
      );

      numeric h ; h := OverlayHeight ;
      draw p shifted (-.33in, h - hb - .33in);

      setbounds currentpicture to OverlayBox ;
      stopuseMPgraphic

      starttext
      chapter[title=Inflation Theory,reference=inflation-theory]
      section[title=13,799 ± 0.021,reference=section]
      input ward

      chapter[title=First Stars,reference=first-stars]
      section[title=13,689 ± 70,reference=section-1]
      input ward
      stoptext





      share|improve this answer



























        3












        3








        3







        The placement of the dot modifies the bounding box. The most ad-hoc solution to this problem is



        1. Save the bounding box before drawing the dot

        2. Draw the dot

        3. Restore the bounding box without dot

        The dot will then leak out of the bounding box but that is only a tiny bit.



        definepapersize[BookPaperSize][
        width=8in,
        height=6in,
        ]

        setuppapersize[BookPaperSize]

        % Specify the width and height here because the inline figures need to
        % maintain aspect ratio while setting a pleasing width.
        startsetups[BookIllustrationSetups]
        setlayerframed[BookIllustrationLayer][
        frame=off,
        x=zeropoint,
        y=1.25in,
        width=makeupwidth,
        background=BookTimelineOverlay,
        ]
        stopsetups

        setupbackgrounds[page][
        background=BookIllustrationLayer,
        setups=BookIllustrationSetups
        ]

        definelayer[BookIllustrationLayer][
        width=paperwidth,
        height=paperheight,
        ]

        defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

        startuseMPgraphicBookTimelineGraphic
        % Define constants
        numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
        EVENT_BEGAN := 13799;
        TIME_OFFSET := 1.25in;
        PATH_THICKNESS := 2pt;

        % The book timeline title macro contains a number representing when the
        % event transpired and additional information.
        string sectionTitle, sectionTitleDigits;
        sectionTitle := "getspecificstructuretitle3";
        sectionTitleDigits := "";

        % Extract only digits and decimals from the book timeline title macro.
        for i = 0 upto length( sectionTitle ):
        string sectionChar;
        sectionChar := substring( i, i + 1 ) of sectionTitle;

        % A space indicates that the number has no more digits.
        if sectionChar = " ":
        break;
        fi;

        % Concatentate all the digits together.
        if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
        sectionTitleDigits := sectionTitleDigits & sectionChar;
        fi;
        endfor;

        % Convert the digits from a string to a numeric value.
        numeric eventTime;
        eventTime := 0;

        for i = scantokens( sectionTitleDigits ):
        eventTime := i;
        endfor;

        numeric eventX;
        eventX := 1 - (eventTime / EVENT_BEGAN);

        % Draw the line.
        draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
        withpen pencircle scaled PATH_THICKNESS;

        % Draw starting |.
        draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
        withpen pencircle scaled PATH_THICKNESS;

        % Draw ending |.
        draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
        withpen pencircle scaled PATH_THICKNESS;

        % The dot will change the size of bounding box, so we will just save the
        % bounding box without the dot for later
        path p ; p := bbox currentpicture ;

        % Draw the timeline's dot relative to the event on the timeline.
        filldraw fullcircle scaled 9
        shifted(
        TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
        );

        % Restore the bounding box without dot
        setbounds currentpicture to p ;
        stopuseMPgraphic

        starttext
        chapter[title=Inflation Theory,reference=inflation-theory]
        section[title=13,799 ± 0.021,reference=section]
        input ward

        chapter[title=First Stars,reference=first-stars]
        section[title=13,689 ± 70,reference=section-1]
        input ward
        stoptext


        Here is a little shorter version of your code, using Lua to parse the chapter title and using the MetaPost drawing as a background for the text layer of the page directly.



        definepapersize
        [BookPaperSize]
        [width=8in,
        height=6in]

        setuppapersize[BookPaperSize]

        defineoverlay
        [BookTimelineOverlay]
        [useMPgraphicBookTimelineGraphic]

        setupbackgrounds
        [text]
        [background=BookTimelineOverlay]


        startluacode
        function userdata.parsetitle(title)
        local a, b = string.match(title, "(%d+),(%d+)")
        return table.concat( a, b , "")
        end
        stopluacode

        startuseMPgraphicBookTimelineGraphic
        % Define constants
        numeric EVENT_BEGAN;
        EVENT_BEGAN := 13799;

        % Convert the digits from a string to a numeric value.
        numeric eventX;
        eventX := lua("mp.print(userdata.parsetitle('getspecificstructuretitle3'))") ;
        eventX := 1 - (eventX / EVENT_BEGAN);

        numeric wb, hb ; wb := 3.33in ; hb := .33in ;
        pickup pencircle scaled 2pt;
        picture p ; p := image(
        % Draw the line.
        draw (0, .5*hb) -- (wb, .5*hb) ;
        % Draw starting |.
        draw (0, 0) -- (0, hb) ;
        % Draw ending |.
        draw (wb, 0) -- (wb, hb) ;
        % Draw the timeline's dot relative to the event on the timeline.
        filldraw fullcircle scaled 9 shifted (eventX * wb, .5*hb);
        );

        numeric h ; h := OverlayHeight ;
        draw p shifted (-.33in, h - hb - .33in);

        setbounds currentpicture to OverlayBox ;
        stopuseMPgraphic

        starttext
        chapter[title=Inflation Theory,reference=inflation-theory]
        section[title=13,799 ± 0.021,reference=section]
        input ward

        chapter[title=First Stars,reference=first-stars]
        section[title=13,689 ± 70,reference=section-1]
        input ward
        stoptext





        share|improve this answer















        The placement of the dot modifies the bounding box. The most ad-hoc solution to this problem is



        1. Save the bounding box before drawing the dot

        2. Draw the dot

        3. Restore the bounding box without dot

        The dot will then leak out of the bounding box but that is only a tiny bit.



        definepapersize[BookPaperSize][
        width=8in,
        height=6in,
        ]

        setuppapersize[BookPaperSize]

        % Specify the width and height here because the inline figures need to
        % maintain aspect ratio while setting a pleasing width.
        startsetups[BookIllustrationSetups]
        setlayerframed[BookIllustrationLayer][
        frame=off,
        x=zeropoint,
        y=1.25in,
        width=makeupwidth,
        background=BookTimelineOverlay,
        ]
        stopsetups

        setupbackgrounds[page][
        background=BookIllustrationLayer,
        setups=BookIllustrationSetups
        ]

        definelayer[BookIllustrationLayer][
        width=paperwidth,
        height=paperheight,
        ]

        defineoverlay[BookTimelineOverlay][useMPgraphicBookTimelineGraphic]

        startuseMPgraphicBookTimelineGraphic
        % Define constants
        numeric EVENT_BEGAN, TIME_OFFSET, PATH_THICKNESS;
        EVENT_BEGAN := 13799;
        TIME_OFFSET := 1.25in;
        PATH_THICKNESS := 2pt;

        % The book timeline title macro contains a number representing when the
        % event transpired and additional information.
        string sectionTitle, sectionTitleDigits;
        sectionTitle := "getspecificstructuretitle3";
        sectionTitleDigits := "";

        % Extract only digits and decimals from the book timeline title macro.
        for i = 0 upto length( sectionTitle ):
        string sectionChar;
        sectionChar := substring( i, i + 1 ) of sectionTitle;

        % A space indicates that the number has no more digits.
        if sectionChar = " ":
        break;
        fi;

        % Concatentate all the digits together.
        if ((sectionChar >= "0") and (sectionChar <= "9")) or (sectionChar = "."):
        sectionTitleDigits := sectionTitleDigits & sectionChar;
        fi;
        endfor;

        % Convert the digits from a string to a numeric value.
        numeric eventTime;
        eventTime := 0;

        for i = scantokens( sectionTitleDigits ):
        eventTime := i;
        endfor;

        numeric eventX;
        eventX := 1 - (eventTime / EVENT_BEGAN);

        % Draw the line.
        draw (TIME_OFFSET, .5*overlayheight) -- (overlaywidth, .5*overlayheight)
        withpen pencircle scaled PATH_THICKNESS;

        % Draw starting |.
        draw (TIME_OFFSET, 0) -- (TIME_OFFSET, overlayheight)
        withpen pencircle scaled PATH_THICKNESS;

        % Draw ending |.
        draw (overlaywidth, 0) -- (overlaywidth, overlayheight)
        withpen pencircle scaled PATH_THICKNESS;

        % The dot will change the size of bounding box, so we will just save the
        % bounding box without the dot for later
        path p ; p := bbox currentpicture ;

        % Draw the timeline's dot relative to the event on the timeline.
        filldraw fullcircle scaled 9
        shifted(
        TIME_OFFSET + eventX * (overlaywidth - TIME_OFFSET), .5*overlayheight
        );

        % Restore the bounding box without dot
        setbounds currentpicture to p ;
        stopuseMPgraphic

        starttext
        chapter[title=Inflation Theory,reference=inflation-theory]
        section[title=13,799 ± 0.021,reference=section]
        input ward

        chapter[title=First Stars,reference=first-stars]
        section[title=13,689 ± 70,reference=section-1]
        input ward
        stoptext


        Here is a little shorter version of your code, using Lua to parse the chapter title and using the MetaPost drawing as a background for the text layer of the page directly.



        definepapersize
        [BookPaperSize]
        [width=8in,
        height=6in]

        setuppapersize[BookPaperSize]

        defineoverlay
        [BookTimelineOverlay]
        [useMPgraphicBookTimelineGraphic]

        setupbackgrounds
        [text]
        [background=BookTimelineOverlay]


        startluacode
        function userdata.parsetitle(title)
        local a, b = string.match(title, "(%d+),(%d+)")
        return table.concat( a, b , "")
        end
        stopluacode

        startuseMPgraphicBookTimelineGraphic
        % Define constants
        numeric EVENT_BEGAN;
        EVENT_BEGAN := 13799;

        % Convert the digits from a string to a numeric value.
        numeric eventX;
        eventX := lua("mp.print(userdata.parsetitle('getspecificstructuretitle3'))") ;
        eventX := 1 - (eventX / EVENT_BEGAN);

        numeric wb, hb ; wb := 3.33in ; hb := .33in ;
        pickup pencircle scaled 2pt;
        picture p ; p := image(
        % Draw the line.
        draw (0, .5*hb) -- (wb, .5*hb) ;
        % Draw starting |.
        draw (0, 0) -- (0, hb) ;
        % Draw ending |.
        draw (wb, 0) -- (wb, hb) ;
        % Draw the timeline's dot relative to the event on the timeline.
        filldraw fullcircle scaled 9 shifted (eventX * wb, .5*hb);
        );

        numeric h ; h := OverlayHeight ;
        draw p shifted (-.33in, h - hb - .33in);

        setbounds currentpicture to OverlayBox ;
        stopuseMPgraphic

        starttext
        chapter[title=Inflation Theory,reference=inflation-theory]
        section[title=13,799 ± 0.021,reference=section]
        input ward

        chapter[title=First Stars,reference=first-stars]
        section[title=13,689 ± 70,reference=section-1]
        input ward
        stoptext






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 3 hours ago

























        answered 4 hours ago









        Henri MenkeHenri Menke

        78.1k8171285




        78.1k8171285



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f488034%2fcontext-metapost-graphic-in-overlay-setups-shifts-between-pages%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Are there any AGPL-style licences that require source code modifications to be public? Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?Force derivative works to be publicAre there any GPL like licenses for Apple App Store?Do you violate the GPL if you provide source code that cannot be compiled?GPL - is it distribution to use libraries in an appliance loaned to customers?Distributing App for free which uses GPL'ed codeModifications of server software under GPL, with web/CLI interfaceDoes using an AGPLv3-licensed library prevent me from dual-licensing my own source code?Can I publish only select code under GPLv3 from a private project?Is there published precedent regarding the scope of covered work that uses AGPL software?If MIT licensed code links to GPL licensed code what should be the license of the resulting binary program?If I use a public API endpoint that has its source code licensed under AGPL in my app, do I need to disclose my source?

            2013 GY136 Descoberta | Órbita | Referências Menu de navegação«List Of Centaurs and Scattered-Disk Objects»«List of Known Trans-Neptunian Objects»

            Button changing it's text & action. Good or terrible? The 2019 Stack Overflow Developer Survey Results Are Inchanging text on user mouseoverShould certain functions be “hard to find” for powerusers to discover?Custom liking function - do I need user login?Using different checkbox style for different checkbox behaviorBest Practices: Save and Exit in Software UIInteraction with remote validated formMore efficient UI to progress the user through a complicated process?Designing a popup notice for a gameShould bulk-editing functions be hidden until a table row is selected, or is there a better solution?Is it bad practice to disable (replace) the context menu?