22.3.12

Manualico para Maxima

Tomado de http://webs.um.es/mira/maxima/manualico.html





Elementos para prácticas con Maxima

José Manuel Mira Ros
Departamento de Matemáticas
Universidad de Murcia
http://webs.um.es/mira

Indice general

  1. Introducción
  2. Cuestiones generales
  3. Aritmética real y compleja
  4. Funciones y constantes matemáticas conocidas
  5. Desarrollar, simplificar, evaluar, sustituir...
  6. Listas
  7. Derivadas e integrales
  8. Desarrollos de Taylor y límites
  9. Resolver ecuaciones
  10. Sumatorios y productos
  11. Matrices
  12. Graficos
  13. Leer y escribir ficheros
  14. Maxima y TeX

Incluyendo «directamente» gráficos eps con pdflatex: el paquete epstopdf y el sistema ps4pdf


Incluyendo «directamente» gráficos eps con pdflatex:
el paquete epstopdf

Los documentos preparados para ser compilados con pdflatex soportan más formatos gráficos que los que se compilan con latex. Pero, lamentablemente, no permiten incluir ficheros en formato eps, ni códigopstricks, ambos dependientes del lenguaje postscript por lo cual es necesario convertir estos gráficos a formato pdf. En otros apartados de esta lección hemos indicado la forma en que puede realizarse esta conversión.
Sería confortable poder realizar dicha conversión de forma automatizada mientras se compila el documento con TeX. Los dos apartados de esta sección se ocupan de esa posibilidad y aportan dos soluciones al problema. En esta primera, que es la más sencilla, se hace uso del paquete epstopdf para convertir al vuelo gráficos postscript bien creados. Para ello es necesario que el compilador pdflatex tenga activada la opción write18 que permite realizar llamadas a programas externos. Para activación de dicha opción aparece explicada en este documento. También es necesario que los programas Ghostscript estén acesibles desde cualquier sitio (es decir, estén incluídos en el path del sistema; si no sabe lo que eso significa, pregunte a alguien que le pueda ayudar).
La mecánica es muy simple: basta con incluir en el preámbulo del documento la línea
\usepackage{epstopdf}
y compilar con pdflatex
Ejercicio: Con los gráficos golfer.pdfmiktex.eps y setupwiz.eps cree un documento para compilar con pdflatex que produzca esta salida (grafico2.pdf); si necesita ayuda, el fichero  gráfico2.tex tiene el código que se ha utilizado.

Incluyendo «directamente» gráficos eps
y código pstricks con pdflatex: el sistema ps4pdf

La primera cuestión que tiene que plantearse antes de seguir leyendo este apartado y si le va a ser de utilidad. Y la respuesta es muy simple: sólo le será de utilidad si hace un uso intensivo de código pstricksmezclado con gráficos pdf.
El lenguaje pstricks utiliza comandos tipo LaTeX para realizar gráficos, posicionar objetos, etc. JpicEdit, entre otros, puede construir gráficos en ese formato. Se trata de un formato "sólo texto" que es interpretado por latex+dvips para construir un fichero postscript. Tal fichero postscript podría luego ser convertido a pdf para su incorporación a un documento LaTeX compilable con pdflatex.
Con ps4pdf pueden automatizarse todas esas tareas de suerte que es posible utilizar de forma simultánea gráficos eps, pdf, png, jpeg y codigo pstricks, sin que sean necesarios los procesos de conversión manual. El protocolo de utilización es muy simple:
  1. Cargar el paquete ps4pdf con \usepackage{ps4pdf}. Si el sistema no tiene instalado este paquete hay que instalarlo y también es necesario el paquete preview de LaTeX.
  2. Si se va a utilizar código pstricks es necesario cargar dicho paquete en el prámbulo del documento, pero como no es compatible con pdflatex es necesario hacerlo no en la forma usual, sino como argumento del comando \PSforPDF del siguiente modo \PSforPDF{\usepackage{pstricks}}.
  3. Cada vez que se incluye un gráfico eps con \includegraphics o bien código pstricks (generalmente mediante un \input) es necesario hacer que tales objetos aparezcan en el argumento de un comando\PSforPDF{ Argumento }. Así \PSforPDF{\includegraphics{Nombre.eps}} o \PSforPDF{\input{Nombre.pst}} son ejemplos de esta sintaxis.

En un sistema Linux para poder operar de forma confortable puede usarse el script ps4pdf ubicándolo en alguna carpeta accesible al path (típicamente /usr/local/bin) y en lugar de utilizar el clásico
  pdflatex NombreFichero
para compilar y producir una salida pdf, se utiliza
  ps4pdf NombreFichero
con el mismo propósito.
Aunque, teóricamente, debería ser lo mismo, con MS-Windows no hemos conseguido que nos funcione satisfactoriamente el sistema ps4pdf.
Ejercicio: Volvemos a utilizar aquí un gráfico golfer.pdf junto con un gráfico postscript miktex.eps y además código pstricks. El fichero fuente es gráfico3.tex y el resultado tras compilar con ps4pdf está esgrafico3.pdf.

Using Colours in LaTeX

A brief departure from the bookdesign series, as some of my future posts within and outside the series will be dealing with the use of colours, so I might as well get it out of the way first. Summarily, we'll take a look at how to usecolours in LaTeX with the xcolor package. This will work with all outputs, i.e. .dvi.ps and .pdf.

The most useful commands for applying colours made available by xcolorare:
  • \color{color} (applies color to the text in the currrent group)
  • \textcolor{color}{text} (applies color to the specified text only)
  • \pagecolor{color} (colors the entire page to be color)
  • \colorbox{color}{text} (creates a box containing the specified text, with color as the background)
  • \fcolorbox{frame color}{bg color}{text} (same as above, but with a coloured border around the box)
See Section 2.6 of the xcolor manual for full list and more details of commands for colour application. Alternatively, if you're using emacs, you can look it up with M-x list-colors-display.

The xcolor package has quite a collection of pre-defined colours; they are listed in Section 4 Colors by Name in the manual. Apart from the 19 "base" colours that are always available, you can also access more pre-defined colours via the dvipsnamessvgnames and x11names options. Here's a quick example:

\documentclass[a6paper,12pt]{article}
\usepackage[x11names]{xcolor}

\begin{document}

% 'LemonChiffon1' from x11names
\pagecolor{LemonChiffon1}

% 'magenta' is a base colour
\textcolor{magenta}{Hello World!}

% 'CadeBlue1', 'Firebrick2' and 'Goldenrod1' 
% are available via x11names
What a \colorbox{CadetBlue1}{wonderful}
\fcolorbox{Firebrick2}{Goldenrod1}{world}.
\end{document}

You can mix up your own colours, too. \color{LemonChiffon1!80}means 80% LemonChiffon1 and 20% white, while\color{lime!30!yellow!60!Mahogany} would be 30% lime, 60% yellow, and 10% Mahogany. You can also give names to the colours you concoct, so that you can reuse them at various points in your document. For example:

  • \definecolor[named]{CoolBlack}{cmyk}{.3,0,0,1}defines the CMYK 'Cool Black' (useful if your printer asks for CMYK black instead of 'rich black')
  • \definecolor[named]{AquaBlue2}{rgb}{.553,.769,.98} defines 'AquaBlue2' with decimal RGB values (range [0,1])
  • \definecolor[named]{Hazelnut}{HTML}{BDA59B} defines 'Hazelnut' with HTML RGB values. Useful if you're re-using colour definitions from CSS styesheets.
If you're like me i.e. you just can't hit the right figures to get a colour just right, head over to COLOURlovers for lotsa inspirations and colour schemes. I got almost all my colours for the Grid Computing Cluster report from this website.

Have fun and happy LaTeXing!

Cálculo y grafismo matemáticos en LaTeX usando Maxima y Gnuplot

Excelente artículo de José Manuel Mira Ros en

http://webs.um.es/mira/tex/maxima_latex.php

junto con el artículo del mismo autor de activar la opción write18 en LaTeX:


Interrupciones en la compilación y llamada a programas externos

En variadas ocasiones LaTeX hace uso de objetos «externos» a LaTeX como pueden ser gráficos o resultados de cálculos matemáticos. Tales objetos se generan con programas específicos independientes de LaTeX. Es obvio que sería confortable poder realizar la generación de esos objetos desde dentro del propio documento, lo cual simplificaría el mantenimiento de los mismos en interacción directa con el documento que se está preparando. La opción write18 permite que TeX realice interrupciones durante la compilación para permitir llamar desde dentro del documento tex a tales programas específicos externos para generar objetos que LaTeX incorporará al domento.
Aquí explicamos cómo configurar el compilador para permitir tales accesos al sistema. Las tareas que tales accesos realicen habrán de ser programadas de forma independiente; TeX se limitará a pasar al sistema operativo sin interpretar una orden que le es ajena. Evidentemente si la opción write18 está activada, podría ocurrir que la compilación de un fichero «sólo texto» con órdenes maliciosas provocara la ejecución no deseada de programas con destrucción de datos, inoculación de virus etc.
La forma de declarar write18 para el compilador TeX depende del sistema (las últimas versiones de las distribuciones TeTeX y MikTeX la soportan).
  • latex --shell-escape NombreArchivo es la forma de hacerlo con TeXLive en Linux. De hecho Kile puede ser configurado para compilar de ese modo.

  • latex --enable-write18 NombreArchivo es la forma de hacerlo con MikTeX en MS-Windows
     
    Complemento aquí la forma de declarar la opción write18 en TeXstudio y TeXmaker bajo Windows Seven


21.3.12

Inkscape to TikZ exporter


Tomado de http://code.google.com/p/inkscape2tikz/

An Inkscape extension for exporting SVG paths as TikZ/PGF paths. Similar to my Blender to TikZ exporter.

Note: This extension is a work in progress.

Example

Exporting the above path will generate the following code:
\documentclass{article}
\usepackage{tikz}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\begin{document}
\definecolor{cff8080}{RGB}{255,128,128}
\begin{tikzpicture}[y=0.80pt,x=0.80pt,yscale=-1]
\begin{scope}[draw=black,line join=round,miter limit=4.00,line width=3.200pt]
  \path[draw=black,fill=cff8080,line join=round,even odd rule,line cap=butt,miter
    limit=4.00,line width=3.200pt] (91.0455,165.7194) rectangle
    (250.7252,347.8104);
  \path[draw=black,line join=round,even odd rule,line cap=butt,miter
    limit=4.00,line width=3.200pt] (168.0839,258.1656) .. controls
    (169.6992,260.2725) and (166.0408,261.3824) .. (164.5822,260.8503) .. controls
    (160.6293,259.4083) and (160.6636,254.1057) .. (162.7146,251.1621) .. controls
    (166.3833,245.8967) and (174.0594,246.2369) .. (178.5892,250.1116) .. controls
    (185.2369,255.7979) and (184.5602,266.1224) .. (178.8226,272.1726) .. controls
    (171.1753,280.2366) and (158.1221,279.2067) .. (150.5752,271.5890) .. controls
    (141.0782,262.0028) and (142.4690,246.1872) .. (151.9759,237.1551) .. controls
    (163.4900,226.2161) and (182.0854,227.9716) .. (192.5962,239.3729) .. controls
    (204.9828,252.8090) and (202.8604,274.1941) .. (189.5613,286.1796) .. controls
    (174.2071,300.0173) and (150.0257,297.5267) .. (136.5682,282.3277) .. controls
    (121.2770,265.0577) and (124.1368,238.0757) .. (141.2372,223.1481) .. controls
    (160.4213,206.4017) and (190.2069,209.6312) .. (206.6032,228.6342) .. controls
    (224.8061,249.7311) and (221.2064,282.3227) .. (200.3000,300.1866);
\end{scope}
\end{tikzpicture}
\end{document}

Installing

Installing is as simple as copying the script (unless it resides in your path) and its INX files to the Inkscape extensions directory.

Windows

Copy the tikz_extport.py file and the tikz_export_effect.inx and tikz_export_output.inx files to your inkscape/share/extensionsdirectory.

Linux and OSX

Copy the tikz_extport.py file and the tikz_export_effect.inx and tikz_export_output.inx files to your home/.inkscape/extensionsdirectory. If you are using Inkscape 0.47 the directory is home/.config/inkscape/extensions.
Additionally you have to copy the following dependencies to the same directory as above:
  • inkex.py
  • simplestyle.py
  • simplepath.py
The above files should be bundled with Inkscape. Look in the main extensions directory. You can also download them from the repository

Usage

If the extension has been installed correctly, you will find the exporter in the Effects -> Export -> Export to TikZ path... menu. You can also select Save As and select TikZ code as output format.
If any objects are selected, only the selected objects will be exported. If no objects are selected, every object will be exported.

Features

  • All SVG paths and shapes are exported
  • Text is exported as TikZ nodes
  • All graphical properties, except shading, supported
  • High level output. Easy to modify.

Limitations

  • No support for markers. If markers are needed, convert stroke to path before export.
  • No shadings or patterns yet
  • The generated code is unnecessary complex. Smarter output is a priority.
  • No support for style references yet.

18.3.12

.: LATEX Beamer Themes :.


Tomado de http://latex.simon04.net/

Introduction

This page is for those who use the Beamer Class for their LATEX presentations, but are not happy with the default set of themes that comes with the package. Here I try to maintain an index of custom themes that are available on the internet. If you're lazy, just pick a theme and install it, or maybe use it for some inspiration and create your own.
Do you know a theme that should be on this list? Please let me know and I'll include it.
This list was created by Rogier Koppejan during his computer science studies at the University of Amsterdam. He hosted this page on his university website. To retain this collection after discontinuation of his account, he handed it over to me.

Themes

Amsterdam 
This theme is called "Amsterdam". I made it myself, it's based on Dresden but with custom colors. You can download it here.

Bouveret 
Sylvain Bouveret has built an alternative beamer theme called progressbar, for more information, see his website (GitHubsome more themes). 

CEA 
An unofficial CEA theme for latex beamer made by Fabrice Gadaud. Link. 

Diepen 
For those that like airplanes (or any other background image I suppose), see Guido Diepen's theme here. 

TU Eindhoven 
Here's a page that provides the TU Eindhoven style (it's the post dated January 31, 2008). 

DIUF 
This theme was designed for the Theoretical Computer Science Research Group of the University of Fribourg, Switzerland. You can find more information here. 

Frederiksberg 
Frederiksberg beamer theme from the university of Copenhagen. Download here. 

IAS 
Here's a theme created by Frans Oliehoek. He's part of the same research group (IAS) as I am and he made a theme to fit our IAS colors. Check it out on his webpage. 

Oxygen/Air 
Two beautiful KDE themes exist, one's called "Oxygen", the other "Air". See this site for further details. 

Stockton 
This is the Stockton Beamer Theme from the University of the Pacific. 

Torino 
A fresh looking theme called "Torino" made by Marco Barisione. You can download it from his blog. 

Trondheim 
A Beamer theme for NTNU made by Jorg Cassens. It's called "Trondheim". More info here. 

Antwerpen 
The Universiteit Antwerpen has its own theme too, and it looks real nice! Check it out. 

UMBC 
A couple of themes made Rouben Rostamian for UMBC University. See his beamer quickstart. 

Nebraska-Lincoln 
Chris Bourke made a nice theme for the University of Nebraska- Lincoln. See his page for more details. 

Uppsala 
And another one, this time for the Uppsala University of Sweden made by Frédéric Haziza. He maintains a seperate page here.

JAutomation 
A beamer style related to the Jacobs University is available from GitHub.

Kansai 
A Kansai Debian Presentation template is also available from GitHub.

Lleida 
Lleida's theme on GitHub. 

Sybila 
Sybila's theme on GitHub. 

DrBunsen 
Seth Brown (DrBunsen) created lightweight theme for his work. See more on his websiteor fetch it from Bitbucket. 

Ghent 
Peter Belmans has created a beamer theme for the University of Ghent. See his blog. 

LSE 
An unofficial beamer theme for the London School of Economics created by Christopher Gandrud is available from GitHub. 

ZBH 
A theme of the Zentrum fùr Bioinformatik, University of Hamburg on GitHub. 

TU Braunschweig 
A beamer theme complying with the corporate design of TU Braunschweig: GitHub. 

Carlworld 
Carl Compliant Beamer slide theme on GitHub. 

intridea 
A nice theme using xelatex and the font Gill Sans: GitHub. 

HongKong 
A theme related to the Hong Kong Polytechnic University on GitHub. 

lankton-keynote 
A theme simulating Apple's Keynote presentations: here. 

McGill 
A theme with a nice McGill layout: here (section Latex). 

subdued 
A subdued, stylish beamer template: here. 

Beamer: themes y como personalizar temas



De manera rápida, aquí pondre comandos que nos sriven paramodificar ciertos aspectos de como se ven las presentaciones en Beamer.

Temas en Beamer

Lo primero, es ver cuales temas hay disponibles. Entre los más populares están (sin contar el tema que viene por default):
  • Antibes
  • bars
  • Bergen
  • Berkeley
  • Berlin
  • Boadilla
  • Boxes
  • classic
  • Copenhagen
  • Darmstadt
  • Dresden
  • Frankfurt
  • Goettingen
  • Hannover
  • Ilmenau
  • JuanLesPins
  • lined
  • Luebeck
  • Madrid
  • Malmoe
  • Marburg
  • Montpellier
  • PaloAlto
  • Pittsburgh
  • Rochester
  • shadow
  • sidebar
  • Singapore
  • split
  • Szeged
  • Tree
  • Warsaw
Aquí podemos ver un preview de estos temas (no tomar en cuenta los colores, porque se pueden modificar, sólo contar el estilo):
Previsualización de los temas.
Para usar un tema especifico en nuestra presentación, usamos
usetheme{nombre del tema}

Colores de los temas

Las combinaciones de colores que hay disponibles para los temas son:
1) albatross (azul marino)
2) beetle (azul y gris)
3) crane (naranja y blanco)
4) default (por defecto)
5) dolphin (azul marino y blanco)
6) dove (gris y blanco)
7) fly (gris)
8 ) lily
9) orchid
10) rose
11) seagull (gris y blanco)
12) seahorse
13) sidebartab
14) structure
15) whale (azul marino y blanco)
y para indicar cual combinación de colores usar, utilizamos el comando
usercolortheme{nombre de la combinación de colores}

Otras opciones

Modificar la fuente del título de la presentación:
setbeamerfont{title}{shape=itshape,family=rmfamily}
Modificar color del título de la presentación:
setbeamercolor{title}{fg=red!80!black,bg=red!20!white}
Modificar la fuente de letra de la presentación:
usefonttheme[onlylarge]{structuresmallcapsserif}
usefonttheme[onlysmall]{structurebold}