Coder Social home page Coder Social logo

Comments (2)

vspinu avatar vspinu commented on July 3, 2024

HTML as host mode should work well. HTML innermodes are problematic. What is the use-case? I haven't heard of html noweb. Do you have an example? Is it common enough to be supported as part of the package? You can try creating your own html-noweb mode by replacing latex with html here

from poly-noweb.

smartmic avatar smartmic commented on July 3, 2024

I just discovered noweb and learned from the noweave manual that "noweave can work with LaTeX, plain TeX, troff or HTML."

My use case: As a newbie noweb user I want to see quick results in order to decide if literate programming is something to spend more time on. For non-print grade documentation, HTML is fine, in fact I like it better than markdown (I think anyhow markdown is overrated, but this is a different story). So just for trying out and creating some HTML documentation of my literate programming exercises, simple HTML should be fine as my LaTeX skills are already a little bit rusty.

Your hint about changing the host mode within the code given is already valuable, I will it try out! But I fear html noweb it is not very common though. On the other hand, my impression is that noweb is not so common at all nowadays.

And here is a very simple example for html noweb, just run noweave -html -index simple.nw > simple.html to get the resulting HTML page. Except for the missing <!doctype html> (which could be added to the noweb source together with boilerplate and giving the -delay option to noweave), this is perfectly valid HTML.

In my case, I added syntax highlighting with highlight.js and also plan to add MathJax for typesetting equations later. Both is possible by adding the script snippets directly into the noweb file (not showing here for brevity).

<p>A paragraph

  <ul>
    <li>First item
    <li>Second item
  </ul>

<p>Another paragraph

<<hello.c>>=
/*
   <<license>>
*/
#include <stdio.h>

int main(int argc, char *argv[]) {
   printf("Hello World!\n");
   return 0;
}
@

<p>it goes on…
  
<<hello.php>>= 
<?php
  /*
 <<license>>
  */
  echo "Hello world!\n";
?>
@

<p>This is put into the public domain
    
<<license>>=
CC0

from poly-noweb.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.