* how to use a tabular in my markdown (any special considerations?) @ 2022-06-25 19:01 John Gabriele [not found] ` <2c8ee7b9-3c91-452f-8e31-5c6c40c46d3d-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: John Gabriele @ 2022-06-25 19:01 UTC (permalink / raw) To: pandoc-discuss 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. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <2c8ee7b9-3c91-452f-8e31-5c6c40c46d3d-jFIJ+Wc5/Vo7lZ9V/NTDHw@public.gmane.org>]
* Re: how to use a tabular in my markdown (any special considerations?) [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> 0 siblings, 1 reply; 3+ messages in thread From: John MacFarlane @ 2022-06-25 20:10 UTC (permalink / raw) To: John Gabriele, pandoc-discuss 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/m235fsld22.fsf%40johnmacfarlane.net. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <m235fsld22.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>]
* Re: how to use a tabular in my markdown (any special considerations?) [not found] ` <m235fsld22.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org> @ 2022-06-28 23:38 ` John Gabriele 0 siblings, 0 replies; 3+ messages in thread From: John Gabriele @ 2022-06-28 23:38 UTC (permalink / raw) To: John MacFarlane, pandoc-discuss 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. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-28 23:38 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-25 19:01 how to use a tabular in my markdown (any special considerations?) 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 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).