Smartypants conversion issue with quotes

Hello, I am currently using Hugo extended version v0.121.2 for my website. I’ve noticed that the smartypants feature is converting my quotes (" or ') into curly quotes (“”). However, I do not want this behavior.

hugo.toml:

# Markup configuration
markup:
  goldmark:
    renderer:
      unsafe: true
      smartypants: false
    renderer.extensions:
      definitionList: false
      footnote: false
      linkify: false
      strikethrough: false
      table: false
      taskList: false
      typographer: true
    renderer.goldmark:
      smartypants:
        enableEmoji: true
        enableSmartypants: false

Is there a way to disable or customize the smartypants conversion for quotes in Hugo? I’ve checked the documentation, but I couldn’t find a solution.

Any help or guidance on this matter would be greatly appreciated. Thank you!

We added more config in this area at some point, see the typographer section here:

1 Like

I fix it, thank you. If someone wants to use it:

typographer:
  disable: false
  apostrophe: '''
  ellipsis: '…'
  emDash: '—'
  enDash: '–'
  rightDoubleQuote: '"'
  leftDoubleQuote: '"'
  rightSingleQuote: '''
  leftSingleQuote: '''
  rightAngleQuote: '›'
  leftAngleQuote: '‹'
1 Like

Curious. Why would you want to use an apostrophe instead of a single quote mark?

In my experience, I often use an apostrophe to show possession or contraction, and reserve a single quote mark for quoting someone or mentioning a title. It’s important to note that style conventions can differ, and personal preferences may influence the decision between them. I also use Turkish Q Keyboard, so it is easy to use single/double apostrophe.

1 Like

Yes. But in the above fix you posted, you are replacing single quotes with apostrophes…

I didn’t understand what do you mean?

I use apostrophes:

' or "

I use quote mark:

’ or ”

That’s my prefer… :slight_smile:

Single quote marks are not the same character as an apostrophe and depending on the type face may look quite different.

  apostrophe: '''
…
  rightSingleQuote: '’'
  leftSingleQuote: '‘'

There is no double apostrophe character. The characters for feet and inches or minutes and seconds are primes.

It looks like there might be some confusion regarding the terminology used for different types of quotation marks and apostrophes. Let me clarify:

  1. Single Quote (Apostrophe): This is typically used for contractions and possessives.
  • Example: 'Hello' or can't (apostrophe is used in can't)
  1. Single Right Quotation Mark: This is a different character from the apostrophe, often used for quotation within a quotation or for a single quote at the end of a quote.
  • Example: ’Hello’
  1. Double Quote: Used for quotations and speech.
  • Example: "Hello"
  1. Double Right Quotation Mark: Similar to the single right quotation mark, used for quotes within quotes or at the end of a quote.
  • Example: “Hello”

The thing is that: I want straight quotes/apostrophes, so I can use ' for both single and double quotes. This is fine to use HTML entities for these characters. When I use the “primes” then I probably take care typograpy of this. :slight_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.