<?xml version="1.0" encoding="windows-1252"?>
<node id="17558" title="Writeup Formatting Tips" created="2000-06-11 00:06:07" updated="2005-08-15 15:29:04">
<type id="17338">
sitefaqlet</type>
<author id="17342">
SiteDocClan</author>
<data>
<field name="doctext">
&lt;!--
2003-03-05 [BigLug] Updated and rewrote most
2003-03-20 [boo_radley] added cross-refs
2003-07-30 [Mr. Muskrat] removed redundancy (how'd it get in here to begin with?)
2004-01-22 [chromatic] added linking information as per id://323331
2004-03-31 [jdporter] edit to reflect changes in 17557. fixed linkages.
2005-05-14 [Arunbear] changed order of tips (code tag tip closer to top); added more about readmore tags from id://404171
2005-05-15 [ysth] special characters quick reference
2005-06-08 [davido] Document c tag abbreviation
2006-02-16 [jdporter] add that code tags should be used around data as well
2008-02-12 [ww] changed underline tags around "strongly" to &lt;c&gt;&lt;b&gt;...&lt;/b&gt;&lt;c&gt; to lessen possibility of confusion with a link; added &lt;c&gt;&lt;br&gt;&lt;/c&gt; to &lt;c&gt;&lt;br/&gt;&lt;/c&gt; as an acceptable line break (despite -- noted for comment! -- the fact that [id://29281] opinionates against &lt;c&gt;&lt;br/&gt;&lt;/c&gt;
2008-07-15 [ww] added reference to [id:674668] for examples of rendering by approved tags
--&gt;

&lt;h1&gt;Writeup Formatting Tips&lt;/h1&gt;

The following are recommendations for making sure your posts are as readable as possible. We &lt;b&gt;strongly&lt;/b&gt; encourage you abide by these recommendations. 
&lt;dl&gt;

&lt;dt&gt;&lt;h3&gt;The three most important words in posting&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;Preview, Preview, Preview.
Even though, in most cases, you [id://17557|can edit your node] after it has
been submitted,
some sections of the site do not allow this, so be sure that
everything is looking how you want others to see it &lt;i&gt;before&lt;/i&gt;
you finally hit Submit.
(In your [id://786919|User Settings] you can switch
off the forced preview. But don't. Even the most experienced monks
still preview before posting.
Your humble author has previewed up to eight
times on some posts, just to make sure it would look right.)&lt;/dd&gt;

&lt;dt&gt;&lt;a name="codetags"&gt;&lt;/a&gt;&lt;h3&gt;Put &lt;c&gt;&lt;code&gt;...&lt;/code&gt;&lt;/c&gt; tags around your code and data&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;
This will make PerlMonks render them in a monospaced font and
allow your code to be easily extracted (via the 'download code' link).
Perhaps more importantly, it imposes a "smart wrapping" feature on the
text. (See the &lt;b&gt;Code Listing Settings&lt;/b&gt; section of your [id://450961].)
As with HTML &lt;c&gt;&lt;PRE&gt;&lt;/c&gt; tags, line breaks
will occur wherever you put them; in fact, all text &amp;mdash; including HTML tags,
such as &lt;c&gt;&lt;br&gt;&lt;/c&gt; &amp;mdash; will be displayed as text, exactly as you typed it. 
&lt;/p&gt;&lt;p&gt;
If you use tabs to indent your code, consider converting them
to 2 or 3 spaces before posting. Also, people prefer if your code &lt;i&gt;is&lt;/i&gt;
indented and as tidy as possible. If you're not sure if you code in an acceptably tidy style, compare it to the recommendations in [doc://perlstyle]. 
You might also consider running your code through [http://perltidy.sourceforge.net|perltidy].
&lt;/p&gt;&lt;p&gt;
Note that &lt;code&gt;&lt;c&gt;&lt;/code&gt; is an alias for &lt;c&gt;&lt;code&gt;&lt;/c&gt;.
It's convenient to have this alias, because it lets you write
&lt;c&gt;&lt;code&gt;&lt;/c&gt; literally in a message or post if you need to,
by writing &lt;tt&gt;&amp;lt;c&gt;&amp;lt;code&gt;&amp;lt;/c&gt;&lt;/tt&gt;.
Conversely, you can write &lt;code&gt;&lt;c&gt;&lt;/code&gt; by writing 
&lt;tt&gt;&amp;lt;code&gt;&amp;lt;c&gt;&amp;lt;/code&gt;&lt;/tt&gt;
&lt;/p&gt;&lt;/dd&gt;


&lt;dt&gt;&lt;h3&gt;Carriage returns are stripped&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;All carriage returns are ignored in posts except within &lt;c&gt;&lt;code&gt;&lt;/c&gt;

sections. Use a &lt;c&gt;&lt;br&gt;&lt;/c&gt; or a &lt;c&gt;&lt;br/&gt;&lt;/c&gt; to get a line-break and a &lt;c&gt;&lt;p&gt;&lt;/c&gt; tag to get a
paragraph break.&lt;/dd&gt;

&lt;dt&gt;&lt;a name="para"&gt;&lt;/a&gt;&lt;h3&gt;Long paragraphs are boring&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;Think about the posts that you read. You probably steer clear of ones that
contain solid blocks of text unless you know you're interested in the content.
When you write your post consider: would I read this when scanning through
a page?&lt;/dd&gt;

&lt;dt&gt;&lt;a name="readmore"&gt;&lt;/a&gt;&lt;h3&gt;Use &lt;c&gt;&lt;readmore&gt;&lt;/c&gt; tags in long posts&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;
&lt;c&gt;&lt;readmore&gt;...&lt;/readmore&gt;&lt;/c&gt; tags are used to elide (hide) large chunks of a post, such as long sections of code. If your post is "very long" &amp;mdash; say, more than two screen heights &amp;mdash; you should identify any parts that can be hidden, and put &lt;c&gt;&lt;readmore&gt;...&lt;/readmore&gt;&lt;/c&gt; tags around each one. Posts in which this rule of courtesy is ignored are subject to being edited by the [janitors]. So please, take care of this yourself, and avoid the shame of [id://92975|consideration].
&lt;/p&gt;&lt;p&gt;
Here's how &lt;c&gt;&lt;readmore&gt;...&lt;/readmore&gt;&lt;/c&gt; tags behave:&lt;br/&gt;
If a node has a chunk of text with &lt;c&gt;&lt;readmore&gt;...&lt;/readmore&gt;&lt;/c&gt; tags around it, that chunk will display normally (i.e. as if there were no &lt;c&gt;&lt;readmore&gt;...&lt;/readmore&gt;&lt;/c&gt; tags) &lt;b&gt;only&lt;/b&gt; when that node is being viewed directly. That is, when the user has navigated to that specific node.&lt;br/&gt;
In any other places where that node's contents may be viewed, the &lt;c&gt;&lt;readmore&gt;...&lt;/readmore&gt;&lt;/c&gt;-enclosed chunks will &lt;i&gt;not&lt;/i&gt; be visible, but will be replaced with a link saying "Read&amp;nbsp;more...".
(That link really just takes the user to the normal full display of that node.)
&lt;/p&gt;&lt;p&gt;
There are numerous places where a node is rendered with its &lt;c&gt;&lt;readmore&gt;&lt;/c&gt; chunks hidden, including:
&lt;ul&gt;
&lt;li&gt; On the main page of the site section it's in (e.g. [id://479|SoPW]), if it's a root post &lt;/li&gt;
&lt;li&gt; In the thread view under a root post, if it's not &lt;/li&gt;
&lt;li&gt; On the [id://131|Front Page] &lt;/li&gt;
&lt;li&gt; In [id://28877] &lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;&lt;p&gt;
As an exercise, take a look at this example: [id://297408]. 
You see that huge chunk of data?  If you navigate up to the 
node's parent (the thread's root post), you won't see that data 
blob in that node, where it's displayed as a child of the root. 
Instead, you see the "Read&amp;nbsp;more..." link. Now, if you click 
that link, it takes you right back to [id://297408], 
where the data chunk is displayed fully.
&lt;/p&gt;&lt;p&gt;
You can specify your own link text if you don't like "Read&amp;nbsp;more...":
&lt;code&gt;
&lt;readmore title="See the code"&gt; . . . &lt;/readmore&gt;
&lt;/code&gt;
&lt;/p&gt;&lt;p&gt;
If a &lt;c&gt;&lt;readmore&gt;&lt;/c&gt; tag does not have a corresponding &lt;c&gt;&lt;/readmore&gt;&lt;/c&gt; tag, PerlMonks will automatically insert the closing tag at the very end of the post. However, you should not rely on this "feature".
&lt;/p&gt;&lt;p&gt;
Readmore tags cannot be nested.
&lt;/p&gt;&lt;p&gt;
Developers' Note: When a node containing &lt;c&gt;&lt;readmore&gt;&lt;/c&gt; is viewed in its full, expanded form, the tags are converted to
&lt;c&gt;
  &lt;div class='readmore'&gt;
  &lt;/div&gt;
&lt;/c&gt;
&lt;/p&gt;
&lt;a name="spoiler"&gt;&lt;/a&gt;
&lt;p&gt;
As an alternative, if you want certain content in your node to be hidden even when that node is viewed directly, you can use &lt;c&gt;&lt;spoiler&gt;...&lt;/spoiler&gt;&lt;/c&gt; tags. 
For example, when posting a solution to a puzzle, you should use
&lt;c&gt;&lt;spoiler&gt;...&lt;/spoiler&gt;&lt;/c&gt; tags as a courtesy to your fellow monks
who may not have solved it yet.
&lt;/p&gt;
&lt;/dd&gt;

&lt;dt&gt;&lt;a name="entities"&gt;&lt;/a&gt;&lt;h3&gt;Special characters quick reference:&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;Outside of &lt;c&gt;&lt;code&gt;&lt;/c&gt; tags, some characters may need to be represented
by entities:
&lt;table border="1"&gt;
&lt;th&gt;Character&lt;/th&gt;&lt;th&gt;Entity&lt;/th&gt;
&lt;tr&gt;&lt;td&gt;&amp;amp;&lt;/td&gt;&lt;td&gt;&amp;amp;amp;&lt;/td&gt;
&lt;tr&gt;&lt;td&gt;&amp;lt;&lt;/td&gt;&lt;td&gt;&amp;amp;lt;&lt;/td&gt;
&lt;tr&gt;&lt;td&gt;&amp;gt;&lt;/td&gt;&lt;td&gt;&amp;amp;gt;&lt;/td&gt;
&lt;tr&gt;&lt;td&gt;&amp;#91;&lt;/td&gt;&lt;td&gt;&amp;amp;#91;&lt;/td&gt;
&lt;tr&gt;&lt;td&gt;&amp;#93;&lt;/td&gt;&lt;td&gt;&amp;amp;#93;&lt;/td&gt;
&lt;/table&gt;
&lt;/dd&gt;

&lt;dt&gt;&lt;h3&gt;Some HTML tags are allowed in writeups&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;Most of the basic formatting tags are allowed.
Read [id://29281] for the exact gory details. Alternately, [id://674668] provides examples of how commonly used tags are actually rendered and guidance for those not familiar with html.&lt;br&gt;
You can't post &lt;c&gt;&lt;script&gt;&lt;/c&gt; tags. &lt;!-- &lt;/script&gt; : for syntax-sensitive editors --&gt;&lt;br&gt;
Please be sure to keep in mind the comments in this document under the
section "Don't get carried away" when you are deciding what tags to use.
&lt;/dd&gt;

&lt;dt&gt;&lt;h3&gt;Link wisely&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;There exist several forms of shortcuts for efficiently linking to other resources, both inside and outside the Monastery.  See [id://43037]&lt;/dd&gt;

&lt;dt&gt;&lt;h3&gt;Don't get carried away&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;While basic formatting tags are allowed, don't be too fancy. Try to stick to 
just &lt;b&gt;&lt;tt&gt;&amp;lt;b&gt;&lt;/tt&gt; for bold&lt;/b&gt; and &lt;i&gt;&lt;c&gt;&lt;i&gt;&lt;/c&gt; for italics&lt;/i&gt;. 
If you get too obnoxious with your formatting, you may even run the risk of
incurring some downvotes from your audience.
This is particularly true for &lt;c&gt;&lt;font&gt;&lt;/c&gt; tags.
Almost any use of &lt;c&gt;&lt;font&gt;&lt;/c&gt; tags will be wrong for at least some users,
so you shouldn't use them. At all. 
The only reason &lt;c&gt;&lt;font&gt;&lt;/c&gt; is allowed is for backwards compatibility.
If you want to obscure some text for some reason (like the punchline for a joke,
or the answer to a tricky question) then you should use &lt;c&gt;&lt;spoiler&gt;&lt;/c&gt; tags.
&lt;/dd&gt;


&lt;dt&gt;&lt;h3&gt;If you're not sure...&lt;/h3&gt;&lt;/dt&gt;
&lt;dd&gt;If you're not sure if something will look the way you want it to, use
the Preview. Repeat after me: Preview, Preview, Preview.&lt;/dd&gt;

&lt;/dl&gt;

&lt;hr/&gt;&lt;i&gt;Back to the [PerlMonks FAQ]&lt;/i&gt;
</field>
</data>
</node>
