I want to make a line, like this one.
\documentclass{article}
\usepackage(tikz}
\begin{tikzpicture}
\draw (0,0) -- (1,0.5)
\end{tikzpicture}
For example, I draw a line that starts from coordinate (0,0) to (1,0.5). It should be like this one.
(Note: This is a picture that I draw in Paint)
Unfortunately, I don't know how to denote the points (for example A is the coordinate of (0,0) and B is the coordinate of (1,0.5).).
Another example, I copied one of the codes in this link:
How to draw parallelepiped and cube with LaTeX, and then I replace it as
\begin{center}
\begin{tikzpicture}[every edge quotes/.append style={auto, text=black}]
\pgfmathsetmacro{\cubex}{3}
\pgfmathsetmacro{\cubey}{3}
\pgfmathsetmacro{\cubez}{3}
\draw [draw=, every edge/.append style={draw=black, densely dashed, opacity=.5}, fill=white]
(0,0,0) coordinate (o) -- ++(-\cubex,0,0) coordinate (a) -- ++(0,-\cubey,0) coordinate (b) edge coordinate [pos=1] (g) ++(0,0,-\cubez) -- ++(\cubex,0,0) coordinate (c) -- cycle
(o) -- ++(0,0,-\cubez) coordinate (d) -- ++(0,-\cubey,0) coordinate (e) edge (g) -- (c) -- cycle
(o) -- (a) -- ++(0,0,-\cubez) coordinate (f) edge (g) -- (d) -- cycle;
\path [every edge/.append style={draw=black, |-|}]
(b) +(0,-5pt) coordinate (b1) edge ["8cm"'] (b1 -| c)
(b) +(-5pt,0) coordinate (b2) edge ["8cm"] (b2 |- a)
(c) +(3.5pt,-3.5pt) coordinate (c2) edge ["8cm"'] ([xshift=3.5pt,yshift=-3.5pt]e)
And I don't know how to denote point (for example let ABCDEFGH be a cube).
Best Answer
Welcome to TeX.SE!
Just add nodes above given coordinates:
[![enter image description here][1]][1]
Addendum:
MWE for the cube can be for example:
[![enter image description here][2]][2]
Edit: Added is
siunitx
package and lenght is written as\qty{8}{cm}
. [1]: https://i.stack.imgur.com/64Npi.png [2]: https://i.stack.imgur.com/1NlAR.png