Pages

Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

How to add math equations in blogger using LaTeX or MathJax?

Here is the website mathjax.org website and you can find the demo here.

In the demo page, you can see following equation written in latex or mathjax equation. 

When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are

If you write $x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$,


you will get follwing formatted equation.

When $$a \ne 0$$ there are two solutions to \(ax^2 + bx + c = 0\) and they are $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
To write such beautiful equations using either mathax or LatTeX in your blogger post or blogspot domain blog, you can do following steps. This is also true for any website if you want to write a code using HTML and other programming languages.
  1. Go to this MathJaX getting started page and copy the code (or simple copy the code below)
  2. Go to Themes in your blog on blogger
  3. Chose Edit HTML
  4. Paste the code (copied from mathjax.org) just below <head> tag[The <head> tag probably will be within 10 lines of code in there]
  5. Save and you are now ready to write LaTeX code or MatJaX code in Blogger.
The code is here [If you want copy this too.

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

Now, you are ready to write beautiful math equations using either LaTeX or MathJax.

If this post is useful you can comment here for visibility of this post as well as this blog.

Do you have any other suggesstions? You can add here.

Thanks. 


Symbols above the letters (for scientific publications)

When writing papers, we often come up with author(s) names with symbols above some characters of author(s) names.

How do you use those symbols in LaTeX?

Here is a Wikipedia link where the details are provided.

https://en.wikipedia.org/wiki/Diacritic

In order to use in LaTeX, a number of answers in the following SE site is given.

https://tex.stackexchange.com/tags/accents/info

Some of the frequently used symbols are (from SE site):

Text mode

Plain TeX makes it possible to typeset the most commonly used accents:
  • \` (grave accent): à
  • \' (acute accent): á
  • \^ (circumflex or “hat”): â
  • \" (umlaut or dieresis): ä
  • \~ (tilde or “squiggle”): ã
  • \= (macron or “bar”): ā
  • \. (dot accent): ȧ
  • \u (breve accent): ă
  • \v (háček or “check”): ǎ
  • \H (long Hungarian umlaut): ő
  • \t (tie-after accent): a͡
  • \c (cedilla): ş
  • \d (dot-under accent): ạ
  • \b (bar-under accent): ο̩
  • \k (ogonek): ą
The Unicode character encoding UTF8 includes several special characters and characters with accents. The following code specifies that the encoding of the LaTeX document source file is UTF8. As font encoding is specified T1, because it supports the encoding of extended character sets in fonts:
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
Of course, the encoding in the text editor needs to be set to utf8, as well.

Math mode

The following commands may be used only in math mode to produce accents;
  • \hat{o} (circumflex): enter image description here
  • \widehat{oo} (wide version of \hat over several letters): enter image description here
  • \check{o} (vee or check): enter image description here
  • \tilde{o} (tilde) enter image description here
  • \widetilde{oo} (wide tilde) enter image description here
  • \acute{o} (acute accent): enter image description here
  • \grave{o} (grave accent): enter image description here
  • \dot{o} (dot over the letter): enter image description here
  • \ddot{o} (two dots over the letter): enter image description here
  • \breve{o} (breve): enter image description here
  • \bar{o} (macron): enter image description here
  • \vec{o} (vector (arrow) over the letter): enter image description here

Notes on LaTeX symbols and usage.

Symbols I use the most

Text modification

Some of the frequently used symbols:
superscript - \textsuperscript{th}
subscript    - \textsubscript{s}
infinity       - \infty
dash            - the latex command is "---"
How to type single bond, double bond and triple bonds in LaTeX (for chemists)?
I found following is useful for Chemists.

https://www.overleaf.com/learn/latex/Chemistry_formulae


How to add multi-line comments in LaTeX?.

\iffalse
Comment text that you don't want to appear in paper.
\fi

Next question will appear here. 

next
anserComment 
will appear here.

See this page on Wikipedia 

Letters

 \alpha
 \beta
 \gamma
 \delta
 \epsilon
 \zeta
 \eta
 \theta
 \iota
 \kappa
 \lambda
 \mu
 \nu
 \xi
 \omicron
 \pi
 \rho
 \sigma
 \tau
 \upsilon
 \phi
 \chi
 \psi
 \omega
 \varepsilon
 \vartheta
 \varkappa
 \varpi
 \varrho
 \varphi
 \varsigma
 \Gamma
 \Delta
 \Theta
 \Lambda
 \Upsilon
 \Xi
 \Phi
 \Pi
 \Psi
 \Sigma
 \Omega
 \digamma
 \aleph
 \beth
 \gimel
 \daleth
 \forall
 \exists
 \nexists
 \Finv
 \Game
 \backepsilon
 \imath
 \jmath
 \ell
 \Bbbk
 \amalg
 \nabla
 \mho
 \partial
 \eth
 \hbar
 \hslash
 \Im
 \Re
 \wp
 \O
 \emptyset
 \varnothing
 \complement
 \circledS
 \acute{a}
 \hat{a}
 \ddot{a}
 \bar{a}
 \tilde{a}
 \grave{a}
 \check{a}
 \dot{a}
 \breve{a}
 \vec{a}
 \prime
 \backprime
 \P
 \S
 \AA
 \frac{abc}{def}
 \sqrt{abc}
 \sqrt[n]{abc}
 \overline{abc}
 \underline{abc}
 \overrightarrow{abc}
 \overleftarrow{abc}
 \overbrace{abc}
 \underbrace{abc}
 \widehat{abc}

Fonts

 \mathcal{A}
 \mathbb{A}
 \mathfrak{A}
 \mathsf{A}
 \mathbf{A}
 \textbf{A}

Common functions

 \sin
 \arcsin
 \sinh
 \cos
 \arccos
 \cosh
 \tan
 \arctan
 \tanh
 \cot
 \coth
 \sec
 \csc
 \exp
 \log
 \ln
 \lg
 \min
 \max
 \inf
 \sup
 \lim
 \liminf
 \limsup
 \arg
 \deg
 \det
 \dim
 \gcd
 \hom
 \ker
 \Pr

Big symbols

 \prod
 \bigcap
 \bigwedge
 \coprod
 \bigcup
 \bigvee
 \bigsqcup
 \sum
 \biguplus
 \bigoplus
 \bigotimes
 \bigodot
 \int
 \oint
 \iint
 \iiint
 \iiiint

Arrows

 \leftarrow
 \Leftarrow
 \leftharpoonup
 \leftharpoondown
 \leftleftarrows
 \rightarrow
 \Rightarrow
 \rightharpoonup
 \rightharpoondown
 \rightrightarrows
 \uparrow
 \Uparrow
 \upharpoonleft
 \upharpoonright
 \upuparrows
 \downarrow
 \Downarrow
 \downharpoonleft
 \downharpoonright
 \downdownarrows
 \longleftarrow
 \Longleftarrow
 \hookleftarrow
 \leftrightharpoons
 \leftrightarrows
 \Lleftarrow
 \Lsh
 \leftarrowtail
 \twoheadleftarrow
 \curvearrowleft
 \circlearrowleft
 \looparrowleft
 \longrightarrow
 \Longrightarrow
 \hookrightarrow
 \rightleftharpoons
 \rightleftarrows
 \Rrightarrow
 \Rsh
 \rightarrowtail
 \twoheadrightarrow
 \curvearrowright
 \circlearrowright
 \looparrowright
 \leftrightarrow
 \longleftrightarrow
 \updownarrow
 \nleftarrow
 \nrightarrow
 \nleftrightarrow
 \Leftrightarrow
 \Longleftrightarrow
 \Updownarrow
 \nLeftarrow
 \nRightarrow
 \nLeftrightarrow
 \mapsto
 \longmapsto
 \multimap
 \rightsquigarrow
 \leftrightsquigarrow
 \swarrow
 \searrow
 \nwarrow
 \nearrow

Order symbols

Some of the following symbols require \usepackage{amssymb} in the preamble
 <
 \leq
 \leqq
 \leqslant
 >
 \geq
 \geqq
 \geqslant
 \nless
 \nleq
 \lneq
 \nleqq
 \lneqq
 \lvertneqq
 \nleqslant
 \ngtr
 \ngeq
 \gneq
 \ngeqq
 \gneqq
 \gvertneqq
 \ngeqslant
 \vartriangleleft
 \trianglelefteq
 \lesssim
 \lessapprox
 \prec
 \preceq
 \precsim
 \precapprox
 \vartriangleright
 \trianglerighteq
 \gtrsim
 \gtrapprox
 \succ
 \succeq
 \succsim
 \succapprox
 \ntriangleleft
 \ntrianglelefteq
 \lnsim
 \lnapprox
 \nprec
 \npreceq
 \precnsim
 \precnapprox
 \ntriangleright
 \ntrianglerighteq
 \gnsim
 \gnapprox
 \nsucc
 \nsucceq
 \succnsim
 \succnapprox
 \eqslantless
 \lessgtr
 \lesseqgtr
 \lesseqqgtr
 \eqslantgtr
 \gtrless
 \gtreqless
 \gtreqqless
 \ll
 \lll
 \lessdot
 \preccurlyeq
 \curlyeqprec
 \gg
 \ggg
 \gtrdot
 \succcurlyeq
 \curlyeqsucc

Set symbols

 \subset
 \Subset
 \sqsubset
 \triangleleft
 \blacktriangleleft
 \supset
 \Supset
 \sqsupset
 \triangleright
 \blacktriangleright
 \cap
 \Cap
 \sqcap
 \vartriangle
 \blacktriangle
 \cup
 \Cup
 \sqcup
 \triangledown
 \blacktriangledown
 \in
 \subseteq
 \subseteqq
 \sqsubseteq
 \ni
 \supseteq
 \supseteqq
 \sqsupseteq
 \notin
 \nsubseteq
 \subsetneq
 \varsubsetneq
 \nsubseteqq
 \subsetneqq
 \varsubsetneqq
 \uplus
 \nsupseteq
 \supsetneq
 \varsupsetneq
 \nsupseteqq
 \supsetneqq
 \varsupsetneqq

Equality and inference

 =
 \neq
 \equiv
 \thickapprox
 \approx
 \approxeq
 \cong
 \ncong
 \sim
 \thicksim
 \nsim
 \simeq
 \backsim
 \backsimeq
 \eqsim
 \doteq
 \div
 \doteqdot
 \fallingdotseq
 \risingdotseq
 \triangleq
 \circeq
 \eqcirc
 \bumpeq
 \Bumpeq
 \asymp
 \mid
 \shortmid
 \vdash
 \dashv
 \Vdash
 \parallel
 \shortparallel
 \vDash
 \Vvdash
 \models
 \nmid
 \nshortmid
 \nvdash
 \nVdash
 \nparallel
 \nshortparallel
 \nvDash
 \nVDash

Brackets

 \lfloor
 \llcorner
 \rfloor
 \lrcorner
 \lceil
 \ulcorner
 \rceil
 \urcorner
 |
 \vert
 \|
 \Vert
 \{
 \}
 \langle
 \rangle
 /
 \backslash
 [
 ]
 (
 )

Other symbols

 \infty
 \propto
 \varpropto
 \bowtie
 \ltimes
 \rtimes
 \intercal
 \dotplus
 \times
 \wr
 \pitchfork
 \surd
 \setminus
 \diagdown
 \diagup
 \leftthreetimes
 \rightthreetimes
 \perp
 \between
 \asymp
 \angle
 \measuredangle
 \sphericalangle
 \bot
 \wedge
 \barwedge
 \doublebarwedge
 \therefore
 \top
 \vee
 \veebar
 \because
 \pm
 \curlywedge
 \smallfrown
 \frown
 \bigtriangleup
 \triangle
 \mp
 \curlyvee
 \smallsmile
 \smile
 \bigtriangledown
 \cdot
 \circ
 \bullet
 \centerdot
 \cdots
 \vdots
 \ldots
 \ddots
 \circledcirc
 \circleddash
 \circledast
 \bigcirc
 \divideontimes
 \odot
 \oplus
 \ominus
 \otimes
 \oslash
 \boxdot
 \boxplus
 \boxminus
 \boxtimes
 \Box
 \diamondsuit
 \clubsuit
 \heartsuit
 \spadesuit
 \lozenge
 \blacklozenge
 \square
 \blacksquare
 \diamond
 \Diamond
 \ast
 \star
 \bigstar
 \sharp
 \flat
 \natural
 \dagger
 \ddagger


Alphabets with special characters on it.

LaTeX commandSampleDescription
\`{o}ògrave accent
\'{o}óacute accent
\^{o}ôcircumflex
\"{o}öumlaut, trema or dieresis
\H{o}őlong Hungarian umlaut (double acute)
\~{o}õtilde
\c{c}çcedilla
\k{a}ąogonek
\l{}łbarred l (l with stroke)
\={o}ōmacron accent (a bar over the letter)
\b{o}obar under the letter
\.{o}ȯdot over the letter
\d{u}dot under the letter
\r{a}åring over the letter (for å there is also the special command \aa)
\u{o}ŏbreve over the letter
\v{s}šcaron/háček ("v") over the letter
\t{oo}o͡o"tie" (inverted u) over the two letters
\oøslashed o (o with stroke)


You may be interested in these posts

Error in image file conversion: convert-im6.q16: not authorized `test.eps' @ error/constitute.c/WriteImage/1037.

This error is because of the vulnerability. This allows remote execution of code using image formats. So, some Linux distributions by defaul...