* \newif\ifepub
@ 2021-05-26 17:49 Louis Turk
[not found] ` <7b095fb7-06ff-47ed-856c-e264f25eac11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Louis Turk @ 2021-05-26 17:49 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 103 bytes --]
How can I make pandoc use latex newif logic so that latex code that pandoc
can't handle is not read?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \newif\ifepub
[not found] ` <7b095fb7-06ff-47ed-856c-e264f25eac11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-05-26 18:23 ` John MacFarlane
2021-05-26 19:25 ` \newif\ifepub Louis Turk
1 sibling, 0 replies; 7+ messages in thread
From: John MacFarlane @ 2021-05-26 18:23 UTC (permalink / raw)
To: Louis Turk, pandoc-discuss
Currently the only conditional the latex reader can handle are
ifstrequal, newtoggle, toggletrue, togglefalse, iftoggle from
etoolbox. Perhaps you could use those?
Louis Turk <louisaturk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> How can I make pandoc use latex newif logic so that latex code that pandoc
> can't handle is not read?
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7b095fb7-06ff-47ed-856c-e264f25eac11n%40googlegroups.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \newif\ifepub
[not found] ` <7b095fb7-06ff-47ed-856c-e264f25eac11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-26 18:23 ` \newif\ifepub John MacFarlane
@ 2021-05-26 19:25 ` Louis Turk
[not found] ` <3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Louis Turk @ 2021-05-26 19:25 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 671 bytes --]
Thanks for responding. How much would it cost to get that \newif logic
implemented?
On Wednesday, May 26, 2021 at 12:49:43 PM UTC-5 Louis Turk wrote:
> How can I make pandoc use latex newif logic so that latex code that
> pandoc can't handle is not read?
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1172 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \newif\ifepub
[not found] ` <3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-05-26 19:47 ` John MacFarlane
[not found] ` <m27djltgy8.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-05-27 16:22 ` \newif\ifepub John MacFarlane
1 sibling, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2021-05-26 19:47 UTC (permalink / raw)
To: Louis Turk, pandoc-discuss
Just to be clear on what you're looking for: as I understand it,
you are converting from LaTeX to something else, and you want
pandoc to understand
\iffalse
\iftrue
\newif\iffoo [ creates command \iffoo and defines it as \iffalse ]
\footrue [ redefines \iffoo to \iftrue ]
\foofalse [ redefines \iffoo to \iffalse ]
So then you can do
\newif\iffoo
\foofalse
\iffoo
stuff you don't want pandoc to try to convert
\fi
Louis Turk <louisaturk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Thanks for responding. How much would it cost to get that \newif logic
> implemented?
>
> On Wednesday, May 26, 2021 at 12:49:43 PM UTC-5 Louis Turk wrote:
>
>> How can I make pandoc use latex newif logic so that latex code that
>> pandoc can't handle is not read?
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n%40googlegroups.com.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \newif\ifepub
[not found] ` <m27djltgy8.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-05-26 20:27 ` Louis Turk
0 siblings, 0 replies; 7+ messages in thread
From: Louis Turk @ 2021-05-26 20:27 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2545 bytes --]
Here is the exact code:
\documentclass[00-main.tex]{subfiles}
\begin{document}
% Actually, the following two lines are in the 00-main.tex file.
\newif\ifepub
\epubtrue
\ifepub
\let\footnoteA\footnote
\let\footnoteB\footnote
\else
\fancyhf{} % delete current header and footer
\fancyhead[LE,RO]{\bfseries\thepage}
\fancyhead[CE,CO]{\bfseries YOHANES}
\headsep = 0pt
\setcounter{chapter}{1}
\chapter*{\begin{center}\textbf{YOHANES}\end{center}}
\addcontentsline{toc}{chapter}{Yohanes}
\begin{multicols}{2}
\fi
%The following line is an example of the footnotes that must be converted.
Dan dari kepenuhan-Nya kita semua sudah menerima, dan rahmat demi
rahmat.\footnoteA{Rahmat adalah pemberian yang diberikan kepada seseorang
yang tidak layak menerimanya.}
\ifepub
\else
\end{multicols}
\fi
\end{document}
On Wednesday, May 26, 2021 at 2:48:14 PM UTC-5 John MacFarlane wrote:
>
> Just to be clear on what you're looking for: as I understand it,
> you are converting from LaTeX to something else, and you want
> pandoc to understand
>
> \iffalse
> \iftrue
> \newif\iffoo [ creates command \iffoo and defines it as \iffalse ]
> \footrue [ redefines \iffoo to \iftrue ]
> \foofalse [ redefines \iffoo to \iffalse ]
>
> So then you can do
>
> \newif\iffoo
> \foofalse
>
> \iffoo
>
> stuff you don't want pandoc to try to convert
>
> \fi
>
>
> Louis Turk <louis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thanks for responding. How much would it cost to get that \newif logic
> > implemented?
> >
> > On Wednesday, May 26, 2021 at 12:49:43 PM UTC-5 Louis Turk wrote:
> >
> >> How can I make pandoc use latex newif logic so that latex code that
> >> pandoc can't handle is not read?
> >
> > --
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n%40googlegroups.com
> .
>
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/a9e61a04-4165-4e6c-9ee8-bc437115c781n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3988 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \newif\ifepub
[not found] ` <3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-26 19:47 ` \newif\ifepub John MacFarlane
@ 2021-05-27 16:22 ` John MacFarlane
[not found] ` <m2r1hsrvsf.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: John MacFarlane @ 2021-05-27 16:22 UTC (permalink / raw)
To: Louis Turk, pandoc-discuss
Louis Turk <louisaturk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Thanks for responding. How much would it cost to get that \newif logic
> implemented?
I've added support for \newif. It took me about three hours to get
it all working (during which I discovered and fixed a bug in the existing
code which only shows itself in nested macro definitions). You
can decide what that's worth to you and make a donation
accordingly, or sponsor me on GitHub (see links on https://pandoc.org).
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: \newif\ifepub
[not found] ` <m2r1hsrvsf.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2021-06-01 1:12 ` Louis Turk
0 siblings, 0 replies; 7+ messages in thread
From: Louis Turk @ 2021-06-01 1:12 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1031 bytes --]
Thanks, John. I'm now a sponsor.
On Thursday, May 27, 2021 at 11:22:55 AM UTC-5 John MacFarlane wrote:
>
> Louis Turk <louis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Thanks for responding. How much would it cost to get that \newif logic
> > implemented?
>
> I've added support for \newif. It took me about three hours to get
> it all working (during which I discovered and fixed a bug in the existing
> code which only shows itself in nested macro definitions). You
> can decide what that's worth to you and make a donation
> accordingly, or sponsor me on GitHub (see links on https://pandoc.org).
>
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/575f38d3-4961-42a3-a1d5-c29ba05898a2n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1835 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-06-01 1:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-26 17:49 \newif\ifepub Louis Turk
[not found] ` <7b095fb7-06ff-47ed-856c-e264f25eac11n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-26 18:23 ` \newif\ifepub John MacFarlane
2021-05-26 19:25 ` \newif\ifepub Louis Turk
[not found] ` <3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-05-26 19:47 ` \newif\ifepub John MacFarlane
[not found] ` <m27djltgy8.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-05-26 20:27 ` \newif\ifepub Louis Turk
2021-05-27 16:22 ` \newif\ifepub John MacFarlane
[not found] ` <m2r1hsrvsf.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2021-06-01 1:12 ` \newif\ifepub Louis Turk
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).