<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cultura Digital#Blog &#187; syntax_highlighting</title>
	<atom:link href="http://blog.culturadigital.org/etiqueta/syntax_highlighting/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.culturadigital.org</link>
	<description>Tener algo que decir; y decirlo.</description>
	<lastBuildDate>Mon, 26 Apr 2010 15:43:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wp-Syntax, tu coloreador de sintaxis (Highlight) en Wordpress</title>
		<link>http://blog.culturadigital.org/tecnologia/desarrollo-web/wp-syntax-tu-coloreador-de-sintaxis-highlight-en-wordpress</link>
		<comments>http://blog.culturadigital.org/tecnologia/desarrollo-web/wp-syntax-tu-coloreador-de-sintaxis-highlight-en-wordpress#comments</comments>
		<pubDate>Mon, 17 Sep 2007 22:45:59 +0000</pubDate>
		<dc:creator>J.A.Cobo</dc:creator>
				<category><![CDATA[Desarrollo web]]></category>
		<category><![CDATA[ghesi]]></category>
		<category><![CDATA[google-SyntaxHighlighter]]></category>
		<category><![CDATA[hightight]]></category>
		<category><![CDATA[Plugins WP]]></category>
		<category><![CDATA[syntax_highlighting]]></category>
		<category><![CDATA[wp-syntax]]></category>

		<guid isPermaLink="false">http://blog.culturadigital.org/desarrollo-web/wp-syntax-tu-coloreador-de-sintaxis-highlight-en-wordpress</guid>
		<description><![CDATA[Pues bien&#8230; tras muchas, muuuuuuchas pruebas y cambios varios en el blog y sus entradas -para formatearlas de acuerdo al plugin usado- por fin me he decantado por un plugin, código, librería&#8230; para usar el resaltado de sintáxis de código:
Wp-Syntax!! basado en Ghesi (Generic Syntax Highlighting).
Las razones
 han sido varias que ya llevaba sopesando:

Marcado válido.
Sin [...]]]></description>
			<content:encoded><![CDATA[<p>Pues bien&#8230; <a href="http://blog.culturadigital.org/desarrollo-web/probando-un-syntaxhighlight-para-el-blog">tras muchas, muuuuuuchas pruebas y cambios</a> varios en el blog y sus entradas -para formatearlas de acuerdo al plugin usado- por fin me he decantado por un plugin, código, librería&#8230; para usar el resaltado de sintáxis de código:</p>
<p><strong class="big"><a href="http://wordpress.org/extend/plugins/wp-syntax/">Wp-Syntax!!</a></strong> basado en <a href="http://qbnz.com/highlighter/">Ghesi</a> (Generic Syntax Highlighting).</p>
<h4>Las razones</h4>
<p> han sido varias que ya llevaba sopesando:</p>
<ul>
<li>Marcado válido.</li>
<li>Sin etiquetas propietarias.</li>
<li>Con etiquetas estándares <a href="http://blog.culturadigital.org/how-to-como-se-hace/cosas-basicas-en-mi-ubuntu">y que funcionen sin el plugin</a> (<strong class="red">Importantísimo!</strong>) .</li>
</ul>
<p>He de decir que me gustaba mucho la librería de google pero me tiraba algunos errores y como ya dije no me gustaba poner un <code class="noblock">textarea</code>.</p>
<p>Este plugin&#8230; o más bien la librería en que se basa -Ghesi- tiene soporte para un gran número de lenguajes, si usas php en tus entradas no ofrece problema alguno al incrustarlo, de fácil pesonalización y marcado válido:<br />
Aunque no me guste demasiado que use una tabla para usar las líneas de código, en todo caso es válido y semántico pues muestras datos tabulares.</p>
<h4>El uso?, muy fácil:</h4>
<p><code class="noblock">&lt;pre lang="LENGUAJE" line="1"&gt;tu código&lt;pre&gt;</code><br />
^^ es genial&#8230; por ahora.</p>
<h4>Ejemplos:</h4>
<p><strong>(X)HTML y XML en general</strong> (con líneas):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="xml" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;object</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;application/x-shockwave-flash&quot;</span> <span style="color: #000066;">data</span>=<span style="color: #ff0000;">&quot;http://twitter.com/flash/twitter_badge.swf&quot;</span> </span>
<span style="color: #009900;">	<span style="color: #000066;">title</span>=<span style="color: #ff0000;">&quot;Twitter, qu&amp;eacute; estoy haciendo?&quot;</span> <span style="color: #000066;">width</span>=<span style="color: #ff0000;">&quot;176&quot;</span> <span style="color: #000066;">height</span>=<span style="color: #ff0000;">&quot;176&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;pluginspage&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;http://www.macromedia.com/go/getflashplayer&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;movie&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;http://twitter.com/flash/twitter_badge.swf&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FlashVars&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;color1=3355443&amp;amp;type=user&amp;amp;id=AQUI CAMBIA EL ID QUE TE DAN POR TU NICK&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;wmode&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;transparent&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;quality&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;hight&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;align&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;middle&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;allowScriptAccess&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;always&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/object<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p><strong>PHP</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;foo&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span> ?php
  <span style="color: #000000; font-weight: bold;">function</span> foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hello World!<span style="color: #000099; font-weight: bold;">\\</span>n&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">10</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
? <span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>Bash</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>X11<span style="color: #000000; font-weight: bold;">/</span>xorg.conf <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>X11<span style="color: #000000; font-weight: bold;">/</span>xorg.mi_backup 
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">killall</span> gdm 
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> linux-headers-<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">uname</span> -r<span style="color: #000000; font-weight: bold;">`</span> build-essential <span style="color: #c20cb9; font-weight: bold;">gcc</span> gcc-<span style="color: #000000;">3.4</span> xserver-xorg-dev 
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>linux-restricted-modules-common <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> \<span style="color: #666666; font-style: italic;"># &gt; /etc/default/linux-restricted-modules-common ;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">DISABLED_MODULES</span>=<span style="color: #000000; font-weight: bold;">\&quot;</span>nv<span style="color: #000000; font-weight: bold;">\&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span>linux-restricted-modules-common 
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>Almacen<span style="color: #000000; font-weight: bold;">/</span>covi_files<span style="color: #000000; font-weight: bold;">/</span>Descargas<span style="color: #000000; font-weight: bold;">/</span>NVidia_driver_1.0.97<span style="color: #000000; font-weight: bold;">/</span>NVIDIA-Linux-x86_64-<span style="color: #000000;">1.0</span>-<span style="color: #000000;">9755</span>-pkg2.run</pre></div></div>

<p><strong>Java</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="java" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Hello <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><strong>Ruby</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>18
19
20
21
22
</pre></td><td class="code"><pre class="ruby" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> Example
  <span style="color:#9966CC; font-weight:bold;">def</span> example<span style="color:#006600; font-weight:bold;">&#40;</span>arg1<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0000FF; font-weight:bold;">return</span> <span style="color:#996600;">&quot;Hello: &quot;</span> <span style="color:#006600; font-weight:bold;">+</span> arg1.<span style="color:#9900CC;">to_s</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p><strong class="big">Me encantaaa!! :mrgreen:</strong></p>
<p>Para ver el resto de plugins que probé y como llegué a la decisión, ver entrada:<br />
<a href="http://blog.culturadigital.org/desarrollo-web/probando-un-syntaxhighlight-para-el-blog">Probando un SyntaxHighlight para el blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.culturadigital.org/tecnologia/desarrollo-web/wp-syntax-tu-coloreador-de-sintaxis-highlight-en-wordpress/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
