컴퓨터(Com)2011.04.29 12:29

1. 압축파일 다운 받는다



2. style.html 에서 <head>와 </head> 사이에 집어넣는다

<link rel="stylesheet" type="text/css" href="./images/shCoreDefault.css" />



3. 아래 문장을 <s_t3>과 </s_t3> 사이에 넣는다. (Ctrl+ F)를 사용하면 편하다.

 <!-- SyntaxHighlighter 시작 -->
<script type="text/javascript" src="./images/shCore.js"></script>
<script type="text/javascript" src="./images/shAutoloader.js"></script>
<script type="text/javascript">
//<![CDATA[
SyntaxHighlighter.autoloader(
'applescript            ./images/shBrushAppleScript.js',
'actionscript3 as3      ./images/shBrushAS3.js',
'bash shell             ./images/shBrushBash.js',
'coldfusion cf          ./images/shBrushColdFusion.js',
'cpp c                  ./images/shBrushCpp.js',
'c# c-sharp csharp      ./images/shBrushCSharp.js',
'css                    ./images/shBrushCss.js',
'delphi pascal          ./images/shBrushDelphi.js',
'diff patch pas         ./images/shBrushDiff.js',
'erl erlang             ./images/shBrushErlang.js',
'groovy                 ./images/shBrushGroovy.js',
'java                   ./images/shBrushJava.js',
'jfx javafx             ./images/shBrushJavaFX.js',
'js jscript javascript  ./images/shBrushJScript.js',
'perl pl                ./images/shBrushPerl.js',
'php                    ./images/shBrushPhp.js',
'text plain             ./images/shBrushPlain.js',
'py python              ./images/shBrushPython.js',
'ruby rails ror rb      ./images/shBrushRuby.js',
'sass scss              ./images/shBrushSass.js',
'scala                  ./images/shBrushScala.js',
'sql                    ./images/shBrushSql.js',
'vb vbnet               ./images/shBrushVb.js',
'xml xhtml xslt html    ./images/shBrushXml.js'
);
SyntaxHighlighter.config.bloggerMode = true;
 // SyntaxHighlighter.config.stripBrs = true;
 // SyntaxHighlighter.defaults['html-script'] = True;
SyntaxHighlighter.all();
//]]> 
</script>
<!-- SyntaxHighlighter 끝 -->
</s_t3>
</body>
</html>

4. 사용방법은 <pre class="brush:html"> </pre>로 구분한다.  

5. Test 해보자.

소스는
#include <stdio.h>
main()

int a=100;

printf("Hello World! %d", a); 

return 0;

#include <stdio.h>
main()

int a=100;

printf("Hello World! %d", a); 

return 0;<

Posted by 멋진☆윤호™

댓글을 달아 주세요