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: Going round in circles with latex output
Date: Sun, 11 Jun 2017 10:43:05 +0200	[thread overview]
Message-ID: <20170611084305.GD95963@Johns-MBP.home> (raw)
In-Reply-To: <2a8d8b0d-2740-4dfb-8718-f06432d6425f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

If you've got a change to the default latex template that
seems to work better and doesn't cause problems, I suggest
you open a pull request on the jgm/pandoc repository on
github.

We can solicit comments there from some of the people who
have contributed a lot to the LaTeX templates, to see if
they can spot any problems.

+++ Lyndon Drake [Jun 06 17 13:51 ]:
>   I've got a fair way with this. Thanks to all for the help so far.
>   1. By reading through the template, I figured out which variables to
>   define to control the LaTeX output. I'm seriously impressed with
>   Pandoc's setup - I remember the awful pain of doing a LaTeX document
>   from scratch and this gets things started so well. Thank you John &
>   everyone else!
>   2. As suggested by Joost, I shifted the package load order around,
>   retaining all the conditionals and variables in the template. I've now
>   got something which is only different by some reordering from the
>   default template, but which avoids the longtable/bidi conflict. Thanks
>   Joost!
>   I've also been playing around with a couple of filters, based on code
>   from Jesse Rosenthal on this list a few years back. It sort of works,
>   but not well enough to rely on. For the moment, I'm just going to tag
>   every word and block with div/span.
>   It did also occur to me that the proper place to do this stuff is
>   actually in LaTeX, not Pandoc. E.g. I'm going to use biblatex, and I'd
>   want the same rules applied to the output from biblatex. There's a
>   package:
>   https://github.com/Pomax/ucharclasses
>   which does some of this. One way to do it would be to implement the
>   Unicode bidi algorithm http://unicode.org/reports/tr9/ (+ some sensible
>   font switching, which is actually easier than the bidi algorithm) as a
>   LaTeX package, but that's a bit much for my current document. I might
>   have a look at ways to do this properly in July & August though, as I'd
>   like to have it available before I start my thesis.
>   Anyway for the moment I'm pleased that I could get this far:
>   https://www.dropbox.com/s/aeyvkjrox5dwtpz/Screenshot%202017-06-06%2021.
>   37.41.png?dl=0
>   without having to type anything other than plain Pandoc Markdown into
>   some text & csv files, and all the formatting has been done by Pandoc
>   and some config. The thing that made me want to use Pandoc was the
>   memory of my previous thesis (in computer science) where the markup
>   made the document so cluttered I found it almost impossible to actually
>   read the text in the editor. This is promising enough that I'm going to
>   persevere to get a setup that will work for the upcoming thesis.
>   Best,
>   Lyndon
>   PS: in case it's of use to others, the relevant bits of YAML:
>     header-includes:
>       - \newfontfamily\hebrewfont{Taamey David CLM}
>       - \newfontfamily\syriacfont{Serto Jerusalem}
>     lang: en-GB
>     otherlangs: [he, syr]
>   On Tuesday, June 6, 2017 at 5:26:21 PM UTC+1, Joost wrote:
>
>     On Tue, Jun 06 2017, Lyndon Drake wrote:
>     > Part of the problem is that if I set lang and otherlangs as
>     > follows:
>     >
>     >   lang: en-GB
>     >   otherlangs: [he, sy]
>     >
>     > I get this:
>     >
>     > ! Package bidi Error: Oops! you have loaded package longtable
>     > after bidi
>     > packag
>     >
>     > e. Please load package longtable before bidi package, and then
>     > try to run
>     > xelatex on your document again.
>     >
>     >
>     > which I guess means that some kind of strange interaction in the
>     > latex
>     > template is producing an undesirable latex file to feed to
>     > xelatex (maybe
>     > pandoc-csv2table is doing something to the produced latex?).
>     No, the template is structured in such a way that polyglossia is
>     loaded before longtable, but polyglossia loads bidi in order to
>     deal with RTL languages such as Syriac.
>     I think your best bet would be to modify the default template and
>     load the other languages somewhere toward the end of the preamble,
>     after longtable and any other packages are loaded. But you'll need
>     to know some LaTeX and understand how Pandoc's template language
>     works in order to do that.
>     In actual fact, though, this may be something John needs to think
>     about, because the default LaTeX template obviously has a problem
>     here.
>     HTH
>     --
>     Joost Kremers
>     Life has its moments
>
>   --
>   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 [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/2a8d8b0d-2740-4dfb-
>   8718-f06432d6425f%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/2a8d8b0d-2740-4dfb-8718-f06432d6425f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout


  parent reply	other threads:[~2017-06-11  8:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06  5:52 Lyndon Drake
     [not found] ` <89122680-f883-4853-a97f-a81861395b78-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-06  6:41   ` Melroch
     [not found]     ` <CADAJKhD0J3JG_qqs1yz5eDORPFRFJCsefUwsGq4+taYkvn95-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-06  7:01       ` Lyndon Drake
     [not found]         ` <99f9330e-3a82-4a0d-8bb4-4ec2513723fe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-06 12:08           ` BPJ
     [not found]             ` <CADAJKhAMLTJrfZG28bac8X+Sj589=vqJ18WswEax=1iEukafgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-06 13:26               ` Lyndon Drake
     [not found]                 ` <e028cdb2-2ace-4a13-8a13-3c2858f002b1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-06 16:26                   ` Joost Kremers
     [not found]                     ` <87d1ah84m4.fsf-97jfqw80gc6171pxa8y+qA@public.gmane.org>
2017-06-06 20:51                       ` Lyndon Drake
     [not found]                         ` <2a8d8b0d-2740-4dfb-8718-f06432d6425f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-06 21:03                           ` Lyndon Drake
2017-06-11  8:43                           ` John MacFarlane [this message]
     [not found]                             ` <20170611084305.GD95963-l/d5Ua9yGnxXsXJlQylH7w@public.gmane.org>
2017-06-11 13:28                               ` Lyndon Drake
2017-06-07 16:23                   ` BP Jonsson
     [not found]                     ` <ad97e931-ac10-0204-d03e-c646e32e4ba1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-08 10:13                       ` Lyndon Drake
     [not found]                         ` <CADAJKhBNwTRaK=Htarn-YzJfCSVCeN5C-z46XBArgW1J6R3RYA@mail.gmail.com>
     [not found]                           ` <CADAJKhBNwTRaK=Htarn-YzJfCSVCeN5C-z46XBArgW1J6R3RYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-08 17:20                             ` Melroch
     [not found]                               ` <CADAJKhD=6C2Zz0J3u2jB_7XyX+4+b4ui1bTr6wTG5kSVDHbYaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-09  8:02                                 ` Lyndon Drake
     [not found]                                   ` <a5d78535-d049-49c9-a77b-ddfa3b226302-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-09 11:12                                     ` Melroch
     [not found]                                       ` <CADAJKhDeJ6fWqdr36Yd1fgZLbTL6FZGVPGahNN44HoezJo69dQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-10  8:38                                         ` Lyndon Drake
2017-06-07  5:43   ` iandol
     [not found]     ` <9105b544-18e3-4f40-be43-fb04c838b4de-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2017-06-07  8:35       ` Lyndon Drake

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=20170611084305.GD95963@Johns-MBP.home \
    --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).