How do I properly format and highlight a docker-compose.yml
file when including a code snippet into a latex document.
I want to do something like:
\documentclass{article}
\usepackage{listings}
\lstset{language=YAML}
\begin{document}
\lstinputlisting{docker-compose.yml}
\end{document}
to import the following docker-compose.yml
.
version: "3.7"
services:
foo:
image: hello-world
How do I add syntax highlighting for *.yaml
/*.yml
files?
I am aware of this answer to format a yaml snippet. I want to know how to do the same with an imported yaml file.