Jekyll + Jemoji : How to config emoji size? - jekyll

I am using Jekyll / jemoji on Github Pages.
When I wrote a markdown document as follows ..
* :tada: sample emoji markdown
.., it was rendered like this.
<li>::marker
<img class="emoji" title=":tada" alt=":tada:" src= ... height="20" width="20">
" sample emoji markdown"
</li>
This image height & width always have same values ( height="20", width="20).
Sometimes I felt this emoji size is too small but I couldn't find any document about how to config "jemoji" ( and I don't know any Ruby language)
What I want to know are like these
How to config default emoji height and width
How to config inline custom values for emoji height and width within markdown document

I found a solution from another plugin.
I changed the plugin of emoji processing from jemoji to jekyll-spaceship.
It seems that jemoji influenced Jekyll-spaceship plugin; they are using same example as follows.
I give this plugin two :+1:!
Anyway, I tested the following markdown expression with jekyll-spaceship.
* I give this plugin two :+1:!
This is rendered like this.
<li>
::marker
"I give this plugin two"
<img class= "emoji" title=":+1:" alt=":+1:" raw="<emoji>" src=... style=" ..., max-width: 1em; ...", onload=".." onerror="...">
"!"
</li>
The image max-width attribute is not an absolute value !!
This shows me the width can be changed by its font size.
In this case the default setting of size attribute doesn't matter anymore.
I need to find how to set custom size of emoji when it is needed
So I tested the following markdown expression for the 'custom emoji size` and it looks like I found the solution.
### 8. Emoji Usage :+1:
* I give this plugin two :+1:!
<style>
.emoji-big-size img {font-size: 4rem;}
</style>
{: .emoji-big-size}
* I give this plugin two :+1:!
My browser show me the following result.

Related

Display image inline using Doxygen

I'm using Doxygen to generate an html user manual from markdown files. I'd like to give instructions such as "Click on the [image.png] button" and have the png image appear in the line of text in the generated html.
According to Doxygen's documentation, images can be added as follows:
\image['{'[option]'}'] <format> <file> ["caption"] [<sizeindication>=<size>]
The documentation also says that "Currently only the option inline is supported. In case the option inline is specified the image is placed "in the line", when a caption s present it is shown in HTML as tooltip (ignored for the other formats)." This sounds like what I want to do.
I've tried several variations of the \image command with no luck. These successfully produce an image, but on its own line:
!["caption"](image.png)
\image html image.png "caption"
and these commands fail:
\image inline html image.png "caption"
\image{inline} html image.png "caption"
Does anyone know if it's possible to do what I'm trying to achieve? Am I just getting the syntax wrong?
The {inline} option with the \image command is introduced in version 1.8.15
The version:
\image{inline} html image.png "caption"
does work in 1.8.15.
OP used an older version and will have got warnings like:
warning: image type inline specified as the first argument of inline
is not valid warning: expected whitespace after { command
I was having this problem too. This line fixed it for me:
\image html name.png width=800cm height=600cm

What does this sign "" mean ? content:""

So I was casually looking in inspect element, to try to gather an image from a webpage (https://forsvaret.no/karriere/forstegangstjeneste). The creator of the page had linked to the image through the css ::before selector using content: ""; does anyone know what “” this sign means, and why it have been used ?
This is the Css:
.iconForsvaret-fighter::before {
content: "";
}
And the Html:
<ul>
<li><a href="/karriere/forstegangstjeneste/muligheter/........">
<span class="iconForsvaret-tank"></span>
<span>Hæren</span></a></li>
</ul>
Thanks ..
It is the non-printable character symbol. It is used when you are trying to display a character that is not available in the font being used to render the text.
Most likely that specific character is in the range of Unicode reserved for private use and that there is some code which sets the font for that pseudo-element to one which has a font with characters defined in that range.
"" usually indicates a unicode character that your browser cannot display. It might very well be some sort of emoji from an iphone that your operating system hasn't implemented yet.
Usually upgrading your OS to the latest version fixes those issues.
"" means your font file is missing. when you link you font then show exact font.

CSS & HTML: My image is not appearing

I've just been teaching my self HTML & CSS and I'm running into my first annoying bug.
Here is my code:
http://pastebin.com/Rk6TjqKZ
It's the only image I have on it so far, and it used to appear, but ever since adding a class to the
I also need help positioning my buttons.
You have the source of the image as
imgur.com/xNiamwg
but this is a web page - you need the source to be the actual image itself:
http://i.imgur.com/xNiamwg.png
(note the PNG extension - not all images have an extension, as it isn't strictly necessary, but they usually do.)
Additionally, you have a semicolon after your source attribute - attributes should only be separated by whitespace.
An example of working code:
<img src="http://i.imgur.com/xNiamwg.png" title="Hosted by imgur.com" />

Font style doesn't work on front end

I have an admin panel -developed by me- (where tinymce and textarea are placed) and the frontend (where I output the text saved in the database submited with tinymce).
The problem is with the frontend font style (size, align, family, style) doesn't work. I viewed the output source file and I saw undefined CSS Rules, like: <span class='italic'>MY TEXT</span> or <p class='textleft'>MY TEXT 2</p>.
Am I need to include in the header tinymce CSS files? Or, am I need to write it my self ( .italic { font-style:italic !important; } )?
Use the content_css configuration setting of tinymce to include custom css styles into your editor instance.

sphinx, restructuredtext: set color for a single word

Is there a way to set the color of single words (or characters) in sphinx? I'm pretty sure there should be some markup tag, like HTML's font tag.
On my Sphinx-powered website, I use a combination of:
A restructuredText file containing roles definitions, one for each color - see .special.rst (BitBucket link)
A CSS file containing color rules for each role - see the first lines of hacks.css (BitBucket link)
Then, in every rST file where I need colors, I first import .special.rst at the top, either manually:
.. include:: .special.rst
Or with the rst_epilog configuration variable in Sphinx's conf.py file:
rst_epilog = "\n.. include:: .special.rst\n"
And then each role can be used easily in pure rST syntax:
This is :red:`red !` And :blue:`this part is blue`.
More details are given on this page (in French, sorry).
It works perfectly well for html output (and html-like), but not for PDF. Refer to the first answer above for producing a PDF with colors.
If you want to do this without being tied to html, try applying a different style than normal body text to your word.
In this example adapted from the rst2pdf manual, I apply the existing rubric style which is red in the backend that I am using:
Before red.
.. role:: rubric
I like color :rubric:`rubric`.
After red.
The actual look of the word will depend on how the style you choose is defined in the stylesheet that you use when generating your document.
If you want blue text, make a blue text style and derive it from the normal text style.
The stylsheet is backend-specific and you may be using the default.
To print the default for rst2pdf.py, do this (from the rst2pdf manual):
rst2pdf --print-stylesheet
Continuing the example for a rst2pdf stylesheet, add this to your stylesheet to have a blue text style:
bluetext:
parent: bodytext
textColor: blue
In the document you can reference this style to get a blue word.
Note this bit is generic, and should make blue text if you define a blue style in your html or whatever backend's stylesheet.
Before blue.
.. role:: bluetext
I like color :bluetext:`blue`.
After blue.
The generated pdf has the coloured words:
Sphinx already supports colors with the s5defs.txt standard definition file intended for inclusion (but is missing the CSS file):
Create/append this text to the value of rst_epilog
sphinx configuration, in your docs/conf.py file:
rst_prolog = """
.. include:: <s5defs.txt>
"""
Follow Sphinx's instructions to add a css with the colors
(e.g. adopt the hack.css from #Næreen's answer):
Place your css file into e.g. _static/css/s4defs-roles.css;
append it's path into shtml_css_files sphinx configuration:
html_css_files = ['css/s4defs-roles.css']
You may then use:
Some :red:`colored text` at last!
TIP:
Read this SO if you also want the styling to appear in Latex output.
This works, but leaves the HTML in a separate paragraph.
.. raw:: html
<font color="blue">Blue word,</font>
And a word without color
If anyone has a better answer, I will accept it.
Just a quick note because I landed here looking for something similar for html.
This works on Sphinx v2.0.1 for me. This uses the concept reported by #adam-matan but doesn't cause any formatting issues (i.e. the paragraph problem).
reference: reStructuredText Directives
.. role:: raw-html(raw)
:format: html
:raw-html:`<font color="blue">Blue word,</font>` And a word without color