From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28450 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Louis Turk Newsgroups: gmane.text.pandoc Subject: Re: \newif\ifepub Date: Wed, 26 May 2021 13:27:31 -0700 (PDT) Message-ID: References: <7b095fb7-06ff-47ed-856c-e264f25eac11n@googlegroups.com> <3b7f9f69-038e-48b2-a4aa-a9ef9698d5e2n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1498_224043106.1622060851870" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32176"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCLNR2M74QORBNG6XKCQMGQEJA4NQSA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed May 26 22:27:35 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f55.google.com ([209.85.210.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lm07q-000889-RU for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 26 May 2021 22:27:34 +0200 Original-Received: by mail-ot1-f55.google.com with SMTP id r22-20020a0568301216b029031135dd0858sf1256741otp.22 for ; Wed, 26 May 2021 13:27:34 -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=9zmDFI65k7Vnv0Sa0z6kdi9/seqdwOKPMAtyLqLoWtI=; b=rH0p90x3NsB92pkWgJOK65cwop9XrGYN1tIRdNjTbvgp9+lWV4bq+6oIogOuYp7kqy XtAcNgAoMtOIQwcAt5pFw3dYBT9gmmz2ECOfcpObL2/sKDyuKT6bYnfsJLOX/KRBZvv9 zQRs0w7LUrPK7tXHk4wPl6YTm2Sl37lzK9pBMrVmi+fcXouT90cHc+AdTM3X20IltoCK ZKBeHc7e/WC+FmNN8JYQUh+dHDZaRQZdnhH28L/X8DIhIB9DjFFvco8PMYLdx/dWrZxZ qX0uk7yL9xo6RqHLVhuvRC1i4Mky1uZU6ISi/TxQIgi2aX2Ik610dGXn3namTP7pq967 b+iQ== 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=9zmDFI65k7Vnv0Sa0z6kdi9/seqdwOKPMAtyLqLoWtI=; b=k+3vy+tQSC+9wFK+oTh4NfWfMGZhTB+FdbC44FxzuYi8d3QLFRMdiLvAwcv86ZLyuN Spj1zJaZWG8AfXDUSbiL1FZDZPRxUvmtAJpFb9Z7VQ/DqvVZhZ5iSnM/Gyzx+D0XUZdy jUFXu/aP6qA34gGScgfQIdlvliOaLzK8yzajmeEOMGz5P5aNRGPT5JunuAV9CnV07lzW 2w49VPFtP11l1qk39bMa1Tt+l+yz9dxi7igUNnSROlgnGLx7o4ELZkcWioNlsFKCLcJT 4Xc/WOhhODn0amrHSID/ucUeENe5CUueZo8dBAPSJxO69pXpsd9Sa7VAZ5mTnBlQuZL0 OvtQ== 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=9zmDFI65k7Vnv0Sa0z6kdi9/seqdwOKPMAtyLqLoWtI=; b=PD738Cl9AdprOjUdj6J3Nm2ID524DSnnPssrrfkNAmUFjxNcCCj989QE/Zm0B3iBdm GeoKva9h9FqKp8xOGNfzWn4uqLp6aI9xnyc5Vl6NylvTK5MuI15oZyNmsCPeLgn3ubN6 IoXWFUQmFHoNw4228d2gt13D9s5cdSIxIdwi9IdEKw4EBnWmGss8mQSurl3rQ/dzDAIK GwBgmq0NAWVNbxFKlotCYc5r+Ha1/6NQq5ONkA2CXSH+w8e854I1e7S6w85L7jLbL1DU 9kLL2CbzSPzEz8LGjEjspIUO6taRgsc75nGAu5y7xHLlmbq/7N+pZoYmc/pKM0sSrUSV mX5g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532b93peMhT5IHRWzxSwxFMadcKVhpuqXdWAz3pZdXcMkQFca9I7 MFVsgKjMnyPtVfXLWk+ELGM= X-Google-Smtp-Source: ABdhPJwhx53simboLohRHvJtYNyBN+RdCdO3ONlg/kJP1eRFu7L7kyovhxsQTYtML2/GgivZmiJi5g== X-Received: by 2002:a9d:12a5:: with SMTP id g34mr111348otg.204.1622060853889; Wed, 26 May 2021 13:27:33 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a4a:e396:: with SMTP id l22ls49906oov.1.gmail; Wed, 26 May 2021 13:27:32 -0700 (PDT) X-Received: by 2002:a4a:e1d7:: with SMTP id n23mr150165oot.86.1622060852452; Wed, 26 May 2021 13:27:32 -0700 (PDT) In-Reply-To: X-Original-Sender: louisaturk-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.io gmane.text.pandoc:28450 Archived-At: ------=_Part_1498_224043106.1622060851870 Content-Type: multipart/alternative; boundary="----=_Part_1499_1150005029.1622060851870" ------=_Part_1499_1150005029.1622060851870 Content-Type: text/plain; charset="UTF-8" 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 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. ------=_Part_1499_1150005029.1622060851870 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Here is the exact code:

\documentclass[00-mai= n.tex]{subfiles}
\begin{document}

% Actu= ally, 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 =3D 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 ke= pada seseorang yang tidak layak menerimanya.}

\ife= pub
\else
\end{multicols}
\fi
\end{= document}

On Wednesday, May 26, 2021 at 2:48:14 PM UTC-5 John MacFarlane wr= ote:

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...@gmai= l.com> writes:

> Thanks for responding. How much would it cost to get that \newif l= ogic=20
> 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 cod= e that=20
>> pandoc can't handle is not read?
>
> --=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 email to pandoc-discus..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/3b7f= 9f69-038e-48b2-a4aa-a9ef9698d5e2n%40googlegroups.com.

--
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 view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/a9e61a04-4165-4e6c-9ee8-bc437115c781n%40googlegroups.= com.
------=_Part_1499_1150005029.1622060851870-- ------=_Part_1498_224043106.1622060851870--