Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-14 Thread Nasser M. Abbasi
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

Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-10 Thread Michal Hoftich
> > > 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 >

Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-10 Thread Nasser M. Abbasi
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

Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-10 Thread Michal Hoftich
""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 %

Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-09 Thread Nasser M. Abbasi
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

Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-09 Thread Jagath AR
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

Re: [tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-09 Thread Jagath AR
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

[tex4ht] is it possible to define a Latex environment, where one can issue direct HTML code in it for tex4ht only?

2016-06-09 Thread Nasser M. Abbasi
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