{"id":16193527,"url":"https://github.com/pyramation/mathapedia","last_synced_at":"2025-03-19T04:30:41.239Z","repository":{"id":6171797,"uuid":"7401675","full_name":"pyramation/Mathapedia","owner":"pyramation","description":"write LaTeX + PSTricks and produce digital textbooks with HTML5 interactivity :)","archived":false,"fork":false,"pushed_at":"2020-02-06T01:26:26.000Z","size":2637,"stargazers_count":66,"open_issues_count":1,"forks_count":15,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-13T02:03:52.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyramation.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-02T03:02:27.000Z","updated_at":"2025-01-16T12:04:25.000Z","dependencies_parsed_at":"2022-09-12T10:00:36.888Z","dependency_job_id":null,"html_url":"https://github.com/pyramation/Mathapedia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyramation%2FMathapedia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyramation%2FMathapedia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyramation%2FMathapedia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyramation%2FMathapedia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyramation","download_url":"https://codeload.github.com/pyramation/Mathapedia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243968528,"owners_count":20376408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T08:15:14.127Z","updated_at":"2025-03-19T04:30:40.314Z","avatar_url":"https://github.com/pyramation.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mathapedia + LaTeX2HTML5\n====================\n\n\nDEPRECATED!\n\nVisit [latex2js](http://latex2js.com)\n\n====================\n\n\nNotes for revival (locally)\n\n## initialize db\n\n```\ndocker-compose up \n```\n\n* login as root with the example password in compose file\n* create the database latex2html5_db\n* load the sql dump in the admin (localhost:8080)\n* dump file is located in Dans preferred cloud drive `\u003ewebsites\u003emathapedia`\n\n## build the frontend and start app\n\n* install and old version of `bbb`\n* build it\n* start it on release mode\n\n```\nnpm install -g bbb@0.1.16\nbbb release\nRELEASE=1 node server/app.js\n```\n\n## NOTES\n\nit's completely frontend rendered, so to make this a static site, need to build in rendering.\n\n\n====================\n\n\nGOOD NEWS! This project now has a frontend-only version: [latex2html5](http://latex2html5.com) ([github](https://github.com/Mathapedia/LaTeX2HTML5))\n\nThe 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.\n\nThe 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.\n\n![Mathapedia](https://mathapedia.com/app/assets/img/photo.png)\n\nCheers!\n\n[video](http://www.youtube.com/watch?v=QYMLMUKJyFc)\n \n[demo](https://mathapedia.com)\n\n\nAdding new LaTeX commands\n=========================\n\nIf there is one takeaway for developers, the most important files for adding (LaTeX) functionality: expressions.js, psgraph.js, renderer.js\n\nInstallation\n============\n\n* nginx v0.8.54 \n* nodejs v0.8.11\n* mysql v14.14\n\ninstalling nodejs, npm, and mysql\n---------------------------------\n\nThese three installations vary from machine to machine. Your best bet is to use Google for this.\n\n\nget the code\n---------------------\n\n    cd /var/www\n    git clone https://github.com/pyramation/LaTeX2HTML5.git\n\n\ninstall node packages\n---------------------\n\nthese run globally (they are for the build and monitoring):\n\n    npm install -g forever\n    npm install -g bbb\n\nThe rest is a part of the repo and can be installed more easily:\n\n    cd /var/www/LaTeX2HTML5\n    npm install\n\nDatabase Setup\n--------------\n\nCreate a mysql user\n\n    GRANT ALL PRIVILEGES ON latex2html5_db.* TO latex2html5@localhost IDENTIFIED BY 'skateboard321' WITH GRANT OPTION;\n\nCreate the database\n\n    CREATE DATABASE latex2html5_db;\n\nInitialize database\n\n    cd /var/www/LaTeX2HTML5\n    bbb db:migrate\n\n\nWeb Server Setup\n----------------\n\nmake public folder and create symbolic links that alias the public folders\n\n    cd /var/www\n    mkdir public\n    cd public\n    ln -s ../LaTeX2HTML5/dist dist\n    ln -s ../LaTeX2HTML5/app app\n\nEdit 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:\n\n\n    worker_processes  1;\n\n    events {\n        worker_connections  1024;\n    }\n\n    http {\n        include       mime.types;\n        default_type  application/octet-stream;\n\n        sendfile        on;\n        keepalive_timeout  65;\n\n        upstream math_server {\n            server localhost:9000 fail_timeout=0;\n        }\n\n        proxy_set_header Host yourdomain.com;\n        proxy_set_header X-forwarded-for $proxy_add_x_forwarded_for;\n\n        server {\n            listen       80;\n            server_name  localhost;\n            root /var/www/public/;\n\n            location / {\n                   try_files $uri @backer;\n            }\n            location @backer {\n               proxy_pass http://math_server$request_uri;\n            }\n            location ~* \\.(png|jpg|jpeg|gif|ico|js|css)$ {\n                expires max;\n                log_not_found off;\n            }\n\n            #error_page  404              /404.html;\n\n            # redirect server error pages to the static page /50x.html\n            error_page   500 502 503 504  /50x.html;\n            location = /50x.html {\n                root   html;\n            }\n\n        }\n\n    }\n\n\nWe are utilizing many various open source projects. Thank you, thank you, thank you open source community!!!!!!\n\n\nStarting the Server for Development\n-----------------------------------\n\n    cd /var/www/LaTeX2HTML5\n    npm start\n\n\nStarting the Server for Production\n----------------------------------\n\n    bbb release\n    RELEASE=1 forever start server/app.js \n\n\nWorking Locally\n---------------\n\nIf you want to work locally and use some.com in your browser, you can edit your `/etc/hosts/` file\n\n    127.0.0.1 math.com\n\n\nThanks\n======\n\n# Frontend\n\n[MathJax](http://www.mathjax.org/)\n\n[Aura](https://github.com/aurajs/aura)\n    \n[Backbone](https://github.com/documentcloud/backbone)\n  \n[RequireJS](https://github.com/jrburke/requirejs)\n\n[Backbone Layout Manager](https://github.com/tbranyen/backbone.layoutmanager)\n\n[Async.js](https://github.com/caolan/async)\n\n[CodeMirror](http://codemirror.net)\n    \n[D3](http://d3js.org/)\n    \n[bootstrap](http://twitter.github.com/bootstrap/)\n  \n[jQuery](http://jquery.com/)\n    \n[underscore.js](http://underscorejs.org/)\n\n[handlebars.js](http://handlebarsjs.com/)\n\n# Backend\n\n[nginx](http://wiki.nginx.org/Main)\n\n[node.js](http://nodejs.org/)\n\n[express.js](http://expressjs.com/)\n\n[MySQL](http://www.mysql.com/)\n\n[jugglingdb](https://github.com/pyramation/jugglingdb/tree/has-and-belongs-to-many)\n\n## Build process\n\n[Backbone Boilerplate](https://github.com/tbranyen/backbone-boilerplate/wiki)\n\n[grunt-bbb](https://github.com/backbone-boilerplate/grunt-bbb)\nplugin repo and follow the instructions to install.  Basing your project off\nthis repo will allow the `bbb` commands to work out-of-the-box.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyramation%2Fmathapedia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyramation%2Fmathapedia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyramation%2Fmathapedia/lists"}