-
TensorFlow实现中文字体分类
2017-11-13 18:19:491.预处理 首先在网上找一份常用汉字大全,我这里找了一份2994字的常用...接着用PIL库来生成字体图片,生成的时候本想每个字居中显示。但是当一个字体中的字居中了,另外字体的字就会跑偏,因此这里用numpy来框出字体1.预处理
首先在网上找一份常用汉字大全,我这里找了一份2994字的常用汉字作为训练,712字的次常用汉字作为测试。
操作系统内就自带字体文件,后缀为ttc和ttf,Mac的路径为 /System/Library/Fonts,选取若干个作为分类的对象。
接着用PIL库来生成字体图片,生成的时候本想每个字居中显示。但是当一个字体中的字居中了,另外字体的字就会跑偏,因此这里用numpy来框出字体位置,然后再在四个方向加边框,代码如下:
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys reload(sys) sys.setdefaultencoding('utf8') import Queue import threading from PIL import Image, ImageFont, ImageDraw import numpy as np from tqdm import tqdm def draw_font(text, font, save_path=None, mode='train'): image_name = '{}{}.png'.format(save_path, text) if mode == 'train' and os.path.isfile(image_name): return im = Image.new("RGB", (256, 256), (255, 255, 255)) dr = ImageDraw.Draw(im) font = ImageFont.truetype(font, 128) dr.text((64, 64), text.decode('utf8'), font=font, fill="#000000") im_slice = np.asarray(im)[:,:,0] y, x = np.where(im_slice != 255) x_max, x_min, y_max, y_min = np.max(x), np.min(x), np.max(y), np.min(y) frame = 10 box = (x_min - frame, y_min - frame, x_max + frame, y_max + frame) im = im.crop(box) return im, image_name
在外层使用多线程来生成图片:def generator(fonts, texts, consumer_num): with tqdm(total=len(fonts)*len(texts)) as counter: for font in fonts: save_path = 'images/{}/'.format(font.split('.')[0]) if not os.path.isdir(save_path): os.mkdir(save_path) for text in texts: font = os.path.join(os.getcwd(), 'fonts', font) result = draw_font(text, font, save_path) if result: message.put(result) counter.update(1) for _ in xrange(consumer_num): message.put(None) def writer(): while True: msg = message.get() if msg: im, image_name = msg im.save(image_name) else: break def read_text(file_name): with open(file_name, 'r') as f: texts = f.read().split(' ') return texts def run(): file_name = u'中国汉字大全.txt' texts = read_text(file_name) fonts = os.listdir('fonts') consumer_1 = threading.Thread(target=writer) consumer_2 = threading.Thread(target=writer) consumer_num = 2 producer = threading.Thread(target=generator, args=(fonts, texts, consumer_num,)) producer.start() consumer_1.start() consumer_2.start() message.join() if __name__ == '__main__': message = Queue.Queue(1000) run()
最后生成的图片内容如下:
2.数据流
读入数据使用TensorFlow最近发布的1.4版本的Dataset API。
先根据目录树结构,来读取图片与标签
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import random import tensorflow as tf from tensorflow.python.framework import ops from tensorflow.python.framework import dtypes dir_path, _ = os.path.split(os.path.realpath(__file__)) class_num = 2 def read_labeled_image_list(images_dir): folders = [folder for _, folder, _ in os.walk(images_dir) if folder][0] filenames = [] labels = [] for index, folder in enumerate(folders): image_dir = os.path.join(images_dir, folder) filename = [os.path.join(image_dir, f) for f in os.listdir(image_dir) if f[0] != '.'] filenames += filename label = index labels += [label] * len(filename) return filenames, labels, folders
这里返回的folders是标签的顺序接着就是读取功能
def read_data(batch_size): with tf.name_scope('input_pipeline'): filenames, labels, annotation = read_labeled_image_list(os.path.join(dir_path, 'images')) instances = zip(filenames, labels) random.shuffle(instances) filenames, labels = zip(*instances) filenames, labels = list(filenames), list(labels) dataset = tf.data.Dataset.from_tensor_slices((filenames, labels)) dataset = dataset.map(parse_function) dataset = dataset.shuffle(100).batch(batch_size).repeat() return dataset, annotation
dataset.map()类似map()的用法,接收一个函数,作用于每个元素。这里parse_function的作用是读取图片,调整尺寸并标准化(非归一化),对标签进行one-hot编码,代码如下:
def parse_function(filenames, label): label = tf.one_hot(label, class_num) file_contents = tf.read_file(filenames) example = tf.image.decode_png(file_contents, channels=3) example = tf.cast(tf.image.resize_images(example, [224, 224]), tf.uint8) example = tf.image.per_image_standardization(example) return example, label
参考资料:
3.模型-vgg16
自从深度学习被提出,进过LeNet、AlexNet、GoogLeNet、VGG、ResNet的发展,图像识别问题基本已算是被解决了。目前VGGNet依然被用来提取图像特征。这里的分类模型选择VGG16,fc层调整为[2048, 2048, 类别数],代码如下:
这里不使用TensorFlow slim里的vgg的原因是slim-vgg的input size要求为224×224,而本文只需128×128,这样训练可以使batch size更大。#!/usr/bin/env python # -*- coding: utf-8 -*- import tensorflow as tf def conv_op(input_op, name, n_out, kh=3, kw=3, dh=1, dw=1): n_in = input_op.get_shape()[-1].value with tf.name_scope(name) as scope: kernel = tf.get_variable(scope + 'w', shape=[kh, kw, n_in, n_out], dtype=tf.float32, initializer=tf.contrib.layers.xavier_initializer_conv2d()) conv = tf.nn.conv2d(input_op, kernel, (1, dh, dw, 1), padding='SAME') bias_init_val = tf.constant(.0, shape=[n_out], dtype=tf.float32) bias = tf.Variable(bias_init_val, trainable=True, name='b') z = tf.nn.bias_add(conv, bias) activation = tf.nn.relu(z, name=scope) tf.summary.histogram('histogram', activation) return activation def fc_op(input_op, name, n_out): n_in = input_op.get_shape()[-1].value with tf.name_scope(name) as scope: kernel = tf.get_variable(scope+'w', shape=[n_in, n_out], dtype=tf.float32, initializer=tf.contrib.layers.xavier_initializer()) biases = tf.Variable(tf.constant(.1, shape=[n_out], dtype=tf.float32), name='b') activation = tf.nn.relu_layer(input_op, kernel, biases, name=scope) tf.summary.histogram('histogram', activation) return activation def mpool_op(input_op, name, kh=2, kw=2, dh=2, dw=2): return tf.nn.max_pool(input_op, ksize=[1, kh, kw, 1], strides=[1, dh, dw, 1], padding='SAME', name=name) def vgg(input_op, class_num, keep_prob): with tf.name_scope('vgg'): conv1_1 = conv_op(input_op, name='conv1_1', n_out=64) conv1_2 = conv_op(conv1_1, name='conv1_2', n_out=64) pool1 = mpool_op(conv1_2, name='pool1') conv2_1 = conv_op(pool1, name='conv2_1', n_out=128) conv2_2 = conv_op(conv2_1, name='conv2_2', n_out=128) pool2 = mpool_op(conv2_2, name='pool2') conv3_1 = conv_op(pool2, name='conv3_1', n_out=256) conv3_2 = conv_op(conv3_1, name='conv3_2', n_out=256) conv3_3 = conv_op(conv3_2, name='conv3_3', n_out=256) pool3 = mpool_op(conv3_3, name='pool3') conv4_1 = conv_op(pool3, name='conv4_1', n_out=512) conv4_2 = conv_op(conv4_1, name='conv4_2', n_out=512) conv4_3 = conv_op(conv4_2, name='conv4_3', n_out=512) pool4 = mpool_op(conv4_3, name='pool4') conv5_1 = conv_op(pool4, name='conv5_1', n_out=512) conv5_2 = conv_op(conv5_1, name='conv5_2', n_out=512) conv5_3 = conv_op(conv5_2, name='conv5_3', n_out=512) pool5 = mpool_op(conv5_3, name='pool5') shp = pool5.get_shape() flattened_shape = shp[1].value * shp[2].value * shp[3].value resh1 = tf.reshape(pool5, [-1, flattened_shape], name='resh1') fc6 = fc_op(resh1, name='fc6', n_out=2048) fc6_drop = tf.nn.dropout(fc6, keep_prob, name='fc6_drop') fc7 = fc_op(fc6_drop, name='fc7', n_out=2048) fc7_drop = tf.nn.dropout(fc7, keep_prob, name='fc6_drop') fc8 = fc_op(fc7_drop, name='fc8', n_out=class_num) softmax = tf.nn.softmax(fc8) return softmax
4.训练
在训练时用softmax计算交叉熵,容易出现浮点下溢,导致log(0)的计算,这就造成了从此次以后的loss都是Nan,解决方法是限制网络输出范围:tf.log(tf.clip_by_value(pred, 1e-5, 1.0))。学习率过大也会造成Nan,一般出现这种情况的话每次学习率除以10地进行调试。
TensorFlow实现训练大致分两种方法。
最低效的是将data pipeline与训练的graph分割成两部分,然后在session中分次执行。代码示意如左,另一种是将data pipeline写进训练的graph中,让TensorFlow自动多线程处理,代码示意如右。
inputs, outputs = data_pipeline(...) X = tf.placeholder(...) Y = tf.placeholder(...) pred = net(X) loss = loss_func(pred, Y) train_op = optimizer.minimize(loss) trainX, trainY = sess.run([inputs, outputs]) sess.run(train_op, feed_dict={X:trainX, Y:trainY})
inputs, outputs = data_pipeline(...) pred = net(inputs) loss = loss_func(pred, outputs) train_op = optimizer.minimize(loss) sess.run(train_op)
然而TensorFlow自动多线程的实现并不是很好,设置batch size 128,iter 1000次测试两种方法,分别耗时665.52s, 654.39s, 基本差别不大。GPU使用率曲线分别如下:理论上来说,如果把训练数据全部读取到内存,那么只需要在内存与GPU直接通信就行了,但实际上训练集都会非常大,因此最耗时的是在硬盘读取上。所以要获得高效的训练,最好自己实现多线程。在这里我使用Python自带的Queue库和threading库,用4个producer产生数据,一个consumer训练网络,代码如下:
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import Queue import threading import tensorflow as tf from dataset.read_data import read_data from nnets.vgg import vgg os.environ['CUDA_VISIBLE_DEVICES'] = '1' class_num = 2 def data_pipline(batch_size): data_batch, annotation = read_data(batch_size) iterator = data_batch.make_initializable_iterator() inputs, outputs = iterator.get_next() with tf.Session() as sess: sess.run(iterator.initializer) for _ in xrange(250): data = sess.run([inputs, outputs]) message.put(data) message.put(None) def train(): inputs = tf.placeholder(tf.float32, shape=[None, 128, 128, 3]) outputs = tf.placeholder(tf.float32, shape=[None, class_num]) tf.summary.image('inputs', inputs, 16) lr = tf.placeholder(tf.float32) keep_prob = tf.placeholder(tf.float32) pred = vgg(inputs, class_num, keep_prob) with tf.name_scope('cross_entropy'): cross_entropy = tf.reduce_mean(-tf.reduce_sum(outputs * tf.log(tf.clip_by_value(pred, 1e-5, 1.0)), reduction_indices=[1])) tf.summary.scalar('cross_entropy', cross_entropy) with tf.name_scope('accuracy'): correct = tf.equal(tf.argmax(pred, 1), tf.argmax(outputs, 1)) accuracy = tf.reduce_mean(tf.cast(correct, tf.float32)) tf.summary.scalar('accuracy', accuracy) with tf.name_scope('optimizer'): optimizer = tf.train.AdamOptimizer(lr).minimize(cross_entropy) merged = tf.summary.merge_all() saver = tf.train.Saver() with tf.Session() as sess: writer = tf.summary.FileWriter('./log/', sess.graph) sess.run(tf.global_variables_initializer()) i, stop_count = 0, 0 st = time.time() while True: i += 1 if stop_count == producer_num: break msg = message.get() if msg is None: stop_count += 1 continue image, label = msg learning_rate = 1e-5 if i < 500 else 1e-6 sess.run(optimizer, feed_dict={inputs:image, outputs:label, lr:learning_rate, keep_prob:0.5}) # if i % 50 == 0: # summary, acc, l = sess.run([merged, accuracy, cross_entropy], feed_dict={inputs:image, outputs:label ,keep_prob:1.0}) # print 'iter:{}, acc:{}, loss:{}'.format(i, acc, l) # writer.add_summary(summary, i) print 'run time: ', time.time() - st saver.save(sess, './models/vgg.ckpt') return if __name__ == '__main__': BATCH_SIZE = 128 producer_num = 4 message = Queue.Queue(200) for i in xrange(producer_num): producer_name = 'p{}'.format(i) locals()[producer_name] = threading.Thread(target=data_pipline, args=(BATCH_SIZE,)) locals()[producer_name].start() c = threading.Thread(target=train)1 c.start() message.join()
耗时527.11s,下图为GPU使用率,可以看到基本上是100%。取消76-80行的注释会把中间结果写进tensorboard,但会多耗时一些,在执行这个步骤时GPU使用率也会降到0。
在这里只使用Baoli和Xingkai两种字体来做二分类,下图分别是训练时的accuracy和loss
5.评估
这里使用712字的次常用汉字来作为测试。测试是要注意的是,在训练时使用tf.image.per_image_standardization来将数据集进行标准化,若测试集用归一化,或者不做处理输出网络,那么所有的预测结果都会偏向于同一类。
如下是测试代码,在测试的时候偷了个懒,网络每次只接收一张图片,若要提升代码速度的话可以批量读取图片到内存,然后一起送进网络。
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import random import numpy as np from scipy.misc import imresize, imrotate import matplotlib.pyplot as plt import tensorflow as tf from dataset.generator import read_text, draw_font from nnets.vgg import vgg def generator_images(texts, fonts): for text in texts: for font in fonts: image, _ = draw_font(text, font, mode='test') image = np.asarray(image) yield image, text def run(): file_name = u'test.txt' # file_name = u'dataset/中国汉字大全.txt' texts = read_text(file_name) fonts_dir = os.path.join('dataset', 'fonts') fonts = [os.path.join(os.getcwd(), fonts_dir, path) for path in os.listdir(fonts_dir)] images_gen = generator_images(texts, fonts) inputs = tf.placeholder(tf.float32, shape = [None, None, 3]) example = tf.cast(tf.image.resize_images(inputs, [128, 128]), tf.uint8) example = tf.image.per_image_standardization(example) example = tf.expand_dims(example, 0) outputs = vgg(example, 2, 1.0) sess = tf.Session() restorer = tf.train.Saver() restorer.restore(sess, 'models/vgg.ckpt') error = 0 error_texts = [] for index, info in enumerate(images_gen): image, text = info pred = sess.run(outputs, feed_dict={inputs:image}) pred = np.squeeze(pred) label = np.squeeze(np.where(pred==np.max(pred))) if index % 2 != label: error_texts.append((text, pred.tolist())) error += 1 print 'test num: {}, error num: {}, acc: {}'.format(index + 1, error, 1 - float(error) / index)
输出结果如下:test num: 1424, error num: 6, acc:0.9957865168539326
因为类别为2,所以测试集大小为712×2=1424
接着将错误的类别可视化:
def show_errors(error_infos, fonts): length = len(error_infos) labels = len(fonts) for i in xrange(length): text, pred = error_infos[i] index = pred.index(max(pred)) for j in xrange(labels): axis = plt.subplot(length, labels, i * labels + j + 1) axis.axis('off') font = fonts[j] image, _ = draw_font(text, font, mode='test') if index == j: plt.title(str(pred)) plt.imshow(image) plt.show()
可以看到被误分类的字分别是皿、吆、蚣、豺、鹦、豁。具体的误分类情况为:
- Baoli的皿以0.978的概率被判断为Xingkai
- Xingkai的吆以0.783的概率被判断为Baoli
- Baoli的蚣以0.801的概率被判断为Xingkai
- Xingkai的豺以0.591的概率被判断为Baoli
- Baoli的鹦以0.827的概率被判断为Xingkai
- Baoli的豁以0.578的概率被判断为Xingkai
接着可以再看一下训练数据的情况:test num: 5988, error num: 0, acc:1.0
所有图片均没有被误分类。然后把训练集和测试集互换一下,即用1424张图片训练,5988张图片测试,结果如下:test num: 5988, error num: 82, acc: 0.986303657926可以说明这两种字体的特征区分比较明显,而且神经网络也算是学到了正确的特征,在字体格式统一的情况下,并没有过拟合。再来看看网络的抗噪性能,给测试图片加上均值0,方差1的高斯噪声,并随机旋转30°,随机放缩0.8-1.2倍。效果图如下图,这里因为加入float格式的高斯噪声,而matplotlib的显示格式是uint8,因此在imshow的时候要把image转化为image.astype(np.uint8):函数generator_images修改如下:def generator_images(texts, fonts): mean, sigma = 0, 1 random_rotate = 30 random_scale = 0.2 for text in texts: for font in fonts: image, _ = draw_font(text, font, mode='test') image = np.asarray(image) image = imresize(image, random.uniform(1-random_scale, 1+random_scale)) image = imrotate(image, random.uniform(-random_rotate, random_rotate)) image = image + np.random.normal(mean, sigma, size = image.shape) yield image, text
结果如下:test num: 1424, error num: 359, acc: 0.747716092762
-
Latex大全
2020-05-09 22:10:19目录符号大全字母样式分式、矩阵、多项式重音符号(向量符号)希腊字母二元关系运算符大运算符(积分求和)箭头定界符(括号)其他符号基本结构注释换行空格中文算法表格插入图片公式页脚注释枚举字体与字号 ...本文介绍了latex中常用的功能
目录
符号大全
因为符号更常用,所以放到前面了。
字母样式
第一行是罗马体,第二行是斜体,第三行类似于斜体
斜体(强烈推荐用于文本)
语法\textit{Precision}
语法\emph{Precision}
粗体(强烈推荐用于文本)
语法\textbf{Precision}
粗斜体(强烈推荐用于文本)
语法\textbf{\textit{Precision}}
语法\textbf{\emph{Precision}}
上述三种用于文本,其余用于公式
正粗体
语法\mathbf{012…abc…ABC…}
粗体
语法\boldsymbol{012…abc…ABC…\alpha \beta\gamma…}
分式、矩阵、多项式
语法 效果 \frac{2}{4}=0.5 \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} =a \dbinom{n}{r}=\binom{n}{n-r}=Cn_r=Cn_{n-r} 矩阵
重音符号(向量符号)
希腊字母
二元关系
运算符
大运算符(积分求和)
箭头
定界符(括号)
其他符号
\Delta:
前置上下标:基本结构
\documentclass[12pt, letterpaper]{article} \usepackage[utf8]{inputenc} \usepackage{comment} % Title \title{Document Title} %标题 \author{Rooney \thanks{Somebody}} \date{2020-05-09} \begin{document} \begin{titlepage} \maketitle \end{titlepage} \tableofcontents \begin{abstract} This is a simple paragraph at the beginning of the document. A brief introduction about the main subject. \end{abstract} First document. This is a simple example, with no extra parameters or packages included. % Comments \begin{comment} This text won't show up in the compiled pdf this is just a multi-line comment. Useful to, for instance, comment out slow-rendering while working on the draft. 相当于加强版的 % \end{comment} \end{document}
其中,\documentclass命令是用于设置LaTex文件所生成文档的格式. 其命令语法如下所示:
\documentclass[options]{class}
常见的class可选项:class 文体 article 科技论文,报告,软件文档等 IEEEtran IEEE Transactions 格式. report 长篇报告(如:学位论文) 常见的option可选项:
option 內容 12pt 文档正文使用的字体大小(默认为10pt) twoside, oneside 分成几列,一般期刊论文是两列 report 长篇报告(如:学位论文) 注释
先加载宏包:
\usepackage{comment}
一般用 % 注释一段话,看也可以用\begin{comment} 注释内容 \end{comment }来注释好几段话。
换行
两个反斜杠 \
空格
波浪线~
中文
将WinEdt设置为默认使用UTF8格式打开tex文件。
如果WinEdt打开一个UTF-8格式的文件显示乱码,可在Document->Document Setting->Format->File Format中选择UTF-8
或者在在该文件的开始处添加一行% !Mode:: "TeX:UTF-8"
Latex环境中使用中文需要注意的一点是: Latex编辑器读入文件的使用的编码格式一定要与该文件的编码格式一致。
1.使用ctexart\documentclass[UTF8]{ctexart} \usepackage{CJK} \begin{document} Hello, World! 世界, 你好! \emph{世界, 你好!} %斜体 \textbf{世界, 你好!} % 粗体 {\CJKfamily{hei} 黑体} {\CJKfamily{kai} 楷体} {\CJKfamily{li} 隶书} {\CJKfamily{fs} 仿宋} {\CJKfamily{song} 宋体} \end{document}
2.使用CTEX中文包(UTF8格式)\documentclass[UTF8]{article} \usepackage{CTEX} \begin{document} \section{字体设置} {\kaishu 楷体} {\songti 宋体} {\heiti 黑体} {\fangsong 仿宋} \end{document}
算法
先加载宏包:
\usepackage{algorithm} \usepackage{algorithmic} \renewcommand{\algorithmicrequire}{ \textbf{Input:}} % Input 代替 Require \renewcommand{\algorithmicensure}{ \textbf{Initialize:}} % Initialize 代替 Ensure \renewcommand{\algorithmicreturn}{ \textbf{Output:}} % Output 代替 Return
\begin{algorithm} \caption{Title of the Algorithm} \label{algo:ref} \begin{algorithmic}[1] \REQUIRE some words. % this command shows "Input" \ENSURE ~\\ % this command shows "Initialized" some text goes here ...\\ \WHILE {\emph{not converged}} \STATE ... \\ % line number at left side \ENDWHILE \RETURN this is the lat part. % this command shows "Output" \end{algorithmic} \end{algorithm}
表格
需要加载宏包:
\usepackage{booktabs} \usepackage{tabularx} \usepackage{multicol} \usepackage{multirow} \usepackage{threeparttable} %三线表格 \usepackage{diagbox} %斜对角线 \usepackage{array}
示例一:
\begin{table}[h] \centering %居中表格 \caption{this is my table} \begin{tabular}{llr} %%前两列左对齐,第三列右对齐 %也可以设置每一列的宽度 \begin{tabular}{p{3.5cm}|p{2cm}|p{5cm}} %也可以设置表格总宽度的宽度 \begin{tabularx}{12cm} \hline \multicolumn{2}{c}{Item} \\ %Item写于前两列的合并 \cline{1-2} %只画前两行的横线 Animal & Description & Price (\$) \\ \hline Gnat & per gram & 13.65 \\ & each & 0.01 \\ Gnu & stuffed & 92.50 \\ Emu & stuffed & 33.33 \\ Armadillo & frozen & 8.99 \\ \hline \end{tabular} \end{table}
代码第四行决定表格中内容的对齐形式:\begin{tabular}[pos]{table spec}
table spec选项:
table spec 作用 样例 l 左对齐 {l c r} c 居中 {l c r} r 右对齐 {l c r} p 限制列宽 表格内容中的一些符号作用
符号 作用 & 列分隔 \ 新列 \hline 画一条水平线 \newline 在列中换行 \cline{i-j} 在水平方向从第 i 列 到 第 j 列画横线段 表格中行间距
\renewcommand{\arraystretch}{1.5} %默认是1.0
示例二:三线表格(更常用)
\begin{table}[h] \caption{This my second table} \centering \begin{tabular}{ccc} \toprule %命令是画出表格最上边的一条粗实线(rule) Name & ID & Gender\\ \midrule % 命令是画出表格中间的细实线。 效果如下图所示: Tom & 001& Male\\ Rose & 002& Female\\ \bottomrule %命令是画出表格最下边的一条粗实线. \end{tabular} \end{table}
示例三:跨越两栏的多表格
如何跨越?——\begin{table}[h ]改成 \begin{table*}[h]
多表格的设置有点巧妙:在这里插入代码片
表格在页面位置
\begin{table}[h]
在方括号中修改。- h Here - at the position in the text where the table environment appears.
- t Top - at the top of a text page.
- b Bottom - at the bottom of a text page.
- p Page of floats - on a separate float page, which is a page containing no text, only floats.
表格字体大小
插入\begin{table}[h] 和 \begin{tabular}之间。
\tiny \scriptsize \footnotesize \small \normalsize % 默认 \large \Large \LARGE \huge \Huge
单元格内换行
\shortstack{ 第一行的內容 \ 第二行的内容 }
{\emph{Suspect}} & \shortstack{Authenticate \\ Accuracy} & {\emph{Authenticate Accuracy}} & \shortstack{First line\\(second line)} \\
设置表格总长
\begin{table} \caption{设置表格总长} \begin{tabular*}{12cm}{lll} \hline Start & End & Character Block Name \\ \hline 3400 & 4DB5 & CJK Unified Ideographs Extension A \\ 4E00 & 9FFF & CJK Unified Ideographs \\ \hline \end{tabular*} \end{table}
设置表格总长是12cm
表格内自动换行(限制列宽)
\begin{document} \begin{table} \caption{自动换行} \begin{center} \begin{tabular}{|l|l|l|l| p{5cm}|} % p{5cm}改成m{0.08\textwidth}也行 \hline Item & Name & Gender & Habit & Self-introduction \\ \hline 1 & Jimmy & Male & Badminton & Hi, everyone,my name is Jimmy. I come from Hamilton, and it's my great honour to give this example. My topic is about how to use p{width} command \\ \hline 2 & Jimmy & Male & Badminton & Hi, everyone,my name is Jimmy. I come from Hamilton, and it's my great honour to give this example. My topic is about how to use p{width} command \\ \hline \end{tabular} \end{center} \end{table}
\begin{tabular}{|l|l|l|l| p{5cm}|}设置最后一列最大是5cm,超出部分要换行。注意,只能使用p限制列宽。p也可以用m代替,p是限制列宽的的左对齐,m是限制列宽的右对齐。
设置表格宽度
需要用到 \usepackage{tabularx,multirow},注意,这里是tabularx
\begin{table} \caption{表格宽度X} \begin{tabularx}{10cm}{llX} % 10cm 減去前兩個欄位寬度後,剩下的通通給 \hline % 第三欄位使用,文字超出的部份會自動折行 Start & End & Character Block Name \\ \hline 3400 & 4DB5 & CJK Unified Ideographs Extension A \\ 4E00 & 9FFF & CJK Unified Ideographs \\ \hline \end{tabularx} \end{table}
调整行高
在该行内容开始之前添加以下命令即可:
\rule{0pt}{15pt}
0pt 的意义无需太多关心,15pt 表示行高。设置表格某列的宽度
注意,只能使用p限制列宽。p也可以用m代替,**p是限制列宽的的左对齐,m是限制列宽的右对齐。
\begin{table}[h] %开始一个表格environment,表格的位置是h,here。 \caption{改变表格任一列宽} %显示表格的标题 \begin{tabular}{p{3.5cm}|p{2cm}|p{5cm}} %设置了每一列的宽度,强制转换。 \hline \hline Format & Extension & Description \\ %用&来分隔单元格的内容 \\表示进入下一行 \hline %画一个横线,下面的就都是一样了,这里一共有4行内容 Bitmap & .bmp & Bitmap images are recommended because they offer the most control over the exact image and colors.\\ \hline Graphics Interchange Format (GIF) & .gif & Compressed image format used for Web pages. Animated GIFs are supported.\\ \hline Joint Photographic Experts Group (JPEG) & .jpeg, .jpg & Compressed image format used for Web pages.\\ \hline Portable Network Graphics (PNG) & .png & Compressed image format used for Web pages.\\ \hline \hline \end{tabular} \end{table}
如果又要设定列宽又要居中,得在p{2cm}后面添加<{\centering}:\begin{table}[h] %开始一个表格environment,表格的位置是h,here。 \caption{改变表格任一列宽+居中} %显示表格的标题 \begin{tabular}{p{3.5cm}<{\centering}|p{2cm}<{\centering}|p{5cm}<{\centering}} %设置了每一列的宽度,强制转换。 \hline \hline Format & Extension & Description \\ %用&来分隔单元格的内容 \\表示进入下一行 \hline %画一个横线,下面的就都是一样了,这里一共有4行内容 Bitmap & .bmp & Bitmap images are recommended because they offer the most control over the exact image and colors.\\ \hline Graphics Interchange Format (GIF) & .gif & Compressed image format used for Web pages. Animated GIFs are supported.\\ \hline Joint Photographic Experts Group (JPEG) & .jpeg, .jpg & Compressed image format used for Web pages.\\ \hline Portable Network Graphics (PNG) & .png & Compressed image format used for Web pages.\\ \hline \hline \end{tabular} \end{table}
高端的三线表格
\begin{table}[tp] \centering \fontsize{6.5}{8}\selectfont \begin{threeparttable} \caption{Demographic Prediction performance comparison by three evaluation metrics.} \label{tab:performance_comparison} \begin{tabular}{ccccccc} \toprule \multirow{2}{*}{Method}& \multicolumn{3}{c}{ G}&\multicolumn{3}{c}{ G}\cr \cmidrule(lr){2-4} \cmidrule(lr){5-7} &Precision&Recall&F1-Measure&Precision&Recall&F1-Measure\cr \midrule kNN&0.7324&0.7388&0.7301&0.6371&0.6462&0.6568\cr F&0.7321&0.7385&0.7323&0.6363&0.6462&0.6559\cr E&0.7321&0.7222&0.7311&0.6243&0.6227&0.6570\cr D&0.7654&0.7716&0.7699&0.6695&0.6684&0.6642\cr C&0.7435&0.7317&0.7343&0.6386&0.6488&0.6435\cr B&0.7667&0.7644&0.7646&0.6609&0.6687&0.6574\cr A&{\bf 0.8189}&{\bf 0.8139}&{\bf 0.8146}&{\bf 0.6971}&{\bf 0.6904}&{\bf 0.6935}\cr \bottomrule \end{tabular} \end{threeparttable} \end{table}
\multirow参数:
\multirow{nrows}[bigstructs]{width}[fixup]{text} nrows 设定所占用的行数。 bigstructs 此为可选项,主要是在你使用了 bigstruct 宏包时使用。 width 设定该栏文本的宽度。如果想让 LaTeX 自行决定文本的宽度,则用 * 即可。 fixup 此为可选项,主要用来调整文本的垂直位置。 text 所要排版的文本。可用 \\ 来强迫换行。
多个小表格组合
1.一个table夹带多个tabular
\begin{table} \centering {\centerline{\bf (a). CDR samples}} \vspace{1.0mm} \begin{tabular}{|l|c|c|c|} \hline \textbf{record-id} & \textbf{user-id} & \textbf{online-time} & \textbf{offline-time} \\\hline 1 & \#user-1 & \#timestamp-1 & \#timestamp-2 \\\hline 2 & \#user-2 & \#timestamp-3 & \#timestamp-4 \\\hline 3 & \#user-2 & \#timestamp-5 & \#timestamp-6 \\\hline 4 & \#user3 & \#timestamp-7 & \#timestamp-8 \\\hline \vdots & \vdots & \vdots &\vdots\\\hline \end{tabular} \vspace{3mm} \centering \centerline{\bf (b). DTR samples} \vspace{1.0mm} \begin{tabular}{|l|c|c|c|} \hline \textbf{record-id} & \textbf{user-id} & \textbf{online-time} & \textbf{offline-time} \\\hline 1 & \#user-1 & \#timestamp-1 & \#timestamp-2 \\\hline 2 & \#user-2 & \#timestamp-3 & \#timestamp-4 \\\hline 3 & \#user-2 & \#timestamp-5 & \#timestamp-6 \\\hline 4 & \#user3 & \#timestamp-7 & \#timestamp-8 \\\hline \vdots & \vdots & \vdots &\vdots\\\hline \end{tabular} \vspace{3mm} \centering \centerline{\bf (c). DTR samples} \vspace{1.0mm} \begin{tabular}{|l|c|c|c|} \hline \textbf{record-id} & \textbf{user-id} & \textbf{online-time} & \textbf{offline-time} \\\hline 1 & \#user-1 & \#timestamp-1 & \#timestamp-2 \\\hline 2 & \#user-2 & \#timestamp-3 & \#timestamp-4 \\\hline 3 & \#user-2 & \#timestamp-5 & \#timestamp-6 \\\hline 4 & \#user3 & \#timestamp-7 & \#timestamp-8 \\\hline \vdots & \vdots & \vdots &\vdots\\\hline \end{tabular} \vspace{1.5mm} \caption{CDR (Call Detail Records) and DTR (Data Traffic Records) samples.} \end{table}
2.figure夹带多个tabular
\begin{figure} \centering {\centerline{\bf (a). CDR samples}} \vspace{1.0mm} \begin{tabular}{|l|c|c|c|} \hline \textbf{record-id} & \textbf{user-id} & \textbf{online-time} & \textbf{offline-time} \\\hline 1 & \#user-1 & \#timestamp-1 & \#timestamp-2 \\\hline 2 & \#user-2 & \#timestamp-3 & \#timestamp-4 \\\hline 3 & \#user-2 & \#timestamp-5 & \#timestamp-6 \\\hline 4 & \#user3 & \#timestamp-7 & \#timestamp-8 \\\hline \vdots & \vdots & \vdots &\vdots\\\hline \end{tabular} \vspace{3mm} \centering \centerline{\bf (b). DTR samples} \vspace{1.0mm} \begin{tabular}{|l|c|c|c|} \hline \textbf{record-id} & \textbf{user-id} & \textbf{online-time} & \textbf{offline-time} \\\hline 1 & \#user-1 & \#timestamp-1 & \#timestamp-2 \\\hline 2 & \#user-2 & \#timestamp-3 & \#timestamp-4 \\\hline 3 & \#user-2 & \#timestamp-5 & \#timestamp-6 \\\hline 4 & \#user3 & \#timestamp-7 & \#timestamp-8 \\\hline \vdots & \vdots & \vdots &\vdots\\\hline \end{tabular} \vspace{3mm} \centering \centerline{\bf (c). DTR samples} \vspace{1.0mm} \begin{tabular}{|l|c|c|c|} \hline \textbf{record-id} & \textbf{user-id} & \textbf{online-time} & \textbf{offline-time} \\\hline 1 & \#user-1 & \#timestamp-1 & \#timestamp-2 \\\hline 2 & \#user-2 & \#timestamp-3 & \#timestamp-4 \\\hline 3 & \#user-2 & \#timestamp-5 & \#timestamp-6 \\\hline 4 & \#user3 & \#timestamp-7 & \#timestamp-8 \\\hline \vdots & \vdots & \vdots &\vdots\\\hline \end{tabular} \vspace{1.5mm} \caption{CDR (Call Detail Records) and DTR (Data Traffic Records) samples.} \end{figure}
注意:题注变成了图一
3.一个tabular布局多个表格
比较麻烦,但是好控制:
\begin{table*} \scriptsize \centering % \fontsize{8}{15}\selectfont %{字体尺寸}{行距} \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} \multicolumn{10}{c}{ (a).Adult} \vspace{0.5mm}%调整间距 \\\hline \multirow{2}{*}{Metrics}& \multicolumn{8}{c|}{Ours}& \multirow{2}{*}{\shortstack{ Merrer et al. \\ (DNN Only)}}\\\cline{2-9} &\multicolumn{1}{c|}{XGB}&{DT}&LR1&LR2&SVM&DNN&RF&Average&\\\cline{1-10} %在第2列到第5列下面划线 \multicolumn{1}{|c|}{Authentication Accuracy} &100.0\%&100.0\%&50.0\%&100.0\%&100.0\%&50.0\%&100.0\%&85.70\%&100.0\%\\\hline \multicolumn{1}{|c|}{Original Classification Accuracy} &86.1\%&84.5\%&82.4\%&78.6\%&77.9\% &76.5\%&85.1\%&81.6\%&85.33\%\\\hline \multicolumn{1}{|c|}{Classification Accuracy Decline} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & 0.41\%\\\hline \multicolumn{10}{c}{~}\\ % Mnist dataset \multicolumn{10}{c}{ (b).Mnist} \vspace{0.5mm}%调整间距 \\\hline \multirow{2}{*}{Metrics}& \multicolumn{8}{c|}{Ours}& \multirow{2}{*}{\shortstack{ Merrer et al. \\ (CNN Only)}}\\\cline{2-9} &\multicolumn{1}{c|}{XGB}&{DT}&LR1&LR2&SVM&DNN&RF&Average&\\\cline{1-10} %在第2列到第5列下面划线 \multicolumn{1}{|c|}{Authentication Accuracy} &100.0\%&100.0\%&50.0\%&100.0\%&100.0\%&50.0\%&100.0\%&85.7\%&100.0\%\\\hline \multicolumn{1}{|c|}{Original Classification Accuracy} &86.1\%&84.5\%&82.4\%&78.6\%&77.9\% &76.5\%&85.1\%&81.6\%&99.5\%\\\hline \multicolumn{1}{|c|}{Classification Accuracy Decline} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & 2.73\%\\\hline \multicolumn{9}{c}{~}\\ % purchase50 dataset \multicolumn{10}{c}{ (c).Purchase50} \vspace{0.5mm}%调整间距 \\\hline \multirow{2}{*}{Metrics}& \multicolumn{8}{c|}{Ours}& \multirow{2}{*}{\shortstack{ Merrer et al. \\ (CNN Only)}}\\\cline{2-9} &\multicolumn{1}{c|}{XGB}&{DT}&LR1&LR2&SVM&DNN&RF&Average&\\\cline{1-10} %在第2列到第5列下面划线 \multicolumn{1}{|c|}{Authentication Accuracy} &100.0\%&100.0\%&50.0\%&100.0\%&100.0\%&50.0\%&100.0\%&85.7\%&62.60\%\\\hline \multicolumn{1}{|c|}{Original Classification Accuracy} &86.1\%&84.5\%&82.4\%&78.6\%&77.9\% &76.5\%&85.1\%&81.6\%&87.36\%\\\hline \multicolumn{1}{|c|}{Classification Accuracy Decline} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & 3.71\%\\\hline \multicolumn{9}{c}{~}\\ % purchase100 dataset \multicolumn{10}{c}{ (d).Purchase100} \vspace{0.5mm}%调整间距 \\\hline \multirow{2}{*}{Metrics}& \multicolumn{8}{c|}{Ours}& \multirow{2}{*}{\shortstack{ Merrer et al. \\ (CNN Only)}}\\\cline{2-9} &\multicolumn{1}{c|}{XGB}&{DT}&LR1&LR2&SVM&DNN&RF&Average&\\\cline{1-10} %在第2列到第5列下面划线 \multicolumn{1}{|c|}{Authentication Accuracy} &100.0\%&100.0\%&50.0\%&100.0\%&100.0\%&50.0\%&100.0\%&85.7\%&55.0\%\\\hline \multicolumn{1}{|c|}{Original Classification Accuracy} &86.1\%&84.5\%&82.4\%&78.6\%&77.9\% &76.5\%&85.1\%&81.6\%&83.63\%\\\hline \multicolumn{1}{|c|}{Classification Accuracy Decline} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & \diagbox[dir=SW]{}{} & 3.0\%\\\hline \multicolumn{9}{c}{~}\\ \end{tabular} \label{tab1} \caption{Authentication results for multiple datasets} \end{table*}
斜线方向的设定
https://www.jianshu.com/p/f357142fc515
\begin{tabular}{|l|c|c|c|} \hline \diagbox{学科}{成绩}{姓名} & ABC & BBC & CED \\ \hline 数学 & 99 & 89 & \diagbox{ce1}{ce2} \\ \hline 化学 & \diagbox[dir=SW]{ce3}{ce4} & 67 & 82 \\ % 注意方向参数是[] \hline \end{tabular}
有时候斜线会出现不对齐的情况:
在 \diagbox 后加入[trim=l,width=16em],通过不断调整width参数,可以对齐:在这里插入代码片
调整间距
以下的命令都放在 \begin{tabular} 之前
表格段后间距调整\setlength{\baselineskip}{1.5em} % 行间距
表格段前间距调整
\setlength{\parskip}{2.0ex} % 段间距
表格列宽度的调整
\renewcommand\tabcolsep{5.0pt} % 调整表格列间的长度 可以用7mm代替5.0pt
调整表格整体宽度,这里用的时候要注意
\resizebox{\textwidth}{15mm}{ \begin{tabular}{cccccccccccc} 。。。。。。表格內容 \end{tabular}}
调整单个单元格宽度:
\begin{tabular}{| l | c | c | c || p{1.5cm} |}
插入图片
\usepackage[pdftex]{graphicx} % 设置图片文件存放路径 \graphicspath{../figures} \begin{document} % 在正文中引用图片时使用\ref In Figure \ref{fig:foo} \begin{figure} %设置对齐格式 \centering %图片居于页面中部 %指定图形大小和图形名称 \includegraphics [width=0.8,height=2.5]{foo.png} %设置标题 \caption{Foo} %设置图形引用名称 \label{fig:foo} \end{figure} \end{document}
插入pdf格式的图片:
添加包 \usepackage{graphicx}\begin{figure}[htbp] \centering \includegraphics[height=4.5cm, width=7.5cm]{pdf_file} \caption{Design} \end{figure} # 其中,pdf_file表示要插入的pdf图片文件名,不需要加后缀。
更高级的插图
插入多组图片并实现自动编号:
首先使用宏包:
\usepackage{graphicx}
\usepackage{subfigure}
竖向插入\begin{figure} \centering \subfigure[the first subfigure]{ \begin{minipage}[b]{0.2\textwidth} \includegraphics[width=1\textwidth]{fig1.eps} \\ \includegraphics[width=1\textwidth]{fig2.eps} \end{minipage}} \subfigure[the second subfigure]{ \begin{minipage}[b]{0.2\textwidth} \includegraphics[width=1\textwidth]{fig3.eps} \\ \includegraphics[width=1\textwidth]{fig4.eps} \end{minipage}} \end{figure}
横向插入
\begin{figure} \begin{minipage}[t]{0.5\linewidth} \centering \includegraphics[width=2.2in]{fig1.eps} \caption{fig1} \label{fig:side:a} \end{minipage}% \begin{minipage}[t]{0.5\linewidth} \centering\includegraphics[width=2.2in]{fig2.eps} \caption{fig2} \label{fig:side:b} \end{minipage} \end{figure}
插入占据双列的图片
\begin{figure*} \centering \subfigure[XGB]{ \includegraphics[width=5cm]{number_of_classes_0.pdf}} \subfigure[DT]{ \includegraphics[width=5cm]{number_of_classes_1.pdf}} \subfigure[LR1]{ \includegraphics[width=5cm]{number_of_classes_2.pdf}} \subfigure[LR2]{ \includegraphics[width=4cm]{number_of_classes_3.pdf}} \subfigure[SVC]{ \includegraphics[width=4cm]{number_of_classes_4.pdf}} \subfigure[DNN]{ \includegraphics[width=4cm]{number_of_classes_5.pdf}} \subfigure[RF]{ \includegraphics[width=4cm]{number_of_classes_6.pdf}} \caption{MainfigureCaption} \end{figure*}
效果:
公式
数学公式在文中的位置可分为两种: 行中公式和独立公式。
行中公式
毕达哥拉斯定理 \begin{math} x^{2}+y^{2}=z^{2} \end{math}又称勾股定理。
或
毕达哥拉斯定理 $ x^{2}+y^{2}=z^{2} $又称勾股定理。
以上两种效果是一样的。
独立公式
$$ v = v^{1}e_{1} + v^{2}e_{2} + v^{3}e_{3} = v^{i}e_{i}, i = 1,2,3 $$ 或 \begin{equation} v = v^{1}e_{1} + v^{2}e_{2} + v^{3}e_{3} = v^{i}e_{i}, i = 1,2,3 \end{equation}
注意下面的这一种会自带公式编号
引用公式\begin{equation}\label{eq:Pythagorean theorem} x^{2}+y^{2}=z^{2} \end{equation} 公式\ref{eq:Pythagorean theorem}是毕达哥拉斯定理,在中国又称勾股定理。%这里引用了
公式中插入中文
使用\mbox{}可在数学公式中插入中文。$$ \mbox{例如:} x_{1}, x_{2}, \cdots, x_{N} $$
可以换行的公式
\begin{equation} \begin{aligned} &\mathbb{E}_{ (\mathbf{x}^{i},y^{i})\sim{D_{train}}} [Uncertainty(f,\mathbf{x})] >\\ &\mathbb{E}_{ (\mathbf{x}^{i},y^{i})\sim{D_{test}}} [Uncertainty(f,\mathbf{x})] \notag % 取消自动编号 \end{aligned} \end{equation}
效果:
公式对齐
为了让第一行和第二行的公式对齐,我们使用&来对齐每一行的公式:
\begin{equation} \begin{aligned} sum &= a+b+c+d \\ sub &= a-b \end{aligned} \end{equation}
效果:
页脚注释
在正文中添加页脚注释的命令是:\footnote, 例如:
正文内容\footnote{注释内容}
也可以使用\footnotemark和\footnotetext 添加页脚注释,例如:
在这里添加页脚注释角标\footnotemark %% ... 在这里设置注释内容\footnotetext{注释内容}
枚举
先加载宏包:
\usepackage{enumitem}
有很多款式,随意选择:
\begin{enumerate}[label=(\alph*)] \item an apple \item a banana \item a carrot \item a durian \end{enumerate} \begin{enumerate}[label=(\Alph*)] % 大写 \item an apple \item a banana \item a carrot \item a durian \end{enumerate} \begin{enumerate}[label=(\roman*)] %罗马字体 \item an apple \item a banana \item a carrot \item a durian \end{enumerate}
字体与字号
可以添加在 \begin{table}后面,控制整个表格的字体。
Latex的字体由小到大分别为\tiny \scriptsize \footnotesize \small \normalsize \large \Large \LARGE \huge \Huge
例如
如果在文档局部微调某些字句的字体大小:{\tiny Hello}\\ {\scriptsize Hello}\\ {\footnotesize Hello}\\ {\small Hello}\\ {\normalsize Hello}\\ {\large Hello}\\ {\Large Hello}\\ {\LARGE Hello}\\ {\huge Hello}\\ {\Huge Hello}\\
如果需要在大范围调整,可使用\begin{}和\end{}命令。 例如:
\begin{footnotesize} The package uses new font size other than default size. \end{footnotesize}
Latex字体大小一般以pt做单位,pt是point的简写。
Latex文档字体大小的默认值\normalsize 是 10 points。\documentclass命令可以在导言区修改字体大小默认值,例如:\documentclass[12pt, letterpaper]{article}
中文排版通常使用字号,例如:五号字,六号字等。 字号与pt的关系如下所列:
\begin{tabular}{lll} \hline 七号 & 5.25pt & 1.845mm \\ 六号 & 7.875pt & 2.768mm \\ 小五号 & 9pt & 3.163mm \\ 五号 & 10.5pt & 3.69mm \\ 小四号 & 12pt & 4.2175mm \\ 四号 & 13.75pt & 4.83mm \\ 三号 & 15.75pt & 5.53mm \\ 二号 & 21pt & 7.38mm \\ 一号 & 27.5pt & 9.48mm \\ 小初号 & 36pt & 12.65mm \\ 初号 & 42pt & 14.76mm \\ \hline \end{tabular}
或者直接自己根据pt定义字体大小:
\fontsize{20pt}{24pt}百度
参考:https://blog.csdn.net/cocoonyang/article/details/78036326
https://blog.csdn.net/guifeng93/article/details/81035335
https://www.cnblogs.com/veagau/articles/11733769.html -
word使用技巧大全
2011-03-18 20:37:53四十、word 使用技巧大全 75 之一 75 巧妙控制OfficeWord中的“孤行” 75 Word中表格快速一分为二: 75 在Excel中输入人名时使用“分散对齐” 77 之二 78 1、硬回车键的使用 78 2、使同行中选定的文字垂直提升或降低... -
CSS,链接样式大全
2011-08-07 11:28:28(极小) 一般中文用不到,只要用数值就可以,单位:PX、PD 样式 {font-style: oblique;}(偏斜体) italic;(斜体) normal;(正常) 行高 {line-height: normal;}(正常) 单位:PX、PD、EM 粗细 {font-weight: bold;}(粗体)... -
C#开发典型模块大全
2014-03-12 18:11:224.3.1 获取数据表中字段的中文信息 84 4.3.2 添加数据表的查询条件 86 4.3.3 向SQL语句中添加括号 89 4.3.4 查询生成后的SQL语句 90 4.3.5 主程序获得接口信息 92 第5章 万能打印模块 5.1 设计思路 94... -
OFFICE2010使用技巧与方法大全(高级篇)
2018-12-07 11:27:50在Word中快速选择字体 1 3. 用Word实现快速隔行删除 1 4. 清除Word文档中多余的空行 2 5. 同时保存所有打开的Word文档 2 6. 巧妙设置文档保护 2 7. 编辑长文件更轻松 2 8. 取消“自作聪明”的超级链接 3 9. 巧设... -
2020易语言模块大全持续更新2.zip
2020-07-02 13:09:06枚举系统字体1.ec 果子的模块.ec 枫式热键 FS1.4 非典加强版.ec 枫影多线程模块.ec 核库函数.ec 模块.ec 模块_bmp转换为jpg.ec 模块_WinXP窗口v4.0版.ec 模块_与应用程序建立关联.ec 模块_与狡兔三窟建立关联.ec ... -
易语言模块大全(共775个模块)
2010-03-22 11:59:48取中文文本拼音首个字母(1.0).zip 取拼音首(1.0).zip 取按键名称模块(1.0).zip 取控件或窗口的标题(1.0).zip 取操作系统类别(1.0).zip 取文件对应图标(1.0).zip 取文本文件行数(1.0).zip 取易模块信息(1.0).zip 取... -
Google Android SDK开发范例大全(第3版) 1/5
2013-01-20 18:45:35正文语种: 简体中文 开本: 16 ISBN: 9787115264305 条形码: 9787115264305 商品尺寸: 26 x 18.4 x 3.8 cm 商品重量: 1.3 Kg 编辑本段 内容简介 《Google Android SDK开发范例大全(第3版)》在上一版的基础上,以... -
Google Android SDK开发范例大全(第3版) 4/5
2013-01-20 19:16:09正文语种: 简体中文 开本: 16 ISBN: 9787115264305 条形码: 9787115264305 商品尺寸: 26 x 18.4 x 3.8 cm 商品重量: 1.3 Kg 编辑本段 内容简介 《Google Android SDK开发范例大全(第3版)》在上一版的基础上,以... -
C#开发实例大全(基础卷).软件开发技术联盟(带详细书签) PDF 下载
2018-02-20 01:26:55实例088 使用正则表达式验证中文汉字输入 103 实例089 使用正则表达式验证输入字符串 104 3.7 网络验证应用技巧 105 实例090 使用正则表达式验证E-mail格式 105 实例091 使用正则表达式验证IP地址 106 实例092 使用... -
我整理的VBA 自定义函数大全 共138页
2008-11-21 16:14:03126.获取一个单元格中有指定字体颜色部份数据 127.对指定文件加XLS加密 128.选择指定范围内使用了填充颜色的单元格 129.在特定的区域内查找文本,返回值是包含查找文本的单元格 130.返回特定区域中最大值的地址 131.... -
VB编程资源大全(源码 其它3)
2007-10-18 15:06:06(25KB) 578,g020_zm019 一个拼图游戏,可以自己指定图片进行游戏(12KB) 579,g019_zm011 一个网络五子棋的源程序(并有聊天功能)(41KB) 580,g018_zm010.zip 中国象棋的源程序,支持网络作战(23KB)... -
VB编程资源大全(源码 其它1)
2007-10-18 15:20:26(25KB) 578,g020_zm019 一个拼图游戏,可以自己指定图片进行游戏(12KB) 579,g019_zm011 一个网络五子棋的源程序(并有聊天功能)(41KB) 580,g018_zm010.zip 中国象棋的源程序,支持网络作战(23KB)... -
VB编程资源大全(源码 其它2)
2007-10-18 15:18:10(25KB) 578,g020_zm019 一个拼图游戏,可以自己指定图片进行游戏(12KB) 579,g019_zm011 一个网络五子棋的源程序(并有聊天功能)(41KB) 580,g018_zm010.zip 中国象棋的源程序,支持网络作战(23KB)... -
Java开发实战1200例(第2卷)(完整版).(清华出版.李钟尉.陈丹丹).part1
2016-06-12 23:30:05注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Java开发实战1200例》分为I、II两卷共计1200个例子,包括了开发... -
the fastest in-memory index in the East 东半球最快并发索引 、知识图谱车音工作项目、自然语言生成资源大全 、中日韩分词库mecab的Python接口库、中文文本摘要/关键词提取、汉字字符特征提取器 (featurizer),...
-
《Java Web开发实战1200例(第I卷)》(清华出版.卢瀚.王春斌).part2 高清完整PDF版
2016-06-13 12:06:47注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Java Web开发实战1200例》分为I、II两卷共计1200个例子,包括了... -
中文字体新手指南.epub 中文文案排版指北.epub 云生态专刊2015年01期.epub 云计算设计模式.epub 互联网协议入门.epub 产品需求文档(PRD)的写作方法.epub 亿级Web系统搭建——单机到分布式集群 .epub 从P1到P7——我...
-
中文字体新手指南.epub 中文文案排版指北.epub 云生态专刊2015年01期.epub 云计算设计模式.epub 互联网协议入门.epub 产品需求文档(PRD)的写作方法.epub 亿级Web系统搭建——单机到分布式集群 .epub 从P1到P7——我...
-
Visual C++开发实战1200例(第1卷).(清华出版.刘锐宁.梁水.李伟明).part1
2016-06-16 01:35:39注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Visual C++开发实战1200例》分为I、II两卷共计1200个例子,包括... -
Visual C++开发实战1200例(第1卷).(清华出版.刘锐宁.梁水.李伟明).part2
2016-06-16 01:38:19注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Visual C++开发实战1200例》分为I、II两卷共计1200个例子,包括... -
ASP.NET开发实战1200例(第1卷).part2
2016-06-11 20:12:37实例190 Eval()绑定图书图片并实现单击图片进行链接 304 实例191 Eval()方法绑定日志并用“…”代替超长内容 305 实例192 双向绑定Bind()方法实现更新最新电影信息 306 实例193 绑定DataTable对象显示银行月利息及... -
ASP.NET开发实战1200例(第1卷).part1
2016-06-11 20:07:19实例190 Eval()绑定图书图片并实现单击图片进行链接 304 实例191 Eval()方法绑定日志并用“…”代替超长内容 305 实例192 双向绑定Bind()方法实现更新最新电影信息 306 实例193 绑定DataTable对象显示银行月利息及... -
ASP.NET开发实战1200例(第1卷).part3
2016-06-11 20:19:00实例190 Eval()绑定图书图片并实现单击图片进行链接 304 实例191 Eval()方法绑定日志并用“…”代替超长内容 305 实例192 双向绑定Bind()方法实现更新最新电影信息 306 实例193 绑定DataTable对象显示银行月利息及... -
C#开发实战1200例(第1卷).(清华出版.王小科.王军.扫描版).part1
2016-06-16 20:55:43注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Visual C++开发实战1200例》分为I、II两卷共计1200个例子,包括... -
C#开发实战1200例(第1卷).(清华出版.王小科.王军.扫描版).part2
2016-06-16 20:59:52注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Visual C++开发实战1200例》分为I、II两卷共计1200个例子,包括... -
C#开发实战1200例(第1卷).(清华出版.王小科.王军.扫描版).part3
2016-06-16 21:02:21注:本系列图书的第I、II卷再版时均相应改名为《xxx开发实例大全》(基础卷)及(提高卷),但内容基本无变化,需要的童鞋可自由匹配查找。 内容简介 《Visual C++开发实战1200例》分为I、II两卷共计1200个例子,包括... -
一、自定义控件大全 (一)、控件介绍 超过160个精美控件,涵盖了各种仪表盘、进度条、进度球、指南针、曲线图、标尺、温度计、导航条、导航栏,flatui、高亮按钮、滑动选择器、农历等。远超qwt集成的控件数量。 ...
-
IBM WebSphere Portal门户开发笔记01
2014-03-11 15:24:112、 火狐浏览器设置为中文 367 3、 使新配置的域名生效 367 十九、PORTAL相关 368 1、完整主机名设置 368 2、向SWF图片新闻播放器添加带有&符号的多个参数 368 3、SCHEME模式文件代码 369 4、ECLIPSE添加SVN 370 5、...
-
MySQL 索引
-
基于Qt的LibVLC开发教程
-
[JavaSE学习之旅]线程状态
-
ros_courses.zip
-
未来教育考试系统V4.0.zip
-
m3u8PC直接播放视频.zip
-
基于微信的同城小程序、校园二手交易小程序 毕业设计毕设源码使用教程
-
python 调用其他 .py 文件功能
-
监控主机基础指标配置及告警
-
长沙市税务局企业社保费划转业务培训课件(定稿103101).ppt
-
投标方法论
-
如何拥有系统化开发能力(第一部分).pdf
-
【报告分享】企业直播新观察2021-易观(附下载)
-
Shell 一键安装命令
-
json handle.zip
-
Allway Sync(稳定) .rar
-
MMM 集群部署实现 MySQL 高可用和读写分离
-
Extended-Yale-B_dataset.zip
-
S3cmd使用手册
-
MySQL DML 语言(插入、更新与删除数据)