From: "John Gabriele" <jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org>
To: "John MacFarlane" <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>,
pandoc-discuss
<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: how to use a tabular in my markdown (any special considerations?)
Date: Tue, 28 Jun 2022 19:38:36 -0400 [thread overview]
Message-ID: <4e90f216-b857-4101-9d1d-27dc699f6297@www.fastmail.com> (raw)
In-Reply-To: <m235fsld22.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
Ah! I'd forgotten that *in LaTeX*:
* `^` is special --- and you can't just backslash-escape it to get that character (since that would give you a hat)
* `<` and `>` are also special in plain text, yielding ¡ (upside-down bang) and ¿ (upside-down question mark) for some reason (!?).
* you can put stuff like that into `\verb|...|` so they come out verbatim.
So, `\verb` worked fine for me.
Thank you! And thanks for the tip about debugging by looking at Pandoc's latex output.
-- John
On Sat, Jun 25, 2022, at 4:10 PM, John MacFarlane wrote:
> You can debug some problems like this by using
> pandoc -t latex
>
> For example
>
> pandoc -t latex
> ^\<Up/Down/Left/Right\>
>
> yields
>
> \^{}\textless Up/Down/Left/Right\textgreater{}
>
> which tells you that ^ and < and > need to
> be treated specially in LaTeX.
>
>
>
> "John Gabriele" <jgabriele-97jfqw80gc6171pxa8y+qA@public.gmane.org> writes:
>
>> Hi all,
>>
>> I'm trying to put a tabular element in my markdown file. My LaTeX is a little rusty, but here's what I have
>>
>> ~~~
>> hi
>>
>> \begin{tabular}{l l}
>> ^<Up/Down/Left/Right> & move by word/para \\
>> <PgUp/PgDn/Home/End> & what you expect \\
>> [a/e & beginning/end of doc \\
>> ^] & go to matching bracket \\
>> ^j & jump to line number \\
>> \end{tabular}
>>
>> bye
>> ~~~
>>
>> This fails with:
>>
>> ~~~
>> Error producing PDF.
>> ! Missing $ inserted.
>> <inserted text>
>> $
>> l.70 ^
>> ~~~
>>
>> I thought maybe it was those carets (^), so I backslash-escaped them, but then still got this error:
>>
>> ~~~
>> Error producing PDF.
>> ! Missing number, treated as zero.
>> <to be read again>
>> a
>> l.73 \^]
>> ~~~
>>
>> What special text rules must I follow in the content of my tabular fields?
>>
>> ***
>>
>> Background: BTW, the reason I want to do this is because I'm writing a twocolumn landscape pdf, and it turns out that tables don't work in 2-column (see https://github.com/jgm/pandoc/issues/1023 ). I thought maybe it would work because my output pdf is landscape rather than portrait:
>>
>> pandoc -t pdf -o foo.pdf -V geometry="margin=0.8in,landscape,twocolumn" -V fontsize=12pt foo.txt
>>
>> but alas that is not the case. So, I figured I'd get my tables by writing raw latex tabular blocks.
>>
>> Thanks,
>> -- John
>>
>> --
>> 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/2c8ee7b9-3c91-452f-8e31-5c6c40c46d3d%40www.fastmail.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/4e90f216-b857-4101-9d1d-27dc699f6297%40www.fastmail.com.
prev parent reply other threads:[~2022-06-28 23:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 19:01 John Gabriele
[not found] ` <2c8ee7b9-3c91-452f-8e31-5c6c40c46d3d-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>
2022-06-25 20:10 ` John MacFarlane
[not found] ` <m235fsld22.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-06-28 23:38 ` John Gabriele [this message]
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=4e90f216-b857-4101-9d1d-27dc699f6297@www.fastmail.com \
--to=jgabriele-97jfqw80gc6171pxa8y+qa@public.gmane.org \
--cc=jgm-TVLZxgkOlNX2fBVCVOL8/A@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).