How to define a text macro?
-
Certain parts of the content on my homepage take up rather long parts in the HTML code, and I would therefore like to define them in one central place and then call them by referring to this macro – which we could maybe call a text macro.
It is probably most easily explained by two examples:
1) To write LaTeX the way it’s supposed to be typeset, I use the following HTML code:
<span class="texhtml" style="font-family: 'CMU Serif', cmr10, LMRoman10-Regular, 'Times New Roman', 'Nimbus Roman No9 L', Times, serif;">L<span style="text-transform: uppercase; font-size: 70%; margin-left: -0.36em; vertical-align: 0.3em; line-height: 0; margin-right: -0.15em;">a</span>T<span style="text-transform: uppercase; margin-left: -0.1667em; vertical-align: -0.5ex; line-height: 0; margin-right: -0.125em;">e</span>X</span>;
This is rather long, and I would like to define this in just one place, and then be able to use it, both in pages and posts on my site.
2) When making a quote I used the following:
<span style="padding-left: 20px; padding-right: 40px; display:block"><font size="2"><i>“This is where the quote goes”</i></font></span><p>
Likewise, I would like to define this quoting environment in one place, and then be able to use it everywhere on my page.
Is this possible? And if yes, where in my theme (child theme of the TwentyTwelve) should I define these?
Thanks in advance for any help!
- The topic ‘How to define a text macro?’ is closed to new replies.