From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33356 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: no color after LaTeX -> docx Date: Tue, 21 Nov 2023 12:11:15 +0000 Message-ID: References: <82960ecf-864e-4379-9726-303997983cebn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2059"; mail-complaints-to="usenet@ciao.gmane.io" To: 'William Lupton' via pandoc-discuss Original-X-From: pandoc-discuss+bncBDCINCES2QJRBZ546KVAMGQEJKR6KYY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 21 13:11:25 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pf1-f192.google.com ([209.85.210.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r5PbA-0000K9-EN for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 21 Nov 2023 13:11:24 +0100 Original-Received: by mail-pf1-f192.google.com with SMTP id d2e1a72fcca58-6c337ce11cesf8016297b3a.1 for ; Tue, 21 Nov 2023 04:11:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700568683; cv=pass; d=google.com; s=arc-20160816; b=BFlOwWiKAR621hr8zYoXn/edXo4JeCR1vpk+AtjFdAvqNdzWEhE1oae7C8WP3UTzYE Lks3phmHyY18D7/fvJJWGwrUuQEu2hvT8XRiYe1F/7S8Xxo4uRfa1zeyLOxkOM7Vgyxh J7qzbaUll7qWb0zDWhy9RItycIA4kKI/vKtAd8u/l53IM82gOM7n24beoUmlnrNvrj2x oRbcoOrF1CjOqEVmiSL2sF7aryCsgUoAC0ggNcaOCYF5yVDoHwGCrdYbELJhhCcVOeL+ VP9/ChuTwFsUN1lQ9M1iEWCbVV+/FsXqBWLAdjl+qyi3zaKBn9Fs4V2m5JTv68BQgt9k A9mA== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=GcDnZ3qpUghRsw4lQZYv4O3OpnHDcYqfX5gnuM/bI88=; fh=M65ZQKprWs5k0z+X/yoE2Hlb8uFxMAo8Ww+8Sge/44w=; b=tIEdjNLORkP6saIVRdW+VTPr0d3os8SFhmcJRKMORDGw3KT7qZsYRU/UFV84gdp2wS ckjwYOLr8cZQM50DfkuYJBmg/ipk7NSCwjIZkQWZudAUVZL2MwtfietlIddkyLprVVZB SVL3F8mCSsTUaXF4/ojD2BLPut4L4sm2uHBcTSboh2fZrwNaxyurDOmvJEfyAyK379nF BO8VvvKjo3fNDoN3YuWBjOFIm+wmpO5nzpRDYDlEkSRHmYomgnOh12SU2gsAtOrj09aE 03mz35Ct5puw8u/kzDBQopfitmxIb3HruTrshtBUG6SOqqTA6zQbXwx4qw5+HG9v+Rm+ yE+g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=IZ9cBCcx; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700568683; x=1701173483; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=GcDnZ3qpUghRsw4lQZYv4O3OpnHDcYqfX5gnuM/bI88=; b=VLPID32Wz9buxoVvIMK+7Wmo+i9VXBe2zVtB/mpMLbPp16y+OSWDb3fllkRhhHURva OD7vK9bJ9hobMFGt3D9KYD7oie/tM5BbNs7et8oQNJUYGLE0lXs8qJEvS6uDLAgbo+bS u9bdqefoGSrfBiQ1svGJlnq+c0+mWelLCmi4iiy0Cyw7y/1hjKbo3FUV3hlV5ucM2cak WJV/SA0cqTOaK1ani+rg6rG9SgPTeV/UX7AHlp27DA3IFN3S6yhuhOSyIVnULWfnjHwa X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700568683; x=1701173483; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=GcDnZ3qpUghRsw4lQZYv4O3OpnHDcYqfX5gnuM/bI88=; b=vZ8pvtvR8gugLuZwA1TC6wP4y3AtXE1+0TfmJbA7AIcye807ygkwTDJ+jtoh2zdufB SfZC6O/2QF2j3MjW+mYw8d4/+jf+qXTw/UUg9zR7QffryJMOULUmWb1P62A/ttCzUP89 LWPV+CMDs29I9TlDpjO2Q71nAPr0lyBlcenQ5QXKmCwX110f3rKJOAK+4kaDj+9/fbWE 8PVUAZ/xVHTFfoD/m6jJ3giQGw8z Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0Yx2qV1qkCnhMk2yrgiuS6q8GKvntMIlDcqFuhrS7lNqSlmpTV2d MtSV+G0neqe23Ab8zU2COwU= X-Google-Smtp-Source: AGHT+IGAuWbNl2e8qa4Q0n22EvOkQNjYedGp6L6UKE9HVtrBSTCDe9YN0fmjtpFXIHWK5GXHYXuGTQ== X-Received: by 2002:a05:6a20:8429:b0:185:876f:4f4d with SMTP id c41-20020a056a20842900b00185876f4f4dmr13785992pzd.32.1700568682928; Tue, 21 Nov 2023 04:11:22 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:90a:c70b:b0:285:1048:c2ec with SMTP id o11-20020a17090ac70b00b002851048c2ecls1105513pjt.2.-pod-prod-06-us; Tue, 21 Nov 2023 04:11:19 -0800 (PST) X-Received: by 2002:a17:90a:c298:b0:281:e1:af1d with SMTP id f24-20020a17090ac29800b0028100e1af1dmr10254861pjt.18.1700568678757; Tue, 21 Nov 2023 04:11:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700568678; cv=none; d=google.com; s=arc-20160816; b=0Ql4e+X6ETsnNAyuVXAUPwldHyxYZKPlr5i+AznvDXkooLFWLzZ1h92fdOsBKIWExQ M3UKxbebnQR337RCbasL64/tBFQANaigsPLU/o74d2oQFr7HV6rK6hxwzXIOB3F3pI0I g9BlDfEEkq5HjAbiMp+aCnUal8evgRrGK7krswqLUhS/3QIpMsq6qtRCaTWiPPnrmWWX UQCo3DqxxT52PXIBgn6Zz5fbZvF5yS96MSP41ejN7PCJgQOH7MroXoFnEejwQSFL7cSq TGWSMn95MstV1gQwiaFkzlaeYlak92bEdUszzo5tNa49V/Q4a86PmmMKTPjEa4nck3iA WGsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=qRI4DzBouNEP47xKNBzP3M93mMm/kQusjSuwlKkH2yk=; fh=M65ZQKprWs5k0z+X/yoE2Hlb8uFxMAo8Ww+8Sge/44w=; b=aFzaRhen+tFc48smyPag/kDSUJ8wdKHxsHq5is9v9fbCE6GxgOnidTtb9VGC4zvbWw 9R2yWfB9/J/5+OggxvIghLz/jBlvZkPIIkvXliXIEwTCiMmb5w6a+MhSANHdQHMc4k5d CNDbD2YTRemFsJIxci8LaQEBPmWCX2tv0bf3YBnPn+rrzwHZA10IO46HCnUaaC68Jo5M UiN/haIVzhqf+DvXMB5b2AesAYu6Kul5CvqrUIw9RF8cXuMxn4S4lSUH69yHgDpvS6NH xKVd+KM/NMe8Mscz7zYBZ3b+Ed0rm2IFRPpBcqiqy8YAiTz71iF7YoHP59yOA/zuCEa7 O6UA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=IZ9cBCcx; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout01.posteo.de (mout01.posteo.de. [185.67.36.65]) by gmr-mx.google.com with ESMTPS id pt3-20020a17090b3d0300b0028000e8c2absi75425pjb.0.2023.11.21.04.11.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 04:11:18 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) client-ip=185.67.36.65; Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9F2A3240027 for ; Tue, 21 Nov 2023 13:11:16 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SZNWm28nYz6txn for ; Tue, 21 Nov 2023 13:11:16 +0100 (CET) Content-Disposition: inline In-Reply-To: X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=IZ9cBCcx; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.65 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:33356 Archived-At: Oh my bad, I mistyped \textcolor in my experiments! This is better indeed: - There is no need to use -f latex+raw_tex; - The filter only has to transform the attribute `style=3D"color: blue"` = into `custom-style=3Dcolor-blue`; - Then, you can modify the character style =E2=80=9Ccolor-blue=E2=80=9D i= n the resulting DOCX file (or your reference doc) to have the text displaye= d in blue. Le Tuesday 21 November 2023 =C3=A0 11:37:56AM, 'William Lupton' via pandoc-= discuss a =C3=A9crit : > It seems that the LaTeX reader encodes the color info in a style attribut= e? ( > [1]try.pandoc) >=20 > \documentclass{article} > \begin{document} > \textcolor{blue}{blue} > \end{document} >=20 > --> >=20 >

blue

>=20 > On Tue, 21 Nov 2023 at 10:49, Bastien DUMONT <[2]bastien.dumont-VwIFZPTo/vqzQB+pC5nmwQ@public.gmane.org= t> > wrote: >=20 > Colors are not supported by Pandoc's internal representation of the > document. To get an idea of what Pandoc takes account of, simply read= the > =E2=80=9CPandoc's Markdown=E2=80=9D section in the manual ([3]https:/= /pandoc.org/ > MANUAL.html#pandocs-markdown): even if you don't use markdown, it ref= lects > the elements supported by the software. If you are comfortable with i= t, you > can also use the Lua reference for Pandoc's types ([4]https://pandoc.= org/ > lua-filters.html#lua-type-reference). >=20 > There are good news, however. If you use: >=20 > =C2=A0 pandoc -s -f latex+raw_tex -t markdown >=20 > you will see that the option =E2=80=9Craw_tex=E2=80=9D instructs Pand= oc to include all > LaTeX code it doesn't understand as raw LaTeX snippets (RawInline typ= e) > instead of ignoring them. It should be possible to process these RawI= nline > objects with a filter to transform them into raw DOCX code to be inse= rted > in the DOCX output. Maybe someone on this list already wrote it? >=20 > Le Tuesday 21 November 2023 =C3=A0 12:45:35AM, =E5=A7=9C=E6=94=BF=E6= =AF=85=EF=BC=88=E8=B4=AA=E5=90=83=E7=9A=84=E5=B0=8F=E7=A5=9E=E4=BB=99=EF=BC= =89 a =C3=A9crit : > > I am trying to convert latex to docx with pandoc.=C2=A0 > > > > LaTeX code is very simple: > > > > \documentclass{article} > > \usepackage{xcolor} > > \begin{document} > > This is a \textcolor{blue}{blue} word. > > \end{document} > > > > And I convert it to docx by command > > pandoc -s file.tex -o file.docx > > > > But file.docx do not have color. Can anybody tell me what is going = on > here? > > > > -- > > 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, s= end an > email > > to [1][5]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [2][6]https://groups.googl= e.com/ > d/msgid/ > > pandoc-discuss/82960ecf-864e-4379-9726-303997983cebn%[7] > 40googlegroups.com. > > > > References: > > > > [1] mailto:[8]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2] [9]https://groups.google.com/d/msgid/pandoc-discuss/ > 82960ecf-864e-4379-9726-303997983cebn%40googlegroups.com?utm_medium= =3Demail& > utm_source=3Dfooter >=20 > -- > You received this message because you are subscribed to the Google Gr= oups > "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, sen= d an > email to [10]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [11]https://groups.google.co= m/d/ > msgid/pandoc-discuss/ZVyLQcdHOHIr63G_%40localhost. >=20 > -- > 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 [12]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [13]https://groups.google.com/d/= msgid/ > pandoc-discuss/ > CAEe_xxicy9Np%2B9vktAPtnfaAhHg4sopkgT21%2B_oQSHV0jgdgVQ%40mail.gmail.com. >=20 > References: >=20 > [1] https://try.pandoc.org/?params=3D%7B%22text%22%3A%22%5C%5Cdocumentcla= ss%7Barticle%7D%5Cn%5C%5Cbegin%7Bdocument%7D%5Cn%5C%5Ctextcolor%7Bblue%7D%7= Bblue%7D%5Cn%5C%5Cend%7Bdocument%7D%5Cn%22%2C%22to%22%3A%22html%22%2C%22fro= m%22%3A%22latex%22%2C%22standalone%22%3Afalse%2C%22embed-resources%22%3Afal= se%2C%22table-of-contents%22%3Afalse%2C%22number-sections%22%3Afalse%2C%22c= iteproc%22%3Afalse%2C%22html-math-method%22%3A%22plain%22%2C%22wrap%22%3A%2= 2auto%22%2C%22highlight-style%22%3Anull%2C%22files%22%3A%7B%7D%2C%22templat= e%22%3Anull%7D > [2] mailto:bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org > [3] https://pandoc.org/MANUAL.html#pandocs-markdown > [4] https://pandoc.org/lua-filters.html#lua-type-reference > [5] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [6] https://groups.google.com/d/msgid/ > [7] http://40googlegroups.com/ > [8] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [9] https://groups.google.com/d/msgid/pandoc-discuss/82960ecf-864e-4379-9= 726-303997983cebn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > [10] mailto:pandoc-discuss%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [11] https://groups.google.com/d/msgid/pandoc-discuss/ZVyLQcdHOHIr63G_%40= localhost > [12] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [13] https://groups.google.com/d/msgid/pandoc-discuss/CAEe_xxicy9Np%2B9vk= tAPtnfaAhHg4sopkgT21%2B_oQSHV0jgdgVQ%40mail.gmail.com?utm_medium=3Demail&ut= m_source=3Dfooter --=20 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 e= mail 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/ZVyeY-5ZjlKgF3F5%40localhost.