<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Formatting Objective-C code with the HTML code tag</title>
	<atom:link href="http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/</link>
	<description>now with more sarcasm</description>
	<pubDate>Mon, 08 Sep 2008 06:46:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Denis Defreyne</title>
		<link>http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22796</link>
		<dc:creator>Denis Defreyne</dc:creator>
		<pubDate>Mon, 20 Aug 2007 08:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22796</guid>
		<description>Looks like my markup broke, so let's try that again…

I use &#60;pre&#62;&#60;code&#62;…&#60;/code&#62;&#60;/pre&#62;. (&#60;pre&#62; is a block element, so no need for code { display: block; }.)

On my blog, I use syntax highlighting, but I mark up everything manually: &#60;span class="variable"&#62;, &#60;span class="function"&#62;, etc. Takes a while, but the result is pretty. (And I can distinguish variables from functions, which no syntax highlighter can do.)

TextMate also has copy-as-HTML functionality, but I don't use it because the HTML it generates is *massive*.

Additionally, on my site, if a code block becomes to large, I make it expand horizontally when hovering over it. Real nifty, if I say so myself.</description>
		<content:encoded><![CDATA[<p>Looks like my markup broke, so let&#8217;s try that again…</p>
<p>I use &lt;pre&gt;&lt;code&gt;…&lt;/code&gt;&lt;/pre&gt;. (&lt;pre&gt; is a block element, so no need for code { display: block; }.)</p>
<p>On my blog, I use syntax highlighting, but I mark up everything manually: &lt;span class=&#8221;variable&#8221;&gt;, &lt;span class=&#8221;function&#8221;&gt;, etc. Takes a while, but the result is pretty. (And I can distinguish variables from functions, which no syntax highlighter can do.)</p>
<p>TextMate also has copy-as-HTML functionality, but I don&#8217;t use it because the HTML it generates is *massive*.</p>
<p>Additionally, on my site, if a code block becomes to large, I make it expand horizontally when hovering over it. Real nifty, if I say so myself.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22761</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Sun, 19 Aug 2007 15:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22761</guid>
		<description>&gt; Think you meant to escape the tags now, too.

*sigh*, yes. In fact, I did the first time I pasted into the WordPress editor. It was just kind enough to switch the &#38;lt; and &#38;gt; into actual &#60; and &#62; characters the first time I hit save (I do a "Save and Continue" first to preview it, then hit "Publish").</description>
		<content:encoded><![CDATA[<p>> Think you meant to escape the tags now, too.</p>
<p>*sigh*, yes. In fact, I did the first time I pasted into the WordPress editor. It was just kind enough to switch the &amp;lt; and &amp;gt; into actual &lt; and &gt; characters the first time I hit save (I do a &#8220;Save and Continue&#8221; first to preview it, then hit &#8220;Publish&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Johnson</title>
		<link>http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22760</link>
		<dc:creator>Jeff Johnson</dc:creator>
		<pubDate>Sun, 19 Aug 2007 13:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22760</guid>
		<description>I agree with Ankur: use &#60;pre&#62;&#60;code&#62;.  By the way, Ankur, doesn't &#60;pre&#62; already create a block?
In my style.css, I use the following to automatically create a horizontal scrollbar so that the content doesn't overflow to the right:
&lt;code&gt;.entry pre {overflow: auto;}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I agree with Ankur: use &lt;pre&gt;&lt;code&gt;.  By the way, Ankur, doesn&#8217;t &lt;pre&gt; already create a block?<br />
In my style.css, I use the following to automatically create a horizontal scrollbar so that the content doesn&#8217;t overflow to the right:<br />
<code>.entry pre {overflow: auto;}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ankur</title>
		<link>http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22755</link>
		<dc:creator>Ankur</dc:creator>
		<pubDate>Sun, 19 Aug 2007 09:33:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22755</guid>
		<description>Use the &#60;pre&#62; tag for block level code. It's usually monospace as well, so your formatting stays nice. For semantics, I wrap code in &#60;pre&#62; and &#60;code&#62;, and in my theme I've styled &#60;code&#62; to display:block. For indentation, just use the padding-left CSS attribute.

If you need some help or if you're interested with what I've done with my theme, just let me know. Unfortunately, there is a real shortage of semantic, optimized and accessible themes for WordPress and I'm considering releasing the theme I'm using... maybe.

But seriously, it sounds as if you're going through a lot of pain for something that shouldn't really be a pain. PRE, CODE, SAMP and VAR... they wont bite!</description>
		<content:encoded><![CDATA[<p>Use the &lt;pre&gt; tag for block level code. It&#8217;s usually monospace as well, so your formatting stays nice. For semantics, I wrap code in &lt;pre&gt; and &lt;code&gt;, and in my theme I&#8217;ve styled &lt;code&gt; to display:block. For indentation, just use the padding-left CSS attribute.</p>
<p>If you need some help or if you&#8217;re interested with what I&#8217;ve done with my theme, just let me know. Unfortunately, there is a real shortage of semantic, optimized and accessible themes for WordPress and I&#8217;m considering releasing the theme I&#8217;m using&#8230; maybe.</p>
<p>But seriously, it sounds as if you&#8217;re going through a lot of pain for something that shouldn&#8217;t really be a pain. PRE, CODE, SAMP and VAR&#8230; they wont bite!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Schinckel</title>
		<link>http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22753</link>
		<dc:creator>Matt Schinckel</dc:creator>
		<pubDate>Sun, 19 Aug 2007 08:58:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.losingfight.com/blog/2007/08/18/formatting-objective-c-code-with-the-html-code-tag/#comment-22753</guid>
		<description>Think you meant to escape the tags now, too.

I use SubEthaEdit, just to use the Copy As XHTML menu item.  Even if I have been coding in another application (Komodo, or Script Editor).

I have had to tweak the output, and my CSS file, but it is the method I have found works best.</description>
		<content:encoded><![CDATA[<p>Think you meant to escape the tags now, too.</p>
<p>I use SubEthaEdit, just to use the Copy As XHTML menu item.  Even if I have been coding in another application (Komodo, or Script Editor).</p>
<p>I have had to tweak the output, and my CSS file, but it is the method I have found works best.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.422 seconds -->
