How to write formula with a special character I've never seen?

Viewed 45

I need to display the following formula in HTML (simplified example):

       ->     ->
d = || BA  ^  u  ||

Is there a special character/entity, that displays an arrow (like this one: →) directly above a character (like as you would write à or  - just with an arrow instead of a tilde or circ).

I have never seen something like this. Can this be done with HTML?

2 Answers

HTML Entities help in incorporating special characters into our HTML documents. Please check the chart from here https://www.freeformatter.com/html-entities.html

If not found in the list: We can use our own CSS to do so:

.content-wrapper {
  display: flex;
  align-items: flex-end;
  font-weight: 600;
}

.wrapper {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin: 0 0.8rem;
}
.character {
  margin-top: -8px;
}

.chars {
  margin: 0 0.4rem;
}
   <section class="content-wrapper">
  <!-- this is where the fun begins... -->

  <div class="chars">D</div>
  <div class="chars">=</div>
  <div class="chars">|&nbsp;|</div>

  <div class="wrapper">
    <div class="arrow">&rarr;</div>
    <div class="character">BA</div>
  </div>

  <div>^</div>
  <div class="wrapper">
    <div class="arrow">&rarr;</div>
    <div class="character">u</div>
  </div>

  <div class="chars">|&nbsp;|</div>
</section>

You could try https://latex.codecogs.com/ for creating gifs "on-the-fly" for inclusion in any HTML (or markup):

d=\left \|{ \overrightarrow{BA} \wedge \overrightarrow{u} }\right \|

d=\left\|{\overrightarrow{BA}\wedge\overrightarrow{u}}\right\|)

You can basically do anything that you would with TeX or LaTeX ...

Related