pandoc.exe my-latex-doc.md -t latex -o my-latex-doc.tex --standalone
and edit the tex file to add these:
\usepackage[left=1.5cm, right=2cm, top=2cm]{geometry}
\usepackage{fontspec}\setmainfont[]{Arial}
and do xelatex.exe my-latex-doc.tex
The tex file is compiled without any errors.
The resulting PDF displays the changes made to the margins but it doesn't display the Arial font. Here is the resulting PDF:
I've tried compiling with the lualatex.exe, too but the result's the same i.e. it gets compiled fine but it doesn't display the Arial font. (I 've first tried using pdflatex, but it turned out that it wasn't capable of compiling fontspec)
The complete tex file in full:
Code: Select all
% Options for packages loaded elsewhere\PassOptionsToPackage{unicode}{hyperref}\PassOptionsToPackage{hyphens}{url}%\documentclass[a4paper,12pt]{article}% -------------------------------------------\usepackage[left=1.5cm, right=2cm, top=2cm]{geometry}% \usepackage[T1]{fontenc}% \usepackage{charter}\usepackage{fontspec}\setmainfont[]{Arial}% \setmainfont{texgyretermes-regular.otf}[% BoldFont=texgyretermes-bold.otf,% ItalicFont=texgyretermes-italic.otf]% --------------------------------------------\usepackage{amsmath,amssymb}\usepackage{lmodern}\usepackage{iftex}\ifPDFTeX\usepackage[T1]{fontenc}\usepackage[utf8]{inputenc}\usepackage{textcomp} % provide euro and other symbols\else % if luatex or xetex\usepackage{unicode-math}\defaultfontfeatures{Scale=MatchLowercase}\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}\fi% Use upquote if available, for straight quotes in verbatim environments\IfFileExists{upquote.sty}{\usepackage{upquote}}{}\IfFileExists{microtype.sty}{% use microtype if available\usepackage[]{microtype}\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts}{}\makeatletter\@ifundefined{KOMAClassName}{% if non-KOMA class\IfFileExists{parskip.sty}{%\usepackage{parskip}
How to edit the tex file or any other thing so that the PDF displays the desired font, Arial or any other font?