From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22623 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alberto Simoes Newsgroups: gmane.text.pandoc Subject: Re: LaTeX Macros from External File Date: Thu, 25 Apr 2019 13:41:53 -0700 (PDT) Message-ID: <03bec534-eafd-48ea-8e2f-e7c9df42c6e7@googlegroups.com> References: <70bd63af-7ad0-4c24-8531-a0c3ac418ff1@googlegroups.com> <2572e66c-d943-4899-98c7-90fbed4b7aaa@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_527_2111196811.1556224913743" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="236927"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCPPPLF75UIRBEVXRDTAKGQEFSXREII-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Apr 25 22:41:58 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hJlBt-000zRu-2r for gtp-pandoc-discuss@m.gmane.org; Thu, 25 Apr 2019 22:41:57 +0200 Original-Received: by mail-ot1-f55.google.com with SMTP id w3sf590416otg.11 for ; Thu, 25 Apr 2019 13:41:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=n3ayVPjD4XgxxuPILfRWvcJfa+ABTG8zvHKzexry/vY=; b=KLSZ8VRNqamcqPc39OXbo9aYFhczstbdz4ng5a94JMtSQLhowclchu2SlFcbr4HFg6 oh59nSeT4VNwEwil20DlAUU6j7JrvQDr+9KsEd5HPTJ7dvB6oSbKQjHYL0Dz9csp4ovw QJ9mH8mur9tEaR/sWx9wqKtAcGFygRUuRvqbHeiPtn++yn1mB4a0DQwxZGSjwktFS4ag YFnZwVKL78/J4ZEqc9YZkDi0k1oW0pzHUo7PI+AFMQ1ioe4u5J9fcSMqWIPeKpofJsR9 vV9V9CuFPqTDAGktiu9BzkPWiEhVZHGoRvrMIFBRMoUDlle2I32YMBn52Muuc3yjunj9 bxiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=n3ayVPjD4XgxxuPILfRWvcJfa+ABTG8zvHKzexry/vY=; b=oJ6rb1BOQ9gauvpiOZQeRXWgCH8SuI7dTK47upHCspU3yFtLuo3zuMMbtlNDThmmn7 hyMoal0UjxDAG010MBTLfRh+lMT3Gja7fWxpIkvm2GuFJyMoUJwdF6eMeXBqDaHGzmn2 fUqoyEpjaWOk8VKF9xj3ajXi/uHheh7gQvDgYYVrpbtQhuQXxkSztIpcIJqe6tddxXdw TTzIVfA6oOc0+N0s3Kre+piaLbizA/9rdKqlCp36DKN8rbT66c6azN65r7Wtk2r5bAwD leHFs8w6s73ZTs+MnAJiw3DUkSurN7gvH/yVAMEL/8+wJXlcR3RRvee3618+G7hLCqbJ Mqgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=n3ayVPjD4XgxxuPILfRWvcJfa+ABTG8zvHKzexry/vY=; b=Bhi8p09FEYA4jkpgZ0rJYuJ0lLDGcsH8JX8VaTo6Fe7+8xjYLbwzlMxSC+53LGhMD2 BhzTb0BYaA+H3YgzOzmYNHTXUzb2vpvq9rTwEW0yXBzYkIqI0oXID+duOS811njbdKod ST7Y1cKfjfy++/s5ySJpSWZvQrZFc8HVqbgwXGYrwgG34Hz+H0Me9cIphCGDHS/yLZRp fIRuubsEnTLtzROljsXI8cP0afHF8oz5oKqcIWIp67XoMdBUAOyfY81kVeN/sbn1lC9B i9KwQe2q5W6dUN0ujZ/dSTfwuA2UTHqRbu6lcSC2ElG8gdUjyDOE1GFv3xIxdE+qHSiv VboQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAXX5o1AUwiC5OwwVhZEqY7qUlyyLTQeOuLFvH3Y1v1Ji92eHzbu c+FECNOVwcT2XoRa9hnSLfs= X-Google-Smtp-Source: APXvYqzCnZejYSys1goGI45/svpFQZ8OQ/Hb8UOw/sWy0tJvd+diT1Se4rhFvzxh0MP7wBbgPeVm5g== X-Received: by 2002:aca:f189:: with SMTP id p131mr4252824oih.89.1556224915613; Thu, 25 Apr 2019 13:41:55 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:5d07:: with SMTP id r7ls276989oib.11.gmail; Thu, 25 Apr 2019 13:41:54 -0700 (PDT) X-Received: by 2002:aca:c246:: with SMTP id s67mr4780297oif.159.1556224914492; Thu, 25 Apr 2019 13:41:54 -0700 (PDT) In-Reply-To: <2572e66c-d943-4899-98c7-90fbed4b7aaa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: hashashin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:22623 Archived-At: ------=_Part_527_2111196811.1556224913743 Content-Type: multipart/alternative; boundary="----=_Part_528_1756958857.1556224913743" ------=_Part_528_1756958857.1556224913743 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, My bad, none is really being expanded... =20 I had an equation where I still had it written manually... So, no, using macros to export to html is not working, unfortunately. Thanks Alberto On Thursday, April 25, 2019 at 9:02:56 PM UTC+1, Alberto Simoes wrote: > > Tried changing exi to not use ex: > > \newcommand{\exi}[1]{#1^{(i)}}=20 > \newcommand{\ex}[2]{#1^{(#2)}} > \newcommand{\yhat}{\hat{y}}=20 > > but exi continues not working. > Any idea why? I am completely clueless! > > On Thursday, April 25, 2019 at 8:33:22 PM UTC+1, Alberto Simoes wrote: >> >> Hi >> >> For LaTeX it is working great. >> Nevertheless, for HTML, it isn't.=20 >> And it is behaving strangely. >> >> These are my macros: >> >> \newcommand{\yhat}{\hat{y}} >> \newcommand{\ex}[2]{#1^{(#2)}} >> \newcommand{\exi}[1]{\ex{#1}{i}} >> >> and only the one in the middle (\ex) is really being processed properly. >> No matter the place I put it, it is always the only working. >> Is this because it is the only one that only uses "primitive" constructs= ,=20 >> somehow? >> >> Thank you >> Alberto >> >> >> On Monday, April 22, 2019 at 2:22:53 PM UTC+1, BP wrote: >>> >>> You can include the file with the macro definitions on the command line= =20 >>> before the actual source. They will be concatenated so effectively the= =20 >>> macro definitions end up at the top of your markdown.Just make sure to = give=20 >>> it an `.md` rather than a `.tex` or `.ltx` extension, or set the source= =20 >>> format explicitly with the `-f` or `-r` option: >>> >>> ````sh >>> pandoc -f markdown mymacros.ltx source.md >>> ```` >>> >>> >>> Den s=C3=B6n 21 apr. 2019 22:28Alberto Simoes skrev= : >>> >>>> Hi >>>> >>>> The latex_macro extension allows me to define extensions directly on m= y=20 >>>> pandoc md source. >>>> Nevertheless, I have a file with my usual macros, and I would like to= =20 >>>> use it from my pandoc md files. >>>> Is that possible? >>>> >>>> Thank you >>>> Alberto >>>> >>>> --=20 >>>> You received this message because you are subscribed to the Google=20 >>>> Groups "pandoc-discuss" group. >>>> To unsubscribe from this group and stop receiving emails from it, send= =20 >>>> an email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To view this discussion on the web visit=20 >>>> https://groups.google.com/d/msgid/pandoc-discuss/f2870a3c-cdc1-4ede-bb= 88-8875a94537ab%40googlegroups.com=20 >>>> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> --=20 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 e= mail 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/03bec534-eafd-48ea-8e2f-e7c9df42c6e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_528_1756958857.1556224913743 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi,

My bad, n= one is really being expanded...=C2=A0
I had an equation wher= e I still had it written manually...

So, no, using= macros to export to html is not working, unfortunately.

Thanks
Alberto

On Thursday, April 25, 2019 at= 9:02:56 PM UTC+1, Alberto Simoes wrote:
Tried changing exi to not use ex:

\newcommand{\exi}[1]{#1^{(i)}}
\newcommand{\= ex}[2]{#1^{(#2)}}
\newcommand{\yhat}{\hat{y}}

but exi continues not working.
Any idea= why? I am completely clueless!

On Thursday, April = 25, 2019 at 8:33:22 PM UTC+1, Alberto Simoes wrote:
Hi

For LaTeX= it is working great.
Nevertheless, for HTML, it isn't.
<= /div>
And it is behaving strangely.

These are = my macros:

\newcommand{\yhat}{\hat{y}}
\newcomm= and{\ex}[2]{#1^{(#2)}}
\newcommand{\exi}[1]{\ex{#1}{i}}

and only the one in the middle (\ex) is really being proc= essed properly.
No matter the place I put it, it is always the on= ly working.
Is this because it is the only one that only uses &qu= ot;primitive" constructs, somehow?

Thank you<= /div>
Alberto


On Monday, April 22, 2019 at = 2:22:53 PM UTC+1, BP wrote:
You can include the file with the macro definitions on the c= ommand line before the actual source. They will be concatenated so effectiv= ely the macro definitions end up at the top of your markdown.Just make sure= to give it an `.md` rather than a `.tex` or `.ltx` extension, or set the s= ource format explicitly with the `-f` or `-r` option:

=
````sh
pandoc -f markdown my= macros.ltx source.md
````


Den s=C3=B6n 21 apr. 2019 22:28Alberto Simoe= s <hash...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:
Hi

T= he latex_macro extension allows me to define extensions directly on my pand= oc md source.
Nevertheless, I have a file with my usual macros, a= nd I would like to use it from my pandoc md files.
Is that possib= le?

Thank you
Alberto

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-...@googleg= roups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pan= doc-discuss/f2870a3c-cdc1-4ede-bb88-8875a94537ab%40googlegroups.c= om.
For more options, visit https://groups.google.com= /d/optout.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/03bec534-eafd-48ea-8e2f-e7c9df42c6e7%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_528_1756958857.1556224913743-- ------=_Part_527_2111196811.1556224913743--