Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

Mathgenerator Editions: Differential Analysis

After the publications of some abstracts (with the pdf version) from papers generated with mathgen and scigen, Today I propose you a book generated with the downloadable code of mathgen. I use the following code:
./mathgen.pl --product=book --mode=zip --output=mybook.zip --author="Gianluigi Filippelli"
In this way the software generates also the LaTeX code, and so I could eventually modify the book. For example I add a cover: first of all I generated it using Magazine Cover generator. In order to add the cover, first of all I insert the following code in the preamble:
\usepackage{geometry}
\geometry{top=0cm,bottom=0cm,left=0cm,right=0cm,nohead,nofoot}
\usepackage{graphicx}
\usepackage{calc}
And after I add the following code after \begin{document}:
\frontmatter
\pagenumbering{gobble}

\ begin{center}
\includegraphics[width=5.8in,height=8.8in]{cover.jpg}
\ end{center}

\newpage
In order to create an interactive pdf I also add the following package:
\usepackage{hyperref}
\hypersetup{
pdfpagemode=UseOutlines,
%pdfstartview=FitV,
bookmarksopen,
bookmarksopenlevel=-1,
pdftitle=Differential analysis,
pdfauthor=Gianluigi Filippelli,
pdfsubject=mathematics,
pdfkeywords=mathematics
%pdfpagemode=FullScreen
}
You can download the results from minus.com
I hope that you can enjoy yourselfs with mathgen and scigen!

MathJax: script for LaTeX

One of the most important tool for a science blog in mathemathics and physics is the equation editor. To embed equation in post we can use a lot of solutions: for example we can write eq. on Wikipedia, past image url or download it and use in our post; we can use also LaTeX editor by codecogs.com, and also we can copy img code or download our equation.
But there's a most elegant solution: MathJax.
Using this script equations present a better integration with html pages, and using right click, our readers can read LeTeX or MathML code. For example, with Schrodinger's equation for a particle subjected by a potential $V(\vec r)$:
\[i \hbar \frac{\partial}{\partial t} \psi (\vec r, t) = - \frac{\hbar}{2m} \nabla^2 \psi (\vec r, t) + V(\vec r) \psi (\vec r,t)\]
An other example is the perfect integration in text. For example the abstract of the preprint Technicolor at the Tevatron:

That became with MathJax:
We propose that the 3.2 sigma excess at ~150 GeV in the dijet mass spectrum of W + jets reported by CDF is the technipion $\pi_T$ of low-scale technicolor. Its relatively large cross section is due to production of a narrow $Wjj$ resonance, the technirho, which decays to W + $\pi_T$. We discuss ways to enhance and strengthen the technicolor hypothesis and suggest companion searches at the Tevatron and LHC.
There's only one controindication: the feed rss. In feed, indeed, we sent LaTeX code and not the image version.

However, to add the scrpit, in a blog on Blogspot for example, you must write the following code after <head> tag:

<script type='text/x-mathjax-config'>
      MathJax.Hub.Config({
  tex2jax: {
    inlineMath: [[&#39;$&#39;,&#39;$&#39;], [&#39;\\(&#39;,&#39;\\)&#39;]],
    processEscapes: true
  }
});
</script>

    <script type='text/x-mathjax-config'>
MathJax.Hub.Config({
  MMLorHTML: {
    prefer: {Firefox: &quot;HTML&quot;}
  }
});
</script>
<script src='http://cdn.mathjax.org/mathjax/1.1-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full' type='text/javascript'/>


I hope that the tools could be useful to other bloggers.