Skip to content

Commit

Permalink
tex, review, nitro
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Aug 29, 2015
1 parent d008cbb commit dbc68ff
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 39 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ logs
/deps/*
samples/.applist
samples/deps
*.aux
*.log
*.pdf
*.toc
**/ebin/**
**/Mnesia*/**
90 changes: 90 additions & 0 deletions doc/hevea.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
% hevea : hevea.sty
% This is a very basic style file for latex document to be processed
% with hevea. It contains definitions of LaTeX environment which are
% processed in a special way by the translator.
% Mostly :
% - latexonly, not processed by hevea, processed by latex.
% - htmlonly , the reverse.
% - rawhtml, to include raw HTML in hevea output.
% - toimage, to send text to the image file.
% The package also provides hevea logos, html related commands (ahref
% etc.), void cutting and image commands.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hevea}[2002/01/11]
\RequirePackage{comment}
\newif\ifhevea\heveafalse
\@ifundefined{ifimagen}{\newif\ifimagen\imagenfalse}
\makeatletter%
\newcommand{\heveasmup}[2]{%
\raise #1\hbox{$\m@th$%
\csname S@\f@size\endcsname
\fontsize\sf@size 0%
\math@fontsfalse\selectfont
#2%
}}%
\DeclareRobustCommand{\hevea}{H\kern-.15em\heveasmup{.2ex}{E}\kern-.15emV\kern-.15em\heveasmup{.2ex}{E}\kern-.15emA}%
\DeclareRobustCommand{\hacha}{H\kern-.15em\heveasmup{.2ex}{A}\kern-.15emC\kern-.1em\heveasmup{.2ex}{H}\kern-.15emA}%
\DeclareRobustCommand{\html}{\protect\heveasmup{0.ex}{HTML}}
%%%%%%%%% Hyperlinks hevea style
\newcommand{\ahref}[2]{{#2}}
\newcommand{\ahrefloc}[2]{{#2}}
\newcommand{\aname}[2]{{#2}}
\newcommand{\ahrefurl}[1]{\texttt{#1}}
\newcommand{\footahref}[2]{#2\footnote{\texttt{#1}}}
\newcommand{\mailto}[1]{\texttt{#1}}
\newcommand{\imgsrc}[2][]{}
\newcommand{\home}[1]{\protect\raisebox{-.75ex}{\char126}#1}
\AtBeginDocument
{\@ifundefined{url}
{%url package is not loaded
\let\url\ahref\let\oneurl\ahrefurl\let\footurl\footahref}
{}}
%% Void cutting instructions
\newcounter{cuttingdepth}
\newcommand{\tocnumber}{}
\newcommand{\notocnumber}{}
\newcommand{\cuttingunit}{}
\newcommand{\cutdef}[2][]{}
\newcommand{\cuthere}[2]{}
\newcommand{\cutend}{}
\newcommand{\htmlhead}[1]{}
\newcommand{\htmlfoot}[1]{}
\newcommand{\htmlprefix}[1]{}
\newenvironment{cutflow}[1]{}{}
\newcommand{\cutname}[1]{}
\newcommand{\toplinks}[3]{}
\newcommand{\setlinkstext}[3]{}
\newcommand{\flushdef}[1]{}
\newcommand{\footnoteflush}[1]{}
%%%% Html only
\excludecomment{rawhtml}
\newcommand{\rawhtmlinput}[1]{}
\excludecomment{htmlonly}
%%%% Latex only
\newenvironment{latexonly}{}{}
\newenvironment{verblatex}{}{}
%%%% Image file stuff
\def\toimage{\endgroup}
\def\endtoimage{\begingroup\def\@currenvir{toimage}}
\def\verbimage{\endgroup}
\def\endverbimage{\begingroup\def\@currenvir{verbimage}}
\newcommand{\imageflush}[1][]{}
%%% Bgcolor definition
\newsavebox{\@bgcolorbin}
\newenvironment{bgcolor}[2][]
{\newcommand{\@mycolor}{#2}\begin{lrbox}{\@bgcolorbin}\vbox\bgroup}
{\egroup\end{lrbox}%
\begin{flushleft}%
\colorbox{\@mycolor}{\usebox{\@bgcolorbin}}%
\end{flushleft}}
%%% Style sheets macros, defined as no-ops
\newcommand{\newstyle}[2]{}
\newcommand{\addstyle}[1]{}
\newcommand{\setenvclass}[2]{}
\newcommand{\getenvclass}[1]{}
\newcommand{\loadcssfile}[1]{}
\newenvironment{divstyle}[1]{}{}
\newenvironment{cellstyle}[2]{}{}
\newif\ifexternalcss
%%% Postlude
\makeatother
10 changes: 5 additions & 5 deletions doc/utf8.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ \subsection{Erlang}

\vspace{1\baselineskip}
\begin{lstlisting}
unicode:characters_to_binary("UniText") == <<"UniText"/utf8>>.
unicode:characters_to_binary("Uni") == <<"Uni"/utf8>>.
\end{lstlisting}
\vspace{1\baselineskip}

I.e. in N2O DSL you should use:

\vspace{1\baselineskip}
\begin{lstlisting}
#button{body= <<"Unicode Name"/utf8>>}
#button{body= <<"Unicode Name"/utf8>>}
\end{lstlisting}
\vspace{1\baselineskip}

Expand All @@ -25,7 +25,7 @@ \subsection{JavaScript}

\vspace{1\baselineskip}
\begin{lstlisting}
> utf8_toByteArray(document.getElementById('phone').value);
> utf8_toByteArray(document.getElementById('phone').value);
\end{lstlisting}
\vspace{1\baselineskip}

Expand All @@ -34,7 +34,7 @@ \subsection{JavaScript}

\vspace{1\baselineskip}
\begin{lstlisting}
> querySource('phone');
> querySource('phone');
\end{lstlisting}
\vspace{1\baselineskip}

Expand All @@ -47,6 +47,6 @@ \subsection{JavaScript}

\vspace{1\baselineskip}
\begin{lstlisting}
> console.log(utf8_decode(receivedMessage));
> console.log(utf8_decode(receivedMessage));
\end{lstlisting}
\vspace{1\baselineskip}
1 change: 1 addition & 0 deletions doc/web/toc.tex
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ \section*{TOC}
\footahref{http://synrc.com/apps/n2o/doc/web/actions.htm}{9. Actions} \@br
\footahref{http://synrc.com/apps/n2o/doc/web/packages.htm}{10. Packages} \@br
\footahref{http://synrc.com/apps/n2o/doc/web/persistence.htm}{11. Persistence} \@br
\footahref{http://synrc.com/apps/n2o/doc/web/utf8.htm}{12. UTF-8} \@br

\footahref{http://synrc.com/apps/n2o/doc/book.pdf}{Download PDF} \@br
%HEVEA \end{divstyle}
19 changes: 19 additions & 0 deletions doc/web/utf8.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
\input{../../../../synrc.hva}
%HEVEA \loadcssfile{../../synrc.css}
\begin{document}
\title{UTF8}
\author{Maxim Sokhatsky}
%HEVEA \begin{divstyle}{nonselectedwrapper}
%HEVEA \begin{divstyle}{article}
\input{toc}
%HEVEA \begin{divstyle}{articlecol}
\include{../utf8}
%HEVEA \rawhtmlinput{templates/disqus.htx}
%HEVEA \end{divstyle}
%HEVEA \end{divstyle}
%HEVEA \end{divstyle}
%HEVEA \begin{divstyle}{clear}{~}\end{divstyle}
\begin{rawhtml}
<script type="text/javascript" src="http://synrc.com/hi.js"></script>
\end{rawhtml}
\end{document}
6 changes: 3 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{lib_dirs,[".."]}.
{deps_dir,["deps"]}.
{deps,[
{jsone, ".*", {git, "git://github.com/sile/jsone.git", {tag,"v0.3.3"}}},
{cowboy, ".*", {git, "git://github.com/extend/cowboy", {tag,"1.0.1"}}},
{gproc, ".*", {git, "git://github.com/uwiger/gproc.git", {tag,"0.3"}}}
{jsone, ".*", {git, "git://github.com/sile/jsone.git", {tag,"v0.3.3"}}},
{cowboy, ".*", {git, "git://github.com/extend/cowboy", {tag,"1.0.1"}}},
{gproc, ".*", {git, "git://github.com/uwiger/gproc.git", {tag,"0.3"}}}
]}.
2 changes: 1 addition & 1 deletion samples/apps/review/src/review.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, review,
[
{description, "N2O VXZ Sample App"},
{description, "N2O Review Application"},
{vsn, "1"},
{registered, []},
{applications, [kernel, stdlib, n2o, kvs]},
Expand Down
26 changes: 0 additions & 26 deletions samples/apps/review/src/routes.erl

This file was deleted.

Binary file modified samples/mad
Binary file not shown.
6 changes: 3 additions & 3 deletions samples/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
{deps_dir,"deps"}.
{deps, [
{mad, ".*", {git, "git://github.com/synrc/mad", {tag, "master"} }},
{nitro, ".*", {git, "git://github.com/synrc/nitro", {tag, "master"} }},
{erlydtl,".*", {git, "git://github.com/evanmiller/erlydtl", {tag, "0.8.0"} }},
{gproc, ".*", {git, "git://github.com/uwiger/gproc.git", {tag, "0.3"} }},
{n2o, ".*", {git, "git://github.com/synrc/n2o", {tag, "master"} }},
{fs, ".*", {git, "git://github.com/synrc/fs", {tag, "0.9"} }},
{sh, ".*", {git, "git://github.com/synrc/sh", {tag, "0.9"} }},
{kjell, ".*", {git, "git://github.com/karlll/kjell", {tag, "master"} }},
{active, ".*", {git, "git://github.com/synrc/active", {tag, "0.9"} }},
{rest, ".*", {git, "git://github.com/synrc/rest", {tag, "1.5.0"} }},
{kvs, ".*", {git, "git://github.com/synrc/kvs", {tag, "2.8"} }},
{n2o, ".*", {git, "git://github.com/synrc/n2o", {tag, "2.8"} }}
{kvs, ".*", {git, "git://github.com/synrc/kvs", {tag, "2.8"} }}
]}.
{shell_driver,start_kjell}.
{fetch_speed,fast_master}.
Expand Down
1 change: 0 additions & 1 deletion samples/sys.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[
{n2o, [{port,8000},
{app,review},
{route,routes},
{log_modules,config},
{log_level,config},
{log_backend,n2o_log},
Expand Down

0 comments on commit dbc68ff

Please sign in to comment.