I'm using Twenty Seconds Resume template in overleaf https://www.overleaf.com/latex/templates/twenty-seconds-resume-slash-cv/mhyfwrmwjkbc

But I met a problem and I can't solve it after trying for long time.

I wanted to make it support Chinese so I added below in twentysecondcv.cls and changed complier to xeLatex

\setCJKmainfont{AR PL KaitiM Big5}

This setting made me successfully seeing Maderin in the compiled file. But then, I want to using Arial in English(the default setting for xeLatex seems to be Times or something similar) So I modified to this

\setCJKmainfont{AR PL KaitiM Big5}

But there is no any changes. I tried to using my own font file like

\setCJKmainfont{AR PL KaitiM Big5}

Still not working.

Anyone with similar experiences can help me? Thanks in advance.


This is because the .cls file loads \RequirePackage[T1]{fontenc} which is not compatible with XeLaTeX (more details here). However rather than editing the .cls file to comment out this line (it's usually not recommended to modify .cls and .sty files directly), you can add these lines in the preamble of your .tex file instead:

\usepackage[TU]{fontenc} %% <---- THIS
\setCJKmainfont{AR PL KaitiM Big5}
  • thank you for your help! Could you tell me which compiler you use in this demo? I tried copy-paste your demo to mine (my demo: link )but the English font doesn't look like yours. – Jiahua Apr 20 '19 at 10:15
  • I'm using XeLaTeX. It may be that your project uses an older TeX Live distribution so the compiling behaviour is different. Could you try cloning your project? That would make your project use a newer TL distribution on Overleaf. Alternatively if you prefer, you can message support@overleaf.com with your project's ID. We can then switch the TL distribution for you (I'm a support personnel at Overleaf). – imnothere Apr 20 '19 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.