4

Is there a better than '\quad' way to style text like on the picture? I mean the space before and after dash. Is using '\quad' after 'inputs:' to make space in next line like after 'tab' a good idea?

Inputs:
\\ \quad \quad $G = \langle{V,E}\rangle$ \quad - \quad a weighted graph
\\ \quad \quad $v_ 0$ \quad  - \quad the initial node to determine distances from

enter image description here

Joey
  • 41

1 Answers1

4

You could use a tabular:

enter image description here

For an overview over available commands for horizontal spacing, take a look at: What commands are there for horizontal spacing?

\documentclass{article}
\usepackage{array}
\begin{document}

Inputs:

\begin{tabular}{@{\quad}>{(}l<{)} @{\enspace-\enspace} l } G = \langle{V,E}\rangle & a weighted graph \ v_ 0 & the initial node to determine distances from \end{tabular}

\end{document}

leandriis
  • 62,593