Week 02:
More about
If you still cannot input Chinese characters after you define vim:$LANG as zh_TW.utf8, add the following lines to your
" comments start with double-quote in vimrc
set encoding=utf8
" the next line highlights the pattern that matches the search
set hlsearch
" stop autoindent
set noautoindent
vim to English, add also in
:language mes C
vim under Windows, create cp /etc/passwd ~/password vim ~/password
/ and ? ; replace with :s
^ and $ are beginning and end of line, respectively.
[] define the range. For example, numbers are [0-9] while alphabets are [A-Za-z].
^ inside [] after [ refers to inverse match. For example, [^0-9] means NOT numbers.
\ and ^V (Ctrl-V).
\s \t \r \n
\d, \a and \w , matches [0-9], [A-Za-z] and [A-Za-z0-9_] , respectively. \D , \A and \W are the inverse matches of them.
\< and ends with \>
\{n\} (defined in ViRegex and ERE)
& is the pattern that matched.
. denotes anything except \n, for example, p.p matches pip, pap, p2p or even p口p.* denotes for "appears zero or more times". For example, pis* matches pi, pis, piss, pisss and more s..* matches anything that appears for any times or not at all.
. and * are the wildcard characters (萬用字元、通配字符) in RE.? and *.
~, or gu gU in block mode.
grep "[udg][0-9a][0-9]\{6\}\|\{8\}" /etc/passwd > ~/public_html/draft.html mkdir ~/public_html and edit your entrance file by vim ~/public_html/index.html
cd to change your working directory.
cd .. pwd or echo $PWD to check your current work directory.vim ~/public_html/htmltest.html to practice the following HTML tags, and you can view the results by pointing your browser to <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
gossip: Arial v.s. Helvetica
<meta http-equiv="content-Type" content="text/html; charset=utf-8">
HTML5: <head> <meta charset="UTF-8"> </head>
UTF-8 with Big5. Always put the header in the beginning of your HTML file.
<!-- -->
- <a href="http://www.nycu.edu.tw">National Yang Ming Chiao Tung University</a>
Result: National Yang Ming Chiao Tung University
- <a href="http://www.nycu.edu.tw" TARGET="_BLANK">National Yang Ming Chiao Tung University</a>
Result: National Yang Ming Chiao Tung University
- Week <a href="./w01.html">01</a>
Result: Week 01
<img src="http://ukko.life.nctu.edu.tw/~u0317029/overwatch.jpg">
<img src="http://ukko.life.nctu.edu.tw/~u0317029/overwatch.jpg" width="25%" align="right">
<center><img src="http://ukko.life.nctu.edu.tw/~u0317029/overwatch.jpg" width="200px"></center>

| R | o | w |
| 1 | 2 | 3 |
<table style="border: 2px solid red; border-collapse: collapse;">
<tr>
<td>R</td>
<td style="border:1px dashed black; border-collapse: collapse;">o</td>
<td>w</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
| R | o | w |
| 1 | 2 | 3 |
Mathjax.js javascript:<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js" type="text/javascript"><script type="text/javascript" async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"> MathJax.Hub.Config({ extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js"], jax: ["input/TeX", "output/HTML-CSS"], tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], }, "HTML-CSS": { availableFonts: ["TeX"] } }); </script>
$$ V_{LJ}=\varepsilon\left [ \left ( \frac{r_{m}}{r} \right )^{12} - 2\left ( \frac{r_{m}}{r} \right )^{6} \right ] $$
var in the above $\LaTeX$ code, it becomes:
Make your homework of previous week shown in HTML format:
If you could not finish it yet, practice to copy and paste from following file.