From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30059 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: MS Word document always differs Date: Wed, 26 Jan 2022 10:55:21 -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: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3826"; mail-complaints-to="usenet@ciao.gmane.io" To: William Lupton , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBLNSY2HQMGQEDKMHTGY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jan 26 19:55:45 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-il1-f183.google.com ([209.85.166.183]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nCnSL-0000pn-63 for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 26 Jan 2022 19:55:45 +0100 Original-Received: by mail-il1-f183.google.com with SMTP id u7-20020a056e02170700b002b54e12bb9esf431791ill.6 for ; Wed, 26 Jan 2022 10:55:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643223344; cv=pass; d=google.com; s=arc-20160816; b=dQh317KveGKHPeUsgzr0yQZgCLm9fQYu7xxipHOGMnPaswZ9LSUiW0YidWWwq7ZDMQ sC39JgAq7XnXNQI4tmhTfjF2GFhsWuzzNh5JIKYLgYyj/kyAY4CKaL3W1wxVeLu1s15w 4WFQG97glu+Q3xT/SFj8YXIKDiJSGJXiW84vm9T2CJygPebKYOiIRGf4Akvpb8g+JXxd ppci1Z5UkkyL9sjvcTOC/kL6u0DcwizRvTmggAOGOcwtwWSnvy5Hct76pJ301Xx2YiuM D69+Du/GNOq+EfyaA99Ar7blSnqnoRWLM8keypmI61mq6+/P2aSzg1xJYnpMLIgYl2O8 oFRA== 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=Aeh7Dj878jsB9AxUcLRpKwl3UUFa2ltX7Us4cWRKQKw=; b=wi8XyfTwV/wQ7V18af8NGgP4lskDwgL91YOPEa0MRX+4aHvyaPSSDe1lbF4HZsCaKZ y2FoN0nyKFw45mAkxYEtsfryTtdn9u21t1Gc4wXtw8vRM3asUypBuKz0wo17IwT9/Yi4 GSFJJTqhX2jn8l/h2624quD6QwojkHUKer4n2JLy7jvgT0lz/h5Q56qUgaXa+u9FQz+i Kmg9LavuMo0lpefFHZbmVHubVj+iyzrx4MFO/y/koswo/l4NzqZoBjdCjrE+ONph2szH suVYn3/7EGi1Io2B5jpViFUE63iYsTJUKwqirr+4wf3Yi5N6fQDeEc64PbmI9XWaPVUm 7O/A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b="a1Lh/iZP"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1030 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=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=Aeh7Dj878jsB9AxUcLRpKwl3UUFa2ltX7Us4cWRKQKw=; b=R9Cs4Sbv/8HcepXcXln2WHBnckIgj3k9/GJXTGVvJA+HsZmi1k+O9rUofpSTUYF5f2 Og4k8WWzGDZjyPT8L8xgZR3SiBGUoE/lGSSz4ZSvXigbEXcGnIjm5gLAB+InoxPKMY1P +/1CK1P9YTeJo735Ncud39LRbuhw/U++HZbPLpFQ9TZmS4Y8/bCjrDjU/7pfxL/xNW5I etYs+M3AVcvGT9n09Rb9mw7XFP/XZp+gu6q5twVgrwDK/u0X5EMTP03YLt2uS7LccjsZ y5NoJ1U7Ts5lkY8lP0eq4VL5XcQ8uhsZuOrrlRDTTc3YKzmiZbJwo+73Kp7OZxVjYIX7 f19g== 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=Aeh7Dj878jsB9AxUcLRpKwl3UUFa2ltX7Us4cWRKQKw=; b=mDAEfSQijRYArccuGsWXDLaDrjkz15wJMNDSBzoNghhK1RZ1kRbCH1HpSW8aDFdbTg RZUndAesAj00tpShr6SCTPoygiZ/tSdJm7FIWJpBNhhzzcfMUcu95Iwnq6FmeFROs+W0 Ys6faWpHJt1FXUGzzqCQeEFWBmYFMKiJTQ5AFoeYbx28Z0hmxPLY8y202lMmndJZiOy8 XUhFNKIIwIgbLl9+d1jn9xSwmfn/TkpHab+OCo1WlJNs3oPMMcmBg9Syj2OkBII37Z9V N3NViDhBJsnltblHDMf3BdeWIV8lrFd1Cs5VfpaB9qmTVaTD2bVDOJUxeZOPc55jYypD jmwQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530sbu1KbIMBDx+UYjWugrN3iD7wUowjiduMvP/xmxPMeSa8IkPB JRAHg7qLfjtXLGrtyfe+Qa8= X-Google-Smtp-Source: ABdhPJxvY/cxk9PTe4UCTz+JIzXPpp55RJBnWsMhTnKkoRG7EwVSM+8y9X/PtBXspM0N5dqdc9k8IA== X-Received: by 2002:a02:a316:: with SMTP id q22mr7894612jai.309.1643223344028; Wed, 26 Jan 2022 10:55:44 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a92:c5c6:: with SMTP id s6ls92159ilt.7.gmail; Wed, 26 Jan 2022 10:55:41 -0800 (PST) X-Received: by 2002:a92:d78b:: with SMTP id d11mr353920iln.226.1643223341695; Wed, 26 Jan 2022 10:55:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643223341; cv=none; d=google.com; s=arc-20160816; b=xS7ebp3kaTwQUYyyrCBicv4a1ZnKK8DgDYqnA9lpzj0GkADSO/A55lN/8oj7E6pAtW //3b3XUoIebWvgMk5SkFhFFnue4V42qQWXbja2y4JUp97ZUAS2tJPbLfSvn+Tj1gb0LA 6Oj3LA0OincfEb3S//RJRf0bkUrHUbS2V7Z+hkmWnYqbbJQLg1GkCljZZnIAft16W5zW kH+LYdhJWkz+tx2tniINe8gwb/l2cWgTA0TOnVADZQAs5iI5udDAP8CXyAjzQ27TIZWi IjObGRv6eL9z1oSxTUkfoI0uATGQnR0XKnL/H+tndixXuVd+s775LwSg+r5pn8kLV8lD 9XPA== 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=4iKJOovwwblzGCsg80RewdOedR2lj2GjoYMb+LgXVYw=; b=use9+Z+LbjsqBrBPl82Qz5LImACHe9JzF3xw5xN5MPNY0iT4AmKMnSCwoYQBodpry4 6dXpjmjqHJGMbrswmknX5GQjW+DTwZQ79aTwKbH1R6mszFCfSoZAyK0cozGYqRvvoNWo oiKv9vwq96320YQmV5vpzthn+27dLmaXvX6k32IvpQSOJqk4Ef+dBgwBZfHSGk/Loa1e nyjGi+wjUmj4llzWznNNaZDcmmNJ8PkVBfFqJ6yi8m3PCNnmZjgeO3GUwLllK+kPQLy9 uFchLS10tHWyHOPiF6nGkKdzCza85EA6QTt1z0w1rsSJk3sTSGYpLN50PCDsXGBohOcl znCw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20210112.gappssmtp.com header.s=20210112 header.b="a1Lh/iZP"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1030 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com. [2607:f8b0:4864:20::1030]) by gmr-mx.google.com with ESMTPS id x11si12029jas.5.2022.01.26.10.55.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jan 2022 10:55:41 -0800 (PST) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1030 as permitted sender) client-ip=2607:f8b0:4864:20::1030; Original-Received: by mail-pj1-x1030.google.com with SMTP id o64so535816pjo.2 for ; Wed, 26 Jan 2022 10:55:41 -0800 (PST) X-Received: by 2002:a17:902:9a08:: with SMTP id v8mr312200plp.109.1643223340716; Wed, 26 Jan 2022 10:55:40 -0800 (PST) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id h13sm2937763pfh.40.2022.01.26.10.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 10:55:39 -0800 (PST) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 07E14A298; Wed, 26 Jan 2022 13:55:29 -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.20210112.gappssmtp.com header.s=20210112 header.b="a1Lh/iZP"; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1030 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.io gmane.text.pandoc:30059 Archived-At: See the manual: https://pandoc.org/MANUAL.html#reproducible-builds William Lupton writes: > Just commenting on this: > >> The two file always differ when I try: diff expected.docx sample.docx. I > do not see why they should differ when they were created with the same > parameters and source file with only the name changing. > > A docx file is a ZIP that contains many resources including a file > called docProps/core.xml that includes "created" and "modified" properties > that indicate when the document was created and modified. > > Therefore I don't think that you can assume that two docx files with > identical content are in fact identical. > > Perhaps the word/document.xml files (also in the ZIP) will be identical, or > perhaps it would be better to convert to a different format for comparison > purposes? > > William > > On Wed, 26 Jan 2022 at 09:40, Nandakumar Chandrasekhar < > navanitachora-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Dear Folks, >> >> I am in the process of writing a lua-filter that modifies the font of >> font-awesome icons added to a Word/DOCX document. >> >> I am finding that if I were to generate a file called expected.docx from >> the code: >> >> pandoc -f markdown -t docx --reference-doc sample-reference.docx -o >> expected.docx sample.md >> >> and then generate another docx file with a different name using the same >> source file and reference docx as below: >> >> pandoc -f markdown -t docx --reference-doc sample-reference.docx -o >> sample.docx sample.md >> >> The two file always differ when I try: >> >> diff expected.docx sample.docx >> >> I do not see why they should differ when they were created with the same >> parameters and source file with only the name changing. >> >> What alternatives do I have to stop making the files differ. >> >> I need to write tests for my lua filter to be accepted into >> pandoc/lua-filters. >> >> Therefore, I need to make sure that the expected output and the generated >> output are exactly the same to pass the test. >> >> I hope someone can lend some insight. >> >> Many thanks. >> >> -- >> 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/a3d1fad4-91f6-4495-aa4c-874f6ca5bb6en%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/CAEe_xxjoHA0sta%2B4%3DeRu4xuYS44e2tpu4_74mmKMjc49e5%3Dfow%40mail.gmail.com.