GeoGebra-like segment marksIs there such a thing as a `mathrule`? (rounded endcaps)Rotate a node but not its...

Using only 1s, make 29 with the minimum number of digits

Program that converts a number to a letter of the alphabet

Does fast page mode apply to ROM?

Pre-1980's science fiction short story: alien disguised as a woman shot by a gangster, has tentacles coming out of her breasts when remaking her body

Cat is tipping over bed-side lamps during the night

If I delete my router's history can my ISP still provide it to my parents?

How can animals be objects of ethics without being subjects as well?

Would a National Army of mercenaries be a feasible idea?

Does Windows 10's telemetry include sending *.doc files if Word crashed?

Overfitting and Underfitting

Finding radius of circle

Do authors have to be politically correct in article-writing?

Why Normality assumption in linear regression

just upgraded iMac late 2015 ram from 12 GB to 28 GB and it became too slow to use

Citing paywalled articles accessed via illegal web sharing

How to deal with an incendiary email that was recalled

What is the time complexity of enqueue and dequeue of a queue implemented with a singly linked list?

What's the most convenient time of year in the USA to end the world?

Is there a better way to make this?

Why zero tolerance on nudity in space?

What does Cypher mean when he says Neo is "gonna pop"?

What is better: yes / no radio, or simple checkbox?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Why does a metal block make a shrill sound but not a wooden block upon hammering?



GeoGebra-like segment marks


Is there such a thing as a `mathrule`? (rounded endcaps)Rotate a node but not its content: the case of the ellipse decorationHow may I extend (prolong or produce) a line segment accurately in the following geometrical figure?Drawing the bisector of an angle as a dashed-line segmentDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to change tkzDrawSegments" Marks style?How to label a segment in `tkz-euclide`?create a standalone legend for a grid of plotsFilling circular segment using Tkz-EuclideTkz-Euclide: mark segment: mark thickness













8















(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.



enter image description here



documentclass[tikz,border=10pt]{standalone}
usepackage{tkz-euclide}
usetkzobj{all}
begin{document}
begin{tikzpicture}
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
tkzMarkSegment[pos=0.5,mark=||](A,B)
tkzMarkSegment[pos=0.5,mark=||](B,C)
end{tikzpicture}
end{document}


enter image description here










share|improve this question




















  • 1





    Can you explain further about how they differ? I see no (major) difference, but my eye is not good at compare things.

    – JouleV
    4 hours ago











  • Related in a very roundabout way: tex.stackexchange.com/questions/161297/…

    – Steven B. Segletes
    2 hours ago











  • @Steven Your solution seems as close as it gets to what I want. Would it be possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago
















8















(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.



enter image description here



documentclass[tikz,border=10pt]{standalone}
usepackage{tkz-euclide}
usetkzobj{all}
begin{document}
begin{tikzpicture}
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
tkzMarkSegment[pos=0.5,mark=||](A,B)
tkzMarkSegment[pos=0.5,mark=||](B,C)
end{tikzpicture}
end{document}


enter image description here










share|improve this question




















  • 1





    Can you explain further about how they differ? I see no (major) difference, but my eye is not good at compare things.

    – JouleV
    4 hours ago











  • Related in a very roundabout way: tex.stackexchange.com/questions/161297/…

    – Steven B. Segletes
    2 hours ago











  • @Steven Your solution seems as close as it gets to what I want. Would it be possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago














8












8








8


0






(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.



enter image description here



documentclass[tikz,border=10pt]{standalone}
usepackage{tkz-euclide}
usetkzobj{all}
begin{document}
begin{tikzpicture}
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
tkzMarkSegment[pos=0.5,mark=||](A,B)
tkzMarkSegment[pos=0.5,mark=||](B,C)
end{tikzpicture}
end{document}


enter image description here










share|improve this question
















(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.



enter image description here



documentclass[tikz,border=10pt]{standalone}
usepackage{tkz-euclide}
usetkzobj{all}
begin{document}
begin{tikzpicture}
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
tkzMarkSegment[pos=0.5,mark=||](A,B)
tkzMarkSegment[pos=0.5,mark=||](B,C)
end{tikzpicture}
end{document}


enter image description here







tikz-pgf tkz-euclide






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 4 hours ago







blackened

















asked 8 hours ago









blackenedblackened

1,564714




1,564714








  • 1





    Can you explain further about how they differ? I see no (major) difference, but my eye is not good at compare things.

    – JouleV
    4 hours ago











  • Related in a very roundabout way: tex.stackexchange.com/questions/161297/…

    – Steven B. Segletes
    2 hours ago











  • @Steven Your solution seems as close as it gets to what I want. Would it be possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago














  • 1





    Can you explain further about how they differ? I see no (major) difference, but my eye is not good at compare things.

    – JouleV
    4 hours ago











  • Related in a very roundabout way: tex.stackexchange.com/questions/161297/…

    – Steven B. Segletes
    2 hours ago











  • @Steven Your solution seems as close as it gets to what I want. Would it be possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago








1




1





Can you explain further about how they differ? I see no (major) difference, but my eye is not good at compare things.

– JouleV
4 hours ago





Can you explain further about how they differ? I see no (major) difference, but my eye is not good at compare things.

– JouleV
4 hours ago













Related in a very roundabout way: tex.stackexchange.com/questions/161297/…

– Steven B. Segletes
2 hours ago





Related in a very roundabout way: tex.stackexchange.com/questions/161297/…

– Steven B. Segletes
2 hours ago













@Steven Your solution seems as close as it gets to what I want. Would it be possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

– blackened
2 hours ago





@Steven Your solution seems as close as it gets to what I want. Would it be possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

– blackened
2 hours ago










2 Answers
2






active

oldest

votes


















3














You could just build your own and then have the full flexibility of controlling every aspect of its appearance.



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt);
draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);
}}},mark segment/.style={thick}]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here



enter image description here



A more customizable version thereof is



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
tikzset{|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {%
draw[line cap=round,mark segment]
(-pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (-pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);
draw[line cap=round,mark segment] (pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);}
}},
mark segment/.style={thick},
mark segment options/.code=tikzset{mark segment/.style={#1}},
mark segment distance/.initial=2pt,
mark segment length/.initial=4pt
}
begin{tikzpicture}[]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[mark segment options={thick,yscale=2},|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • Thanks. What controls the distance between the two ticks?

    – blackened
    1 hour ago






  • 2





    I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

    – CarLaTeX
    1 hour ago











  • @blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

    – marmot
    1 hour ago











  • @blackened I added a version in which you can control the parameters with pgfkeys.

    – marmot
    1 hour ago











  • @marmot Thanks. Do I need to create separate styles for single and triple ticks?

    – blackened
    1 hour ago



















5














Use decorations.markings to customize the markings as you like.



To control the distance between the two ticks, just modify the x coordinates here:



draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);


MWE:



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[decoration={
markings,
mark=at position .5 with
{
draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);
}
}
]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[postaction={decorate}] (A) -- (B);
path[postaction={decorate}] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago











  • @blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

    – CarLaTeX
    1 hour ago













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%2f477390%2fgeogebra-like-segment-marks%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














You could just build your own and then have the full flexibility of controlling every aspect of its appearance.



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt);
draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);
}}},mark segment/.style={thick}]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here



enter image description here



A more customizable version thereof is



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
tikzset{|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {%
draw[line cap=round,mark segment]
(-pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (-pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);
draw[line cap=round,mark segment] (pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);}
}},
mark segment/.style={thick},
mark segment options/.code=tikzset{mark segment/.style={#1}},
mark segment distance/.initial=2pt,
mark segment length/.initial=4pt
}
begin{tikzpicture}[]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[mark segment options={thick,yscale=2},|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • Thanks. What controls the distance between the two ticks?

    – blackened
    1 hour ago






  • 2





    I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

    – CarLaTeX
    1 hour ago











  • @blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

    – marmot
    1 hour ago











  • @blackened I added a version in which you can control the parameters with pgfkeys.

    – marmot
    1 hour ago











  • @marmot Thanks. Do I need to create separate styles for single and triple ticks?

    – blackened
    1 hour ago
















3














You could just build your own and then have the full flexibility of controlling every aspect of its appearance.



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt);
draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);
}}},mark segment/.style={thick}]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here



enter image description here



A more customizable version thereof is



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
tikzset{|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {%
draw[line cap=round,mark segment]
(-pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (-pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);
draw[line cap=round,mark segment] (pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);}
}},
mark segment/.style={thick},
mark segment options/.code=tikzset{mark segment/.style={#1}},
mark segment distance/.initial=2pt,
mark segment length/.initial=4pt
}
begin{tikzpicture}[]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[mark segment options={thick,yscale=2},|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • Thanks. What controls the distance between the two ticks?

    – blackened
    1 hour ago






  • 2





    I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

    – CarLaTeX
    1 hour ago











  • @blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

    – marmot
    1 hour ago











  • @blackened I added a version in which you can control the parameters with pgfkeys.

    – marmot
    1 hour ago











  • @marmot Thanks. Do I need to create separate styles for single and triple ticks?

    – blackened
    1 hour ago














3












3








3







You could just build your own and then have the full flexibility of controlling every aspect of its appearance.



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt);
draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);
}}},mark segment/.style={thick}]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here



enter image description here



A more customizable version thereof is



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
tikzset{|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {%
draw[line cap=round,mark segment]
(-pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (-pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);
draw[line cap=round,mark segment] (pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);}
}},
mark segment/.style={thick},
mark segment options/.code=tikzset{mark segment/.style={#1}},
mark segment distance/.initial=2pt,
mark segment length/.initial=4pt
}
begin{tikzpicture}[]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[mark segment options={thick,yscale=2},|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer















You could just build your own and then have the full flexibility of controlling every aspect of its appearance.



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt);
draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);
}}},mark segment/.style={thick}]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here



enter image description here



A more customizable version thereof is



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
tikzset{|| mark/.style={postaction=decorate,decoration={markings,
mark=at position #1 with {%
draw[line cap=round,mark segment]
(-pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (-pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);
draw[line cap=round,mark segment] (pgfkeysvalueof{/tikz/mark segment distance}/2,-pgfkeysvalueof{/tikz/mark
segment length}/2) -- (pgfkeysvalueof{/tikz/mark segment distance}/2,pgfkeysvalueof{/tikz/mark
segment length}/2);}
}},
mark segment/.style={thick},
mark segment options/.code=tikzset{mark segment/.style={#1}},
mark segment distance/.initial=2pt,
mark segment length/.initial=4pt
}
begin{tikzpicture}[]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[|| mark=0.5] (A) -- (B);
path[mark segment options={thick,yscale=2},|| mark=0.5] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 47 mins ago

























answered 1 hour ago









marmotmarmot

105k4125238




105k4125238













  • Thanks. What controls the distance between the two ticks?

    – blackened
    1 hour ago






  • 2





    I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

    – CarLaTeX
    1 hour ago











  • @blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

    – marmot
    1 hour ago











  • @blackened I added a version in which you can control the parameters with pgfkeys.

    – marmot
    1 hour ago











  • @marmot Thanks. Do I need to create separate styles for single and triple ticks?

    – blackened
    1 hour ago



















  • Thanks. What controls the distance between the two ticks?

    – blackened
    1 hour ago






  • 2





    I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

    – CarLaTeX
    1 hour ago











  • @blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

    – marmot
    1 hour ago











  • @blackened I added a version in which you can control the parameters with pgfkeys.

    – marmot
    1 hour ago











  • @marmot Thanks. Do I need to create separate styles for single and triple ticks?

    – blackened
    1 hour ago

















Thanks. What controls the distance between the two ticks?

– blackened
1 hour ago





Thanks. What controls the distance between the two ticks?

– blackened
1 hour ago




2




2





I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

– CarLaTeX
1 hour ago





I was renewing my answer while you answered, however the answers are slightly different, I would leave them both.

– CarLaTeX
1 hour ago













@blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

– marmot
1 hour ago





@blackened You can make this a pgf key. At the moment the distance is 2pt because I use draw[line cap=round,mark segment] (-1pt,-2pt) -- (-1pt,2pt); draw[line cap=round,mark segment] (1pt,-2pt) -- (1pt,2pt);.

– marmot
1 hour ago













@blackened I added a version in which you can control the parameters with pgfkeys.

– marmot
1 hour ago





@blackened I added a version in which you can control the parameters with pgfkeys.

– marmot
1 hour ago













@marmot Thanks. Do I need to create separate styles for single and triple ticks?

– blackened
1 hour ago





@marmot Thanks. Do I need to create separate styles for single and triple ticks?

– blackened
1 hour ago











5














Use decorations.markings to customize the markings as you like.



To control the distance between the two ticks, just modify the x coordinates here:



draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);


MWE:



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[decoration={
markings,
mark=at position .5 with
{
draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);
}
}
]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[postaction={decorate}] (A) -- (B);
path[postaction={decorate}] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago











  • @blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

    – CarLaTeX
    1 hour ago


















5














Use decorations.markings to customize the markings as you like.



To control the distance between the two ticks, just modify the x coordinates here:



draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);


MWE:



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[decoration={
markings,
mark=at position .5 with
{
draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);
}
}
]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[postaction={decorate}] (A) -- (B);
path[postaction={decorate}] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer


























  • Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago











  • @blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

    – CarLaTeX
    1 hour ago
















5












5








5







Use decorations.markings to customize the markings as you like.



To control the distance between the two ticks, just modify the x coordinates here:



draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);


MWE:



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[decoration={
markings,
mark=at position .5 with
{
draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);
}
}
]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[postaction={decorate}] (A) -- (B);
path[postaction={decorate}] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here






share|improve this answer















Use decorations.markings to customize the markings as you like.



To control the distance between the two ticks, just modify the x coordinates here:



draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);


MWE:



documentclass[tikz,border=10pt]{standalone}
usetikzlibrary{decorations.markings}
begin{document}
begin{tikzpicture}[decoration={
markings,
mark=at position .5 with
{
draw[line cap=round, thick] (-2pt,-2pt) -- (-2pt,2pt);
draw[line cap=round, thick] (2pt,-2pt) -- (2pt,2pt);
}
}
]
coordinate (A) at (0,0);
coordinate (B) at (2,4);
coordinate (C) at (4,0);

draw(A)--(B)--(C)--cycle;
path[postaction={decorate}] (A) -- (B);
path[postaction={decorate}] (B) -- (C);
end{tikzpicture}
end{document}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 1 hour ago

























answered 2 hours ago









CarLaTeXCarLaTeX

32.2k551133




32.2k551133













  • Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago











  • @blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

    – CarLaTeX
    1 hour ago





















  • Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

    – blackened
    2 hours ago











  • @blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

    – CarLaTeX
    1 hour ago



















Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

– blackened
2 hours ago





Steven's link above is as close as it gets. Would it possible to have ticks with round ends as in those examples, and be control the distance between the tick marks?

– blackened
2 hours ago













@blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

– CarLaTeX
1 hour ago







@blackened Don't use tikz-euclide but decorations.markings to customize the markings as you like. See my renewed answer.

– CarLaTeX
1 hour ago




















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%2f477390%2fgeogebra-like-segment-marks%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

is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

How do i solve the “ No module named 'mlxtend' ” issue on Jupyter?

Pilgersdorf Inhaltsverzeichnis Geografie | Geschichte | Bevölkerungsentwicklung | Politik | Kultur...