lunes, 7 de diciembre de 2009

Dibujar un eje de coordenadas en LaTeX usando pstricks.

   Muchas veces al realizar un documento científico resulta útil dibujar una función. Para ello conviene empezar por conocer cómo se pinta un eje de coordenadas.
   Una opción sencilla para pintar tanto ejes de coordenadas como funciones, diagramas, grafos, ... es utilizando pstricks
   Para emplear pstricks es conveniente añadir los siguientes paquetes al documento:
\usepackage{pstricks}
\usepackage{pst-node}

\usepackage{pst-plot}
  A partir de ahora ya se puede empezar a insertar gráficos usando pstricks. La forma más sencilla de dibujar un eje es mediante la sentencia \psaxes. Un ejemplo muy sencillo es el siguiente:


\begin{pspicture}(0,0)(4,3)
 \psaxes{->}(4,3)
\end{pspicture}






La forma de la macro es la siguiente:
\psaxes*[par]{arrows}(x0,y0)(x1,y1)(x2,y2)
Las coordenadas son cartesianas. Los puntos (x1,y1)(x2,y2) son la esquina inferior y la esquina superior respectivamente. El punto (x0,y0) indica donde se intersecta el eje x con el eje y.

\psaxes[linewidth=1.2pt,labels=none, ticks=none]{<->}(2,1)(0,0)(4,3)

Si se omite el punto (x0,y0) entonces el origen es el punto (x1,y1). Si se omiten (x0,y0) y (x1,y1) entonces el punto de corte es el (0,0).


Los parámetros que pueden ir dentro del corchete son los siguientes:
  • labels=all/x/y/none   Por defecto: all
       Especifica si las etiquetas de los ejes aparecen en ambos ejes, sólo en el eje x, sólo en el eje y o ninguna etiqueta respectivamente.
  • showorigin=true/false  Por defecto: true
       Si true, las etiquetas se ponen las etiquetas del origen. Si es falso no se ponen etiquetas en el origen.
  • fdsfsa

Lista de colores para usar en LaTeX

                                                                                                                                           

Bueno, navegando un poco he encontrado una lista de colores para usar en LaTeX que está muy completa.


A continuación dejo un fichero llamado colourlist.sty

\definecolor{snow}{rgb}{1,0.98,0.98}
\definecolor{ghostwhite}{rgb}{0.97,0.97,1}
\definecolor{whitesmoke}{rgb}{0.96,0.96,0.96}
\definecolor{gainsboro}{rgb}{0.86,0.86,0.86}
\definecolor{floralwhite}{rgb}{1,0.98,0.94}
\definecolor{oldlace}{rgb}{0.99,0.96,0.9}
\definecolor{linen}{rgb}{0.98,0.94,0.9}
\definecolor{antiquewhite}{rgb}{0.98,0.92,0.84}
\definecolor{papayawhip}{rgb}{1,0.94,0.84}
\definecolor{blanchedalmond}{rgb}{1,0.92,0.8}
\definecolor{bisque}{rgb}{1,0.89,0.77}
\definecolor{peachpuff}{rgb}{1,0.85,0.73}
\definecolor{navajowhite}{rgb}{1,0.87,0.68}
\definecolor{moccasin}{rgb}{1,0.89,0.71}
\definecolor{cornsilk}{rgb}{1,0.97,0.86}
\definecolor{ivory}{rgb}{1,1,0.94}
\definecolor{lemonchiffon}{rgb}{1,0.98,0.8}
\definecolor{seashell}{rgb}{1,0.96,0.93}
\definecolor{honeydew}{rgb}{0.94,1,0.94}
\definecolor{mintcream}{rgb}{0.96,1,0.98}
\definecolor{azure}{rgb}{0.94,1,1}
\definecolor{aliceblue}{rgb}{0.94,0.97,1}
\definecolor{lavender}{rgb}{0.9,0.9,0.98}
\definecolor{lavenderblush}{rgb}{1,0.94,0.96}
\definecolor{mistyrose}{rgb}{1,0.89,0.88}
\definecolor{white}{rgb}{1,1,1}
\definecolor{black}{rgb}{0,0,0}
\definecolor{darkslategray}{rgb}{0.18,0.31,0.31}
\definecolor{dimgrey}{rgb}{0.41,0.41,0.41}
\definecolor{slategrey}{rgb}{0.44,0.5,0.56}
\definecolor{lightslategray}{rgb}{0.47,0.53,0.6}
\definecolor{darkgrey}{rgb}{0.66,0.66,0.66}
\definecolor{gray}{rgb}{0.75,0.75,0.75}
\definecolor{lightgray}{rgb}{0.83,0.83,0.83}
\definecolor{midnightblue}{rgb}{0.1,0.1,0.44}
\definecolor{navyblue}{rgb}{0,0,0.5}
\definecolor{cornflowerblue}{rgb}{0.39,0.58,0.93}
\definecolor{darkslateblue}{rgb}{0.28,0.24,0.55}
\definecolor{slateblue}{rgb}{0.42,0.35,0.8}
\definecolor{mediumslateblue}{rgb}{0.48,0.41,0.93}
\definecolor{lightslateblue}{rgb}{0.52,0.44,1}
\definecolor{mediumblue}{rgb}{0,0,0.8}
\definecolor{royalblue}{rgb}{0.25,0.41,0.88}
\definecolor{blue}{rgb}{0,0,1}
\definecolor{dodgerblue}{rgb}{0.12,0.56,1}
\definecolor{deepskyblue}{rgb}{0,0.75,1}
\definecolor{skyblue}{rgb}{0.53,0.81,0.92}
\definecolor{lightskyblue}{rgb}{0.53,0.81,0.98}
\definecolor{steelblue}{rgb}{0.27,0.51,0.71}
\definecolor{lightsteelblue}{rgb}{0.69,0.77,0.87}
\definecolor{lightblue}{rgb}{0.68,0.85,0.9}
\definecolor{powderblue}{rgb}{0.69,0.88,0.9}
\definecolor{paleturquoise}{rgb}{0.69,0.93,0.93}
\definecolor{darkturquoise}{rgb}{0,0.81,0.82}
\definecolor{mediumturquoise}{rgb}{0.28,0.82,0.8}
\definecolor{turquoise}{rgb}{0.25,0.88,0.82}
\definecolor{cyan}{rgb}{0,1,1}
\definecolor{lightcyan}{rgb}{0.88,1,1}
\definecolor{cadetblue}{rgb}{0.37,0.62,0.63}
\definecolor{mediumaquamarine}{rgb}{0.4,0.8,0.67}
\definecolor{aquamarine}{rgb}{0.5,1,0.83}
\definecolor{darkgreen}{rgb}{0,0.39,0}
\definecolor{darkolivegreen}{rgb}{0.33,0.42,0.18}
\definecolor{darkseagreen}{rgb}{0.56,0.74,0.56}
\definecolor{sea}{rgb}{0.18,0.55,0.34}
\definecolor{mediumseagreen}{rgb}{0.24,0.7,0.44}
\definecolor{lightseagreen}{rgb}{0.13,0.7,0.67}
\definecolor{palegreen}{rgb}{0.6,0.98,0.6}
\definecolor{lightgreen}{rgb}{0.56,0.93,0.56}
\definecolor{springgreen}{rgb}{0,1,0.5}
\definecolor{lawngreen}{rgb}{0.49,0.99,0}
\definecolor{green}{rgb}{0,1,0}
\definecolor{chartreuse}{rgb}{0.5,1,0}
\definecolor{mediumspringgreen}{rgb}{0,0.98,0.6}
\definecolor{greenyellow}{rgb}{0.68,1,0.18}
\definecolor{limegreen}{rgb}{0.2,0.8,0.2}
\definecolor{yellowgreen}{rgb}{0.6,0.8,0.2}
\definecolor{forestgreen}{rgb}{0.13,0.55,0.13}
\definecolor{olivedrab}{rgb}{0.42,0.56,0.14}
\definecolor{darkkhaki}{rgb}{0.74,0.72,0.42}
\definecolor{palegoldenrod}{rgb}{0.93,0.91,0.67}
\definecolor{lightgoldenrod}{rgb}{0.98,0.98,0.82}
\definecolor{lightyellow}{rgb}{1,1,0.88}
\definecolor{yellow}{rgb}{1,1,0}
\definecolor{gold}{rgb}{1,0.84,0}
\definecolor{lightgoldenrod}{rgb}{0.93,0.87,0.51}
\definecolor{goldenrod}{rgb}{0.85,0.65,0.13}
\definecolor{darkgoldenrod}{rgb}{0.72,0.53,0.04}
\definecolor{rosybrown}{rgb}{0.74,0.56,0.56}
\definecolor{indianred}{rgb}{0.8,0.36,0.36}
\definecolor{saddlebrown}{rgb}{0.55,0.27,0.07}
\definecolor{sienna}{rgb}{0.63,0.32,0.18}
\definecolor{peru}{rgb}{0.8,0.52,0.25}
\definecolor{burlywood}{rgb}{0.87,0.72,0.53}
\definecolor{beige}{rgb}{0.96,0.96,0.86}
\definecolor{wheat}{rgb}{0.96,0.87,0.7}
\definecolor{sandybrown}{rgb}{0.96,0.64,0.38}
\definecolor{tan}{rgb}{0.82,0.71,0.55}
\definecolor{chocolate}{rgb}{0.82,0.41,0.12}
\definecolor{firebrick}{rgb}{0.7,0.13,0.13}
\definecolor{brown}{rgb}{0.65,0.16,0.16}
\definecolor{darksalmon}{rgb}{0.91,0.59,0.48}
\definecolor{salmon}{rgb}{0.98,0.5,0.45}
\definecolor{lightsalmon}{rgb}{1,0.63,0.48}
\definecolor{orange}{rgb}{1,0.65,0}
\definecolor{darkorange}{rgb}{1,0.55,0}
\definecolor{coral}{rgb}{1,0.5,0.31}
\definecolor{lightcoral}{rgb}{0.94,0.5,0.5}
\definecolor{tomato}{rgb}{1,0.39,0.28}
\definecolor{orangered}{rgb}{1,0.27,0}
\definecolor{red}{rgb}{1,0,0}
\definecolor{hotpink}{rgb}{1,0.41,0.71}
\definecolor{deeppink}{rgb}{1,0.08,0.58}
\definecolor{pink}{rgb}{1,0.75,0.8}
\definecolor{lightpink}{rgb}{1,0.71,0.76}
\definecolor{palevioletred}{rgb}{0.86,0.44,0.58}
\definecolor{maroon}{rgb}{0.69,0.19,0.38}
\definecolor{mediumvioletred}{rgb}{0.78,0.08,0.52}
\definecolor{violetred}{rgb}{0.82,0.13,0.56}
\definecolor{magenta}{rgb}{1,0,1}
\definecolor{violet}{rgb}{0.93,0.51,0.93}
\definecolor{plum}{rgb}{0.87,0.63,0.87}
\definecolor{orchid}{rgb}{0.85,0.44,0.84}
\definecolor{mediumorchid}{rgb}{0.73,0.33,0.83}
\definecolor{darkorchid}{rgb}{0.6,0.2,0.8}
\definecolor{darkviolet}{rgb}{0.58,0,0.83}
\definecolor{blueviolet}{rgb}{0.54,0.17,0.89}
\definecolor{purple}{rgb}{0.63,0.13,0.94}
\definecolor{mediumpurple}{rgb}{0.58,0.44,0.86}
\definecolor{thistle}{rgb}{0.85,0.75,0.85}
\definecolor{darkblue}{rgb}{0,0,0.55}
\definecolor{darkcyan}{rgb}{0,0.55,0.55}
\definecolor{darkmagenta}{rgb}{0.55,0,0.55}
\definecolor{darkred}{rgb}{0.55,0,0}

\definecolor{snow1}{rgb}{1,0.98,0.98}
\definecolor{snow2}{rgb}{0.93,0.91,0.91}
\definecolor{snow3}{rgb}{0.8,0.79,0.79}
\definecolor{snow4}{rgb}{0.55,0.54,0.54}
\definecolor{seashell1}{rgb}{1,0.96,0.93}
\definecolor{seashell2}{rgb}{0.93,0.9,0.87}
\definecolor{seashell3}{rgb}{0.8,0.77,0.75}
\definecolor{seashell4}{rgb}{0.55,0.53,0.51}
\definecolor{antiquewhite1}{rgb}{1,0.94,0.86}
\definecolor{antiquewhite2}{rgb}{0.93,0.87,0.8}
\definecolor{antiquewhite3}{rgb}{0.8,0.75,0.69}
\definecolor{antiquewhite4}{rgb}{0.55,0.51,0.47}
\definecolor{bisque1}{rgb}{1,0.89,0.77}
\definecolor{bisque2}{rgb}{0.93,0.84,0.72}
\definecolor{bisque3}{rgb}{0.8,0.72,0.62}
\definecolor{bisque4}{rgb}{0.55,0.49,0.42}
\definecolor{peachpuff1}{rgb}{1,0.85,0.73}
\definecolor{peachpuff2}{rgb}{0.93,0.8,0.68}
\definecolor{peachpuff3}{rgb}{0.8,0.69,0.58}
\definecolor{peachpuff4}{rgb}{0.55,0.47,0.4}
\definecolor{navajowhite1}{rgb}{1,0.87,0.68}
\definecolor{navajowhite2}{rgb}{0.93,0.81,0.63}
\definecolor{navajowhite3}{rgb}{0.8,0.7,0.55}
\definecolor{navajowhite4}{rgb}{0.55,0.47,0.37}
\definecolor{lemonchiffon1}{rgb}{1,0.98,0.8}
\definecolor{lemonchiffon2}{rgb}{0.93,0.91,0.75}
\definecolor{lemonchiffon3}{rgb}{0.8,0.79,0.65}
\definecolor{lemonchiffon4}{rgb}{0.55,0.54,0.44}
\definecolor{cornsilk1}{rgb}{1,0.97,0.86}
\definecolor{cornsilk2}{rgb}{0.93,0.91,0.8}
\definecolor{cornsilk3}{rgb}{0.8,0.78,0.69}
\definecolor{cornsilk4}{rgb}{0.55,0.53,0.47}
\definecolor{ivory1}{rgb}{1,1,0.94}
\definecolor{ivory2}{rgb}{0.93,0.93,0.88}
\definecolor{ivory3}{rgb}{0.8,0.8,0.76}
\definecolor{ivory4}{rgb}{0.55,0.55,0.51}
\definecolor{honeydew1}{rgb}{0.94,1,0.94}
\definecolor{honeydew2}{rgb}{0.88,0.93,0.88}
\definecolor{honeydew3}{rgb}{0.76,0.8,0.76}
\definecolor{honeydew4}{rgb}{0.51,0.55,0.51}
\definecolor{lavenderblush1}{rgb}{1,0.94,0.96}
\definecolor{lavenderblush2}{rgb}{0.93,0.88,0.9}
\definecolor{lavenderblush3}{rgb}{0.8,0.76,0.77}
\definecolor{lavenderblush4}{rgb}{0.55,0.51,0.53}
\definecolor{mistyrose1}{rgb}{1,0.89,0.88}
\definecolor{mistyrose2}{rgb}{0.93,0.84,0.82}
\definecolor{mistyrose3}{rgb}{0.8,0.72,0.71}
\definecolor{mistyrose4}{rgb}{0.55,0.49,0.48}
\definecolor{azure1}{rgb}{0.94,1,1}
\definecolor{azure2}{rgb}{0.88,0.93,0.93}
\definecolor{azure3}{rgb}{0.76,0.8,0.8}
\definecolor{azure4}{rgb}{0.51,0.55,0.55}
\definecolor{slateblue1}{rgb}{0.51,0.44,1}
\definecolor{slateblue2}{rgb}{0.48,0.4,0.93}
\definecolor{slateblue3}{rgb}{0.41,0.35,0.8}
\definecolor{slateblue4}{rgb}{0.28,0.24,0.55}
\definecolor{royalblue1}{rgb}{0.28,0.46,1}
\definecolor{royalblue2}{rgb}{0.26,0.43,0.93}
\definecolor{royalblue3}{rgb}{0.23,0.37,0.8}
\definecolor{royalblue4}{rgb}{0.15,0.25,0.55}
\definecolor{blue1}{rgb}{0,0,1}
\definecolor{blue2}{rgb}{0,0,0.93}
\definecolor{blue3}{rgb}{0,0,0.8}
\definecolor{blue4}{rgb}{0,0,0.55}
\definecolor{dodgerblue1}{rgb}{0.12,0.56,1}
\definecolor{dodgerblue2}{rgb}{0.11,0.53,0.93}
\definecolor{dodgerblue3}{rgb}{0.09,0.45,0.8}
\definecolor{dodgerblue4}{rgb}{0.06,0.31,0.55}
\definecolor{steelblue1}{rgb}{0.39,0.72,1}
\definecolor{steelblue2}{rgb}{0.36,0.67,0.93}
\definecolor{steelblue3}{rgb}{0.31,0.58,0.8}
\definecolor{steelblue4}{rgb}{0.21,0.39,0.55}
\definecolor{deepskyblue1}{rgb}{0,0.75,1}
\definecolor{deepskyblue2}{rgb}{0,0.7,0.93}
\definecolor{deepskyblue3}{rgb}{0,0.6,0.8}
\definecolor{deepskyblue4}{rgb}{0,0.41,0.55}
\definecolor{skyblue1}{rgb}{0.53,0.81,1}
\definecolor{skyblue2}{rgb}{0.49,0.75,0.93}
\definecolor{skyblue3}{rgb}{0.42,0.65,0.8}
\definecolor{skyblue4}{rgb}{0.29,0.44,0.55}
\definecolor{lightskyblue1}{rgb}{0.69,0.89,1}
\definecolor{lightskyblue2}{rgb}{0.64,0.83,0.93}
\definecolor{lightskyblue3}{rgb}{0.55,0.71,0.8}
\definecolor{lightskyblue4}{rgb}{0.38,0.48,0.55}
\definecolor{slategray1}{rgb}{0.78,0.89,1}
\definecolor{slategray2}{rgb}{0.73,0.83,0.93}
\definecolor{slategray3}{rgb}{0.62,0.71,0.8}
\definecolor{slategray4}{rgb}{0.42,0.48,0.55}
\definecolor{lightsteelblue1}{rgb}{0.79,0.88,1}
\definecolor{lightsteelblue2}{rgb}{0.74,0.82,0.93}
\definecolor{lightsteelblue3}{rgb}{0.64,0.71,0.8}
\definecolor{lightsteelblue4}{rgb}{0.43,0.48,0.55}
\definecolor{lightblue1}{rgb}{0.75,0.94,1}
\definecolor{lightblue2}{rgb}{0.7,0.87,0.93}
\definecolor{lightblue3}{rgb}{0.6,0.75,0.8}
\definecolor{lightblue4}{rgb}{0.41,0.51,0.55}
\definecolor{lightcyan1}{rgb}{0.88,1,1}
\definecolor{lightcyan2}{rgb}{0.82,0.93,0.93}
\definecolor{lightcyan3}{rgb}{0.71,0.8,0.8}
\definecolor{lightcyan4}{rgb}{0.48,0.55,0.55}
\definecolor{paleturquoise1}{rgb}{0.73,1,1}
\definecolor{paleturquoise2}{rgb}{0.68,0.93,0.93}
\definecolor{paleturquoise3}{rgb}{0.59,0.8,0.8}
\definecolor{paleturquoise4}{rgb}{0.4,0.55,0.55}
\definecolor{cadetblue1}{rgb}{0.6,0.96,1}
\definecolor{cadetblue2}{rgb}{0.56,0.9,0.93}
\definecolor{cadetblue3}{rgb}{0.48,0.77,0.8}
\definecolor{cadetblue4}{rgb}{0.33,0.53,0.55}
\definecolor{turquoise1}{rgb}{0,0.96,1}
\definecolor{turquoise2}{rgb}{0,0.9,0.93}
\definecolor{turquoise3}{rgb}{0,0.77,0.8}
\definecolor{turquoise4}{rgb}{0,0.53,0.55}
\definecolor{cyan1}{rgb}{0,1,1}
\definecolor{cyan2}{rgb}{0,0.93,0.93}
\definecolor{cyan3}{rgb}{0,0.8,0.8}
\definecolor{cyan4}{rgb}{0,0.55,0.55}
\definecolor{darkslategray1}{rgb}{0.59,1,1}
\definecolor{darkslategray2}{rgb}{0.55,0.93,0.93}
\definecolor{darkslategray3}{rgb}{0.47,0.8,0.8}
\definecolor{darkslategray4}{rgb}{0.32,0.55,0.55}
\definecolor{aquamarine1}{rgb}{0.5,1,0.83}
\definecolor{aquamarine2}{rgb}{0.46,0.93,0.78}
\definecolor{aquamarine3}{rgb}{0.4,0.8,0.67}
\definecolor{aquamarine4}{rgb}{0.27,0.55,0.45}
\definecolor{darkseagreen1}{rgb}{0.76,1,0.76}
\definecolor{darkseagreen2}{rgb}{0.71,0.93,0.71}
\definecolor{darkseagreen3}{rgb}{0.61,0.8,0.61}
\definecolor{darkseagreen4}{rgb}{0.41,0.55,0.41}
\definecolor{seagreen1}{rgb}{0.33,1,0.62}
\definecolor{seagreen2}{rgb}{0.31,0.93,0.58}
\definecolor{seagreen3}{rgb}{0.26,0.8,0.5}
\definecolor{seagreen4}{rgb}{0.18,0.55,0.34}
\definecolor{palegreen1}{rgb}{0.6,1,0.6}
\definecolor{palegreen2}{rgb}{0.56,0.93,0.56}
\definecolor{palegreen3}{rgb}{0.49,0.8,0.49}
\definecolor{palegreen4}{rgb}{0.33,0.55,0.33}
\definecolor{springgreen1}{rgb}{0,1,0.5}
\definecolor{springgreen2}{rgb}{0,0.93,0.46}
\definecolor{springgreen3}{rgb}{0,0.8,0.4}
\definecolor{springgreen4}{rgb}{0,0.55,0.27}
\definecolor{green1}{rgb}{0,1,0}
\definecolor{green2}{rgb}{0,0.93,0}
\definecolor{green3}{rgb}{0,0.8,0}
\definecolor{green4}{rgb}{0,0.55,0}
\definecolor{chartreuse1}{rgb}{0.5,1,0}
\definecolor{chartreuse2}{rgb}{0.46,0.93,0}
\definecolor{chartreuse3}{rgb}{0.4,0.8,0}
\definecolor{chartreuse4}{rgb}{0.27,0.55,0}
\definecolor{olivedrab1}{rgb}{0.75,1,0.24}
\definecolor{olivedrab2}{rgb}{0.7,0.93,0.23}
\definecolor{olivedrab3}{rgb}{0.6,0.8,0.2}
\definecolor{olivedrab4}{rgb}{0.41,0.55,0.13}
\definecolor{darkolivegreen1}{rgb}{0.79,1,0.44}
\definecolor{darkolivegreen2}{rgb}{0.74,0.93,0.41}
\definecolor{darkolivegreen3}{rgb}{0.64,0.8,0.35}
\definecolor{darkolivegreen4}{rgb}{0.43,0.55,0.24}
\definecolor{khaki1}{rgb}{1,0.96,0.56}
\definecolor{khaki2}{rgb}{0.93,0.9,0.52}
\definecolor{khaki3}{rgb}{0.8,0.78,0.45}
\definecolor{khaki4}{rgb}{0.55,0.53,0.31}
\definecolor{lightgoldenrod1}{rgb}{1,0.93,0.55}
\definecolor{lightgoldenrod2}{rgb}{0.93,0.86,0.51}
\definecolor{lightgoldenrod3}{rgb}{0.8,0.75,0.44}
\definecolor{lightgoldenrod4}{rgb}{0.55,0.51,0.3}
\definecolor{lightyellow1}{rgb}{1,1,0.88}
\definecolor{lightyellow2}{rgb}{0.93,0.93,0.82}
\definecolor{lightyellow3}{rgb}{0.8,0.8,0.71}
\definecolor{lightyellow4}{rgb}{0.55,0.55,0.48}
\definecolor{yellow1}{rgb}{1,1,0}
\definecolor{yellow2}{rgb}{0.93,0.93,0}
\definecolor{yellow3}{rgb}{0.8,0.8,0}
\definecolor{yellow4}{rgb}{0.55,0.55,0}
\definecolor{gold1}{rgb}{1,0.84,0}
\definecolor{gold2}{rgb}{0.93,0.79,0}
\definecolor{gold3}{rgb}{0.8,0.68,0}
\definecolor{gold4}{rgb}{0.55,0.46,0}
\definecolor{goldenrod1}{rgb}{1,0.76,0.15}
\definecolor{goldenrod2}{rgb}{0.93,0.71,0.13}
\definecolor{goldenrod3}{rgb}{0.8,0.61,0.11}
\definecolor{goldenrod4}{rgb}{0.55,0.41,0.08}
\definecolor{darkgoldenrod1}{rgb}{1,0.73,0.06}
\definecolor{darkgoldenrod2}{rgb}{0.93,0.68,0.05}
\definecolor{darkgoldenrod3}{rgb}{0.8,0.58,0.05}
\definecolor{darkgoldenrod4}{rgb}{0.55,0.4,0.55}
\definecolor{rosybrown1}{rgb}{1,0.76,0.76}
\definecolor{rosybrown2}{rgb}{0.93,0.71,0.71}
\definecolor{rosybrown3}{rgb}{0.8,0.61,0.61}
\definecolor{rosybrown4}{rgb}{0.55,0.41,0.41}
\definecolor{indianred1}{rgb}{1,0.42,0.42}
\definecolor{indianred2}{rgb}{0.93,0.39,0.39}
\definecolor{indianred3}{rgb}{0.8,0.33,0.33}
\definecolor{indianred4}{rgb}{0.55,0.23,0.23}
\definecolor{sienna1}{rgb}{1,0.51,0.28}
\definecolor{sienna2}{rgb}{0.93,0.47,0.26}
\definecolor{sienna3}{rgb}{0.8,0.41,0.22}
\definecolor{sienna4}{rgb}{0.55,0.28,0.15}
\definecolor{burlywood1}{rgb}{1,0.83,0.61}
\definecolor{burlywood2}{rgb}{0.93,0.77,0.57}
\definecolor{burlywood3}{rgb}{0.8,0.67,0.49}
\definecolor{burlyood4}{rgb}{0.55,0.45,0.33}
\definecolor{wheat1}{rgb}{1,0.91,0.73}
\definecolor{wheat2}{rgb}{0.93,0.85,0.68}
\definecolor{wheat3}{rgb}{0.8,0.73,0.59}
\definecolor{wheat4}{rgb}{0.55,0.49,0.4}
\definecolor{tan1}{rgb}{1,0.65,0.31}
\definecolor{tan2}{rgb}{0.93,0.6,0.29}
\definecolor{tan3}{rgb}{0.8,0.52,0.25}
\definecolor{tan4}{rgb}{0.55,0.35,0.17}
\definecolor{chocolate1}{rgb}{1,0.5,0.14}
\definecolor{chocolate2}{rgb}{0.93,0.46,0.13}
\definecolor{chocolate3}{rgb}{0.8,0.4,0.11}
\definecolor{chocolate4}{rgb}{0.55,0.27,0.07}
\definecolor{firebrick1}{rgb}{1,0.19,0.19}
\definecolor{firebrick2}{rgb}{0.93,0.17,0.17}
\definecolor{firebrick3}{rgb}{0.8,0.15,0.15}
\definecolor{firebrick4}{rgb}{0.55,0.1,0.1}
\definecolor{brown1}{rgb}{1,0.25,0.25}
\definecolor{brown2}{rgb}{0.93,0.23,0.23}
\definecolor{brown3}{rgb}{0.8,0.2,0.2}
\definecolor{brown4}{rgb}{0.55,0.14,0.14}
\definecolor{salmon1}{rgb}{1,0.55,0.41}
\definecolor{salmon2}{rgb}{0.93,0.51,0.38}
\definecolor{salmon3}{rgb}{0.8,0.44,0.33}
\definecolor{salmon4}{rgb}{0.55,0.3,0.22}
\definecolor{lightsalmon1}{rgb}{1,0.63,0.48}
\definecolor{lightsalmon2}{rgb}{0.93,0.58,0.45}
\definecolor{lightsalmon3}{rgb}{0.8,0.51,0.38}
\definecolor{lightsalmon4}{rgb}{0.55,0.34,0.26}
\definecolor{orange1}{rgb}{1,0.65,0}
\definecolor{orange2}{rgb}{0.93,0.6,0}
\definecolor{orange3}{rgb}{0.8,0.52,0}
\definecolor{orange4}{rgb}{0.55,0.35,0}
\definecolor{darkorange1}{rgb}{1,0.5,0}
\definecolor{darkorange2}{rgb}{0.93,0.46,0}
\definecolor{darkorange3}{rgb}{0.8,0.4,0}
\definecolor{darkorange4}{rgb}{0.55,0.27,0}
\definecolor{coral1}{rgb}{1,0.45,0.34}
\definecolor{coral2}{rgb}{0.93,0.42,0.31}
\definecolor{coral3}{rgb}{0.8,0.36,0.27}
\definecolor{coral4}{rgb}{0.55,0.24,0.18}
\definecolor{tomato1}{rgb}{1,0.39,0.28}
\definecolor{tomato2}{rgb}{0.93,0.36,0.26}
\definecolor{tomato3}{rgb}{0.8,0.31,0.22}
\definecolor{tomato4}{rgb}{0.55,0.21,0.15}
\definecolor{orangered1}{rgb}{1,0.27,0}
\definecolor{orangered2}{rgb}{0.93,0.25,0}
\definecolor{orangered3}{rgb}{0.8,0.22,0}
\definecolor{orangered4}{rgb}{0.55,0.15,0}
\definecolor{red1}{rgb}{1,0,0}
\definecolor{red2}{rgb}{0.93,0,0}
\definecolor{red3}{rgb}{0.8,0,0}
\definecolor{red4}{rgb}{0.55,0,0}
\definecolor{deeppink1}{rgb}{1,0.08,0.58}
\definecolor{deeppink2}{rgb}{0.93,0.07,0.54}
\definecolor{deeppink3}{rgb}{0.8,0.06,0.46}
\definecolor{deeppink4}{rgb}{0.55,0.04,0.31}
\definecolor{hotpink1}{rgb}{1,0.43,0.71}
\definecolor{hotpink2}{rgb}{0.93,0.42,0.65}
\definecolor{hotpink3}{rgb}{0.8,0.38,0.56}
\definecolor{hotpink4}{rgb}{0.55,0.23,0.38}
\definecolor{pink1}{rgb}{1,0.71,0.77}
\definecolor{pink2}{rgb}{0.93,0.66,0.72}
\definecolor{pink3}{rgb}{0.8,0.57,0.62}
\definecolor{pink4}{rgb}{0.55,0.39,0.42}
\definecolor{lightpink1}{rgb}{1,0.68,0.73}
\definecolor{lightpink2}{rgb}{0.93,0.64,0.68}
\definecolor{lightpink3}{rgb}{0.8,0.55,0.58}
\definecolor{lightpink4}{rgb}{0.55,0.37,0.4}
\definecolor{palevioletred1}{rgb}{1,0.51,0.67}
\definecolor{palevioletred2}{rgb}{0.93,0.47,0.62}
\definecolor{palevioletred3}{rgb}{0.8,0.41,0.54}
\definecolor{palevioletred4}{rgb}{0.55,0.28,0.36}
\definecolor{maroon1}{rgb}{1,0.2,0.7}
\definecolor{maroon2}{rgb}{0.93,0.19,0.65}
\definecolor{maroon3}{rgb}{0.8,0.16,0.56}
\definecolor{maroon4}{rgb}{0.55,0.11,0.38}
\definecolor{violetred1}{rgb}{1,0.24,0.59}
\definecolor{violetred2}{rgb}{0.93,0.23,0.55}
\definecolor{violetred3}{rgb}{0.8,0.2,0.47}
\definecolor{violetred4}{rgb}{0.55,0.13,0.32}
\definecolor{magenta1}{rgb}{1,0,1}
\definecolor{magenta2}{rgb}{0.93,0,0.93}
\definecolor{magenta3}{rgb}{0.8,0,0.8}
\definecolor{magenta4}{rgb}{0.55,0,0.55}
\definecolor{orchid1}{rgb}{1,0.51,0.98}
\definecolor{orchid2}{rgb}{0.93,0.48,0.91}
\definecolor{orchid3}{rgb}{0.8,0.41,0.79}
\definecolor{orchid4}{rgb}{0.55,0.28,0.54}
\definecolor{plum1}{rgb}{1,0.73,1}
\definecolor{plum2}{rgb}{0.93,0.68,0.93}
\definecolor{plum3}{rgb}{0.8,0.59,0.8}
\definecolor{plum4}{rgb}{0.55,0.4,0.55}
\definecolor{mediumorchid1}{rgb}{0.88,0.4,1}
\definecolor{mediumorchid2}{rgb}{0.82,0.37,0.93}
\definecolor{mediumorchid3}{rgb}{0.71,0.32,0.8}
\definecolor{mediumorchid4}{rgb}{0.48,0.22,0.55}
\definecolor{darkorchid1}{rgb}{0.75,0.24,1}
\definecolor{darkorchid2}{rgb}{0.7,0.23,0.93}
\definecolor{darkorchid3}{rgb}{0.6,0.2,0.8}
\definecolor{darkorchid4}{rgb}{0.41,0.13,0.55}
\definecolor{purple1}{rgb}{0.61,0.19,1}
\definecolor{purple2}{rgb}{0.57,0.17,0.93}
\definecolor{purple3}{rgb}{0.49,0.15,0.8}
\definecolor{purple4}{rgb}{0.33,0.1,0.55}
\definecolor{mediumpurple1}{rgb}{0.67,0.51,1}
\definecolor{mediumpurple2}{rgb}{0.62,0.47,0.93}
\definecolor{mediumpurple3}{rgb}{0.54,0.41,0.8}
\definecolor{mediumpurple4}{rgb}{0.36,0.28,0.55}
\definecolor{thistle1}{rgb}{1,0.88,1}
\definecolor{thistle2}{rgb}{0.93,0.82,0.93}
\definecolor{thistle3}{rgb}{0.8,0.71,0.8}
\definecolor{thistle4}{rgb}{0.55,0.48,0.55}
\definecolor{gray91}{rgb}{0.91,0.91,0.91}
\definecolor{gray81}{rgb}{0.81,0.81,0.81}
\definecolor{gray71}{rgb}{0.71,0.71,0.71}
\definecolor{gray61}{rgb}{0.61,0.61,0.61}
\definecolor{gray51}{rgb}{0.51,0.51,0.51}
\definecolor{gray41}{rgb}{0.41,0.41,0.41}
\definecolor{gray31}{rgb}{0.31,0.31,0.31}
\definecolor{gray21}{rgb}{0.21,0.21,0.21}
\definecolor{gray11}{rgb}{0.11,0.11,0.11}


Están sacados de la siguiente web:




En la siguiente dirección hay un bonito PDF con los colores generados:



Ejemplo de uso:


Fichero: EjemploDeUsoDeColores.tex
\documentclass[a4paper,10pt]{article}
\usepackage[spanish]{babel}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}

\usepackage{colourlist} % Aquí incluimos la lista de colores.
\begin{document}
\textcolor{darkorchid3}{Esto es una prueba}
\end{document}

martes, 3 de noviembre de 2009

Error: El sonido no funciona en karmic koala tras la actualización.

El sonido no funciona en karmic koala tras la actualización.
No tengo muchas ganas de explicar lo que hace cada sentencia, así que directamente pondré los comandos que hay que meter en la consola uno tras otro:

sudo apt-get install grub2 linux-backports-modules-alsa-karmic-generic
 
sudo add-apt-repository ppa:ubuntu-audio-dev/ppa

sudo apt-get update

sudo apt-get dist-upgrade
mkdir ~/pulse-backup && cp -r ~/.pulse ~/.asound* /etc/asound.conf
(Sigue la línea) /etc/pulse -t ~/pulse-backup/
 
rm -r ~/.pulse ~/.asound* 
 
sudo rm /etc/asound.conf 
sudo apt-get install libasound2-plugins padevchooser 
(Sigue la línea) libsdl1.2debian-pulseaudio
 
sudo apt-get remove --purge libflashsupport 
(Sigue la línea)flashplugin-nonfree-extrasound
 
pulseaudio & pavucontrol 
 
Si quieres echarle un vistazo al volumen:
 
alsamixer -Dhw
 
Eso es todo. Ánimo!!

lunes, 2 de noviembre de 2009

Error en la actualización de Kubuntu Jaunty Jackalope a Karmic Koala

Buenas!!

Si has tratado de actualizar el sistema operativo de tu Kubuntu Jaunty Jackalope a un Kubuntu Karmic Koala y te has encontrado con que al reiniciar dice algo sobre un error al montar el sistema de ficheros, no está todo perdido.

Dice algo así:

General error mounting filesystems a maintenance will now be started.

Pulsa Control + D para acceder como root y pon tu superclave.

Una vez como root tendrás que remontar el sistema de ficheros pues estará como read-only.

mount -o remount /dev/sdaX

donde X es el número de la partición.

NOTA: Sólo si no sabes cuál es tu X: Si no lo tienes claro utiliza el comando
fsck -f
En la fila donde ponga +Linux será la que indica el sdaX que debes usar. En mi caso solo tengo instalado linux por lo que es sda1.

Sigamos, probablemente tendrás dañado el apt-get de tu linux y habrá que arreglarlo.

dpkg --configure -a

Este paso funcionará si has remontado tu disco, en el que se encuentra el sistema de ficheros de linux, correctamente.

Lo siguiente es reparar la actualización y sus errores. Para ello:

apt-get -f install

Por último, un

apt-get dist-upgrade


y ahora ya solo falta reiniciar.

shutdown -r now

martes, 27 de octubre de 2009

Cómo compilar una aplicación Java que conecta con una base de datos.

Si tenemos un código parecido a este:

import java.sql.*;

public class MysqlConnect {
public static void main(String[] args) {
System.out.println("MySQL Connect Example.");
Connection conn = null;
String url = "jdbc:mysql://localhost:3306/";
String dbName = "nombre_de_la_base_de_datos";
String userName = "usuario";
String password = "micontraseña";
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection(url + dbName,userName,password);
System.out.println("Connected to the database");
conn.close();
System.out.println("Disconnected from database");
} catch (Exception e) {
e.printStackTrace();
}
}
}

Podemos compilar de la siguiente manera:

gcj -O2 mysql-connector-java-3.0.17-ga-bin.jar MysqlConnect.java --main=MysqlConnect -findirect-dispatch

Para poder hacer esto, hay que bajarse el paquete mysql-connector-java-3.0.17-ga-bin.jar y poner en la misma carpeta que el fichero fuente MysqlConnect.java

jueves, 24 de septiembre de 2009

¿Cómo cambiar de idioma Firefox-3.5 Shiretoko?

Para cambiar el idioma de Firefox 3.5 Shiretoko accedemos a la página siguiente:
http://releases.mozilla.org/pub/mozilla.org/firefox/releases/latest-3.5/linux-i686/xpi/

Una vez ahí, pinchamos en es-Es.xpi y a partir de ahí seguir la instalación y luego reiniciar firefox.

martes, 8 de septiembre de 2009

Configurar Gimp para utilizar la Wacom Bamboo Pen Tablet

Bueno un sitio donde explica muy bien cómo configurar Gimp para utilizar la pen tablet es el siguiente:

http://www.lugsaju.com.ar/2009/01/wacom-bamboo-configuracin-del-gimp.html

lunes, 7 de septiembre de 2009

Instalar los drivers de HP en Linux Kubuntu

Bueno, en kde 4 kubuntu jaunty jackalope, por alguna razón que desconozco la hp 845c no imprime correctamente. Lo que hace es expulsar un folio en blanco. Una solución es instalar los drivers de Hp. Viene todo muy bien explicado en la siguiente dirección:

http://hplipopensource.com/hplip-web/install/manual/distros/ubuntu.html

jueves, 20 de agosto de 2009

Actualizar la versión de KDE de Jaunty Jackalope a Kde 4.3

sudo sh -c "echo 'deb http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu jaunty main' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb http://ppa.launchpad.net/kubuntu-ppa/staging/ubuntu jaunty main' >> /etc/apt/sources.list"



sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8AC93F7A



sudo aptitude update && sudo aptitude dist-upgrade

Una buena página que lo explica con detalle es:

webupd8

martes, 30 de junio de 2009

Java: Tamaños de letra grande en las aplicaciones (GUI) por culpa del intérprete que viene en el repositorio de Kubuntu Jaunty

Bueno, para evitar que las fuentes de los controles se vean tan grades lo mejor es actualizar la JVM

Para ello la descargamos de la página oficial:

Descargar de sun.com

Y ahora en la consola y en el directorio en el que se ha descargado:

cd

Normalmente es Escritorio.


chmod +x jre-6-linux-i586.bin

sudo ./jre-6-linux-i586.bin

sudo mv jre1.6.0_14 /usr/lib/jvm/

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_14/bin/java" 1

sudo update-alternatives --set java /usr/lib/jvm/jre1.6.0_14/bin/java

java -version

Y este es el resultado:

java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)


jueves, 18 de junio de 2009

Instalar plugin x-mplayer2 para firefox en Kubuntu

Con una simple orden se pueden ver vídeos online en el dichoso formato de windows.
Abre una consola y escribe:

sudo apt-get install mozilla-mplayer

Ahora ya sólo falta probarlo, ¿qué te parece esta página?

TDT ONLINE

lunes, 27 de abril de 2009

Descargar kubuntu Jaunty Jackalope

Descargar kubuntu Jaunty Jackalope 9.04

¿Cómo instalar kile 2.1 en Kde 4?

Los pasos a seguir para instalar kile 2.1 en KDE 4 son los siguientes:

$ cd
$ mkdir kile-new
$ cd kile-new
$ svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/office/kile

$ mkdir build
$ cd build
$ cmake ../kile -DCMAKE_INSTALL_PREFIX=$HOME/.kde4 -DCMAKE_BUILD_TYPE="Debug"

$ make -j 2
$ make install -j 2

Y por último arrancamos kile:

$ $HOME/.kde4/bin/kile

o desde el menú de KDE!!

viernes, 13 de marzo de 2009

Ya está disponible el último alpha de la colección

Aquí dejo la dirección para descargar el que será el último alpha de la distribución de Jaunty Jackalope:
Descarga Kubuntu Jaunty Jackalope Alpha 6

sábado, 28 de febrero de 2009

Descargar Kubuntu Jaunty Jackalope Alpha 5

Ya está disponible la nueva versión alpha 5 de Kubuntu Jaunty, la pueden descargar está dirección web:

Descargar Kubuntu Jaunty Jackalope Alpha 5

¡Que la disfruten!

domingo, 22 de febrero de 2009

¿Cómo escribir una aplicación matemática en Latex?

Para escribir una aplicación matemática como la siguiente:


puedes utilizar el siguiente código:

\usepackage{amsmath, amsfonts}

\begin{document}

$$
\begin{array}{rccl}
f \colon & U \subset \mathbb{R}^{2} & \longrightarrow & \mathbb{R}\\
&(x,y) & \longmapsto &z = f(x,y)
\end{array}
$$

\end{document}

viernes, 20 de febrero de 2009

¿Cuál es mi editor de Latex favorito?

Mi editor de Latex favorito es Kile, se puede instalar fácilmente como siempre abriendo una consola y poniendo:

sudo apt-get install kile

Quizás por su parecido a kate y su adaptación a Latex. Lo recomiendo. Aquí un link de una captura:


Captura de Kile

¿Cómo dibujar funciones 2d y 3d en latex?

Para dibujar funciones 2d y 3d en latex, se puede utilizar el paquete pstricks. Para instalarlo, abrir un terminal y escribir:

sudo apt-get install sketch texlive-pstricks

Ahora solo falta aprender a usarlo, pero eso será ya otra entrada en el blog.

Carátulas para CD/DVD de Kubuntu

Aquí dejo dos enlaces de carátulas para CD/DVD de kubuntu:

Carátula 1

Carátula 2

¿Cómo actualizar desde una versión menor a una mayor de Kubuntu de forma sencilla?

Para actualizar la versión de Kubuntu, por ejemplo de la versión Hardy Heron a Intrepid Ibex, puedes instalar el siguiente programa de la siguiente manera:

sudo apt-get install update-manager

Una vez instalado, ejecuta en tu terminal:

update-manager -d

Se abrirá una interfaz en la que podrás escoger qué versión puedes actualizar.

Descarga la versión Alpha 4 de Kubuntu Jaunty Jackalope

En el siguiente link puedes descargar la versión Alpha 4 de Kubuntu Jaunty Jackalope:

Descargar Kubuntu 9.04 Jaunty Jackalope Alpha4

Fechas de lanzamiento de Kubuntu Jaunty Jackalope

Las fechas previstas para el lanzamiento de kubuntu Jaunty Jackalope son:
  • 20 de noviembre de 2008: Kubuntu 9.04 Alpha1
  • 18 de diciembre de 2008: Kubuntu 9.04 Alpha2
  • 15 de enero de 2009: Kubuntu 9.04 Alpha3
  • 5 de febrero de 2009: Kubuntu 9.04 Alpha4
  • 26 de febrero de 2009: Kubuntu 9.04 Alpha5
  • 12 de marzo de 2009: Kubuntu 9.04 Alpha6
  • 26 de marzo de 2009: Kubuntu 9.04 Beta
  • 16 de abril de 2009: Kubuntu 9.04 Release Candidate
  • 23 de abril de 2009: Kubuntu 9.04 versión final