How to generate numbering in latex beamer - pdflatex

How to generate numbering in latex beamer for references?
I am using a reference from the bib file
\usepackage{natbib}
\begin{frame}[allowframebreaks]{References}
\bibliographystyle{agsm}
\bibliography{Reference}
\end{frame}
while generating in beamer it appears
I want to generate numbering for referenes cited.

Related

Save Asciidoctor AST as an AsciiDoc text document

Working with Asciidoc programmatically (I'm using AsciiDoctorJ), is there a straightforward way to get back the AsciiDoc text data from the AST DOM?
I can get the pre-processed AsciiDoc stream from the pre-processor, but if I want to make any changes to the AST as it's being loaded, I don't see any way to render a Document back into the AsciiDoc form.
I suppose it's possible to implement a Converter, or simply traverse the DOM tree and write out its contents as AsciiDoc text myself, but that's a serious undertaking, and there are lot of nooks and crannies that I'm bound to miss.
Considering that AsciiDoc code contains the information that lets it determine how to convert the text into the tree, I was wondering if there is a straightforward way to simply reverse that.
The Asciidoctor parser does not currently store enough information to reproduce the original source document. For more information, see: https://github.com/asciidoctor/asciidoctor/issues/3312
Depending on what you want to achieve, the best option is probably to use a Preprocessor extension to process the raw AsciiDoc before Asciidoctor parses it: https://docs.asciidoctor.org/asciidoctorj/latest/extensions/preprocessor/

doxygen: How to create ".uml" file from source code of c++ using doxygen?

I have used doxygen, no dobt very good tool.
I used Doxygen + Graphviz, to generate uml like diagrams from it, but those are image files shown on webpage.
And my requirement is specific to .uml files.
So Is there any way to generate .uml files from c++ source code.

Linux (Bash) - Create a PDF with a form with editable fields from the Acrobat Reader

Is it possible to create from Linux, from the command line (bash), a PDF that contains a form with fields that can then be edited with Acrobat Reader?
The first approach could be creating a LaTeX file with your form and generating the PDF file using a bash command.
For instance, the Creating Fillable PDFs post explains how to write a LaTeX file to produce a PDF form.
Once you have written all the LaTeX files, you could simply run:
$ pdflatex -interaction=nonstopmode ${latexFile}
Where the -interaction=nonstopmode flag disables the user interaction and the ${latexFile} points to your latex source file
yes it is possible.
You can pick a programming language with good pdf library supported, E.g java and itext, design your pdf layout, decide which fields should be editable. Then generate the pdf.
In shell you just call the program you've developed.
If you ask for pure bash itself, No, it cannot do it for you.

iteratively creating graphs

I have a bunch of files containing x and y coordinates, representing time and value (space-separated, but can be amended)
For example, in each file I will have this sort of points:
15:06:59 0.0140
15:07:00 0.0142
...etc....
I want to create a word file (or some equivalent) to show all these graphs.
Currently, I am using Excel. It pretty daunting task, as I have to plug paste numbers in two rows for each graph, and I have many of them, both graphs and points
Thanks
Maybe create a TEX file and then compile it to the PDF?
Great example of creating line plots in TEX here: http://www.texample.net/tikz/examples/line-plot-example/
Beside TIKZ there is also second package that allows you to create graphs programmatically: the PGF plots
The word "iteratively" in the question title makes me think that you want to have a look at RRDTool.
I did something like this before, my solution was to write a C program that wrote all of these values into a CSV file format. Then simply use a CSV to .xls file converter.
you could use the gnuplot program. This will allow you to produce charts using scripts and save them as images. It's pretty good and aimed specifically at producing charts.
alternatively you could try the R package - this is a full statistical analysis package and will produce lovely charts but it's got a substantially steeper learning curve than gnuplot

Getting R plots into LaTeX?

I'm a newbie to both R and LaTeX and have just recently found how to plot a standard time series graph using R and save it as a png image. What I'm worried about is that saving it as an image and then embedding it into LaTeX is going to scale it and make it look ugly.
Is there a way to make R's plot() function output a vector graphic and embed that into LaTeX? I'm a total beginner in both so please be gentle :) Code snippets are highly appreciated!
I would recommend the tikzDevice package for producing output for inclusion in LaTeX documents:
http://cran.r-project.org/web/packages/tikzDevice/index.html
The tikzDevice converts graphics produced in R to code that can be interpreted by the LaTeX package tikz. TikZ provides a very nice vector drawing system for LaTeX. Some good examples of TikZ output are located at:
http://www.texample.net/
The tikzDevice may be used like any other R graphics device:
require( tikzDevice )
tikz( 'myPlot.tex' )
plot( 1, 1, main = '\\LaTex\\ is $\\int e^{xy}$' )
dev.off()
Note that the backslashes in LaTeX macros must be doubled as R interprets a single backslash as an escape character. To use the plot in a LaTeX document, simply include it:
\include{path/to/myPlot.tex}
The pgfSweave package contains Sweave functionality that can handle the above step for you. Make sure that your document contains \usepackage{tikz} somewhere in the LaTeX preamble.
http://cran.r-project.org/
The advantages of tikz() function as compared to pdf() are:
The font of labels and captions in your figures always matches the font used in your LaTeX document. This provides a unified look to your document.
You have all the power of the LaTeX typesetter available for creating mathematical annotation and can use arbitrary LaTeX code in your figure text.
Disadvantages of the tikz() function are:
It does not scale well to handle plots with lots of components. These are things such as persp() plots of large matricies. The shear number of graphic elements can cause LaTeX to slow to a crawl or run out of memory.
The package is currently flagged as beta. This means that the interface or functionality of the package is subject to change if the authors find a compelling reason to do so.
I should end this post by disclaiming that I am an author of both the tikzDevice and pgfSweave packages so my opinion may be biased. However, I have used both packages to produce several academic reports in the last year and have been very satisfied with the results.
Shane is spot-on, you do want Sweave. Eventually.
As a newbie, you may better off separating task though. For that, do this:
open a device: pdf("figures/myfile.pdf", height=6, width=6).
plot your R object: plot(1:10, type='l', main='boring') -- and remember that lattice and ggplot need an explicit print around plot.
important: close your device: dev.off() to finalize the file.
optional: inspect the pdf file.
in LaTeX, use usepackage{graphicx} in the document header, use
\includegraphics[width=0.98\textwidth]{figures/myfile} to include the figure created earlier and note that file extension is optional.
run this through pdflatex and enjoy.
You might want to consider using Sweave. There is a lot of great documentation available for this on the Sweave website (and elsewhere). It has very simple syntax: just put your R code between <<>>= and #.
Here's a simple example that ends up looking like this:
\documentclass[a4paper]{article}
\title{Sweave Example 1}
\author{Friedrich Leisch}
\begin{document}
\maketitle
In this example we embed parts of the examples from the
\texttt{kruskal.test} help page into a \LaTeX{} document:
<<>>=
data(airquality)
library(ctest)
kruskal.test(Ozone ~ Month, data = airquality)
#
which shows that the location parameter of the Ozone
distribution varies significantly from month to month. Finally we
include a boxplot of the data:
\begin{center}
<<fig=TRUE,echo=FALSE>>=
boxplot(Ozone ~ Month, data = airquality)
#
\end{center}
\end{document}
To build the document, you can just call R CMD Sweave file.Rnw or run Sweave(file) from within R.
This is a dupe of a question on SO that I can't find.
But:
http://r-forge.r-project.org/projects/tikzdevice/ -- tikz output from r
and
http://www.rforge.net/pgfSweave/ tikz code via sweave.
Using tikz will give you a look consistent with the rest of your document, plus it will use latex to typeset all the text in your graphs.
EDIT
Getting LaTeX into R Plots

Resources