best way to use emphasis within code?
    Michel Fortin 
    michel.fortin at michelf.com
       
    Thu Jan  4 14:37:41 EST 2007
    
    
  
Le 2007-01-04 à 12:14, Jeremy C. Reed a écrit :
>> And now type this: {$ **mail -u _user_**}{in} and then type
>> {$ cd .. }{1}
>>
>> {1}: style=font-family:fixed
>
> My problem with that is it is becomming less readable.
Agree... but then you could point out that adding ** and _ to the  
input makes it incorrect when reading as plain text, so it's already  
less readable on its own. Any kind of markers added within code will  
look like code when reading as text, this can't be avoided.
What I don't like about the above is that it relies entirely on CSS  
support by the browser instead of using established and meaningful  
tags. I think this is a better solution than the above, and on the  
plus side it already works:
     And now type this: <code>$ **mail -u _user_**</code> and then type
     <code>$ cd ..</code>
But I suspect the best HTML markup possible for your example would be  
this one[^1]:
     And now type this: <samp>$ <kbd>mail -u <var>user</var></kbd></ 
samp>
     and then type <samp>$ <kbd>cd ..</kdb></samp>
Unfortunately, Markdown doesn't help you much with this.
[^1]:
     The HTML 4.01 specification has this to say about the samp,
     kbd, and var elements:
     > SAMP
     > :   Designates sample output from programs, scripts, etc.
     >
     > KBD
     > :   Indicates text to be entered by the user.
     >
     > VAR
     > :   Indicates an instance of a variable or program argument.
     <http://www.w3.org/TR/html401/struct/text.html#h-9.2.1>
Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/
    
    
More information about the Markdown-Discuss
mailing list