LaTeX技巧016:使用第三方字体时的路径设置问题

LaTeX技巧001:ctex下使用其他中文字体 前言  使用XeLaTex来写中文的文档是十分方便的,它提供了几种默认的字体来供我们使用,但是Windows下还有不少十分漂亮的字体,如华文行楷等。如果我们要使用华文行楷这类不在定义好的字体中,那么该怎么办的?百度了一下,找到一个可以运行的解决方案,下面就简单说一下。第一步:找到字体   要想使用字体,那么就要看自己的计算机里是不是有这样的字体,如果没有那么什么都是空谈。首先在命令窗口执行下载的命 阅读详情

使用LaTeX的ctex宏包时,因为默认支持的字体少,如果我们想使用各种第三方字体,但是 又不知道应该把字体放在哪个文件夹下,那么可以把字体放在当前项目的文件夹下,如下图所示:




将字体和main.tex放在了同一个文件夹下,然后来看一下具体代码:

\documentclass{article}
\usepackage[nofonts]{ctex}
\setCJKmainfont{maobi.ttf}
\begin{document} 
开始的开始,我们都是孩子。最后的最后,渴望变成天使。 
\end{document}

这样运行是没有问题的。但是,我想新建一个fonts文件夹,然后把字体文件放入fonts文件夹下,然后把代码改成如下所示:

\documentclass{article}
\usepackage[nofonts]{ctex}
\setCJKmainfont{fonts/maobi.ttf}
Latex在VSCODE中编译中文,使用中文路径问题解决 latex 编译中文和中文路径 问题1编译中文 \documentclass{article} \usepackage{CTEX} \begin{document} 这是一个CTEX的utf-8编码例子,{\kaishu 这里是楷体显示},{\songti 这里是宋体显示},{\heiti 这里是黑体显示},{\fangsong 这里是仿宋显示}。 \end{document} 如上代码需要使用xelatex进行编译,编译结果 如果使用latexmk,就会出现如下报错 我们应该作如下操作进行xelat 阅读详情

相关推荐

C语言——预处理指令

return 0;这里是可以编译通过的,运行结果也是对的:;;return 0;这里编译器会报错:这里是有语法错误的。在C语言中,#include是一个预处理指令,用于将一个源文件的内容插入到另一个源文件中。这通常用于包含标准库或自定义库的头文件,以便在程序中使用这些库中定义的函数、类型和宏。#include或:用于包含标准库头文件。查找策略是,编译器会在标准库头文件目录中查找这些文件。:用于包含用户自定义的头文件。

Stewie Lee的博客 3195

Linux 使用rm -rf /*命令后,恢复系统方法

Linux 使用rm -rf /*命令后,恢复系统方法 个人学习记录 这里实验环境采用的是radhel7.1的版本: 个人认为核心就是缺失什么组件,就从别的地方复制什么组件过来,先把系统拉起来,再慢慢恢复配置 进入救援模式 1、将/dev/sda两个分区分别挂载看看,里面的内容,有内容的就是根存在的分区 2、ifconfig eno16777777 192.168.8.2 3、从另外一台一样系统的根 。用 tar打包,一个个文件夹拷贝过来 4、到坏系统,scp另外一个系统的etc.tar.gz 5

weixin_43603476的博客 1万+

【大模型】MHA,MQA,GQA及KV Cache详解

在自回归模型中(Autoregressive Models),模型会逐个生成文本的每个token,这个过程可能比较慢,因为模型一次只能生成一个token,而且每次新的预测都依赖于之前的上下文。这意味着,要预测第1000个token,你需要用到前999个token的信息,这通常涉及到对这些token的表示进行一系列矩阵乘法运算。而要预测第1001个token,你不仅需要前999个token的信息,还要加上第1000个token的信息。

酒酿小圆子呀~ 2625

控制台模拟前端请求实现快速刷网课时长

本教程仅用于学习前端技术和网页开发,旨在提供教育与技术指导。对于任何未经授权或违反规定的使用行为,本人不承担任何责任。注意到那个serive后面有timestamp时间戳,暗示它很可能就是每30秒汇报一次进度和播放时长的命令,我们右键——复制——复制为fetch。有的网站上的网课需要的不仅仅是进度,而是时长,所以倍速插件失效,但我们可以使用控制台命令来模拟请求实现快速刷网课时长。尝试修改即可,例如我修改time为800,然后复制粘贴到控制台执行。播放视频,等待前端请求出现,然后复制前端请求为fetch。

m0_74823408的博客 2082

从传感器到执行-智能家居 Agent 的感知-决策-执行闭环

本文提出了一种面向智能家居的感知型Agent架构,通过"感知-决策-执行"的闭环系统实现智能化控制。感知模块整合多源传感器数据,决策模块基于规则或机器学习模型生成控制策略,执行模块完成设备操作。系统能够实时监测环境参数和用户状态,自动调节温度、照明等设备,提升家居舒适度。该架构可扩展为多模态感知与强化学习相结合的智能系统,为智慧家居发展提供技术基础。

一键难忘的博客 1130

python点云可视化

Python三种点云可视化方案:mayavi、matplotlib、CloudCompare。

叶子的博客 1万+

ZYNQ Petalinux编译系统启动文件实战指南

本文提出的混合编译加速方案实测可将编译时间从45分钟缩短至18分钟,QSPI双启动方案已在工业控制领域成功应用。Xilinx官方UG1144文档(最新v2023.1版)正点原子《ZYNQ嵌入式开发实战》开源项目Meta-Petalinux(GitHub趋势项目)未来展望:随着Versal平台的普及,Petalinux将支持更多AI加速器原生驱动,值得持续关注。

QQ_778132974的博客 818

【python爬虫--爬取电商商品及对其销量、好差评等数据进行分析】Python爬虫爬取电商商品及大数据分析-实战

选择目标电商网站:这里选择爬取两个不同电商网站(比如京东、淘宝)上的商品数据,包括商品名称、价格、销量和评价信息。编写爬虫:通过爬虫获取商品信息并保存数据。数据清洗与对齐:将两个电商网站抓取到的数据进行统一清洗和对齐。数据分析:进行销量分析、好评与差评分析等。

Dreams°的博客 4018

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

上一篇: LaTeX技巧015:设置表格的宽度和高度
下一篇: 印象笔记支持MarkDown语法
潘建成
博客等级 码龄12年 139粉丝 120原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址