public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Smart quotes with roman, sans serif and mono fonts and LaTeX
@ 2021-09-12 17:36 R (Chandra) Chandrasekhar
       [not found] ` <74247170-9cd6-6e28-8443-b6d93c1f824f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: R (Chandra) Chandrasekhar @ 2021-09-12 17:36 UTC (permalink / raw)
  To: pandoc-discuss

I want to get smart quotes with a sans serif font with LaTeX/PDF output 
from markdown input.

The quotes I got with \textsf{"This is it."} were not paired, but two of 
the same.

My MWE, in a file named quotes.md, is:

---
mainfont: "Noto Serif"
sansfont: "Noto Sans"
monofont: "Noto Mono"
---

"This is it."

\textrm{"This is it."}

\textsf{"This is it."}

\texttt{"This is it."}

`"This is it."`

---End of MWE---

When compiled with

pandoc -f markdown -t latex --pdf-engine lualatex --output quotes.pdf 
quotes.md

I get properly paired quotes when used outside of \textrm declaration, 
but not within it.

Of course, the monofont does not have two types of quotes and so appears 
the same in both invocations.

My question is how do I get correctly paired sans serif quotes to show 
up in the PDF?

I do not want to do

\renewcommand{\familydefault}{\sfdefault}

since I wish to have the sans serif font only in selected parts of the 
output.

Thanks.

Chandra


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Smart quotes with roman, sans serif and mono fonts and LaTeX
       [not found] ` <74247170-9cd6-6e28-8443-b6d93c1f824f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2021-09-12 18:00   ` John MacFarlane
  0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2021-09-12 18:00 UTC (permalink / raw)
  To: R (Chandra) Chandrasekhar, pandoc-discuss


In a raw LaTeX context, smart quote recognition won't work.
Use unicode curly quotes inside \textsf{...}.



"R (Chandra) Chandrasekhar" <chyavana-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I want to get smart quotes with a sans serif font with LaTeX/PDF output 
> from markdown input.
>
> The quotes I got with \textsf{"This is it."} were not paired, but two of 
> the same.
>
> My MWE, in a file named quotes.md, is:
>
> ---
> mainfont: "Noto Serif"
> sansfont: "Noto Sans"
> monofont: "Noto Mono"
> ---
>
> "This is it."
>
> \textrm{"This is it."}
>
> \textsf{"This is it."}
>
> \texttt{"This is it."}
>
> `"This is it."`
>
> ---End of MWE---
>
> When compiled with
>
> pandoc -f markdown -t latex --pdf-engine lualatex --output quotes.pdf 
> quotes.md
>
> I get properly paired quotes when used outside of \textrm declaration, 
> but not within it.
>
> Of course, the monofont does not have two types of quotes and so appears 
> the same in both invocations.
>
> My question is how do I get correctly paired sans serif quotes to show 
> up in the PDF?
>
> I do not want to do
>
> \renewcommand{\familydefault}{\sfdefault}
>
> since I wish to have the sans serif font only in selected parts of the 
> output.
>
> Thanks.
>
> Chandra
>
> -- 
> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/74247170-9cd6-6e28-8443-b6d93c1f824f%40gmail.com.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-12 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 17:36 Smart quotes with roman, sans serif and mono fonts and LaTeX R (Chandra) Chandrasekhar
     [not found] ` <74247170-9cd6-6e28-8443-b6d93c1f824f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2021-09-12 18:00   ` John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).