public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Louis Turk <louisaturk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: \newif\ifepub
Date: Wed, 26 May 2021 13:27:31 -0700 (PDT)	[thread overview]
Message-ID: <a9e61a04-4165-4e6c-9ee8-bc437115c781n@googlegroups.com> (raw)
In-Reply-To: <m27djltgy8.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>


[-- 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 --]

  parent reply	other threads:[~2021-05-26 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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           ` Louis Turk [this message]
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

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=a9e61a04-4165-4e6c-9ee8-bc437115c781n@googlegroups.com \
    --to=louisaturk-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).