龙空技术网

LaTeX 学习入门之第一篇文章

FlyingWithTheWind 89

前言:

当前朋友们对“ubuntulatex安装”大概比较注重,大家都想要剖析一些“ubuntulatex安装”的相关文章。那么小编同时在网摘上汇集了一些有关“ubuntulatex安装””的相关知识,希望咱们能喜欢,各位老铁们一起来了解一下吧!

LaTeX is a high-quality typesetting system; it includes features designed for the production of technical and scientific documentation. LaTeX is the de facto standard for the communication and publication of scientific documents. LaTeX is available as free software.

LaTeX最初由Leslie Lamport于1980年代初期开发,是基于Donald Knuth的TeX排版系统的扩展。TeX最初是为了满足科技出版领域的需求而设计的,但使用起来较为复杂。为了简化TeX的使用,Lamport开发了LaTeX,将一些常用的排版任务进行了封装和简化,使得普通用户也能方便地使用TeX进行高质量的文档排版。随着时间的推移,LaTeX逐渐成为学术界和科技领域的事实标准,被广泛应用于学术论文、书籍、报告等文档的排版。

下面请欣赏我的 学习入门文章,不要把这么长的代码吓到,其实每一行代码都很容易看懂,看就完了。

备注:%后面代码备注信息

一、代码:

\documentclass{ctexart} % 中文

% 使用的包

\usepackage{graphicx} % 插图

\usepackage{booktabs} % 美化三线表

\usepackage{tabularx} % 控制表格宽度

\usepackage{longtable}

% 页眉页脚

\usepackage{fancyhdr}

\setlength{\headheight}{13pt}

\pagestyle{fancy}

\chead{我的计算机学习之路}

\rfoot{\thepage}

\cfoot{computer learning}

\renewcommand{\headrulewidth}{0.4pt}

\renewcommand{\footrulewidth}{0.4pt}

% 文章Title

\title{我的计算机学习之路}

\author{阿杰}

\date{\today}

\begin{document}

\maketitle

% Abstract

\begin{abstract}

\begin{center}

\begin{quote}

满纸荒堂言,一把心酸泪,都云作者痴,谁解其中味!

\begin{flushright}

— 曹雪芹

\end{flushright}

\end{quote}

\end{center}

\end{abstract}

Ours is essentially a tragic age, so we refuse to take it tragically. The cataclysm has happened, we are among the ruins, and we start to build up new little habitats, to have new little hopes. It is rather hard work: there is now no smooth road into the future: but we go round, or scramble over the obstacles. We' ve got to live, no matter how many skies have fallen.

\begin{flushright}

— D.H Lawrence \footnote{《Lady Chatterley's Lover》的作者}

\end{flushright}

\section{从\ DOS\ 到\ UNIX \ }

\subsection{DOS 操作系统}

一九九七年我考上高中不久,一次偶然机会,父亲第一次带我见识了计算机,甭提有多高兴了,上来学的就是\ Dos 操作系统,经常在文件目录之间\ cd\ 来\ cd\ 去,当时也不太明白,只是死记命令罢了。

最有意思的是第一次知道了求伯君,是因为计算机老师说如果你的\ WPS \ 文档忘记密码了,你就输入\ qiubojun\ (求伯君三个字的全拼),这是万能密码,大家哈哈大笑。

\subsection{Unix 操作系统}

一九九九年我考上了大学,学校开设了计算机课程,第一次正式学习了\ windows 操作系统,那时候计算机还没有普及,刚刚兴起,一切是那么的新鲜,每一位同学都在如饥似渴地学习计算机知识,一有机会就去机房和图书馆。因为喜欢\ Dos 命令,渴望能像黑客一样,成为电脑高手。有一次,在图书馆我无意中发现一本《Unix 直通车》的书,这本书简直太好了,讲解的清晰易懂,一下子就吸引了我。于是我借来这本书一边看一边做笔记,那时还不能上网,看书是获得电脑知识的唯一途径。只是那个时候喜欢电脑的人太多了,我刚刚抄完的笔记第二天就不见了,但幸运的是因为我仔细的做了笔记,我对\ Unix\ 的基本入门命令已然牢记在心,这为我以后的电脑学习打下了坚实的基础。

\subsection{Linux 操作系统}

时间飞逝,我已成为一名上班族,\ Unix\ 太贵,用不起,也没有机会用,于是我转向了与\ Unix\ 同宗同源的\ Linux\ 操作系统。一次偶然的机会,我得到一张 \ Ubuntu\ 的安装光盘,于是我开始了\ Linux\ 的学习之路,道路阻且长。从\ Ubuntu 到\ Linux Mint , 从\ Manjaro 到\ Arch Linux , 从\ Deepin\ 到\ OpenSUSE\ ,都有 me 日夜安装学习的身影,因为实在是喜欢\ Unix,我现在电脑上还安装着 \ FreeBSD\ 操作系统,这应该是最接近\ Unix\ 的操作系统了。

\section{从\ Word 到\ \LaTeX }

因为喜欢\ linux ,所以我看到了清华退学博士王垠的《完全用\ linux\ 工作》一文,从此我又喜欢上了\ \LaTeX 。

\section{第一次接触编程语言}

\subsection{C\ 语言的学习}

大学时第一次接触的计算机编程语言是\ C\ 语言。说实话,当时,学的不怎么样(当然,现在也不怎么样,只是了解的比当时多一些),稀里糊涂混了个二级证,就草草了事。

C\ 语言 Hello World 代码:

\begin{verbatim}

#include <stdio.h>

int main() {

printf("Hello World!");

return 0;

}

\end{verbatim}

% * 打印空格

\begin{verbatim*}

#include <stdio.h>

int main() {

printf("Hello World!");

return 0;

}

\end{verbatim*}

\subsection{Excel VBA\ }

在工作中我无意间学会了\ Excel VBA\ ,这得益于我的\ C\ 语言学习基础。

\begin{verbatim}

Sub helloworld()

MsgBox ("Hello World!")

End Sub

\end{verbatim}

\subsection{Python\ 语言的学习}

正因为有着丰富的\ Linux \ 安装和学习经验,再加上\ C\ 语言的编程基础,我又很快学会了一点\ Python\ 入门知识,现在我可以用\ Python\ 操作\ Excel\ 了。

\begin{verbatim}

print("Hello World!")

\end{verbatim}

\subsection{SQL\ 语言的学习}

学习无止境,有时候用\ Excel\ 总是有点不尽人如意,于是我又学习了\ SQL\ 语言, 在学习\ SQL\ 语言的过程中我不知不觉间也学习了使用\ MySQL 、\ Postgresql\ 、 SQLite\ 等数据库知识。

\begin{verbatim}

SELECT * FROM table;

\end{verbatim}

\section{向\ Go\ 语言进发}

\begin{verbatim}

package main

import ("fmt")

func main() {

fmt.Println("Hello World!")

}

\end{verbatim}

\section{应用}

\subsection{插图}

\begin{verbatim}

\begin{figure}[htbp]

\centering

\includegraphics[viewport=0 0 2000 2000,scale=.1]{logo.jpg}

\caption{dnzy}

\end{figure}

\end{verbatim}

见图1

\begin{figure}[htbp]

\centering

\includegraphics[viewport=0 0 1000 1000,scale=.05]{logo.jpg}

\caption{dnzy}

\end{figure}

\subsection{插入表格}

\LaTeX 代码:

\begin{verbatim}

\begin{tabular}{|l|c|r|}

\hline

操作系统 & 发行版 & 编辑器 \\

\hline

Windows & CTex & WinEdt \\

\hline

Unix/Linux & TeX Live & vim \\

\hline

Mac OS & MacTeX & TeXShop \\

\hline

\end{tabular}

\end{verbatim}

\begin{tabular}{|l|c|r|}

\hline

OS & software & editor\\

\hline

Windows & CTex & WinEdt \\

\hline

Unix/Linux & TeX Live & vim \\

\hline

Mac OS & MacTeX & TeXShop \\

\hline

\end{tabular}

Three-line Table Code:

\begin{verbatim}

\begin{table}[htbp]

\caption{Three-line Table}

\label{tab:threesome}

\centering

\begin{tabular}{lll}

\hline

os & software & Editor \\

\hline

Windows & CTeX & WinEdt \\

Unix/Linux & TeX Live & vim \\

Mac OS & MacTeX & TeXShop \\

\hline

\end{tabular}

\end{table}

\end{verbatim}

\begin{table}[htbp]

\caption{Three-line Table}

\label{tab:threesome}

\centering

\begin{tabular}{lll}

\hline

os & software & Editor \\

\hline

Windows & CTex & WinEdt \\

Unix/Linux & TeX Live & vim \\

Mac OS & MacTeX & TeXShop \\

\hline

\end{tabular}

\end{table}

\begin{table}[htbp]

\caption{Control Column Width}

\centering

\begin{tabular}{p{100pt}p{100pt}p{100pt}}

\toprule

OS & software & Editor \\

\midrule

Windows & CTeX & WinEdt \\

Unix/Linux & TeX Live & vim \\

Mac OS & MacTeX & TeXShop \\

\bottomrule

\end{tabular}

\end{table}

\begin{longtable}{ll}

\caption{长恨歌} \\

\toprule

Author& Works\\

\midrule

\endfirsthead

\midrule

Author& Works\\

\midrule

\endhead

\midrule

\multicolumn{2}{r}{continue\dots} \\

\endfoot

\bottomrule

\endlastfoot

白居易& 汉皇重色思倾国,\\

& 御宇多年求不得。\\

& 杨家有女初长成,\\

& 养在深闺人未识。\\

& 天生丽质难自弃,\\

& 一朝选在君王侧。\\

& 回眸一笑百媚生,\\

& 六宫粉黛无颜色。\\

& 春寒赐浴华清池,\\

& 温泉水滑洗凝脂。\\

& 侍儿扶起娇无力,\\

& 始是新承恩泽时。\\

& 云鬓花颜金步摇,\\

& 芙蓉帐暖度春宵。\\

& 春宵苦短日高起,\\

& 从此君王不早朝。\\

\end{longtable}

\LaTeX 博大精深,我也只能算是入门罢了。

\hrule

参考文献:Alpha Huang,《\LaTeX\ Notes v 1.24》2009年6月7日

\end{document}

二、编译代码后效果

这是代码编译后生成的高质量的 PDF 文档

标签: #ubuntulatex安装