In org-mode export to LaTeX (then to pdf), I want to include html file. In
exported document, html file contents should be rendered (not in raw html
code). My export comment (C-c C-e ll) seems to have no effect on the first of
the two #+INCLUDE: commands below. Second #+INCLUDE: command works as
expected. How can this be fixed?
My org file (include_html.org)
#+TITLE: Include html
In org-mode export to LaTeX to pdf, include html file. In exported document,
html file contents should not be in raw html code. They should be rendered.
#+INCLUDE: "hello_world.html" export html
#+INCLUDE: "hello_world.html" src html
Same directory has this html file (hello_world.html)
<!DOCTYPE html>
<html>
<head>
<title>HTML Document</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>
LaTeX file produced by C-c C-e ll
% Created 2025-08-10 Sun 10:05
% Intended LaTeX compiler: pdflatex
\documentclass[11pt]{article}
\title{Include html}
% Deleted \usepackage lines
\hypersetup{
pdfauthor={Naresh Gurbuxani},
pdftitle={Include html},
pdfkeywords={},
pdfsubject={},
pdfcreator={Emacs 30.1 (Org mode 9.7.11)},
pdflang={English}}
\begin{document}
\maketitle
In org-mode export to \LaTeX{} to pdf, include html file. In exported document,
html file contents should not be in raw html code. They should be rendered.
\begin{lstlisting}[language=HTML,numbers=none]
<!DOCTYPE html>
<html>
<head>
<title>HTML Document</title>
</head>
<body>
<p>Hello World</p>
</body>
</html>
\end{lstlisting}
\end{document}