From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/22060 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: RST to LaTeX with highlight directive? Date: Fri, 08 Feb 2019 17:41:44 -0800 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="110450"; mail-complaints-to="usenet@blaine.gmane.org" To: Sam Reckoner , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBZO77DRAKGQEJ5RAFZQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Feb 09 02:42:00 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-yw1-f61.google.com ([209.85.161.61]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1gsHeZ-000ScJ-UN for gtp-pandoc-discuss@m.gmane.org; Sat, 09 Feb 2019 02:42:00 +0100 Original-Received: by mail-yw1-f61.google.com with SMTP id l7sf3455840ywh.16 for ; Fri, 08 Feb 2019 17:41:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1549676518; cv=pass; d=google.com; s=arc-20160816; b=fPh5Pas71SRmEnw46voFvwTTn1P8AR3GqMLZ4qm/EeL7MuyVVAWYDRAqR3zxAixNZA B0MhcgHPslU5oilSCXYkCo0uKAelZh6Rdw+up5ZuMwZUcwDLc8T6JzFFsvLo9wOWqRRV hBKGR1+8Tx35+nQ0hKcV+OCm1rffjAB/MGnE+IUjr9PSNmpTX0yIxlCpWZUa1uWj3YjK KDUdgYP4o4hVoESYnSm8ORgdkFC3MAVbYDDemdNNpbb1L+HNpwecBbo7UyvKWgECKBt4 a+rzA+W7HD1EL6/UClylMHDtAKAd0u00OHWDMx+CA6hEvxOT16OdZF+UcR3yHVqsKJLy vT/A== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=kRPmLm1/GoTAy/q79YeDaWi+5hmFnftOVgZ2FQjx+fc=; b=q1PHZAq4FGvT4NmxD7E1kmrnt6H7E6DTsVkPoBEW+OnBUUUIngSn48MVDyyRbWsqcP OLExhw2rceOsl3WdNRbWxbVK2QXS233wNMPiix7/AVzF4Alh1ZPzR4EP0KQTGDMW/9Y+ HUcqx4ZQZKl0W/kCA8+S0FDX5t+YeQSeXwAk8Xot7san8bI899dfVlNhDNXLkgALbBAK PMJoTuOj9MUCK131d7I7BYL3uNL8PkPtS5uxUPS5DB1xBqco11QrXXZKXw1lcotW3BiW ZGe+b5YK+OVG2LpZxyd50bz8wsPhMqVktcYe7HMM+dVklMqhnkE4IoR6IA2PkY31Dpqp 8HKw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="Wi/juOT9"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::629 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:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=kRPmLm1/GoTAy/q79YeDaWi+5hmFnftOVgZ2FQjx+fc=; b=anLaC/NhHDK6i/YwVGTotbAgjb1PMiaUvxIWnaqXNXfU5PEPvhw5/kyJw5JmugOf26 EJ4XymUD/bFjr9fmASsDgdOPoL5WsATs2jXjofIbEOFVp9lVw1e4nuxHLFQ0t7PCO5Ps 527IO9pf0JTMGhuy87yw247R+Oz+xhFil2XyKy8FaXPzLCLxTNBCOoN70xcVh8/LW6pu tNmzPtgtGQOTIPwv5FfHgrO5k4mSzFDRfEfAQDU9fOZjttEhWjkRHJfYX9LshfamL70W N/vaFZ3xb1pBn3MUUxT4H4x3RE0EWyoE/3+J04bsM5RxTFG9yZdd+XRCCjFEJXxlxG9h 8C2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version: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=kRPmLm1/GoTAy/q79YeDaWi+5hmFnftOVgZ2FQjx+fc=; b=FXVD2FHT0zE15w+zDM0BLRESs7yTKes4LvjL5jJ6MZhOYpH3IAqdKxlvymX57mom/8 0oCyWkugVNIogjUL0DUqxXoGwk64FC6aroEOHfJuuHFfHJcJvpVYHoNfL77tHFTStisA AeNYBpw4pycjSJ8koeNpqsPsgmP7/7WYIAj8aT+16Ua0CmVZrT/OLWoH2mhC0IYxspUb 2s5huB3zvI2f7ZbMn0Dhf+G62jfOnQB/DHFc6ILpK54py+gJdI88wR94B3x7tU2ViZxL F+AMSlm/R4R8/nLfn5or0S9Ms8SfH3RlKh7T9+cN2X2EU3qy9wFRNZHl7rs1v8meqi9k srMA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AHQUAuY9KdmUHfpOcZzDvLObQ2aFFAZ57m5q016s8rYKCQaLcvYLPZtg Vmxt6YV/MbOVS7ggqOaAYt8= X-Google-Smtp-Source: AHgI3IaFQ/OHEiUNWKPDlNvfPwjYesuCa27Shw/tfBwJufcv9BwbOLnHphR2wiNJXSAPNpIUoAAvIA== X-Received: by 2002:a25:ab82:: with SMTP id v2mr229497ybi.3.1549676518787; Fri, 08 Feb 2019 17:41:58 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a25:a223:: with SMTP id b32ls2569858ybi.6.gmail; Fri, 08 Feb 2019 17:41:57 -0800 (PST) X-Received: by 2002:a25:6643:: with SMTP id z3mr10505127ybm.16.1549676517301; Fri, 08 Feb 2019 17:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549676517; cv=none; d=google.com; s=arc-20160816; b=jStVsb1wpDhMpWxX9sfACzORqQeudo4Q5hYAdOMxAxhjLKXZb6pVG5NJhT1t9i3rLE B214NHGGmbCTBj0gXr+4iQOssf26kveIdzd9B1s8pvlFAxeX+v1xHWyECJZ/f3D7Q672 xXL/blar6LkzuKy43bVeE/t607iMt1JrJq6Wu0VavAMRuWDNXx1jH0ygBOwCFdHvhjXM H1YCCGVfntEXYVWteV+WlR8y7rEZ9QEfCUzRLtofR0S3tOX2sObZe6IOhgaT5OV2RpLa 1WApgm4aP3jXQY26SR0BGBf2D0SqAT4FAlgx8ygpIFSv2xhpdE78J4Pk8Gj0dYhlaEqS W1zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=Ke1eZr/CVJwRZGXiBYFQzLz+Q5IcJkjVC85qaOhsFUE=; b=CrHnwA4Ftp7ET46JyqEet5BTU0Oby9ynw62+DkgSMlC56sg24AFO7okK8Kt9Lt57PY 6XWSxyKgzpVa5MZUm5jn9OACUf+47dehulX1+cJJq88FJrkPvmTokjVKc+m01mbVKes0 0nGe1FtO5Vyiwjcy32xO8JkY9vk65eEaEhn0iKZPf/ig35Rceic8HDdxYfXJ457xtFX0 tn9cnYhrY4zSj0KKb1cdpLCyWDFa4YwA0goEPtGNuQGah1RZMn7pfQUFjoqFa+EzWyFd G91lUYWQ1I5RwQaR0+tGEE+1zA1AvcoF97a5t8TCyWyfi/HnG7juHwQ1v2e9eOxtB0Ct zHgA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b="Wi/juOT9"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::629 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com. [2607:f8b0:4864:20::629]) by gmr-mx.google.com with ESMTPS id i1si237182ywg.5.2019.02.08.17.41.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Feb 2019 17:41:57 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::629 as permitted sender) client-ip=2607:f8b0:4864:20::629; Original-Received: by mail-pl1-x629.google.com with SMTP id u18so2514768plq.7 for ; Fri, 08 Feb 2019 17:41:57 -0800 (PST) X-Received: by 2002:a17:902:147:: with SMTP id 65mr26093527plb.116.1549676516928; Fri, 08 Feb 2019 17:41:56 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id f2sm1004245pgp.32.2019.02.08.17.41.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Feb 2019 17:41:56 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 03174A177; Fri, 8 Feb 2019 20:41:45 -0500 (EST) In-Reply-To: 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 header.s=20150623 header.b="Wi/juOT9"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::629 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:22060 Archived-At: If I understand correctly, .. highlight:: python causes python to be used as the default syntax for code blocks, unless they're marked differently? Looks like it's a special sphinx directive. In general, we aim to support standard rst. But I suppose it could be useful to support common sphinx directives as well. Feel free to submit an issue requesting this on our github issue tracker (jgm/pandoc). A possible workaround is to use a lua filter to insert the 'python' class into every code block. (Easy.) Sam Reckoner writes: > Hi, > > I have a large number of rst documents that I am trying to convert to > latex. The rst documents contain the .. highlight:: python directive which > causes the literal blocks to be code formatted correctly but when I do the > pandoc conversion, the resulting latex does not produce the corresponding > highlights. I am doing this on the command line with pandoc 2.2.3.2 on > Ubuntu bionic. > > pandoc -s foo.rst -o foo.tex > > For other reasons I cannot use the .. code: python directive. > > Thanks in advance. > > -- > 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/a4ea56dc-3217-44ef-9b9f-5e733b417458%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout.