From: BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: LaTeX Macros from External File
Date: Mon, 29 Apr 2019 20:55:11 +0200 [thread overview]
Message-ID: <CADAJKhAMSptqwy2NGVufupe0G0YGnXd=qV+jd1489XyxiH259g@mail.gmail.com> (raw)
In-Reply-To: <03c33657-2843-46b2-a074-eca3173938cc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3323 bytes --]
See
https://pandoc.org/MANUAL.html#option--include-in-header
or try
````````markdown
---
header-includes:
- |
````{=html}
<!-- whatever you need here -->
````
````````
You can't use both methods at the same time though since the option
overrides the metadata.
Den sön 28 apr. 2019 22:06Alberto Simoes <hashashin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
> Hi
>
> I just found out that if I add in the top of my generated HTML file using
> MathJAX the macros as:
>
>
> \(
> \newcommand{\exi}[1]{#1^{(i)}}
> \newcommand{\ex}[2]{#1^{(#2)}}
> \newcommand{\yhat}{\hat{y}}
> \newcommand{\Yhat}{\hat{Y}}
>
> \newcommand{\dZ}{{\,d\!Z}}
> \newcommand{\dz}{{\,d\!z}}
> \newcommand{\dw}{{\,d\!w}}
> \newcommand{\db}{{\,d\!b}}
> \)
>
> then all my macros are correctly, even when inside a equation or eqnarray
> environment.
> It would be very interesting to have a way to feed math macros to the HTML
> output (I know I can put it on the template, and probably will be my
> current approach).
>
> Cheers
>
> On Friday, April 26, 2019 at 9:45:07 AM UTC+1, Alberto Simoes wrote:
>>
>> Hi, John
>>
>> the problem is that I am using the equation (and eqnarray) environments,
>> to get the formulas numbered.
>>
>> Do you know if there is a way to make that work there too?
>> Thank you
>>
>> On Fri, Apr 26, 2019 at 1:45 AM John MacFarlane <...> wrote:
>>
>>>
>>> Works fine for me (pandoc 2.7.2):
>>>
>>> % pandoc -t html
>>> \newcommand{\exi}[1]{#1^{(i)}}
>>> \newcommand{\ex}[2]{#1^{(#2)}}
>>> \newcommand{\yhat}{\hat{y}}
>>>
>>> $\exi{x}$
>>>
>>> $\ex{1}{2}$
>>>
>>> $\yhat$
>>> ^D
>>> <p><span class="math inline"><em>x</em><sup>(<em>i</em>)</sup></span></p>
>>> <p><span class="math inline">1<sup>(2)</sup></span></p>
>>> <p><span class="math inline"><em>ŷ</em></span></p>
>>>
>>> Do you get different results with the same command?
>>>
>>>
>>
>> --
>> Alberto Simões
>>
> --
> You received this message because you are subscribed to the Google Groups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/03c33657-2843-46b2-a074-eca3173938cc%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/03c33657-2843-46b2-a074-eca3173938cc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAMSptqwy2NGVufupe0G0YGnXd%3DqV%2Bjd1489XyxiH259g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: Type: text/html, Size: 5708 bytes --]
next prev parent reply other threads:[~2019-04-29 18:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-21 20:27 Alberto Simoes
[not found] ` <f2870a3c-cdc1-4ede-bb88-8875a94537ab-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-22 13:22 ` BPJ
[not found] ` <CADAJKhDvc-WkrgyqP=Ahoz1YgVZLEGnw58Fya6mW=fgw13mfkA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-22 15:52 ` John MacFarlane
2019-04-25 19:33 ` Alberto Simoes
[not found] ` <70bd63af-7ad0-4c24-8531-a0c3ac418ff1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-25 20:02 ` Alberto Simoes
[not found] ` <2572e66c-d943-4899-98c7-90fbed4b7aaa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-25 20:41 ` Alberto Simoes
2019-04-26 0:45 ` John MacFarlane
[not found] ` <m236m5y4qa.fsf-Kg0TIO5PyJpkhmErBYysHMpsVdM05VCzQjotyikrkNS67hWjmhPcHA/vqy67L5BpjQwYZcTdm+3YtjvyW6yDsg==@public.gmane.org>
2019-04-26 8:44 ` Alberto Simões
[not found] ` <CAAkRyrt80T0O-bCBGirQwAUM5oA_Ooxpg=41Jp9NyKNrkQ8vTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-28 20:05 ` Alberto Simoes
[not found] ` <03c33657-2843-46b2-a074-eca3173938cc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-29 18:55 ` BPJ [this message]
[not found] ` <CADAJKhAMSptqwy2NGVufupe0G0YGnXd=qV+jd1489XyxiH259g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-04-30 14:15 ` Alberto Simões
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADAJKhAMSptqwy2NGVufupe0G0YGnXd=qV+jd1489XyxiH259g@mail.gmail.com' \
--to=melroch-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).