Giter VIP home page Giter VIP logo

nibbletex's People

Contributors

theojones2 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kludges

nibbletex's Issues

Style Support

  1. Changing the style

The file latex2wpstyle.py contains several definitions that determine the appearance of the WordPress/Nibbleblog translation. It should be self-explanatory to change the way sections, subsections, proofs and theorem-like environments are typeset, and to change the numbering scheme for theorem-like environments.

The variable $$ {M}&fg=000000$$ in latex2wpstyle.py contains a list of pairs of strings. For every pair, every occurrence of the first string in the document is replaced by an occurrence of the second before proceeding to the conversion from LaTeX to WordPress. If you want to use simple macros (which do not involve parameter-passing) then edit $$ {M}&fg=000000$$ to add support for your own LaTeX macros. (You will have to define the macros in macrosblog.tex as well, otherwise you will not be able to compile your LaTeX file and preview it.)

 

emref

Add emref and numbered equations support.

It is possible to refer to equations and
theorems via the {\em ref}, {\em eqref} and {\em label} LaTeX
commands, for example to Equation (\ref{eq:test}),
to Equation \eqref{eq:lemma},
and to Lemma \ref{lm:main} above.

Fix Math Support

Some macros are already defined. For example, backslash-E produces an expectation symbol:

$$ \mathop{\mathbb E}{x \in X} f(x) := \sum{x\in X} \mathop{\mathbb P} [x] \cdot f(x) &fg=000000$$

Some more macros (see the LaTeX source)

$$ { 0,1 }, {\mathbb R} , {\mathbb C}, {\mathbb Z}, {\mathbb N} , {\mathbb Q}, \epsilon &fg=000000$$

  1. Math

Lemma 1 (Main) Let $$ {\cal F}&fg=000000$$ be a total ramification of a compactifier, then
$$ \forall g \in {\cal F}. g^2 = \eta \ \ \ \ \ (1)&fg=000000$$

The (modifiable) numbering scheme is that lemmas, theorems, propositions, remarks and corollaries share the same counters, while exercises and examples have each their own counter.

Theorem 2 The adèle of a number field is never hyperbolically transfinite.
Proof: Left as an exercise. $latex \Box&fg=000000$

Exercise 1 Find a counterexample to Theorem 2.
Exercise 2 (Advanced) Prove Lemma 1.
Note that accented characters are allowed. Unfortunately, Erdös's name cannot be properly typeset in HTML. (Note that to get the above approximation, you need to type backslash-H-space-o, rather than backslash-H-{o}. Both are good in LaTeX, but only the second is recognized by LaTeX2WP.)

One can correctly type the names of Håstad, Szemerédi, Čech, and so on.

and unnumbered equations

$$ t(x) - \frac 12 > x^{\frac 13} &fg=000000$$

Unnumbered equations can be created with the double-dollar sign command or with the backslash-square bracket command.

$$ f(x) = \int_{-\infty}^{x} \frac 1 {t^2} dt &fg=000000$$

You can nest a bold text inside an emphasized text or viceversa.

The theorem-like environments theorem, lemma, proposition, remark, corollary, example and exercise are defined, as is the proof environment.

The LaTex commands to type $, %, and & are supported outside math mode, and % and & are supported in math mode as well:

$$ 30 & 10 % &fg=000000$$

The section symbol § is also supported.

Nibbleblog has trouble if a LaTeX expression containing a $$ {<}&fg=000000$$ symbol, such as $$ {x^2 < x^2 + 1}&fg=000000$$ is followed by an expression containing a $$ {>}&fg=000000$$ symbol, such as $$ {(x+y)^2 > (x+y)^2 - 3}&fg=000000$$. This is fixed by converting the inequality symbols into ``HTML character codes.'' Always write the symbols $$ {<}&fg=000000$$ and $$ {>}&fg=000000$$ in math mode.

 

Tabular environments without borders.

and without borders as in

\begin{tabular}{ccc}
$a$ & $\rightarrow$ & $b$
$\downarrow$ & & $\uparrow$
$c$ & $\rightarrow$ & $d$
\end{tabular}

(The tabular environments will be centered in Nibbleblog, but
not in the LaTeX preview.)

eqnarray

Add support for eqnarray:

\begin{eqnarray_}
f(x) & < & x^2 - y^2
& = & (x+y) \cdot (x-y)
\end{eqnarray_}

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.