public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MACFARLANE <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Advice needed: producing tabs in Pandoc output
Date: Sun, 3 Apr 2016 16:39:46 -0700	[thread overview]
Message-ID: <20160403233946.GD55527@protagoras.berkeley.edu> (raw)
In-Reply-To: <93e30e4a-f2e6-4692-958b-cce730b23142-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

Did you try using the --preserve-tabs option?

+++ Boris Vassilev [Apr 02 16 12:35 ]:
>   Hello,
>   The `&#9;` works if it is in normal markdown. Once you have it inside
>   an HTML <pre> tag, it will get quoted properly so that we actually see
>   "&#9;" and not a tab.
>   So say I use a command line tool, and I want to put the output in an
>   HTML document that I generate with the help of Pandoc. If there are
>   tabs in the output of the command, they will be messed up. I need a
>   <pre> because I want to be able to put more HTML markup inside the
>   <pre>, and this cannot be done with markdown.
>   The thing with tabs is, they are usually align at 8 columns. It is like
>   this on terminals by default, it is like this when shown in a browser.
>   Fun fact: if you do place a tab inside a <pre>, it will be aligned on 8
>   columns if you look at it in the browser, but it will be aligned at 4
>   if you look at the source (this is at least what Firefox does).
>   It was actually very easy to implement my first "solution": replace
>   tabs with an HTML tag, then pass through Pandoc, then replace all
>   occurrences of the tag with a tab. I still wonder if and how it could
>   break.
>   Cheers
>   On Saturday, April 2, 2016 at 3:12:46 PM UTC+3, BPJ wrote:
>
>     Why do you want a literal tab inside a pre tag? What effect do you
>     want to achieve?Perhaps there is a workaround which will achieve the
>     same effect.
>
>   BTW have you tried `&#x09;`?
>
>   /bpj
>
>   lördag 2 april 2016 skrev Boris Vassilev <[1]boris.v...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
>
>   Hello,
>   first let me apologize for being a pain with this issue. :(
>   I would like to put tab characters inside a <pre> tag in the HTML
>   document produced by Pandoc. I perfectly understand why this doesn't
>   work in the way I attempted it: see [this closed
>   issue]([2]https://github.com/jgm/pandoc/issues/2835).
>   Can anyone recommend a work-around? There are at least two
>   possibilities I could come up with (well, variations of the same
>   really).
>   1. Replace tabs with an HTML tag of my choosing, say <actualtab>. Then,
>   after Pandoc, replace this tag with a tab character.
>   2. Replace tabs with a <span> with a class of my choosing, say <span
>   class="actualtab">. Then use CSS to tell the browser to treat it as a
>   tab.
>   Motivation: I am using Pandoc for producing HTML (and eventually LaTeX)
>   from an input format that is a bit more complex than markdown. Pandoc
>   is a great choice because it treats embedded markup transparently. For
>   example, I cannot escape inside code blocks, but I can simply give
>   Pandoc content in a <pre> HTML tag and it comes out (mostly) untouched.
>   Same goes for LaTeX markup.
>   Any suggestions or comments are welcome, even if it goes along the
>   lines of "you are doing the wrong thing".
>   Cheers,
>   Boris
>   Currently in the EEST time zone: This is UTC +3:00
>   Save our in-boxes! [3]http://emailcharter.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 post to this group, send email to pandoc-discuss@googlegroups.
>     com.
>     To view this discussion on the web visit
>     [4]https://groups.google.com/d/msgid/pandoc-discuss/
>     CAFw8osJHUpOwbMzQO%3DxNb1va4OZR6WGO6x1e8U8pxKO8q6
>     cJtw%40mail.gmail.com.
>     For more options, visit [5]https://groups.google.com/d/optout.
>
>   --
>   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 [6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [7]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [8]https://groups.google.com/d/msgid/pandoc-discuss/93e30e4a-f2e6-4692-
>   958b-cce730b23142%40googlegroups.com.
>   For more options, visit [9]https://groups.google.com/d/optout.
>
>References
>
>   1. javascript:/
>   2. https://github.com/jgm/pandoc/issues/2835
>   3. http://emailcharter.org/
>   4. https://groups.google.com/d/msgid/pandoc-discuss/CAFw8osJHUpOwbMzQO=xNb1va4OZR6WGO6x1e8U8pxKO8q6cJtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org?utm_medium=email&utm_source=footer
>   5. https://groups.google.com/d/optout
>   6. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   7. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   8. https://groups.google.com/d/msgid/pandoc-discuss/93e30e4a-f2e6-4692-958b-cce730b23142-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   9. https://groups.google.com/d/optout

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20160403233946.GD55527%40protagoras.berkeley.edu.
For more options, visit https://groups.google.com/d/optout.


  parent reply	other threads:[~2016-04-03 23:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-02  9:15 Boris Vassilev
     [not found] ` <CAFw8osJHUpOwbMzQO=xNb1va4OZR6WGO6x1e8U8pxKO8q6cJtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-02 12:12   ` BPJ
     [not found]     ` <CADAJKhAs1SwNf-1Hy1ZRFFPZ+vRWXDXdbLyWUeESQxDzqgP_Xg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-02 19:35       ` Boris Vassilev
     [not found]         ` <93e30e4a-f2e6-4692-958b-cce730b23142-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-04-03 23:39           ` John MACFARLANE [this message]
     [not found]             ` <20160403233946.GD55527-nFAEphtLEs/fysO+viCLMa55KtNWUUjk@public.gmane.org>
2016-04-04  4:28               ` Boris Vassilev

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=20160403233946.GD55527@protagoras.berkeley.edu \
    --to=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).