From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30916 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Normalizing spaces in italics Date: Tue, 05 Jul 2022 10:26:26 +0200 Message-ID: References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10426"; mail-complaints-to="usenet@ciao.gmane.io" To: BPJ , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBNXLR6LAMGQEZ4ARKBQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jul 05 10:26:34 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f187.google.com ([209.85.166.187]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o8dtB-0002Ys-B8 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 05 Jul 2022 10:26:33 +0200 Original-Received: by mail-il1-f187.google.com with SMTP id w7-20020a056e021c8700b002dae30c776fsf5438229ill.17 for ; Tue, 05 Jul 2022 01:26:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1657009592; cv=pass; d=google.com; s=arc-20160816; b=IBsCXdVjmzL7gT6SKOaV7AzauiZ97RXrPsslr1BpKlwS0MSHVxCEgdmVFSCyRVp/BR 9VLLVpPQHl2bWoY73bDwC8SUXdt2MnA42cQM55e+Pu5vQKFsN8lL859XxiGitYJ42bPU Hm4uZ7mvovHpfOnQzeTlmwspaHSzR1hUbm3C1dwiKDV7JJJiTLfEK82CyBz21JYoXyCQ zRnYYFwKEakxVfKMsLNgR/34MVbzrkrmG3mfTNNIVFx3uCScp9G27GOWgsGI3WDQvC+N TcJw26cKd2NQEvoypbDqp/ko9+lHdrMSUWw+HGDIC51x567PNTpkURKETPz3qeaNJM03 r7PQ== 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=wjc5ihrHmjCxwIvxXV81oKfLnuUK3AS9sQtgASqABs0=; b=tUFPok6I6BdM851RnVPQGIe+m6TZXzg7tVl0hhRgcoMldv3gmxqql1y3jYrBQFp71E SEM2VhjjfL7QVRcowDMyVwdkLyjv/G8rGo/uuVOaqlMB17gpQqmwjoCt92GNGLavilQT 1M1mZ2dtUUMEnmrpVG5aDIvA/cjfzUtf/0eE3pFtH6v8MZW7pZVsqbOU4NN65oTAAPGl LjDFOjVF5U77sHW9pu8bgq3ZGjsNNX3jU0+4b/kI3Hq7d+WfulVjzF7aDuZQHXlbjy4x Bvk0RRHYKv/eAhsC1K/4rAfaxzuaeGk72dRO78sLLFYJc+b4XGSnVXUpeQuW5TtwETgB jILg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b="SMlc3/VT"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102b as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; 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=wjc5ihrHmjCxwIvxXV81oKfLnuUK3AS9sQtgASqABs0=; b=JiS1D5qEPxUdFN+jkMWIzM/eQd4QfJeKX95zXsCCNrl3k1OOKNDiVA8+j1J+RcdIzH boFTTaF2B+nyFiMs+REs1DxycjuHh6x0RhejFmMb1GqZIyD1Po2IeBgnACPMWFk5ExxM /nejHtVvCNI3Z+bIloWPsdYoDDdmLkOZ+7HJrj4JgA7iva94CTEfWvVUqpEX/sqrovpV ZF2Q8VxHvlPknprFcG4nCNgHTdr2hVG5WKTZiuZhCJXthzwxJOY0kL38DNS9NMZ3yyDD 0hwGPkrb1grwvqHk3hJ2G8qyt6xalXiXSPE/Pqd0zKSu+pmCZ2pVRCdYt6QEymQ9lw44 3r3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=wjc5ihrHmjCxwIvxXV81oKfLnuUK3AS9sQtgASqABs0=; b=GqRBgbRMz+Q/qiqHUAfOCkYI3fiM9FqJzBI5Ilokr5DBETEmy5BOxtIZ2IPP9UEIfV pfL+YmCiV6OM/Cwcs/easT9Hr5/uLveSnXcI+UhmKA5htsVD0ph8xfFIwIM4Z409GaaQ IaMbvr1Q3xzAhay7Zmh7+yg9T/FoUPeINb8e1YN+fgTxhf3+DlGNokaXLHpWPDJ4TAN5 FEGHPuHJIfcGznyRCzPYUtxXf/OgODD/yDeiH2QpKciQukIkFh5wtImgFngE2VZyd3DR hoqzUAxRKjwDYb0Q/Hu3PMHazZVLYvrUcnEIsJlmboEoewaODF7BH+4dKgRl56HrWSIv +nDQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AJIora9niuIvqd7O22GBWGiIcLAkk3ihIm8DjIASUvaFEpvE62S8iz11 pI1FvjzM7rLJn85qC/2RDHE= X-Google-Smtp-Source: AGRyM1tIOadaWaUaRwa7RBAmqsH4pmXT5MfWDdr4wXCIA2xXOZF3mDjttPOpwKeEpmZL+fnbd5MFiQ== X-Received: by 2002:a6b:7908:0:b0:675:79cc:3471 with SMTP id i8-20020a6b7908000000b0067579cc3471mr17504590iop.173.1657009592267; Tue, 05 Jul 2022 01:26:32 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6e02:d94:b0:2dc:14b7:c282 with SMTP id i20-20020a056e020d9400b002dc14b7c282ls492725ilj.10.gmail; Tue, 05 Jul 2022 01:26:29 -0700 (PDT) X-Received: by 2002:a92:7f0b:0:b0:2dc:ef6:29c8 with SMTP id a11-20020a927f0b000000b002dc0ef629c8mr6312248ild.286.1657009589597; Tue, 05 Jul 2022 01:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657009589; cv=none; d=google.com; s=arc-20160816; b=QPh0mHWdtoHEOzZ50GkdmmuCNyK+CX0ejxDFi3x0yVvBuZBH709u6NTedWeGYxdSvm Q+3eCymtaFzt9RYkrD7mcV9E1dAzo1AHSZBXCA1D4HbQAimPbczsroZM/+ml3LhMGznP +ZMmlInsHQIQvZ6rD1Usw3Jo96hCIhyIF2QrPYRxRF2PYTp76mZ+qk3ddTrTDVf66IgH vUaq/ooAll47r3iG9W9DqqJcyxNKGIE3TePHqtUXW+a9ZH7KSpYG11/oBlENHMcumMoj 8Rk02Htslyrbdv2oKvYW9k/i5gYdmTutYNCOj9YLJN4RURUNyDztESKVuIqEaRVpSKZ/ KJEQ== 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=4yVnefy2Q5iKkWBY517ph34mxCctsIEzbTZ52Ljh+j8=; b=GfWkE2uaJIXdiCy1NoEIQlN1JokZze+7NH50YD9NYOmZfulJcKkzdpduRUxJVjxjLy OvyGqcGx0p9KUmPYpFcI79Nx+FGEROIEiVILa/eANHlWv6TDpOLBGE/ZyP+L1KwdUnew Y5QtQe3KEXt21qOIkEy5zSmJq96glFXcLpFx2ZFb2oi9U45Pgs6hBI2yfXKmpjtqTEex TGB4B0eXPiBWbGE4ZjyYeMKzeu1xPai1YcVQHntsSc4QYZekYVeAEk245GqPJ0g2rSLg FYDY6jcoZMwMG4p1paut8f1IyCcn3PnDjStupuIfz0FwkQ3CvyfT9mnQ/sTAs+3KpAPt 99ag== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b="SMlc3/VT"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102b as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu Original-Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com. [2607:f8b0:4864:20::102b]) by gmr-mx.google.com with ESMTPS id f13-20020a02b78d000000b00330ebfb4c33si1584161jam.1.2022.07.05.01.26.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Jul 2022 01:26:29 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102b as permitted sender) client-ip=2607:f8b0:4864:20::102b; Original-Received: by mail-pj1-x102b.google.com with SMTP id ju17so6359243pjb.3 for ; Tue, 05 Jul 2022 01:26:29 -0700 (PDT) X-Received: by 2002:a17:90b:4ac9:b0:1ec:9bd1:92ff with SMTP id mh9-20020a17090b4ac900b001ec9bd192ffmr39344516pjb.178.1657009589011; Tue, 05 Jul 2022 01:26:29 -0700 (PDT) Original-Received: from hermes.johnmacfarlane.net ([45.32.92.108]) by smtp.gmail.com with ESMTPSA id g18-20020a17090a579200b001ec932d7592sm14363987pji.9.2022.07.05.01.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jul 2022 01:26:28 -0700 (PDT) Original-Received: by hermes.johnmacfarlane.net (sSMTP sendmail emulation); Tue, 05 Jul 2022 01:26:26 -0700 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 header.s=google header.b="SMlc3/VT"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::102b as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu 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.io gmane.text.pandoc:30916 Archived-At: Might be good to build this into the docx reader. BPJ writes: > I use this Lua filter to clean up when I convert from DOCX. > > ``````lua > local function handler (elem) > -- Get the length of the content > len = #elem.content > -- Check that the content isn't empty > if 0 < len then > -- Is the last child a space? > if 'Space' == elem.content[len].tag then > -- Remove the space (last child) > elem.content:remove() > -- Return a space *after* the element > return { elem, pandoc.Space() } > end > end > return nil > end > > return { > { > Emph = handler, > Strong = handler, > Strikeout = handler, > SmallCaps = handler, > Underline = handler, > Span = handler, > Link = handler, > } > } > `````` > > Den fre 1 juli 2022 18:37r.d.go...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org skrev: > >> I am a bit sloppy typing italics in my wordprocessor, and generally only >> turn off the italics after I hit the space at the end of the word, so I end >> up with markdown output that looks like this (when I convert from rtf to >> md): >> >> Strictly speaking the qualities that are imposed by the *logos *of a >> certain thing are the *activities *of the *logos* >> >> This looks ugly when I open it up in Emacs etc. I can fix these with regex >> replace in Emacs; but I thought pandoc had normalization by default now, >> which is supposed to fix these kinds of stylistic errors? I tried passing >> the markdown again through pandoc, to generate markdown, but it made no >> difference. >> >> -- >> 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/bd84993b-b1cd-4128-aab2-ce1eff2c9768n%40googlegroups.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/CADAJKhCj%3DdCQ%2B1BkzkK7%2B%2BbJn8ajpKkbxYHYVrHaC_NRjVQ15Q%40mail.gmail.com.