Code Monkey home page Code Monkey logo

Comments (3)

Witiko avatar Witiko commented on September 13, 2024

Hello,

double asterisks / underscores mark up strong emphasis. This markup is purely logical and does not need to be rendered using a bold font face. In fact, these are the default LaTeX renderers for emphasis (single asterisks / underscores) and strong emphasis defined by the package:

emphasis = {\emph{#1}},
strongEmphasis = {%
    \ifx\alert\undefined
        \textbf{\emph{#1}}%
    \else % Beamer support
        \alert{\emph{#1}}%
    \fi},

If you are dissatisfied with the default strong empasis renderer, you may redefine it to just switch to the bold font face:

\markdownSetup{
    renderers = {
        strongEmphasis = {\textbf{#1}},
    }
}

Cheers

from markdown.

Witiko avatar Witiko commented on September 13, 2024

You may even set up a more intricate behaviour that switches between the bold and medium font faces when you **nest__the**strong**emphasis__**:

\newif\ifnestedstrong
\nestedstrongfalse
\markdownSetup{
    renderers = {
        strongEmphasis = {%
          \ifnestedstrong
              \nestedstrongfalse
              \textmd{#1}%
              \nestedstrongtrue
          \else
              \nestedstrongtrue
              \textbf{#1}%            
              \nestedstrongfalse
          \fi
        },
    }
}

Perhaps I should use something similar as the default renderer for the strong emphasis, since it is closer to the behavior one would expect and more in line with how \emph behaves in most document classes. This is why you should redefine the renderers that you expect to render in a specific manner, since the defaults are subject to change. The package manual is clear on that point, although I try to keep such changes to a minimum.

from markdown.

jendas1 avatar jendas1 commented on September 13, 2024

Thank you for a clarification. I was just confused when I tried basics of markup and got "wrong" result (different visualisation than I expected). I thing that your proposed solution is much better because people familiar with markdown would expect bold as a strongEmphasis rather than with italics as well.

from markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.