TeX - LaTeX Asked on July 1, 2021
I have the following minimal code
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw[solid, thick]
(0,0) node [below]{0}
-- (2,0) node [below]{$n-k$}
-- (6,0) node [below]{$n$};
end{tikzpicture}
end{document}
How can I get short vertical tick marks at the nodes? By this I mean, how can I get the image to appear like the one below?
Note that the red colour is not necessary but it was just added to the image to make the desired result easier to understand.
The next code
documentclass{article}
usepackage{tikz}
begin{document}
begin{tikzpicture}
draw[solid,thick] (0,0) -- (6,0);
draw[thick] (0,0.2) -- ++ (0,-0.4) node[below] {0};
draw[thick] (2,0.2) -- ++ (0,-0.4) node[below] {$n-k$};
draw[thick] (6,0.2) -- ++ (0,-0.4) node[below] {$n$};
end{tikzpicture}
end{document}
produces:
Correct answer by Luis Sibaja on July 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP