Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

部分外国人名里的符号不支持 #54

Open
Enorsee opened this issue Mar 19, 2023 · 5 comments
Open

部分外国人名里的符号不支持 #54

Enorsee opened this issue Mar 19, 2023 · 5 comments

Comments

@Enorsee
Copy link

Enorsee commented Mar 19, 2023

在我的机器上,有一些外国人名里的符号可以支持,比如:Ä Å ã À;有一些符号不能支持,显示乱码,比如:ą ż ā ŏ。

不知道这个是什么原因呢?

@liubenyuan
Copy link
Owner

我没处理过这类符号,
xelatex若是字体支持应该可以直接输入。你看下下面两个例子在你论文中输出什么?

  1. https://latex.org/forum/viewtopic.php?t=28575
  2. https://tex.stackexchange.com/questions/131483/berenis-and-%C4%99-%C4%85-letters

@hushidong
Copy link
Collaborator

用biber是可以的。

比如:


% !Mode:: "TeX:UTF-8"
% 用于测试gb7714-2015样式文献表中数字标签的格式
% 测试gbpunctin选项
\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage[top=10pt,bottom=10pt,left=1cm,right=1cm,paperheight=6cm]{geometry}
\usepackage{xcolor}
\usepackage[CJKbookmarks,colorlinks,bookmarksnumbered=true,pdfstartview=FitH,linkcolor=blue]{hyperref}
\usepackage[backend=biber,style=gb7714-2015,gbnamefmt=lowercase]{biblatex}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{mocap_gear_price,
title = {High Quality Mocap for a Fraction of the Cost},
howpublished= {\url{https://nofilmschool.com/rokoko-review-high-quality-mocap-fraction-cost#:~:text=The%20Rokoko%20Smartsuit%20fills%20an,usually%20cost%20upwards%20of%20%2415%2C000.}
},
year={2019}
}

@Inproceedings{ref-replace-char,
  Title                    = {Cognitive Radio and Cooperative Strategies for Power Saving in Multi-Standard Wireless Devices},
  Address                  = {Florence, Italy},
  Author                   = {Rodriguez, J. and P. Marques and A. Radwan and K. Moessner and R. Tafazolli and others},
  Booktitle                = {Future % Network & Mobile # Summit 2010},
  Date                     = {June 2010}
}

@incollection{article3,
  author =   {Sally Scribe and ÄÅãÀ, G and Àążāŏ, S},
  title =    {title},
  abstract =  {40–110 µm % Network & Mobile # Summit 2010},
  pages =    {1--20},
}



@inproceedings{savingface_paper,
author = {Camilo Rojas and Niels Poulsen and Mileva Van Tuyl and Daniel Vargas and Zipporah Cohen and Joseph A. Paradiso and Pattie Maes and Kevin M Esvelt and Fadel Adib},
title = {A Scalable Solution for Signaling Face Touches to Reduce the Spread of Surface-based Pathogens},
booktitle = {Proceedings of the 2021 ACM International Joint Conference on Pervasive and Ubiquitous Computing},
series = {UbiComp '21},
year = {2021},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {activity recognition, magnetic, sensor, wearable device}
}

\end{filecontents}
\addbibresource{\jobname.bib}
\renewcommand{\bibfont}{\zihao{-5}}
%\setlength{\bibitemsep}{0ex}
%\setlength{\bibnamesep}{0ex}
%\setlength{\bibinitsep}{0ex}

\begin{document}

%\section{测试gb7714-2015样式文献表中数字标签的格式}

\nocite{*}

\printbibliography[heading=none]
\end{document} 

结果为:
图片

@Enorsee
Copy link
Author

Enorsee commented Mar 20, 2023

我没处理过这类符号, xelatex若是字体支持应该可以直接输入。你看下下面两个例子在你论文中输出什么?

  1. https://latex.org/forum/viewtopic.php?t=28575
  2. https://tex.stackexchange.com/questions/131483/berenis-and-%C4%99-%C4%85-letters

本源哥好!xelatex默认的字体是支持所有西文符号的,所以使用xelatex默认字体在我本地输出没有问题。

但是我的毕业论文里documentclass加的字体选项是 fz,跟踪 nudtpaper.cls 发现 fz 选项使用的正文字体(setmainfont)、无衬线字体(setsansfont)和等宽字体(setmonofont)分别是Times New Roman PS Std、Arial 和 Courier New。我在本地机器上(Mac && Windows)打开了这些字体文件,发现都是只有 Ä Å ã À 符号,没有 ą ż ā ŏ 符号,所以会在论文中显示如下所示乱码:
Snipaste_2023-03-20_09-38-54

本地字体文件(Times New Roman PS Std)支持的特殊符号如下:
Snipaste_2023-03-20_09-45-35

其他两类字体文件也一样。

@Enorsee
Copy link
Author

Enorsee commented Mar 20, 2023

@hushidong 您好,这段代码在我本地可成功编译,但是无法预览 pdf 文件,显示:

Failed to find file: C:/.../texstudio_hDLSEf.pdf; perhaps it has been deleted

如果您在 document class 选项中加入 nudtpaper 项目的字体选项,如 fzotf 等,应该也有类似的问题,可参考我上一条评论。

@hushidong
Copy link
Collaborator

先从最简单的例子开始,就是用我上面的这个例子,先把它搞定了再说其它的。

你说没有pdf显示,显然是没有成功编译的,所以你要先把这个问题解决,再去讨论字体的问题。

而这个小例子的编译,是要用biber的,所以你是否已经设置了用biber编译参考文献?

有错误的时候最好用命令行看到底存在什么问题?用texstudio不能显式的给出log。

你直接用命令行:

xelatex a.TEX
biber a
xelatex a.TEX

看看,是否能正常显示。

然后再用同样的编译方式来考察nudtpaper的编译,是否正常?

若不正常,再看看字体的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants