You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HEVEA fails to recognize the tag names and comments in HTML source code that is typeset using the listings package. The example input file to reproduce the problem is included below.
I processed the input file with pdflatex as follows.
$ pdflatex example.texThis is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)...Output written on example.pdf (1 page, 172393 bytes).Transcript written on example.log.
Notice that neither the opening and closing tags of the HTML elements nor the comment are highlighted in the HTML file as they are in the PDF.
The following LaTeX source was used as the example.tex input file.
\documentclass[12pt,a5paper]{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[mono=false]{libertine}
\usepackage[sf]{titlesec}
\usepackage[usenames,dvipsnames]{color}
\usepackage{listings}
\usepackage{hevea}
%BEGIN LATEX\lstset{basicstyle={\ttfamily\footnotesize}}
\lstset{showstringspaces=false}
\lstset{basewidth=0.5em}
%END LATEX\newstyle{.source}{font-family:monospace;white-space:pre;}
\lstdefinestyle{syntax}{
keywordstyle={\color{NavyBlue}\bfseries},
commentstyle={\color{OliveGreen}\itshape},
stringstyle={\color{Maroon}\slshape}}
\lstnewenvironment{source}[1]{
\setenvclass{lstlisting}{source}
\lstset{language={#1},style=syntax}}{}
\begin{document}
\noindent
This is the source code of a Java program:
\begin{source}{Java}
public class HelloWorldApp {
public static void main(String[] args) {
// Prints the string to the console
System.out.println("Hello World!");
}
}
\end{source}
\noindent
This is a fragment of HTML source code:
\begin{source}{HTML}
<!-- Fleurons are stylized flowers. -->
<div class="center"><img class="fleuron" src="images/fleuron.svg" width="45" height="16" alt="* * *"></div>\end{source}\end{document}
The text was updated successfully, but these errors were encountered:
HEVEA fails to recognize the tag names and comments in HTML source code that is typeset using the listings package. The example input file to reproduce the problem is included below.
I processed the input file with pdflatex as follows.
This command produced a PDF page that displays:
I processed the input file with hevea as follows.
This command produced an HTML page that displays:
Notice that neither the opening and closing tags of the HTML elements nor the comment are highlighted in the HTML file as they are in the PDF.
The following LaTeX source was used as the example.tex input file.
The text was updated successfully, but these errors were encountered: