Sha256: c2712bc4d108abeff73a338a5965672332aa49df6e8f2ca9381c4351433f6fbc

Contents?: true

Size: 904 Bytes

Versions: 8

Compression:

Stored size: 904 Bytes

Contents

\documentclass[12pt,a4paper,sloppy]{article}
<% @latex_config = { :recipe => [
	{:command => 'pdflatex'},
	{:command => 'bibtex', :arguments =>[]},
	{:command => 'pdflatex', :runs => 2}
]} # you can override the defaults if you wish; see LatexToPdf#config
%>
\usepackage{filecontents}
\usepackage{lastpage}
\usepackage{graphics}

\begin{filecontents}{bibliography.bib}
@article{example,
  author  = {John Doe},
  title   = {The title of the work},
  journal = {The name of the journal},
  year    = 1993,
  number  = 2,
  pages   = {201-213},
  month   = 7,
  note    = {An optional note},
  volume  = 4
}
\end{filecontents}

\begin{document}
This document\cite{example} uses \verb|parse_runs = 2| to calculate the last page.

Other defaults can be overridden using \verb|LatexToPdf#config| and \verb|@latex_config|.

<%= yield %>

\bibliography{bibliography}
\bibliographystyle{plain}


\end{document}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails-latex-2.3.4 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.3.3 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.3.2 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.3.0 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.2.2 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.2.1 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.2.0 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex
rails-latex-2.1.0 examples/rails-latex-demo/app/views/layouts/application.pdf.erbtex