Segment marks with round capsIs there such a thing as a `mathrule`? (rounded endcaps)Rotate a node but not...

Is it safe to try charging my laptop with a USB-C PD charger that has less wattage than recommended?

Using loops to create tables

Strange Sign on Lab Door

Why are the books in the Game of Thrones citadel library shelved spine inwards?

Can a dragon be stuck looking like a human?

What is the purpose of easy combat scenarios that don't need resource expenditure?

How did the original light saber work?

Program that converts a number to a letter of the alphabet

Why would the Pakistan airspace closure cancel flights not headed to Pakistan itself?

Why don't American passenger airlines operate dedicated cargo flights any more?

What is the wife of a henpecked husband called?

Recrystallisation of dibenzylideneacetone

How to deal with an incendiary email that was recalled

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Reference on complex cobordism

Every character has a name - does this lead to too many named characters?

Can a hotel cancel a confirmed reservation?

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

Slow moving projectiles from a hand-held weapon - how do they reach the target?

What makes the Forgotten Realms "forgotten"?

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

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

En passant for beginner

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



Segment marks with round caps


Is there such a thing as a `mathrule`? (rounded endcaps)Rotate a node but not its content: the case of the ellipse decorationHow can I mark right angles in tkz-euclide with round quarter-circle and a dot?How to mark a Segment with an arrow in Tkz euclid with the tkzMarkSegmentDrawing 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
    6 hours ago











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

    – Steven B. Segletes
    4 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
    4 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
    6 hours ago











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

    – Steven B. Segletes
    4 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
    4 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 10 mins ago







blackened

















asked 10 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
    6 hours ago











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

    – Steven B. Segletes
    4 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
    4 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
    6 hours ago











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

    – Steven B. Segletes
    4 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
    4 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
6 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
6 hours ago













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

– Steven B. Segletes
4 hours ago





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

– Steven B. Segletes
4 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
4 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
4 hours ago










2 Answers
2






active

oldest

votes


















4














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
    3 hours ago






  • 3





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

    – CarLaTeX
    3 hours 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
    3 hours ago











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

    – marmot
    3 hours ago











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

    – blackened
    3 hours 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
    4 hours ago











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

    – CarLaTeX
    3 hours 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%2fsegment-marks-with-round-caps%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









4














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
    3 hours ago






  • 3





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

    – CarLaTeX
    3 hours 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
    3 hours ago











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

    – marmot
    3 hours ago











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

    – blackened
    3 hours ago
















4














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
    3 hours ago






  • 3





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

    – CarLaTeX
    3 hours 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
    3 hours ago











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

    – marmot
    3 hours ago











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

    – blackened
    3 hours ago














4












4








4







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 2 hours ago

























answered 3 hours ago









marmotmarmot

105k4125240




105k4125240













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

    – blackened
    3 hours ago






  • 3





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

    – CarLaTeX
    3 hours 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
    3 hours ago











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

    – marmot
    3 hours ago











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

    – blackened
    3 hours ago



















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

    – blackened
    3 hours ago






  • 3





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

    – CarLaTeX
    3 hours 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
    3 hours ago











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

    – marmot
    3 hours ago











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

    – blackened
    3 hours ago

















Thanks. What controls the distance between the two ticks?

– blackened
3 hours ago





Thanks. What controls the distance between the two ticks?

– blackened
3 hours ago




3




3





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

– CarLaTeX
3 hours ago





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

– CarLaTeX
3 hours 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
3 hours 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
3 hours ago













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

– marmot
3 hours ago





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

– marmot
3 hours ago













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

– blackened
3 hours ago





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

– blackened
3 hours 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
    4 hours ago











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

    – CarLaTeX
    3 hours 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
    4 hours ago











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

    – CarLaTeX
    3 hours 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 3 hours ago

























answered 4 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
    4 hours ago











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

    – CarLaTeX
    3 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
    4 hours ago











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

    – CarLaTeX
    3 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
4 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
4 hours ago













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

– CarLaTeX
3 hours ago







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

– CarLaTeX
3 hours 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%2fsegment-marks-with-round-caps%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...