사이트에 코드를 올릴 때 편집기 처럼 이쁘게 올릴 수 있는걸 발견했습니다(dovelet.com의 makecode님, 네이버 코드人의 에디터(imsangchin)님 감사합니다)
두가지 방법이 있습니다. 블로그 스킨을 변경하는 방법과 하이라이트 시킨 후 블로그에 삽입하는 방법
1.
제 블로그에도 적용을 시켰습니다.
티스토리 블로그 처럼 스크립트 적용 가능한 블로그나 사이트에서만 쓸 수 있습니다.
사용법은 스킨 -> html/css편집으로 가서 skin.html소스를 열어 주세요.
<head> </head>안에
<!--코드 이쁘게 출력-->
<link rel="stylesheet" type="text/css" href="/main.css">
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shCore.js' type='text/javascript'></script>
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushCpp.js' type='text/javascript'></script>
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.1.364/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
<!--코드 이쁘게 출력-->
을 넣어주세요. (주석은 후에 스킨을 바꾸고 싶을 때를 대비해서 앞 뒤로 달았습니다)
다음부터 글을 올릴 땐 html모드를 활성화하시고 소스 앞뒤로
<pre class=brush:c>
</pre>
해주시면 됩니다.
Hello, World. :-)
2.
블로그에 코드를 올리실 때 상시로 syntax highlighter 기능을 이용하고 싶으시면 위와 같이 하구요.
블로그 스킨 변경할 필요없는 방법도 있습니다.
http://qbnz.com/highlighter/demo.php
코드 입력하고 language 선택 후에 output style도 자기 마음대로 바꿀 수 있네요.
두가지 방법이 있습니다. 블로그 스킨을 변경하는 방법과 하이라이트 시킨 후 블로그에 삽입하는 방법
1.
제 블로그에도 적용을 시켰습니다.
티스토리 블로그 처럼 스크립트 적용 가능한 블로그나 사이트에서만 쓸 수 있습니다.
사용법은 스킨 -> html/css편집으로 가서 skin.html소스를 열어 주세요.
<head> </head>안에
<!--코드 이쁘게 출력-->
<link rel="stylesheet" type="text/css" href="/main.css">
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/2.1.364/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shCore.js' type='text/javascript'></script>
<script src='http://alexgorbatchev.com/pub/sh/2.1.364/scripts/shBrushCpp.js' type='text/javascript'></script>
<script language='javascript'>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/2.1.364/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
<!--코드 이쁘게 출력-->
을 넣어주세요. (주석은 후에 스킨을 바꾸고 싶을 때를 대비해서 앞 뒤로 달았습니다)
다음부터 글을 올릴 땐 html모드를 활성화하시고 소스 앞뒤로
<pre class=brush:c>
</pre>
해주시면 됩니다.
#include <stdio.h>int main() { printf("Hello, World."); return 0; }
Hello, World. :-)
2.
블로그에 코드를 올리실 때 상시로 syntax highlighter 기능을 이용하고 싶으시면 위와 같이 하구요.
블로그 스킨 변경할 필요없는 방법도 있습니다.
http://qbnz.com/highlighter/demo.php
코드 입력하고 language 선택 후에 output style도 자기 마음대로 바꿀 수 있네요.
-
#include <stdio.h>
-
-
int main()
-
{
-
printf("Hello, World.");
-
-
return 0;
-
}
'노트정리 > 프로그래밍 언어' 카테고리의 다른 글
| 프로그래머가 되는 방법: 짧고 폭넓고 개인적인 요약. (0) | 2010.03.02 |
|---|---|
| PIC 마이컴 명령어 셋 (0) | 2010.03.01 |
| MPASM의 사용법 (0) | 2010.02.24 |
| MOV : 8086과 PIC의 차이 (0) | 2010.02.24 |
| 어셈블리 구조체 (0) | 2010.02.23 |
| emu8086 어셈블리 에물레이터 (0) | 2010.02.23 |
| 문자열 출력 프로그램 복습 (0) | 2010.02.21 |
| HEX to BIN (0) | 2010.02.14 |


