On 6/10/2016 3:53 AM, Michal Hoftich wrote:
""Nasser,
this is of course typical example of case when you should put your
macros to .sty file and redefinitions for tex4ht into .4ht file.
Thanks to the pointer above by Michal, I made some progress
with the above method. Now using tex4ht, it gen
>
>
> Thanks Michal;
>
> This is really neat. I never knew how to do all the above before.
> never used .sty and .4ht before and how they are used. (is
> there a basic user-guide tutorial on these things?)
>
Sure :)
https://github.com/michal-h21/helpers4ht/wiki/tex4ht-tutorial#configurations
>
On 6/10/2016 3:53 AM, Michal Hoftich wrote:
""Nasser,
this is of course typical example of case when you should put your
macros to .sty file and redefinitions for tex4ht into .4ht file.
mycode.sty:
\ProvidesPackage{mycode}
\RequirePackage{listings}
\lstnewenvironment{code}
{\l
""Nasser,
this is of course typical example of case when you should put your
macros to .sty file and redefinitions for tex4ht into .4ht file.
mycode.sty:
\ProvidesPackage{mycode}
\RequirePackage{listings}
\lstnewenvironment{code}
{\lstset{language=matlab}}
{}
\endinput
%
On 6/10/2016 1:23 AM, Jagath AR wrote:
Hi Nasser,
The error in your MWE case is due to undefined "\PRE" command, which should
be "/PRE".
Regards
Jagath
Opps, sorry about that. Too much latex and for second forgot about
HTML uses ;) Ok, so PRE do not give error. But PRE is not reall
Hi Nasser,
Will this work for you:
\documentclass[12pt]{book}%
\usepackage[T1]{fontenc}
\usepackage{listings}
%\usepackage{fancyvrb}
\usepackage{moreverb}
\def\putVerb{%
\HCode{}%
\verbatiminput{a.tex}%
\HCode{}%
}
\ifdefined\HCode
\newenvironment{code}
{\verbatimwrite{a.tex}}
{\endv
Hi Nasser,
The error in your MWE case is due to undefined "\PRE" command, which should
be "/PRE".
Regards
Jagath
On 10 June 2016 at 11:41, Nasser M. Abbasi wrote:
> I am struggling with this. I need to be able to define
> an environment, where when Latex file is compiled to HTML
> does one thin
I am struggling with this. I need to be able to define
an environment, where when Latex file is compiled to HTML
does one thing, and when compiled to pdf does another thing.
This sounds easy enough. The problem is it is for code
listing. For pdf, I can use listing package no problem.
For HTML, I