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
(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.
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}
tikz-pgf tkz-euclide
add a comment |
(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.
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}
tikz-pgf tkz-euclide
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
add a comment |
(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.
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}
tikz-pgf tkz-euclide
(I guess many will view this nitpicking.) How can I replicate the soft-yet-beautiful-looking segment marks of GeoGebra.
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}
tikz-pgf tkz-euclide
tikz-pgf tkz-euclide
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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}
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}
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 usedraw[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
|
show 6 more comments
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}
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 usetikz-euclide
butdecorations.markings
to customize the markings as you like. See my renewed answer.
– CarLaTeX
1 hour ago
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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}
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}
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 usedraw[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
|
show 6 more comments
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}
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}
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 usedraw[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
|
show 6 more comments
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}
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}
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}
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}
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 usedraw[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
|
show 6 more comments
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 usedraw[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
|
show 6 more comments
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}
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 usetikz-euclide
butdecorations.markings
to customize the markings as you like. See my renewed answer.
– CarLaTeX
1 hour ago
add a comment |
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}
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 usetikz-euclide
butdecorations.markings
to customize the markings as you like. See my renewed answer.
– CarLaTeX
1 hour ago
add a comment |
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}
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}
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 usetikz-euclide
butdecorations.markings
to customize the markings as you like. See my renewed answer.
– CarLaTeX
1 hour ago
add a comment |
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 usetikz-euclide
butdecorations.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
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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