Difference between revisions of "LaTeX"

From RobolaboWiki
Jump to: navigation, search
Line 44: Line 44:
 
</pre>
 
</pre>
  
on the contrary, if using pdflatex (as for example overleaf), this line shoudl be uncommented:
+
On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:
 
<pre>
 
<pre>
\usepackage{hyperref} % Use if of compiling with with pdflatex (defaulton overleaf)
+
\usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)
 
</pre>
 
</pre>
  

Revision as of 12:50, 18 July 2020


Installation

apt-get install texlive-full

Templates

Some considerations you need to define in src/tft.tex:

  • If you want a double-side printing
    \documentclass[twoside,a4paper,11pt]{book} 
    

    or a single-side printing

    \documentclass[oneside,a4paper,11pt]{book} 
    
  • The template has two colors to be implemented for titles and headers: orange
    \usepackage[orange]{tft} 
    

    or black

    \usepackage[black]{tft} 
    
  • If compiling with latex (as with makefile provided), this line should be uncommented:
     
    \usepackage[dvipdfm]{hyperref} % Use it if compiling with latex (default on makefile)
    

    On the contrary, if using pdflatex (as for example overleaf), this line should be uncommented:

    \usepackage{hyperref} % Use it if compiling with with pdflatex (default on overleaf)
    

Bibtex

Bibliography style for the different elements to cite inside the document. ALIAS is referred to the name of the bibtex element that you are going to cite it.

Article

@ARTICLE{ALIAS,
 author  = {{AUTHOR}},
 title   = {{TITLE}},
 journal = {{JOURNAL}},
 volume  = {{VOLUME}},
 number  = {{NUMBER}},
 pages   = {{PAGES}},
 year    = {{YEAR}},
}

Collection of books

@INCOLLECTION{ExIncollec01,
 author    = {{AUTHOR}},
 title 	   = {{TITLE}},
 booktitle = {{BOOKTITLE}},
 editor    = {{EDITOR}},
 publisher = {{PUBLISHER}},
 address   = {{ADRESS}},
 pages     = {{PAGES}},
 year      = {{YEAR}},
}

Conference proceedings

@INPROCEEDINGS{ExInpro01, 
 author    = {{AUTHOR}},
 title 	   = {{TITLE}},
 booktitle = {{BOOKTITLE}},
 publisher = {{PUBLISHER}},
 address   = {{ADRESS}},
 pages     = {{PAGES}},
 year      = {{YEAR}},
}

Technical Report

@TECHREPORT{ALIAS,
 author      = {{AUTHOR}},
 title 	     = {{TITLE}},
 institution = {{INSTITUTION}},
 number      = {{NUMBER}},
 year        = {{YEAR}},
}

Books

@BOOK{ALIAS,      
 author    = {{AUTHOR}},
 title 	   = {{TITLE}},
 publisher = {{PUBLISHER}},
 address   = {{ADRESS}},
 year      = {{YEAR}},
}

PHD Thesis

@PHDTHESIS{ALIAS,
 author = {{AUTHOR}},
 title  = {{TITLE}},
 school = {{SCHOOL}},	
 year   = {{YEAR}},
}

Web Links

@MISC{ALIAS,
 author       = {{AUTHOR}},
 title        = {{TITLE}},
 howpublished = {\url{LINK}},
 year         = {{YEAR}},
 note         = {[Online; accessed DATE]}
}

TikZ

Some problems have been reported when compiling TikZ with TexLive 2009.

Compilation Problems

Whether compiling you get:

I can't  find file tikzlibrary

Then, it is possible you have problems with TexLive and need to install new TexLive version.

Download TexLive 2011 image:

wget http://ftp.oleane.net/pub/CTAN/systems/texlive/Images/texlive2011.iso

Mount the .iso image as root:

mount -o loop -t iso9660 texlive2011.iso /media/cdrom

Install TexLive:

./install-tl

Choose the following options:

Options -> Create SymLinks -> [Chose Standar Dirs]
Install

Compilation works, but not pictures shown

Get last pgf package:

wget http://downloads.sourceforge.net/project/pgf/pgf/version%202.10/ \
  pgf_2.10.tds.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpgf%2F&ts= \
  1338847489&use_mirror=netcologne

Unzip the downloaded file. Substitute the old pgp package by the new downloaded one:

mv tex/generic/pgf/* /usr/share/texmf/tex/generic/pgf/*

Execute as superuser:

texhash

DVI problems

dvipdfm does not completelly supports tikz options. Modify it by dvipdfmx

Videos on Beamer

In videoLatexTemplate.tgz there is an example with two different options to include videos on beamer.

  • The first one inserts the video on the pdf. There is a video2image.sh script that converts a video into different frames (.EPS). It requires ffmpeg and sam2p. Later on animategraphics is in charge of moving the frames:
    \animategraphics[autoplay,loop,width=6cm]{<NUM_FRAME>{mov/<VIDEO_FOLDER>}{<FIRST_FRAME>}{<LAST_FRAME>
    


  • The second one inserts an image that one pressed launches a player.
    \movie[externalviewer]{\includegraphics[width=0.5cm]{figs/<FIG_ICON>}}{mov/<VIDEO_FILE>}
    

To compile you need to run:

make videos
make