Giter Site home page Giter Site logo

mathapedia's Introduction

Mathapedia + LaTeX2HTML5

DEPRECATED!

Visit latex2js

====================

Notes for revival (locally)

initialize db

docker-compose up 
  • login as root with the example password in compose file
  • create the database latex2html5_db
  • load the sql dump in the admin (localhost:8080)
  • dump file is located in Dans preferred cloud drive >websites>mathapedia

build the frontend and start app

  • install and old version of bbb
  • build it
  • start it on release mode
npm install -g [email protected]
bbb release
RELEASE=1 node server/app.js

NOTES

it's completely frontend rendered, so to make this a static site, need to build in rendering.

====================

GOOD NEWS! This project now has a frontend-only version: latex2html5 (github)

The loose structure and nature of user interface design poses a problem for documenting science and related interfaces in a consistent manner. TeX provides us with some "laws" to obey in order to design the output of a text and graphical language around. Hence, we can attempt to create a synthesis of a structured user interface specification (TeX) and a structured functional specification (HTML5) to provide a publishing platform for the current and next generation.

The Art is where we can blend these two standards bodies; higher levels of abstraction allow people to express their ideas without having to worry about the mechanisms by which the technology is rendering their works. It is in these environments when people can express themselves freely.

Mathapedia

Cheers!

video

demo

Adding new LaTeX commands

If there is one takeaway for developers, the most important files for adding (LaTeX) functionality: expressions.js, psgraph.js, renderer.js

Installation

  • nginx v0.8.54
  • nodejs v0.8.11
  • mysql v14.14

installing nodejs, npm, and mysql

These three installations vary from machine to machine. Your best bet is to use Google for this.

get the code

cd /var/www
git clone https://github.com/pyramation/LaTeX2HTML5.git

install node packages

these run globally (they are for the build and monitoring):

npm install -g forever
npm install -g bbb

The rest is a part of the repo and can be installed more easily:

cd /var/www/LaTeX2HTML5
npm install

Database Setup

Create a mysql user

GRANT ALL PRIVILEGES ON latex2html5_db.* TO latex2html5@localhost IDENTIFIED BY 'skateboard321' WITH GRANT OPTION;

Create the database

CREATE DATABASE latex2html5_db;

Initialize database

cd /var/www/LaTeX2HTML5
bbb db:migrate

Web Server Setup

make public folder and create symbolic links that alias the public folders

cd /var/www
mkdir public
cd public
ln -s ../LaTeX2HTML5/dist dist
ln -s ../LaTeX2HTML5/app app

Edit nginx.conf in /usr/local/nginx/conf or wherever it was installed so that you proxy port 9000 and point to the public folder for the root:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    upstream math_server {
        server localhost:9000 fail_timeout=0;
    }

    proxy_set_header Host yourdomain.com;
    proxy_set_header X-forwarded-for $proxy_add_x_forwarded_for;

    server {
        listen       80;
        server_name  localhost;
        root /var/www/public/;

        location / {
               try_files $uri @backer;
        }
        location @backer {
           proxy_pass http://math_server$request_uri;
        }
        location ~* \.(png|jpg|jpeg|gif|ico|js|css)$ {
            expires max;
            log_not_found off;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

    }

}

We are utilizing many various open source projects. Thank you, thank you, thank you open source community!!!!!!

Starting the Server for Development

cd /var/www/LaTeX2HTML5
npm start

Starting the Server for Production

bbb release
RELEASE=1 forever start server/app.js 

Working Locally

If you want to work locally and use some.com in your browser, you can edit your /etc/hosts/ file

127.0.0.1 math.com

Thanks

Frontend

MathJax

Aura

Backbone

RequireJS

Backbone Layout Manager

Async.js

CodeMirror

D3

bootstrap

jQuery

underscore.js

handlebars.js

Backend

nginx

node.js

express.js

MySQL

jugglingdb

Build process

Backbone Boilerplate

grunt-bbb plugin repo and follow the instructions to install. Basing your project off this repo will allow the bbb commands to work out-of-the-box.

mathapedia's People

Contributors

kqdtran avatar pyramation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.