通过设置 bibliographystyle 就可以达到上述目的,Bibtex 自身已具备排序的功能,而且可以选择自己想要的排序方式。Bibtex 已自带有 8 种样式,分别如下(下面内容摘自 LaTeX 编辑部):
1. plain,按字母的顺序排列,比较次序为作者、年度和标题
2. unsrt,样式同plain,只是按照引用的先后排序
3. alpha,用作者名首字母+年份后两位作标号,以字母顺序排序
4. abbrv,类似plain,将月份全拼改为缩写,更显紧凑:
5. ieeetr,国际电气电子工程师协会期刊样式:
6. acm,美国计算机学会期刊样式:
7. siam,美国工业和应用数学学会期刊样式:
8. apalike,美国心理学学会期刊样式:
BibTeX 提供了一个外部的 BibTeX 工具程序,源文件经过 LaTeX 编译后,还要使用BibTeX 对数据库文件编译一次,最后再用 LaTeX 连续编译两遍,才能得到正确结果。 可用下图解释这四个编译步骤的作用:
Kurs T: System skladu publikacji LATEX
文献数据库可根据要求自行编写,其格式有:文章、书籍、技术报告、会议论文集和博士论文等十几种,每种格式都有一些必填和选填的项目,如作者、标题、出版社、发表年度、…等等,最后存储为 .bib 文件。
如果对生成的参考文献样式仍有不满意之处,还可将编译信息文件*.bbl 中的参考文献列表源程序拷贝到论文尾部,然后进行手工调整。
Linux From Scratch
These days, I am working on building my own Linux operating system. Here I would like to share with you some of my experiences.
I have been learning, using and loving for over four years. Early from mid-2005, I was instantly attracted by the beauty of this operating system, though not very famous around the area where I was living, I fell in love with it. I love its philosophy of openness and more importantly collaboration with people no matter where you are from. I was trying to collect videos, books and blogs about linux just in order to love it more. And along the way of loving this operating system, I also have been building my own skills of using and working with Linux. I have learned in depth on system administration either by watching videos or by reading books and hands on experience with this lovely OS. Back in August 2006 to January 2007, I even had the opportunity to work as a intern software programmer using Linux, which is one of the most important linux skill trying till now. At that time, I learned programming using c/c++ under linux, script programming and a lot. Here I would like to thank that precious opportunity.
As time went by, I met bottle neck in learning Linux. I have been telling myself to join the big community of Linux, try to help the community and do something, but things are not always that easy, although, I have been trying to do so by applying for positions such as translators or system administrators, I was always beat off. There were so much enthusiastic people in this community. Documents are translated in a timely fashion at least in my language - Chinese. Still, I also want to do something else to help the open source world, I always find myself lack enough competition. So I told myself to build my Linux skills even further and deeper.
About half a year a ago, I first heard of Linux From Scratch from one of my colleagues who is now still working in that company - state street corporation. But at that time, due to a lot of reasons I left it into the corner of my memory. As I need to earn my bread. As time went by, I gradually find the importance of deepening my own linux skills, and thanks to the free time these days, I can pickup the left from the corner and do it from scratch. I have never been doing such kind of things before, which means this experience log to some extent shows the core steps and some of the trouble shooting skills along the way of building my own linux operating system, and there will be upcoming updates with my new experience. So, if you like this post please make a comment, I just want to make it better and better. Thanks!
Abstract
Building linux from scratch needs a lot of skills, shell scripting and system administration is a must. There are generally three big steps in all. First, build your own compiling tool-chain. Second, build the core system softwares using the self sustained tool-chain and last, build the kernel and make the operating system bootable. In order to make the system flexible enough I put my system onto a usb stick thus I can make a usb-pen based operating system.
Core steps of building Linux from scratch.
First, building the tool-chain from scratch. Tool chain are like food production factories, you put in your code and get the program to make the whole system work. So, it is the basis of all the softwares that are going to appear on the new operating system. The steps of building the tool-chain for the new system is also the most time-consuming, we need to go through several steps in order to make the tool-chain self-sustainable. First, we need to compile our new compiler using the compiler residing on the host operating system. Then, the compiler will have to build itself several times to make it independent of the host operating system. Along with the compiler, we also need to compile the basic libraries on which most of the upcoming to be compiled programs will depend. Thus far, we have build our own libraries and compilers, we can go on with building the essential programs for the system to work.
Second, building core softwares for the new system. The essential point we have to consider in building the system core softwares are dependency, which determines the sequence of how these softwares are built. Another important thing we need to be careful of is to be sure of using the newly build compiler and libraries rather than the old ones on the host operating system.
Third, build the new kernel and make the new system bootable. Building kernel is one big topic which you need to try on your own, it is common that there are several failures such as "Kernel panic." and "VFS: cannot find the partition". Anyway we need to trouble shoot all of these problems. Additionally, building your system onto a usb stick may bring about problems that will not exist otherwise. In a word, problems are almost inevitable, so don't panic when meeting them, consult with your friends or use google, anyway we can it through.
Thus far, we have finished all the steps, now enjoy your new system.
Note, one very important issue that I have met in the procedure of building my own operating system is the kernel. How to compile the kernel to make it work is trouble prone.
For details about every steps please visit the official website of Linux From Scratch.
I have been learning, using and loving for over four years. Early from mid-2005, I was instantly attracted by the beauty of this operating system, though not very famous around the area where I was living, I fell in love with it. I love its philosophy of openness and more importantly collaboration with people no matter where you are from. I was trying to collect videos, books and blogs about linux just in order to love it more. And along the way of loving this operating system, I also have been building my own skills of using and working with Linux. I have learned in depth on system administration either by watching videos or by reading books and hands on experience with this lovely OS. Back in August 2006 to January 2007, I even had the opportunity to work as a intern software programmer using Linux, which is one of the most important linux skill trying till now. At that time, I learned programming using c/c++ under linux, script programming and a lot. Here I would like to thank that precious opportunity.
As time went by, I met bottle neck in learning Linux. I have been telling myself to join the big community of Linux, try to help the community and do something, but things are not always that easy, although, I have been trying to do so by applying for positions such as translators or system administrators, I was always beat off. There were so much enthusiastic people in this community. Documents are translated in a timely fashion at least in my language - Chinese. Still, I also want to do something else to help the open source world, I always find myself lack enough competition. So I told myself to build my Linux skills even further and deeper.
About half a year a ago, I first heard of Linux From Scratch from one of my colleagues who is now still working in that company - state street corporation. But at that time, due to a lot of reasons I left it into the corner of my memory. As I need to earn my bread. As time went by, I gradually find the importance of deepening my own linux skills, and thanks to the free time these days, I can pickup the left from the corner and do it from scratch. I have never been doing such kind of things before, which means this experience log to some extent shows the core steps and some of the trouble shooting skills along the way of building my own linux operating system, and there will be upcoming updates with my new experience. So, if you like this post please make a comment, I just want to make it better and better. Thanks!
Abstract
Building linux from scratch needs a lot of skills, shell scripting and system administration is a must. There are generally three big steps in all. First, build your own compiling tool-chain. Second, build the core system softwares using the self sustained tool-chain and last, build the kernel and make the operating system bootable. In order to make the system flexible enough I put my system onto a usb stick thus I can make a usb-pen based operating system.
Core steps of building Linux from scratch.
First, building the tool-chain from scratch. Tool chain are like food production factories, you put in your code and get the program to make the whole system work. So, it is the basis of all the softwares that are going to appear on the new operating system. The steps of building the tool-chain for the new system is also the most time-consuming, we need to go through several steps in order to make the tool-chain self-sustainable. First, we need to compile our new compiler using the compiler residing on the host operating system. Then, the compiler will have to build itself several times to make it independent of the host operating system. Along with the compiler, we also need to compile the basic libraries on which most of the upcoming to be compiled programs will depend. Thus far, we have build our own libraries and compilers, we can go on with building the essential programs for the system to work.
Second, building core softwares for the new system. The essential point we have to consider in building the system core softwares are dependency, which determines the sequence of how these softwares are built. Another important thing we need to be careful of is to be sure of using the newly build compiler and libraries rather than the old ones on the host operating system.
Third, build the new kernel and make the new system bootable. Building kernel is one big topic which you need to try on your own, it is common that there are several failures such as "Kernel panic." and "VFS: cannot find the partition". Anyway we need to trouble shoot all of these problems. Additionally, building your system onto a usb stick may bring about problems that will not exist otherwise. In a word, problems are almost inevitable, so don't panic when meeting them, consult with your friends or use google, anyway we can it through.
Thus far, we have finished all the steps, now enjoy your new system.
Note, one very important issue that I have met in the procedure of building my own operating system is the kernel. How to compile the kernel to make it work is trouble prone.
For details about every steps please visit the official website of Linux From Scratch.
Java 学习笔记
Class accessibility modifiers:
- final: complete class, can't be subclassed, and methods can't be overloaded;- abstract: implete class, must be subclassed before instantiation;
- static: can't be instantiated, can only be accessed by class name;
- default: this class can only be visible in this package;
- public: can be accessbile by other classes, and there should be only one in one file;
- private: only visible to this package;
Member accessibility modifiers:
- public: visible to every class;- protected: visible to subclasses in other packages and every classes in this package;
- default: only visible to classes in the same package;
- private: not visible to any class outside of this class;
- static: define class rather than instance members and methods;
- final: contants;
- abstract: must be implemented in the subclasses;
- synchronized: only one thread can execute the method, mutual exclusion;
- native: used for methods call implemented in other languages;
- transient: used for ever changing members;
- volatile: used to keep consistency when multiple threads are accessing the same object.
Note:
- accessibility of local variables can't be specified;- local virables can't be declared static;
- method and member reference rule:
* static/class methods can only reference static varibles;
* non-static/object methods can access static varibles;
* static members can be access through a class reference or object reference.
- abstract classes can't have transient member varibles;
if(condition): the condition variable must be a boolean varible;
continue statement must be used in a loop;
break must be used in a block: such as:
aa: {break aa;} while for contiune
aa: {continue aa;} is incorrect;
- labels can be used to handle the excution trace of the program.
Exceptions and Errors
- checked exceptions: the exception must be dealt with explicitly by the method that throw it;- unchecked exceptions: the method is not obliged to do with the exceptions;
- try-catch-finally construct;
- throw and throws
* throw is used to throw an exception explicitly in the program;
* throws is used to propagate the exception to the caller of the program.
- throw null will cause a NullPointerException;
- assertion is used to handle program errors.
Inheritance in Java
- A class can only extend only one class, this is called linear implementation;- inherited, extended members;
- Upcasting: subclass reference can be assigned to base class reference;
- method overriding;
- dynamic method allocation, the method called at runtime is determined by the real object type;
- dynamic binding, the mechanism to dynamically determine which function to call at run time;
rather than at compile time;
- this pointer used for the nonstatic classes and methods;
- method overriding and overloading...
this() and super() construct
- this() is used to access the current object;
- super() is used to access the parent class of this class;
if used it must be the first statement in the body of constructors
it can only be used in a constructor declaration;
- Constructor chaining:
using super() call, the top most parent class can be called, this is the upper chain;
using this() call, (overloaded)constructors in the class can be called.
this() and super() calls can not appear in the same constructor;
- if no this() or super() calls are used, the compiler with implicitely insert one super() call,
this is used to call the default constructor of the super class;
- if the current class has no default constructors, a super() call with parameters must be
explicitely stated, if not, a complie time error will follow;
Interface
- The anatomy of an interface:* constants;
* methods prototypes;
* nested classes;
* nested interfaces;
- interfaces are inheritely public and abstract;
- the methods in the interface must have public accessibility when implemented in classes;
because changing it will voilate the contract of an interface;
- a class can implement some of the methods in the interface, but this class must be abstract;
- the interface methods can't be declared static, because they must be implemented first in
order to use them, (abstract)
- a class can only provides one implementation even though multiple declarations of a method
exist in multiple interfaces.
- one interface can extend several other interfaces, this is different from class inheritence;
one class can only have one direct super class;
one class can implement several other interfaces;
- Constants in interfaces are inheritely with public, static and final modifiers;
Aggregation and Inheritence
- When B is-a A then B can inherite from A, this complies to OOP phylosophy;- When B has-a A then B can be implemented by aggregation.
- Polymorphism is achieved through inheritence and interface implementation.
Code relying on polymorphic behavior will still work without any change if new subclasses or
new classes implementing the interface are added.
If no obvious is-a relationship is present, then polymorphism is best achieved by using
aggregation with interface implementation.
Latex 学习笔记
本文是作者阅读Latex Companion时作的读书笔记,谬误在所难免,如有疑问,请给此帖留言。
\showthe\topmargin %显示某个参数的数值或者内容;
在tex编译过程中出现行溢出(overflow hbox)是由于断字程序不知道在何处进行断字,可以使用如下命令来减少这样的问题,
\sloppy这样会降低断字标准,使输出不如默认状态下的输出出色,可以使用\fussy命令来回复到原始状态;
如果想查看哪一行发生了行溢出,可以在文档类中加入[draft]参数。
\frontmatter \mainmatter \& \backmatter \appendix修改文章的页码标记方式
\frontmatter %在文章正文之前使用罗马数字标记页码;
\mainmatter %文章正文用阿拉伯数字标记;
\backmatter %文章的结尾部分用
\label \ref \pageref %用来生成文章的标记和引用;
\flushleft \flushright \center %段落的对齐方式;
\quote \verse \quotation %引用命令;
\verbatim 和 verbatim 这个package; %逐字打印命令和软件包;
\verbatiminput{filename} %可以将Ascii文件嵌入到当前文件中来;
\tabular \longtabular \supertabular %表格命令;
表格和图片的浮动体环境可以将图片或者表格放置到合适的位置
normal
headings
no
myheadings %自定义显示方式;
\markboth{leftPage}{rightpage} %分别标记左右页眉;
fancy %需要用到fancyhdr 这个package;
用法如下:
\fancyhf{} % delete current setting for header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
\leftmark %当前的章名;
\chaptermark \sectionmark \subsectionmark命令用来定义\leftmark和\rightmark;
.sty Package 文件;
.dtx 文档化的TeX文件;
.ins .dtx的安装文件;
.dvi 设备无关文件;
.log 编译时的信息;
.toc 生成目录需要的文件,改文件存储了章节标题;
.lof 生成图片列表的文件;
.lot 生成表格列表的文件;
.aux 一个向下次编译传递信息的辅助文件;改文件通常还包含交叉引用信息;
.idx 生成索引用到的辅助文件;
num用来指定命令能接受的参数的个数,如果不给定,新建的命令将不会接受任何参数;
如果num不为0,则必须给定num个数的参数,如果参数为空,必须加一个{},并存在num个{};
defaultA和defaultB用来定义一个optional的参数,如果参数的个数小于num,则会使用optional的参数;
\newcommand %命令不能创建已经存在的命令,如果要修改现有的命令可以使用\renewcommand命令来实现;
\providecommand %命令用来创建命令,如果该命令已经存在则其将被忽略;
before 和after分别是该命令开始和结尾的定义;
\newenvironment的用法和\newcommand的用法比较类似;
可以将自己定义的命令和环境放到一个文件中,其他文件就可以以package的形式来引用在该文件中定义的命令
Package的定义如下:
\ProvidePackage{demo}
\newcommand{cmd1}{}
\newcommand{cmd2}{}
\newenvironment{env1}{\beforecmd}{\endcmd}
\textrm{...} roman \textsf{...} sans serif
\texttt{...} typewriter
\textmd{...} medium \textbf{...} bold face
\textup{...} upright \textit{...} italic
\textsl{...} slanted \textsc{...} small caps
\emph{...} emphasized \textnormal{...} document font
\scriptsize very small font
\footnotesize quite small font
\small small font
\normalsize normal font
\large large font
\Large larger font
\LARGE very large font
\huge huge
\Huge largest
\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt
字体使用的建议:文档中字体使用的越多,文档越漂亮;
\linespread{factor} 例如\linespread{1.6}产生2倍行距;
\baselinestretch{num} %改变行间距;
\ziju{num} %中文(CCT)改变字间距的方式,该命令不会影响英文的字距;
\setlength{parskip}{1ex} %设置段落间距为1ex;
\ccwd %一个汉字的宽度,在中文(CCT)环境中使用;
垂直距离\vspace{length} %该命令可以用来改变两个段落之间的垂直间距;
\stretch{length} %定义一个将一行宽度充满的橡皮长度;系统会根据当前的状态赋值;
\bigskip 和\smallskip %获得一个预定义的垂直距离;
页面布局参数主要有:
\hoffset %正文的水平偏移;
\voffset %正文的垂直偏移;
\oddsidemargin %奇数页正文和侧栏之间的距离;
\evensidemargin %偶数页正文和侧栏之间的距离;
\topmargin %
\headheight
\headsep
\textheight
\textwidth
\marginparsep
\marginparwidth
\footskip
\addtolength{parameter}{length}
\makebox[width][pos]{text} %将文本放到一个width宽度位于pos的盒子中;
\framebox[width][pos]{text} %和\makebox命令类似,不同之处在于盒子内部的文本有矩形框;
\raisebox{lift}[depth][height]{text} %用来控制盒子在垂直方向的距离;
\rule[lift]{width}{height} %用来生成水平方向和垂直方向的线条;
\chapter{} %章;
\section{} %
\subsection{}
\subsubsection{}
\paragraph{} %段落
\subparagraph{} %子段落;
article.sty %文章风格;
- art10.sty %10pt;
- art11.sty %11pt;
- art12.sty %12pt;
article.cls %2e版本的article样式文件;
- size10.clo %10pt,对应art10.sty;
- size11.clo %11pt, 对应art11.sty;
LaTeX基本操作
\hyphenation{word list} %断字命令;\showthe\topmargin %显示某个参数的数值或者内容;
在tex编译过程中出现行溢出(overflow hbox)是由于断字程序不知道在何处进行断字,可以使用如下命令来减少这样的问题,
\sloppy这样会降低断字标准,使输出不如默认状态下的输出出色,可以使用\fussy命令来回复到原始状态;
如果想查看哪一行发生了行溢出,可以在文档类中加入[draft]参数。
\frontmatter \mainmatter \& \backmatter \appendix修改文章的页码标记方式
\frontmatter %在文章正文之前使用罗马数字标记页码;
\mainmatter %文章正文用阿拉伯数字标记;
\backmatter %文章的结尾部分用
\label \ref \pageref %用来生成文章的标记和引用;
列表:
\itemize \enumberate \description \list %可以通过参数改变列表的编号;\flushleft \flushright \center %段落的对齐方式;
\quote \verse \quotation %引用命令;
\verbatim 和 verbatim 这个package; %逐字打印命令和软件包;
\verbatiminput{filename} %可以将Ascii文件嵌入到当前文件中来;
\tabular \longtabular \supertabular %表格命令;
表格和图片的浮动体环境可以将图片或者表格放置到合适的位置
页面的格式:
\pagestyle %页面格式主要包括页码的显示位置和页眉的显示方式等;normal
headings
no
myheadings %自定义显示方式;
\markboth{leftPage}{rightpage} %分别标记左右页眉;
fancy %需要用到fancyhdr 这个package;
用法如下:
\fancyhf{} % delete current setting for header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[LO]{\bfseries\rightmark}
\fancyhead[RE]{\bfseries\leftmark}
使用\fancyhdr来定制文档的页眉和页脚;
\rightmark %当前的节名;\leftmark %当前的章名;
\chaptermark \sectionmark \subsectionmark命令用来定义\leftmark和\rightmark;
和LaTeX相关的文件扩展名:
.tex LaTeX源文件;.sty Package 文件;
.dtx 文档化的TeX文件;
.ins .dtx的安装文件;
.dvi 设备无关文件;
.log 编译时的信息;
.toc 生成目录需要的文件,改文件存储了章节标题;
.lof 生成图片列表的文件;
.lot 生成表格列表的文件;
.aux 一个向下次编译传递信息的辅助文件;改文件通常还包含交叉引用信息;
.idx 生成索引用到的辅助文件;
LaTeX扩展:
新建命令\newcommand{name}[num][defaultA, defaultB]{definitions}num用来指定命令能接受的参数的个数,如果不给定,新建的命令将不会接受任何参数;
如果num不为0,则必须给定num个数的参数,如果参数为空,必须加一个{},并存在num个{};
defaultA和defaultB用来定义一个optional的参数,如果参数的个数小于num,则会使用optional的参数;
\newcommand %命令不能创建已经存在的命令,如果要修改现有的命令可以使用\renewcommand命令来实现;
\providecommand %命令用来创建命令,如果该命令已经存在则其将被忽略;
新建环境
\newenvironment{name}[num]{before}{after}before 和after分别是该命令开始和结尾的定义;
\newenvironment的用法和\newcommand的用法比较类似;
可以将自己定义的命令和环境放到一个文件中,其他文件就可以以package的形式来引用在该文件中定义的命令
Package的定义如下:
\ProvidePackage{demo}
\newcommand{cmd1}{}
\newcommand{cmd2}{}
\newenvironment{env1}{\beforecmd}{\endcmd}
字体操作
字体: %如果遇到既要改变字体也要改变字号的情况,则应首先改变字号的大小;然后改变字体;\textrm{...} roman \textsf{...} sans serif
\texttt{...} typewriter
\textmd{...} medium \textbf{...} bold face
\textup{...} upright \textit{...} italic
\textsl{...} slanted \textsc{...} small caps
\emph{...} emphasized \textnormal{...} document font
字体尺寸:
\tiny tiny font\scriptsize very small font
\footnotesize quite small font
\small small font
\normalsize normal font
\large large font
\Large larger font
\LARGE very large font
\huge huge
\Huge largest
字体的绝对大小:
\tiny 5pt 6pt 6pt\scriptsize 7pt 8pt 8pt
\footnotesize 8pt 9pt 10pt
\small 9pt 10pt 11pt
\normalsize 10pt 11pt 12pt
\large 12pt 12pt 14pt
\Large 14pt 14pt 17pt
\LARGE 17pt 17pt 20pt
\huge 20pt 20pt 25pt
\Huge 25pt 25pt 25pt
字体使用的建议:文档中字体使用的越多,文档越漂亮;
文档对象的间隔
修改行距:\linespread{factor} 例如\linespread{1.6}产生2倍行距;
\baselinestretch{num} %改变行间距;
\ziju{num} %中文(CCT)改变字间距的方式,该命令不会影响英文的字距;
设置首行缩进和段落间距:
\setlength{parindent}{0pt} %设置首行缩进为0;\setlength{parskip}{1ex} %设置段落间距为1ex;
\ccwd %一个汉字的宽度,在中文(CCT)环境中使用;
单词和句子之间的距离
水平距离\hspace{length} %可以用该命令插入一个水平间距;垂直距离\vspace{length} %该命令可以用来改变两个段落之间的垂直间距;
\stretch{length} %定义一个将一行宽度充满的橡皮长度;系统会根据当前的状态赋值;
\bigskip 和\smallskip %获得一个预定义的垂直距离;
修改页面布局
页面的布局是通过一系列的参数来控制的,我们可以通过修改这个参数的数值来修改页面布局;页面布局参数主要有:
\hoffset %正文的水平偏移;
\voffset %正文的垂直偏移;
\oddsidemargin %奇数页正文和侧栏之间的距离;
\evensidemargin %偶数页正文和侧栏之间的距离;
\topmargin %
\headheight
\headsep
\textheight
\textwidth
\marginparsep
\marginparwidth
\footskip
修改页面参数的命令有:
\setlength{parameter}{length}\addtolength{parameter}{length}
LaTeX中的盒子操作
\parbox[pos]{width}{text} %将段落放到一个盒子中;\makebox[width][pos]{text} %将文本放到一个width宽度位于pos的盒子中;
\framebox[width][pos]{text} %和\makebox命令类似,不同之处在于盒子内部的文本有矩形框;
\raisebox{lift}[depth][height]{text} %用来控制盒子在垂直方向的距离;
\rule[lift]{width}{height} %用来生成水平方向和垂直方向的线条;
文章结构命令
\part{} %部分;\chapter{} %章;
\section{} %
\subsection{}
\subsubsection{}
\paragraph{} %段落
\subparagraph{} %子段落;
解读sty|cls文件
%风格,样式文件定义;article.sty %文章风格;
- art10.sty %10pt;
- art11.sty %11pt;
- art12.sty %12pt;
article.cls %2e版本的article样式文件;
- size10.clo %10pt,对应art10.sty;
- size11.clo %11pt, 对应art11.sty;
常用\LaTeXe工具包
\usepackage{indenrst} %首行缩进工具包;indenrst.sty;调整Linux CLI的分辨率
关于屏幕分辨率
前几天由于使用Linux的CLI(command line interface)突然蹦出个想法,设置一下终端的显示分辨率,默认的分辨率实在是太不让人满意了.总体来说,调整CLI的分辨率还是挺简单的,就是需要修改一下参数,但是可不能随便修改,在修改之前还是需要研究一下的。
我们都知道,显示器的分辨率是用 vertical resolution X horizontal resolution来表示的,但是还有一个概念就是色深(color depth)。这个概念恐怕知道的人不是很多。其实也没有什么,说的简单一点就是色深可以表示颜色的数量,表示屏幕上的一个像素点用几个二进制位来表示。例如:色深如果是8的话,那每个像素点就用的颜色就用8个二进制位来表示,这样总共可以表示的颜色数目就是2的8次方,也就是256. 当然色深数值越大,表示能表示的颜色越多,可以显示的色彩越艳丽。
分辨率设置参考
在linux下面设置CLI的颜色是通过传递内核参数来实现的。也就是在系统引导时,将相关的参数传递给内核。而传递参数的任务是由引导加载程序来完成的。引导加载程序一般的是lilo或者grub。分辨率、色深以对应内核参数对照表
|
Colors(depth)
|
640x480
|
800x600
|
1024x768
|
1280x1024
|
1600x1200
|
|
256(8bit)
|
769
|
771
|
773
|
775
|
796
|
|
32,768(15bit)
|
784
|
787
|
790
|
793
|
797
|
|
65,536(16bit)
|
785
|
788
|
791
|
794
|
798
|
|
16.8M(24bit)
|
786
|
789
|
792
|
795
|
799
|
修改内核引导参数
我的系统采用的是Fedora 7,使用的引导加载程序是Grub。其配置文件时/boot/grub/grub.conf或者它的符号链接/etc/grub.conf 。打开配置文件 # vi /etc/grub.conf
搜索以kernel开始的一行 /^kernel
然后定位到该行的末尾 (在Vi中,可以使用“shift + $”实现),添加 vga=xxx,注意这个参数和前面的参数之间是有一个空格的。
例如:kernel /vmlinuz-2.6.8-1-386 root=/dev/hda3 ro vga=788
然后重新启动系统:reboot,就可以得到我们设置的分辨率和色深了,很简单是吗?为什么不自己动手做一下呢?
其他方法
前面我们将的通过修改配置文件来实现修改分辨率的目的。其实,很多情况下我们只是想临时修改一下,让眼睛看着舒服。此时,我们可以不用修改配置文件,而直接在系统启动之前(出现系统选择菜单,但还没有进入系统时)修改grub的引导参数。具体做法如下:重启系统,进入grub 引导选择菜单。
定位到要引导的系统,然后按键盘上的字母“e”;
此时,我们会进入到引导参数修改模式,定位到以kernel开头的行(用上下键就可以了);
在按“e”,然后定位到该行的末尾,添加分辨率参数,如vga=788。
回车,按“b”键,引导进入系统。
Subscribe to:
Posts (Atom)