Pandoc Beamer



  1. Pandoc Beamer Aspect Ratio
  2. Pandoc Beamer Tv
  3. Pandoc Beamer Ii
  4. Pandoc Beamer 5

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library.

You can use pandoc to produce an HTML + JavaScript slide presentation that can be viewed via a web browser. There are five ways to do this, using S5, DZSlides, Slidy, Slideous, or reveal.js. You can also produce a PDF slide show using LaTeX beamer, or slides shows in Microsoft PowerPoint format.

Here’s the Markdown source for a simple slide show, Demo.md:

  1. I recently learned how to use Pandoc and TexLive LaTeX to convert Markdown to Beamer slides. The command I'm using is this: pandoc src/00localgit.md -t beamer -o slides/00localgit.pdf However, this does not add each Slide header as a bookmark in the PDF. Is this possible to do? The top of my Markdown file looks like this.
  2. Posts about XOR written by geekoverdose.

Slidedecks, LaTeX Beamer and pandoc 1.9. Superscripts not working in raw latex environments?

The slides generated from this markdown can bee seen here

You can create a slide show broken up into sections by using the # and ## heading tags (you can also create a new slide without a header using a horizontal rule (—-). You can also insert latex equations by going to math mode (Insert the equation in $ $ )

To produce an HTML/JavaScript slide show, simply type

where FORMAT is either s5, slidy, slideous, dzslides, or revealjs.

To produce a PDF slide show using LaTeX beamer, type

Note that a reveal.js slide show can also be converted to a PDF by printing it to a file from the browser.

To produce a Powerpoint slide show, type

Structuring the slide show¶

By default, the slide level is the highest heading level in the hierarchy that is followed immediately by content, and not another heading, somewhere in the document. In the example above, level-1 headings are always followed by level-2 headings, which are followed by content, so the slide level is 2. This default can be overridden using the --slide-level option.

The document is carved up into slides according to the following rules:

  • A horizontal rule always starts a new slide.
  • A heading at the slide level always starts a new slide.
  • Headings below the slide level in the hierarchy create headings within a slide.
  • Headings above the slide level in the hierarchy create “title slides,” which just contain the section title and help to break the slide show into sections. Non-slide content under these headings will be included on the title slide (for HTML slide shows) or in a subsequent slide with the same title (for beamer).
  • A title page is constructed automatically from the document’s title block, if present. (In the case of beamer, this can be disabled by commenting out some lines in the default template.)

These rules are designed to support many different styles of slide show. If you don’t care about structuring your slides into sections and subsections, you can just use level-1 headings for all each slide. (In that case, level-1 will be the slide level.) But you can also structure the slide show into sections, as in the example above.

Note: in reveal.js slide shows, if slide level is 2, a two-dimensional layout will be produced, with level-1 headings building horizontally and level-2 headings building vertically. It is not recommended that you use deeper nesting of section levels with reveal.js.

Incremental lists¶

By default, these writers produces lists that display “all at once”. If you want your lists to display incrementally (one item at a time), use the -i option. If you want aparticular list to depart from the default (that is, to display incrementally without the -i option and all at once with the -i option), put it in a block quote:

In this way incremental and nonincremental lists can be mixed in asingle document.

Styling the slides¶

To style beamer slides, you can specify a beamer “theme” or “colortheme” using the -V option:

for more settings visit Pandoc Manual and bookdown.org

Like this post? Share on: Twitter ❄ Facebook ❄ Reddit ❄ LinkedIn ❄ Email

So what do you think? Did I miss something? Is any part unclear? Leave your comments below.

Published

Last Updated

Category

Blog

Tags

Stay in Touch

Contents

  1. 1 Basic LaTeX Lesson I
    1. 1.2 Installation
  2. 2 Basic LaTeX Lesson II
  3. 3 FAQ
    1. 3.1 Basics
    2. 3.2 Math
    3. 3.3 Page Layout
    4. 3.4 Beamer
    5. 3.5 References
    6. 3.6 Using Latex for CV
    7. 3.7 Tikz
    8. 3.8 Texstudio
    9. 3.9 Microsoft Word

Basic LaTeX Lesson I

Why Latex

  • What you see is what you mean (WYSIWYM)
  • No need to bother with formatting, LaTex will do it for you
  • Standard for academic publishing
  • Easy to include math/graphics/tables

Installation

Windows -> Install MikTeX

Mac -> Install MacTex

Windows

For Windows, go to http://miktex.org/. You will then see the following at the top of the page.


Clicking the download button will then bring you to this page.


Download MiKTex, then install and open TexWork. You are then ready to use LaTex on your Windows computer.

Mac

For Mac users, head to http://tug.org/mactex/. Click on the download MacTex button, as shown below.


Run the installation program, and you are ready to use LaTex on your Mac.

Online: Overleafs

For users who do not wish to install any programs, LaTex can also be used online. This also makes it easy for multiple people to edit the same file at the same time, similar to Google Docs. Simply go to https://www.overleaf.com/ and create a free account, and you’re ready to use LaTex online. In the rest of this user guide, I will show examples using the online version.

To create a new project, simply click on the button on the left-hand side of the screen.


You will then see the following layouts. In most cases, choosing a blank page as your layout is enough.


Hello World!

We then begin by showing you how to type text in the document. On the right-hand side, you will notice that there is a preview, which updates after a few seconds every time you make a change in the left-hand side.


Here, we have typed the words “Hello World!” between the begin{document} and end{document}. Whatever text, pictures, or tables is included in between the 2 commands will appear on the document itself, and you can see this on the right-hand side.


Indents, spacing, font size, font type, color etc can all be changed using certain commands.

Front Matter

Next, we will show you how to include a title in the document.


Here, we include a title, today’s date, and an author. The {today} command tells LaTex to use today’s date, otherwise, you can simply enter a specific date if you prefer. After including the 3 items, we must then include a maketitle command at the end, otherwise the title will not be created.


Sections

Next, we move on to sections and subsections. This is important if you wish to divide your text into nice, separate sections for readability.


As seen above, I include empty lines in between each section. While this is not necessary, as LaTex does not do anything when you include empty lines, it is easier for people who want to edit your code in the future, or even yourself. Including empty lines between each portion of code is a useful thing, especially when you have very long codes.

When you include sections by using section{}, LaTex automatically numbers each section for you. You might have seen this in academic papers, this is why people use LaTex when writing their papers. Subsections will take on that particular section’s number, and then include a second number behind to indicate that it is a subsection. We use subsection{} here. You can also use subsubsection{} if you wish.


Reference

For referencing, we then show you how to do citations in LaTex, and also how to include a bibliography.


The cite{} command will automatically extract information from the bibliography. To create a bibliography, use the begin{thebibliography} and end{thebibliography} commands. Without creating the bibliography, the citations will simply show a question mark “?”. To create items in the bibliography, we use bibitem{}, where the name in the brackets is what you use when using cite{}. The references and citations are automatically numbered by LaTex.

The argument to begin{thebibliography} is used for setting the hanging indentation of the bibliography items. If you use numeric labels, then the argument should be a single digit (9 is commonly used) if there are less than ten items; two digits (commonly 99) if there are from 10 to 99 items and so on. If you use symbolic labels (say Xyz12 or XY13) like BibTeX creates with the abbrv style, then you should pass the widest label, for instance begin{thebibliography}{Xyz12} or whatever abbreviation is the widest. The correct argument is needed in order to make the labels flush left and the bibliography items to have the precise hanging indentation.


Appendix

Lastly, we show how to create an appendix. Simply type appendix and LaTex will label that section as an appendix for you, using the letter A.


Source Code

To refer to the read-only version of the source code, head to https://www.overleaf.com/read/fpvwmvjpgfgs.

Basic LaTeX Lesson II

Fonts


As shown above, we can change the font size used throughout the paper by changing the number here. In this example, font size is 12, and we can change it by just typing another number to replace the “12”.

Here, we show the Huge, textit{}, tiny, large, textbf{}, and footnote{} commands.


As seen from the image above, Huge makes the text size really huge. Another alternative is large, which also enlarges the font but to a smaller extent. You can also use tiny to make the font smaller. textit{} shows the words inside the brackets as italics, and textbf{} shows them in bold (bf is short form for boldface). Using the footnote{} command creates a footnote at the bottom of the page.


We use the soul package, which allows us to use features such as highlight hl{}. The result is the text with underlines.


We can also change the color of the font, by using the color package.


The color that is entered in the {} will be used, in this example it is red.

Page layout

We have a few commands to edit the page layout. Using at any point creates a break in the line, and LaTex registers it as an empty line. This is useful when you want to create empty line spacing in your text. newpage creates a new page at that point, so any content after the command is automatically in put in the next page. noindent suppresses paragraph indentation when used at the beginning of a paragraph. If used in the middle of a paragraph, it is ignored and does not suppress the paragraph indentation. vspace{insert number} refers to vertical spacing, or the spacing between lines. The number entered should either be in cm, or inches (type as in). We can also use hspace{} for horizontal spacing between words.


The geometry package allows you to change the margins of the page, if you wish to. To change the individual sides’ margins, simply use geometry{left=2.5in, right=2.5in, top=2.5in, bottom=2.5in}.

The setspace package allows you to edit the line spacing between each line, similar to Word’s function. Options include singlespacing, onehalfspacing, doublespacing. Take note that this should be put before the begin{document} command.

Lists


Using begin{itemize} and end{itemize} allows us to include sentences as items, by using item. These items will then appear as bulleted points, as shown below.


Likewise, the begin{enumerate} and end{enumerate} also works the same way, and we also use item to create items. The only difference is that enumerate uses numbers, and itemize uses bullet points.


Math


Using the $ signs tells LaTex that we are trying to enter Math, instead of just text. We can also include symbols by using symbolname, for example alpha, beta etc. frac{}{} creates fractions, and [ insert equation here ] creates an equation. For a complete list of symbols, fonts, and mathematical functions, refer to https://en.wikipedia.org/wiki/Wikipedia:LaTeX_symbols.


Tables


Tables are created using the begin{tabular}{} and end{tabular} format. We can specify what type of table we want, and LaTex will create it for us.

Input Meaning
l left-justified column
c centered column
r right-justified column
p{'width'} paragraph column with text vertically aligned at the top
m{'width'} paragraph column with text vertically aligned in the middle (requires array package)
b{'width'} paragraph column with text vertically aligned at the bottom (requires array package)
| vertical line
|| double vertical line

In the example above, we have used “l c r”, so LaTex creates a table with 3 columns, with the corresponding directional justifications. The result is then shown below.


Graphics

To include graphics in the document, we need to make use of the graphicx package, which is done by using usepackage{graphicx}.


We can then begin inserting the picture by using begin{figure}. There are a few options we can add on, shown below.

Optional parameters to fine tune the placement of tables and figures, with the following meaning:

h here
t top
b bottom
p page of float

and LaTeX will try to honour the placement with respect to the actual place, the top or bottom of the page, or a separate page of floats coming immediately after the present insertion point. For example, when using ht LaTeX will try to put the figure at the insertion point, then on the top of the next page if it happens to violate its typesetting rules. You may also force LaTeX to 'insist' on these specifications by adding an exclamation mark (!) before the placement parameters, e.g. begin{figure}[!htb].

We can also include a caption, center the picture, and lastly we have to tell LaTex which picture we wish to include.

Source code

The reference code can be found at https://www.overleaf.com/read/swfvjwxznbsh.


FAQ

Basics

How to write Hello World?

begin{document}
end{document}

How to move the title above?

setlength{droptitle}{-10em}
%%% Alternative method

Math

How to allow Math equation to break across pages?

How to write an expression with cases?

f(x) =
x^2 & text{if } x geq 0
Pandoc Beamer
end{cases}

How to showing labels in pdf?

How to adding Section Number to Equations?

setcounter{equation}{0} %reset the equation counter
renewcommand{theequation}{Alph{section}.arabic{equation}}

How to adding reference section to the bookmark?

phantomsection
addcontentsline{toc}{section}{References}
Method 2:
addcontentsline{toc}{section}{Reference}
item Author A, Title, Journal, Page number.
end{description}

Page Layout

How to start a new line?

newline

How to start a new page?

How to change the size of margin?

geometry{margin=1.2in}

How to change line spacing?

singlespacing
doublespacing

How to make no indentation?

noindent # for a particular paragraph

How to fill a horizontal line?

Beamer

How to add section page manually?

Method 1: Default section page
frame{sectionpage}
Method 2:
begin{center}
end{center}

How to add section page without section number?

{
begin{beamercolorbox}[sep=12pt,center]{part title}
end{beamercolorbox}
}

How to add Table of Content (TOC)?

frametitle{Outline}
end{frame}

How to make TOC for each Section with Current Section Highlight?

{
frametitle{Table of Contents}
end{frame}

How to make TOC for each Section with Current Subsection Highlight, Hiding other subsections not in the same section

{
frametitle{Table of Contents}
tableofcontents[currentsection,currentsubsection,hideothersubsections]
}

How to remove the default navigation bar at the bottom right-hand corner?

How to add frame Number on right bottom corner?

How to change margin of a slide?

setbeamersize{text margin left=15pt,text margin right=15pt}

How to autofit the content into slide?

% content here

How to make the slide to stop using pause?

frametitle{List}
item Point A
item Point B
item Point C
end{frame}

How to change the order of appearance?

frametitle{List}
item<1-2> Point A
end{itemize}

References

What is the standard format for BibTeX file?

@Article{key1,
author = YYY,
volume = 1,
pages = {100--120},
}
author = {XXX},
month = {June 26},
howpublished ={Website, Retrieved from http://www.Iamalink.com}

How to create reference format following economics journals?

usepackage{natbib}
%bibliographystyle{plainnat}
setcitestyle{authoryear,open={(},close={)}}
%bibliographystyle{aer}
%bibliographystyle{ecca}
%bibliographystyle{jpe}
%bibliographystyle{cje}
bibliographystyle{ecta}

Using Latex for CV

How to write CV for Industry Jobs in LaTeX?

Here are the pdf and tex files: [PDF File] and [LaTeX File]

documentclass[12pt,a4paper]{article}


%Margin of the document

usepackage{geometry}

geometry{

body={6.5in, 9.0in},

left=1.0in,

top=1.0in

}


usepackage{enumitem}

% Make lists without bullets and compact spacing

renewenvironment{itemize}{

begin{list}{}{

Pandoc Beamer

setlength{leftmargin}{1.5em}

setlength{itemsep}{0.25em}

setlength{parskip}{0pt}

setlength{parsep}{0.25em}

}

}{

end{list}

}

setlist[enumerate]{itemsep=0.25em}


% Fonts

usepackage[T1]{fontenc}

usepackage[urw-garamond]{mathdesign}


% Set your name, address here

defname{Your Name}

defaddress{My street, My city, My country, zip code}

defphone{Phone number}

defemail{abc@xyz.com}



usepackage{hyperref}

% The following metadata will show up in the PDF properties Free download qbasic for mac os x.

hypersetup{

colorlinks = true,

urlcolor = black,

pdfauthor = {name},

pdfkeywords = {name},

pdftitle = {name: Curriculum Vitae},

pdfsubject = {Curriculum Vitae},

pdfpagemode = UseNone

}


% Customize page headers

pagestyle{myheadings}

markright{name}

thispagestyle{empty} % no page number


% Section and Subsection fonts Selection

usepackage{sectsty}

sectionfont{rmfamilymdseriesLarge}

subsectionfont{rmfamilymdseriesitshapelarge}


% Other possible font commands include:

% ttfamily for teletype,

Pandoc Beamer Aspect Ratio

% sffamily for sans serif,

% bfseries for bold,

% scshape for small caps,

% normalsize, large, Large, LARGE sizes.


% set indent of paragraph to zero

setlengthparindent{0em}


begin{document}

% Place name at the center

%{huge name}


% Alternatively, print name centered and bold:

centerline{huge bf name}


%bigskip

begin{center}

address

Phone: phone | Email: href{mailto:email}{email}

end{center}


section*{Education}

begin{itemize}

item Master of Everything, ABC College, Aug 2010 (GPA: 3.99)

begin{itemize}

item Extraordinary Exceptional Student, ABC, College, 2010

end{itemize}

item Bachelor of Something, XYZ University, Jul 2009 (GPA: 3.79)

begin{itemize}

item Outstanding Student, XYZ University, 2006, 2007

end{itemize}

end{itemize}


section*{Working Experience}

begin{itemize}

item CEO, Big Company, Small Island, Mar 2013 -- Present.

item Clerk, Small Company, Big City, Oct 2010 -- Dec 2012.

end{itemize}


section*{Qualification}

begin{itemize}

item Fellow, Institute of Surfing Internet, Nov 2013.

item Chartered Smartphone Reseller, World Reseller Association, Jan 2013.

end{itemize}


% Footer

medskip

Transformice para mac. begin{small}

Last updated: today

end{small}


end{document}

How to write a CV for academic jobs in LaTeX

Here are the pdf and tex files: [PDF File] and [LaTeX File]

documentclass[12pt,a4paper]{article}


usepackage{hyperref}

usepackage{geometry}

usepackage{enumitem}


% Fonts

usepackage[T1]{fontenc}

usepackage[urw-garamond]{mathdesign}


% Set your name here

defname{Your Name}

defemail{Your Email}

defphone{Telephone}

deffax{FAX}

defwebsite{Website}



% The following metadata will show up in the PDF properties

hypersetup{

colorlinks = true,

urlcolor = black,

pdfauthor = {name},

pdfkeywords = {economics, industrial organization,

applied game theory},

pdftitle = {name: Curriculum Vitae},

pdfsubject = {Curriculum Vitae},

pdfpagemode = UseNone

}


geometry{

body={6.8in, 9in},

left=0.8in,

top=1.0in

}


% Customize page headers

pagestyle{myheadings}

markright{name}

thispagestyle{empty}


% Custom section fonts

usepackage{sectsty}

sectionfont{rmfamilymdseriesLarge}

subsectionfont{rmfamilymdseriesitshapelarge}


% Other possible font commands include:

% ttfamily for teletype,

% sffamily for sans serif,

% bfseries for bold,

% scshape for small caps,

% normalsize, large, Large, LARGE sizes.


Screen record on mac os.

% Don't indent paragraphs.

setlengthparindent{0em}


% Make lists without bullets and compact spacing

renewenvironment{itemize}{

begin{list}{}{

setlength{leftmargin}{1.5em}

setlength{itemsep}{0.25em}

setlength{parskip}{0pt}

setlength{parsep}{0.25em}

}

}{

end{list}

}

setlist[enumerate]{itemsep=0.25em}


begin{document}


% Place name at left

{huge name}

Pandoc beamer yaml

bigskip


Pandoc Beamer Tv

begin{minipage}[t]{0.495textwidth}

Department of Economics

% Faculty of Arts and Social Sciences

National University of Singapore

Singapore 117570

end{minipage}

begin{minipage}[t]{0.495textwidth}

Phone: phone

Email: href{mailto:email}{email}

Website: href{https://website}{website}

end{minipage}


section*{Education}


begin{itemize}

item Ph.D. Economics, National University of Singapore, 2016 (Expected).

begin{itemize}

item emph{Dissertation:} ``Title'.

item emph{Committee:} Your advice (Chair), Committee Members.

end{itemize}

item B.A. Economics, National University of Singapore, 2005.

end{itemize}



section*{Research Interest}

begin{itemize}

item Primary: Applied Game Theory, and Industrial Organization

item Secondary: Political Economy, Financial Economics, and Economic History

end{itemize}




section*{Research Papers}


begin{enumerate}

item (Job Market Paper) Title of Paper 1 (with Coauthor) .

item Title of Paper 2 (with Coauthor) .

item Title of Paper 3 (with Coauthor) .

end{enumerate}


section*{Conference Presentations}


begin{itemize}


item My important Paper

begin{itemize}

Pandoc Beamer Ii

item XXX Conference, Jul 5--7, 2015

Beamer

item YYY Conference, Jul 5--7, 2014

end{itemize}



end{itemize}



section*{Teaching Experience}



begin{itemize}

item Teaching Assistant, Macroeconomics, Fall 2015

item Teaching Assistant, Microeconomics, Fall 2014

item Teaching Assistant, Econometrics, Fall 2013

end{itemize}


section*{Reference}


begin{minipage}[t]{0.495textwidth}

Prof. ABC

National University of Singapore

Singapore 117570


Prof. CDE

National University of Singapore

Singapore 117570

end{minipage}

begin{minipage}[t]{0.495textwidth}

Prof. CDE

National University of Singapore

Singapore 117570

Pandoc Beamer 5

end{minipage}


% Footer

%medskip

bigskip

%begin{center}

begin{small}

Last updated: today

end{small}

%end{center}


end{document}


Tikz

How to define variable for calculation of Tikz Package


pgfmathsetmacro{y}{x+10}
Pandoc beamer auto

Texstudio

How to write a macro to red-color text?

%SCRIPT
txt = cursor.selectedText()
editor.write('textcolor{red}{'+txt+'}')
cursor.clearSelection()

Microsoft Word

How to convert from LaTeX to DOCX using Pandoc?

Download pandoc. Run the following code in the command prompt.
pandoc in.tex --from=latex --to=docx --output=out.docx

How to make your word document using the font as LaTeX?

Use of modern computer font available at: