Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export as PDF or HTML Wont Show the Icon #15

Open
xmarkclx opened this issue Jul 3, 2022 · 2 comments
Open

Export as PDF or HTML Wont Show the Icon #15

xmarkclx opened this issue Jul 3, 2022 · 2 comments

Comments

@xmarkclx
Copy link

xmarkclx commented Jul 3, 2022

PDF

image

HTML

image

@drank-sinatra
Copy link

I have experienced the same.

@purnasatria
Copy link

i have same experience..but i found a workaround to handle this..

admonition use FontAwesome for the icon

.admonition-icon {
    position: absolute;
    left: 1.2rem;
    font-family: "FontAwesome";
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    // font-size: 1.7rem;
    // width: 1.8rem;
    width: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    text-align: center;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;
    /* Support for Safari and Chrome. */
    text-rendering: optimizeLegibility;
    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;
    /* Support for IE. */
    font-feature-settings: 'liga';
}

for the icon to be recognized in the HTML, you can install FontAwessome font
in ubuntu you can run command

sudo apt-get install fonts-font-awesome

for the PDF, you can insert custom css setting for PDF print
see this documentation for the detail

the css will look like this

@media print {
  .admonition-icon {
    position: absolute;
    left: 1.2rem;
    font-family: "FontAwesome";
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    // font-size: 1.7rem;
    // width: 1.8rem;
    width: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    text-align: center;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    /* Support for all WebKit browsers. */
    -webkit-font-smoothing: antialiased;
    /* Support for Safari and Chrome. */
    text-rendering: optimizeLegibility;
    /* Support for Firefox. */
    -moz-osx-font-smoothing: grayscale;
    /* Support for IE. */
    font-feature-settings: 'liga';
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants