2013年4月29日星期一

latex的参考

http://stackoverflow.com/questions/1017055/get-started-with-latex-on-linux

http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/

https://launchpad.net/rubber/

http://www.lyx.org/Download

http://en.wikibooks.org/wiki/LaTeX

http://miktex.org/download

http://www.tug.org/texlive/

du/df howto


Df命令是linux系统以磁盘分区为单位查看文件系统,可以加上参数查看磁盘剩余空间信息,命令格式:

df -hl

显示格式为: 

文件系统              容量 已用 可用 已用% 挂载点 

Filesystem            Size Used Avail Use% Mounted on

/dev/hda2              45G   19G   24G 44% /

/dev/hda1             494M   19M 450M   4% /boot

/dev/hda6             4.9G 2.2G 2.5G 47% /home

/dev/hda5             9.7G 2.9G 6.4G 31% /opt

none                 1009M     0 1009M   0% /dev/shm

/dev/hda3             9.7G 7.2G 2.1G 78% /usr/local

/dev/hdb2              75G   75G     0 100% /

/dev/hdb2              75G   75G     0 100% /

以上面的输出为例,表示的意思为:

HD硬盘接口的第二个硬盘(b),第二个分区(2),容量是75G,用了75G,可用是0,因此利用率是100%, 被挂载到根分区目录上(/)。

下面是相关命令的解释:

df -hl 查看磁盘剩余空间

df -h 查看每个根路径的分区大小

du -sh [目录名] 返回该目录的大小

du -sm [文件夹] 返回该文件夹总M数

更多功能可以输入一下命令查看:

df --help

du --help


查看硬盘的分区 #sudo fdisk -l

查看IDE硬盘信息 #sudo hdparm -i /dev/hda

查看STAT硬盘信息 #sudo hdparm -I /dev/sda 或 #sudo apt-get install blktool #sudo blktool /dev/sda id

查看硬盘剩余空间 #df -h #df -H

查看目录占用空间 #du -hs 目录名

优盘没法卸载 #sync fuser -km /media/usbdisk

Sphinx PDF with rst2pdf

I deliberately omit word LaT*X in my post to avoid missing people who add '-LaT*X' in search queries. Yes, it is possible to generate PDF with Sphinx without LaT*X in cross-platform way. Yes, on Windows too. You will need only rst2pdf. Actually integration with Sphinx is well described in rst2pdf manual (text and PDF), but people find it hard to find this information, so I'll quote checklist here:
  1. install rst2pdf
  2. register rst2pdf in your conf.py Sphinx config
    extensions = ['sphinx.ext.autodoc','rst2pdf.pdfbuilder']
  3. run
    sphinx-build -bpdf sourcedir outdir
I hope it was helpful. Actually, check the manual - it has some useful options for conf.py and it's more up-to-date.

http://rst2pdf.googlecode.com/svn/trunk/doc/manual.txt

vs2008 replace tab with space

VS2008将原有的tab空格设置为空格符号

1、首先将设置tab的空格缩进:Tools --> Options --> Text Editor”,如果是编写C/C++程序,就打开“C/C++-->Tabs”,在这里,选中“Insert spaces”即可
2、显示空格:ctrl+shift+*快捷键,或者Edit->Advanced->View White Space:
3、转换:选择代码块,Edit->Advanced->Format Selection (Ctrl+K,Ctrl+F:)

Keep tabs on white space in Visual Studio

To turn on visual indicators of whitespace in Visual Studio, use the keyboard chord (Ctrl-R, Ctrl-W) (setting found in Tools > Environment > Options):
image
Instead of nothing:
image
You can now see:
image
By default, when I set the insertion point on line 12 and hit Enter, Visual Studio inserted spaces instead of tabs:
image
To turn this off, change the setting to Keep Tabs in Tools > Options > Text Editor > All Languages > Tabs:
image
image
You can also do Edit > Advanced > Tabify Selected Lines.

vim中转换tab为空格 vim: Convert [tab] to [space] 发布时间:2009-06-29 13:01:13
技术类别:CPLD/FPGA

在vim中,有时需要将tab转换成space。使用ret命令(replace tab)。
[range]ret[ab]! [new-tabstop]

举例:将第一行到文件尾的tab转换成space,每个tab用4个space替代。
:set expandtab
:%ret! 4
如果没有给定4,则用当前的tab宽度设定替换为space。

其它相关命令:
:set tabstop=4        设定tab宽度为4个字符
:set shiftwidth=4     设定自动缩进为4个字符
:set expandtab        用space替代tab的输入
:set noexpandtab      不用space替代tab的输入