我使用的是网上找到的简历模板,但无法显示一小段中文字符(公司名称)。我尝试过使用 CJKutf8 和 xeCJK,但都没有成功。
以下是实际简历的序言:
% !TEX TS-program = XeLaTeX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Wilson Resume/CV
% XeLaTeX Template
% Version 1.0 (22/1/2015)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Howard Wilson (https://github.com/watsonbox/cv_template_2004) with
% extensive modifications by Vel ([email protected])
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\documentclass[10pt]{article} % Default font size
\usepackage{fontspec}
\input{structure.tex} % Include the file specifying document layout
%----------------------------------------------------------------------------------------
\begin{document}
该structure.tex
文件的序言如下:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Wilson Resume/CV
% Structure Specification File
% Version 1.0 (22/1/2015)
%
% This file has been downloaded from:
% http://www.LaTeXTemplates.com
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage[a4paper, hmargin=25mm, vmargin=30mm, top=20mm]{geometry} % Use A4 paper and set margins
\usepackage{fancyhdr} % Customize the header and footer
\usepackage{lastpage} % Required for calculating the number of pages in the document
\usepackage{hyperref} % Colors for links, text and headings
\setcounter{secnumdepth}{0} % Suppress section numbering
% \usepackage{CJKutf8} <-- **failed prior attempt using \zh{zh-characters}**
% \newcommand{\zh}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}} <-- **\zh{}**
\usepackage{xeCJK}
\fontspec{~/Desktop/SimSun.ttf}
%\usepackage[proportional,scaled=1.064]{erewhon} % Use the Erewhon font
%\usepackage[erewhon,vvarbb,bigdelims]{newtxmath} % Use the Erewhon font
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage{fontspec} % Required for specification of custom fonts
\setmainfont[Path = ./fonts/,
Extension = .otf,
BoldFont = Erewhon-Bold,
ItalicFont = Erewhon-Italic,
BoldItalicFont = Erewhon-BoldItalic,
SmallCapsFeatures = {Letters = SmallCaps}
]{Erewhon-Regular}
我实际上想要渲染的字符部分是:
\job
{xxx 20xx -}{Present}
{xxx (百度), xxx}
{http://www.baidu.com/}
{xxx xxx}
{xxx_details_xxx \\
\rule{0mm}{5mm}\textbf{Concepts and technologies:} xxx}
自包含示例(包含使用 CJKutf8 的失败尝试):
% !TEX TS-program = XeLaTeX
\documentclass[10pt]{article}
\usepackage{CJKutf8}
\newcommand{\zh}[1]{\begin{CJK}{UTF8}{gbsn}#1\end{CJK}}
\newcommand{\job}[6]{
\begin{tabbing}
\hspace{2cm} \= \kill
\textbf{#1} \> \href{#4}{#3} \\
\textbf{#2} \>\+ \textit{#5} \\
\begin{minipage}{\smallertextwidth}
\vspace{2mm}
#6
\end{minipage}
\end{tabbing}
\vspace{2mm}
}
\begin{document}
\section{Work Experience}
\job
{xxx 20xx -}{Present}
{xxx (百度), xxx}
{http://www.baidu.com/}
{xxx xxx}
{xxx_details_xxx \\
\rule{0mm}{5mm}\textbf{Concepts and technologies:} xxx}
\end{document}
抱歉,如果这里有很多内容没有帮助;我对 LaTeX 还比较陌生,但仍在努力精通(就相关内容而言):)