From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/17814 Path: news.gmane.org!.POSTED!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Going round in circles with latex output Date: Sun, 11 Jun 2017 10:43:05 +0200 Message-ID: <20170611084305.GD95963@Johns-MBP.home> References: <89122680-f883-4853-a97f-a81861395b78@googlegroups.com> <99f9330e-3a82-4a0d-8bb4-4ec2513723fe@googlegroups.com> <87d1ah84m4.fsf@fastmail.fm> <2a8d8b0d-2740-4dfb-8718-f06432d6425f@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed X-Trace: blaine.gmane.org 1497170600 7400 195.159.176.226 (11 Jun 2017 08:43:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Jun 2017 08:43:20 +0000 (UTC) User-Agent: Mutt/1.6.2 (2016-07-01) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBJ4F6TEQKGQE7JLISWI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jun 11 10:43:15 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-pf0-f189.google.com ([209.85.192.189]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dJySo-0001YU-RZ for gtp-pandoc-discuss@m.gmane.org; Sun, 11 Jun 2017 10:43:15 +0200 Original-Received: by mail-pf0-f189.google.com with SMTP id v29sf7631782pfi.0 for ; Sun, 11 Jun 2017 01:43:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1497170599; cv=pass; d=google.com; s=arc-20160816; b=SAXQD1RaP6M9wLCFD3Jalw4k4MGM+aq1YRUuO92yxMT0UHq41F0yIJs278fAY26Ulh HmHVYu3oFiNDkunqVX0p1pcb32TPVdyYVuiTSl0feBN9fzqumtNjlRqCIBmikRfZx6Tn 6tfPizwABHZMJt5eU/jr4V+uhDovS01/8ZOKYn2NguhX3bgWTPWRuaiG3lemJCjxxiIw IaR9Qnd8XFRSz7BZYcJZjkpKHjGBX9wjN092uR40RwiSmVzICgMjdXW81NSBPW8K2lCM YP0ORBzD1Gjnzs6ZfuYQX5FkqUnbfyffHnpLFgIOYatW5S2wp8PFjQzrsHIDIQxF2/rl yLJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :date:from:arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=4Uh0tYKDqu7Yhsy7ZKcMEFlnA4tRVddYbJKsOruzOzA=; b=Ol9SMpBgvhZHKG8j6gkZhGqvuJBBsWCrjgnO1/qmlu0FNH6HuwVyXzhhHIFUVeNFd/ p8cUpi/w4J+yGEfnoAaHPhjPoIV+1CTZw2j42x8MTbTitP7EHX78Vwar6nB0o9quqUZN g3DDZk/lM6wl9m3TLP798Rz+dwNO3Ul0443wkaTbSoAY43BIHHG4wvJhUr/vc5m8zSLj opcNWpFw+OqBD+DptONieAmCDuFRFfoIr3cibGempdRUvFo6PSwUQItDr0EHelOTzRhf 7jjpZKjZ/BHN0XirwBf2EZM4nPkb9S6wtouIs5THCJX0K653HhTeSMMePpY73q0xURqH ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c00::242 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=4Uh0tYKDqu7Yhsy7ZKcMEFlnA4tRVddYbJKsOruzOzA=; b=gJ2dL+KCb8xzD3kgghyd0Y6ZAVW0YXBbXFBSpGUBZVndz83pwfCLE20fFTVCGK7CB6 x+9Zf9mMEvtYpAyqkixBPTeYnzwcVmodp2coUEg8wJxF6W/3jjoSsaRJxKnEtekhVTgZ cusdfu2KJ5iUUPtUnSd6gNQDiuuFJd9yn04ZEz5PJVjeudv/c3yrYGzK2sYaB81FYSzb F3iJb6TgjlNs9PRepXV+B278iyIKLZwBhgmad38DlWpL85Dch6s0q8ObZ82IY2aSX6pA ilhPS5X8uk+Osybvoac5uSyLZ8P+HcSqoQG3Qqg4cLpP4HLkgkjKGwJAEcyNfuXnex9Q T4lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=4Uh0tYKDqu7Yhsy7ZKcMEFlnA4tRVddYbJKsOruzOzA=; b=hRnQJ5afDz0bgHQyKrTl1MHppGFnCm+u9t3Ngcn51gdDxohpIjM6r3R47I0vmwmhaf U2fV3fkffG2+3r7yzakfIduhH4ONf5uqz3tJPOXFTRi6YSAiSCXwRvzz+SK4Tg4u3Pe/ OgXCvLIWV9IDNyIiJrJrUna7QfsyYcp7VNScrwwvlt/5O5XXSbrCfIo9nPYTnnjCn/Nr gClBpWzN3scn22inhU2IaCtbMmRrsYQze9o/fKIy3JAwp/iwol3f1BjkqOgK41Rzg6Ff Ew4LsS6pigVMqzb3L8xPt6vx67xtl5b+dwTyutKYf23AQ+4XCKT6a/igKjg2AQPw2GUv Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AKS2vOyldWbD+YLRsHtVVsaIMlPiF043xI5BGKJoqa7kBR+kwajDg14E hT/QrxWm0dofYQ== X-Received: by 10.157.80.24 with SMTP id a24mr1175432oth.18.1497170599842; Sun, 11 Jun 2017 01:43:19 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.28.142 with SMTP id l14ls12849651ota.14.gmail; Sun, 11 Jun 2017 01:43:19 -0700 (PDT) X-Received: by 10.157.56.170 with SMTP id p39mr26875809otc.83.1497170599441; Sun, 11 Jun 2017 01:43:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497170599; cv=none; d=google.com; s=arc-20160816; b=MjAOc87mcbGjNLTWOzLsK9YlIp20DvXILy/vzRe2Q4huzYSCTyKMCQ7J4mGaWiN3SZ KQ56PVBCQo+s32Iy79XS1e1cBY7ShlnAkS00ToX2YYcnRDr36u0ftHqesHpeuUPNS+07 ncT+IFVf+khvgRIrrk/1uqS9oJisuVPiiVXeGsw1Oi9xjXfsmV4ARN9n+nm0TvWw5yF0 2uwf7WEfH3NGzyVpJk/dInZHRsv5m6FvL9LvnUW+K1jLmUj3BAUANrSe2k0blAF6MEFg HsXgOi6El6xx9PP2XORkh1VE4fXqbOvHHYFSTub7QiksXJ85HVqF9ExD7ybOMUnGaVZJ 5cFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:date:from:dkim-signature :arc-authentication-results; bh=2Wt36lwnvA8DCH3M1dDMnVEa27T6ClNkxITjAhD+uuQ=; b=YPBOZlfoB0SWcv6lED0RILEMuqqOQEyExjIHNnZbiS9udHuchog9XGUVrAen2iMSI4 2WCGFC085FOKG7hv3m7eDuxuj6uaR7qkeHgJ3tsK/87dQWCv7gr54IDpDR23TnHtOBRZ oUFW+SF8J++Uvyv73Ri/Am4LXzpr5QyN8GsbabAZPclkFgVjK8oOlh3c8ux/95IUowTQ yvBK60YsAIsfEYJCnaEiOQeHLepk8Ziopx4RegaDn4pc6+P7LTLWUFcQ46IuUWIn6zlu 72w185Fw1oo1/bN6O+0noweaUR3njHakr5fU1xouOiRQfOK35ljC/iS5h/jsiMpR/BKd U+IA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c00::242 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pf0-x242.google.com (mail-pf0-x242.google.com. [2607:f8b0:400e:c00::242]) by gmr-mx.google.com with ESMTPS id b64si1311279pfl.1.2017.06.11.01.43.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 01:43:19 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c00::242 as permitted sender) client-ip=2607:f8b0:400e:c00::242; Original-Received: by mail-pf0-x242.google.com with SMTP id u26so13278668pfd.2 for ; Sun, 11 Jun 2017 01:43:19 -0700 (PDT) X-Received: by 10.84.217.87 with SMTP id e23mr18167788plj.143.1497170598871; Sun, 11 Jun 2017 01:43:18 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id o2sm11037642pgq.44.2017.06.11.01.43.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2017 01:43:18 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 8B27EA2A1; Sun, 11 Jun 2017 04:43:07 -0400 (EDT) Content-Disposition: inline In-Reply-To: <2a8d8b0d-2740-4dfb-8718-f06432d6425f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-PGP-Key: http://johnmacfarlane.net/jgm.asc X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c00::242 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:17814 Archived-At: 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