Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
314 views
in Technique[技术] by (71.8m points)

Is there CSS for typesetting the LaTeX logo in HTML?

I'm looking for css equivalent to the LaTeX macro that will produce a beautifully typeset LaTeX logo within an HTML document via css. That is,

<p>This web site uses <span class="latex">LaTeX</span> to generate the PDF version of this web page.</p>

The CSS probably should replace the roman characters TeX with Greek (and use the right font via web fonts if possible) etc.

Surely I can not be the first person to want to do this …

question from:https://stackoverflow.com/questions/8160514/is-there-css-for-typesetting-the-latex-logo-in-html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

A Google search lead me to TeX and LaTeX logo POSHlets.

The solution involves:

    .tex sub, .latex sub, .latex sup {
      text-transform: uppercase;
    }

    .tex sub, .latex sub {
      vertical-align: -0.5ex;
      margin-left: -0.1667em;
      margin-right: -0.125em;
    }

    .tex, .latex, .tex sub, .latex sub {
      font-size: 1em;
    }

    .latex sup {
      font-size: 0.85em;
      vertical-align: 0.15em;
      margin-left: -0.36em;
      margin-right: -0.15em;
    }
<p><span class="tex">T<sub>e</sub>X</span> and 
<span class="latex">L<sup>a</sup>T<sub>e</sub>X</span></p>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...