Ah thanks for the correction. Indeed, I used -V mainfont and I received the following error message. I thought that that was because the DejaVu Serif font was not installed and so I tried to install the font but still having the same message, so I thought maybe the command line was wrong. In any case, this was the error message I got:

---
PS C:\Users\***>  pandoc test.txt -s -o test.pdf -V mainfont="DejaVu Serif" --pdf-engine=xelatex -C --bibliography=library.bib --number-sections 

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\***\AppData\Local\MiKTeX\miktex\log\miktex-makemf.log
Couldn't open `DejaVu Ser.cfg'

hbf2gf (CJK ver. 4.8.4)


Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\***\AppData\Local\MiKTeX\miktex\log\miktex-maketfm.log

Sorry, but miktex-makemf did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\***\AppData\Local\MiKTeX\miktex\log\miktex-makemf.log
Couldn't open `DejaVu Ser.cfg'

hbf2gf (CJK ver. 4.8.4)


Sorry, but miktex-maketfm did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  C:\Users\***\AppData\Local\MiKTeX\miktex\log\miktex-maketfm.log
Error producing PDF.
! Package fontspec Error: The font "DejaVu Serif" cannot be found.

For immediate help type H <return>.
 ...

l.21 \fi

---

On Tue, Nov 16, 2021 at 5:04 PM amph...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <amphiboly-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
If indeed that was your command line, you should try again with -V mainfont instead of -V --mainfont.

On Tuesday, November 16, 2021 at 3:26:41 PM UTC-5 kcho17-KQhtac8ZjM8@public.gmane.org wrote:
Hmm I am still getting the same error message:

My command line was :
pandoc test.txt -s -o test.pdf -V --mainfont="DejaVu Serif" --pdf-engine=xelatex -C --bibliography=library.bib --number-sections 

And this was the error message : 

[WARNING] Missing character: There is no ??pandoc.exe: <stderr>: hPutChar: invalid argument (Invalid argument)
On Tuesday, November 16, 2021 at 10:40:38 AM UTC-6 John MacFarlane wrote:

Try adding

-V mainfont="DejaVu Serif"

assuming you have the DejaVu Serif font installed -- otherwise
pick a font that has the Greek glyphs.


Kyoungmin Cho <kch...-KQhtac8ZjM8@public.gmane.org> writes:

> This is my command line:
>
> pandoc test.txt -s -o test.pdf --pdf-engine=xelatex -C
> --bibliography=library.bib --number-sections
>
>
>
> On Tue, Nov 16, 2021 at 5:05 AM <denis...@unibe.ch> wrote:
>
>> Are you using pdflatex, xelatex or lualatex?
>>
>>
>>
>> Then, with latex-related errors it’s always helpful to export to a latex
>> document first, and run latex from there.
>>
>>
>>
>> Denis
>>
>>
>>
>> *Von:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> *Im
>> Auftrag von *Leonard Rosenthol
>> *Gesendet:* Dienstag, 16. November 2021 08:03
>> *An:* pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>> *Betreff:* Re: Ancient Greek in PDF output
>>
>>
>>
>> What is the command line that you are passing to pandoc?
>>
>>
>>
>> My guess, offhand, is that you are trying to typeset that character in a
>> font that doesn't have that glyph.
>>
>>
>>
>> Leonard
>>
>>
>>
>> On Tue, Nov 16, 2021 at 1:30 AM Kyoungmin Cho <kch...-KQhtac8ZjM8@public.gmane.org> wrote:
>>
>> Ah sorry. This is what I've received:
>>
>>
>>
>> [WARNING] Missing character: There is no ??pandoc.exe: <stderr>: hPutChar:
>> invalid argument (Invalid argument)
>>
>>
>>
>> Best,
>> Kay
>>
>>
>>
>> On Mon, Nov 15, 2021 at 11:59 PM Leonard Rosenthol <leon...-bM6h3K5UM15l57MIdRCFDg@public.gmane.org>
>> wrote:
>>
>> what kind of error message, from what operation in pandoc?
>>
>>
>>
>> Leonard
>>
>>
>>
>> On Tue, Nov 16, 2021 at 12:45 AM kch...@uic.edu <kch...-KQhtac8ZjM8@public.gmane.org> wrote:
>>
>> Dear all,
>>
>>
>>
>> I just would like to write φ and ψ for pdf output, but I keep receving
>> error message. Is there any way I can use those letters for pdf output?
>>
>>
>>
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/3c752d83-c1df-4209-ac11-b33d1df2ab3dn%40googlegroups.com
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpandoc-discuss%2F3c752d83-c1df-4209-ac11-b33d1df2ab3dn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007248025%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=gC6JUwcZwlN4rd7p4R5rZrVvLOuYdnrb5XG1uKXpCxA%3D&reserved=0>
>> .
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "pandoc-discuss" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/pandoc-discuss/LYHhCuDoLKc/unsubscribe
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Ftopic%2Fpandoc-discuss%2FLYHhCuDoLKc%2Funsubscribe&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007248025%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=8LLVY1kUY6XYJUY41x9G2ERGNG1aWLW3opGkrAAUVmk%3D&reserved=0>
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CALu%3Dv3%2BjY6y7PcTERy-L_ov8Hcs7HtVtnLHWdjdmjW7bHHLyXA%40mail.gmail.com
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpandoc-discuss%2FCALu%253Dv3%252BjY6y7PcTERy-L_ov8Hcs7HtVtnLHWdjdmjW7bHHLyXA%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007258017%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QvpzVaXdb%2BTul0ihpMHXGp2g7E9QeSERHlFuhnw%2Fffw%3D&reserved=0>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CAAXeR7mwiqfTfen-R4q4fiQoAkoSLuOOLzP-CpPnhoaewxXySA%40mail.gmail.com
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpandoc-discuss%2FCAAXeR7mwiqfTfen-R4q4fiQoAkoSLuOOLzP-CpPnhoaewxXySA%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007258017%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=s5H3c%2FKn21YWXWuHYoDALxtF48PKZFRVxiXIIyUs6qw%3D&reserved=0>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "pandoc-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/CALu%3Dv3LKyBHgf3qwBMzcvg8Sv9J9A0N-fni0z%3D3sCuoKCzYAWw%40mail.gmail.com
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpandoc-discuss%2FCALu%253Dv3LKyBHgf3qwBMzcvg8Sv9J9A0N-fni0z%253D3sCuoKCzYAWw%2540mail.gmail.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007268015%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=rW3izM%2FtBgegjvAwlF4MBE0oe85zYKb%2BJT4l38YLPvM%3D&reserved=0>
>> .
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "pandoc-discuss" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/pandoc-discuss/LYHhCuDoLKc/unsubscribe
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Ftopic%2Fpandoc-discuss%2FLYHhCuDoLKc%2Funsubscribe&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007278007%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=RV8g%2B%2BHNsnPVmAwWxBbBp7jKlIvToOcYIZg%2BPdeAr0c%3D&reserved=0>
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/f0a591f236654b9981faf8854708e1d6%40unibe.ch
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fpandoc-discuss%2Ff0a591f236654b9981faf8854708e1d6%2540unibe.ch%3Futm_medium%3Demail%26utm_source%3Dfooter&data=04%7C01%7Ckcho17%40groute.uic.edu%7C4d96b136bd50472d4c9408d9a8f0b8ec%7Ce202cd477a564baa99e3e3b71a7c77dd%7C0%7C0%7C637726575007278007%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2Ba%2Bep%2BO16GAspmkZIVgqOB5ewh6AB97zIlVu3tsD278%3D&reserved=0>
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAAXeR7nF_sHgnZq3OvT4fhx4Tv-PKQF1Ee-2MHxmb36dPZ5nKQ%40mail.gmail.com.

--
You received this message because you are subscribed to a topic in the Google Groups "pandoc-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pandoc-discuss/LYHhCuDoLKc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/c6359c88-b059-43d6-9e20-14a3dcfdb94dn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAAXeR7%3D_0UNPzW1-7vVgn5spJ81JSpZqSD6j%2B7C3OKOSVHeWwQ%40mail.gmail.com.