I am trying to display code blocks with some formatting feature, possibly syntax highlighting, from a Latex block in a Google Doc. An example of output I would like to achieve is:

I have tried two packages.
1) listings package
Inserting the following Latex block:
\usepackage{listings}
\begin{lstlisting}[language=html]
<html>
    <head>
        <title>Hello</title>
    </head>
    <body>Hello</body>
</html>
\end{lstlisting}
returns:
2) minted package
This would be my preferred choice, as it also support syntax colouring, unlike listings. However, inserting the following Latex block:
\usepackage{minted} 
\begin{minted}{html} 
<!DOCTYPE html> 
<html> 
  <head> 
    <title>Hello</title> 
  </head> 
  <body>Hello</body> 
</html> 
\end{minted}
Returns the same incorrect output as the listings package block:
Is any of those two packages supported, am I doing something wrong?
 
      
    

