TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MWE:

\documentclass{article}
\usepackage{cprotect}
\begin{document}
\cprotect\section{\verb|invlaplace(exp((a*s)^(1/2)), s, t)|}
test
\end{document}

pdflatex output:

Mathematica graphics

but htlatex foo.tex generated this HTML output:

Mathematica graphics

The HTML is:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
  "http://www.w3.org/TR/html4/loose.dtd">  
<html > 
<head><title></title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)"> 
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)"> 
<!-- html --> 
<meta name="src" content="foo.tex"> 
<meta name="date" content="2013-11-16 02:34:00"> 
<link rel="stylesheet" type="text/css" href="foo.css"> 
</head><body 
>
   <h3 class="sectionHead"><span class="titlemark">1   </span> <a 
 id="x1-10001"></a><span class="obeylines-h"><span class="verb"><span 
class="cmtt-10">invlaplace(exp((a*s)^(1/2)),</span><span 
class="cmtt-10">&#x00A0;s,</span><span 
class="cmtt-10">&#x00A0;t)</span></span></span>&#x02C6;&#x02C6;E&#x02C6;&#x02C6;L </h3>
<!--l. 6--><p class="noindent" >test

</body></html> 

How can one remove the extra ^^E^^L noise added? Using This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)

share|improve this question
up vote 3 down vote accepted

Do you really need to use the cprotect package? As simple workaround, you can use

\documentclass{article}
\usepackage[]{fancyvrb}
\begin{document}
\section{\protect\Verb|invlaplace(exp((a*s)^(1/2)), s, t)|}
test
\end{document}
share|improve this answer
    
Thanks. No I do not need to. I tried \texttt and that did not work due to ^ being there. So I tried cprotect. I tried your solution and it worked! – Nasser Nov 16 '13 at 11:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.