Archive for the ‘latex’ Category

May 10, 2014 0

Python script to extract citation keys from latex files

By in latex, python

”’ Created on May 10, 2014 @author: thomas ”’ import fnmatch import os”’ Created on May 10, 2014 @author: thomas ”’ import fnmatch import os import re if __name__ == ‘__main__’: directory = ‘/home/thomas/Ph.D/Projekter/057 2014-03-10 Database paper/latex-version/databasepaper’ matches = [] for root, dirnames, filenames in os.walk(directory): for filename in fnmatch.filter(filenames, ‘*.tex’): matches.append(os.path.join(root, filename)) print(matches) pattern= […]

Tags: , ,

March 15, 2013 0

Getting pdflatex to use pgf and tikz

By in latex

if pdflatex should freate figures using pgf and tikz an additional parameter needs to be send to pdflatex. eg in texworks: go to “edit”–>”preferences”->”typesetting” and find pfglatex. Add the parameter “-shell-escape” and move it so its the first argument.

Tags: , , ,

September 24, 2012 0

adding formulas to google docs and presentations workaround

By in google docs, latex

A far from optimal workaround for adding formulas to google presentations and properly also google docs is to use http://www.codecogs.com/latex/eqneditor.php to construct the formula with latex syntax and load it as an image by adding an image from an URL E.g.: The ugly drawback is that, AFAIK, you are not able to recall the link […]

Tags: , , ,

August 6, 2012 0

install missing latex packages

By in latex, texworks

One way to install missing latex-packages is to find another package in the package repositories that contains the needed .sty file. According to this post (Easy package installation) one approach is to use apt-file the following way: apt-file -x search ‘/textcomp.sty$’ This will report which package contain the needed file and that package can then […]

Tags: , ,

June 11, 2012 0

adding Henriks texworks scripts

By in latex, texworks

Adding henriks texworks scripts Go to the directory: cd ~/.Texworks checkout henriks git repo (https://github.com/henrikmidtiby/TeXworks-scripts) git clone https://github.com/henrikmidtiby/TeXworks-scripts.git rename/delete existing scripts folder and rename the created folder “TeXworks-scripts” to “scripts” in texworks choose scripts->Scripting texworks-> reload script list Soem of the scripts may not work if texworks isnt the newest version

June 8, 2012 0

Getting pgfplots from ppa on ubuntu newer than lucid

By in latex, ubuntu, Ubuntu 12.04

To get pgfplots you can use the ppa by johannes Reinhardt ppa:johannes-reinhardt/ppa but the newers build of pgfplots is for lucid so if you are on a newer ubuntu you need to change the release name from e.g. precise to lucid in the software manager. Another way is to manually add deb http://ppa.launchpad.net/johannes-reinhardt/ppa/ubuntu lucid main […]

Tags:

March 20, 2012 0

tikz ensure equal axis ticks when converting a matlab plot to tikz using matlab2tikz

By in latex, matlab

If you want to ensure the same ticks mark as you have in your matlab plot then this might help matlab2tikz(‘latextikzfile.tex’,’extraAxisOptions’,{[‘xtick={‘ regexprep(num2str(get(gca,’XTick’)),’\s*’,’,’) ‘}’]})

Tags: ,

March 19, 2012 0

Thousand separator in latex when using pgfplot

By in latex

Set thousand separator in latex. \pgfkeys{/pgf/number format/set thousands separator={}}

Tags: