From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33355 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "'William Lupton' via pandoc-discuss" Newsgroups: gmane.text.pandoc Subject: Re: no color after LaTeX -> docx Date: Tue, 21 Nov 2023 11:37:56 +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: multipart/alternative; boundary="00000000000053b299060aa80954" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33670"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCS4HJ6WSAHBBIVN6KVAMGQEPNA4CCQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Nov 21 12:38:15 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f191.google.com ([209.85.208.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1r5P55-0008XD-Bt for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 21 Nov 2023 12:38:15 +0100 Original-Received: by mail-lj1-f191.google.com with SMTP id 38308e7fff4ca-2c883c6985esf15839371fa.0 for ; Tue, 21 Nov 2023 03:38:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700566694; cv=pass; d=google.com; s=arc-20160816; b=xO3qtA3s4xpcViJfiE5taw603462gmlRQPiUkGpuFq/UUzrqhueZKHKuE1fVPrARqT Rncu01JjExBkXJpefaoRZCVXfcIH1k9KJ8QwqvS2FqvNjPjgK0ZC3yt0cdTjBO0uavM6 H4BgC3rWNid+BbiArHof6903dNkSELXXZxGNfg6CPZXxf5oWy+TgDJ7NlUVPe1Nk40Rd +0xIAXhdqor1hiv2vUL9SaTe5JiGQNM5yavMSQ/mF57SKnpDk+olS6qo0Sw1SffVTsOO jAaFdi3FoJo6imDnXStjeid5hvJGPSwkQSEsHiBg+p2JeAXI3+dMhEw8J2aKvQxHjYH4 itDQ== 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:to:subject:message-id:date :from:in-reply-to:references:mime-version:dkim-signature; bh=q8PL7uFPf3Dv/77CtQXhCBBRNNyxFqek7Jc98hwpGjY=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=kF65ShnPvyjMlzgya7gTFaJ7nFV0fB0JILqhG0q+HQUdtCqOAf8RiZrUHvA3BdqL7c 0qfHPHTUrxgA8uAWrAjUnaJsK3vGA9AkNo0I7+edAUZIK3/8tniRLsN116pYiPzvSVXg hvFgp3eFUFYxh2cgEZtpAGu1KbUYiPcYUe0XnnFOsJv04N49xke13f03luedM18pX+uO imP66+rA9KxQ6ur3hGRiqdhzuRMz2Z+/JnF8TZO8m5uKaWvKIEEAxE1j9uhaaKa8jhE6 tuSKAjN01uJKhPg3zr00P6h7t7SKFXCbPQyasIMkCJEmF1Ehy8HEeIXEl0Ir3XhxP8sT +qsg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=c0Dagqe4; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62d as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1700566694; x=1701171494; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version:from:to:cc :subject:date:message-id:reply-to; bh=q8PL7uFPf3Dv/77CtQXhCBBRNNyxFqek7Jc98hwpGjY=; b=v1xYVOMaTsy3kk0c9Hsw61ubphmbODzPbeY5PCXwxLgQHD6yatF1nHNMlpRiRrlT6n FilrTo+u4kQOz2CmUKLPRpE72uLEt4iB2e04lddu8WPCkK4gyXil/tRm0FV3mzxXQw2+ +G29gkTZsO8SAsY6Sq0ful8DCZfbuO5MAQpV65a/XVrm4W3C5NDCCHQEYt3U5MA7UFqy z/9F3xmtZ0ho1FVfG1BlX/ymcGvD2ZTvQ9Xqwv9eJoG/eSZSjN7Lg5/1P9DEBk2eN2py z5sF31v7CySwWPO2yqdWVs3eYZ72jEgWcelBnVhwtLYED6s6SQ6fzp5jIl/ X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700566694; x=1701171494; 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:to:subject :message-id:date:from:in-reply-to:references:mime-version :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q8PL7uFPf3Dv/77CtQXhCBBRNNyxFqek7Jc98hwpGjY=; b=wgSa/50MXmdfFxWk9xGSz20ghxLj8F8y9s+E9+Nr2CVdxtg7CBRUD4QwWbPJvg5K/2 6V57WQTW76zRr2mYuI88dFw39hbK7p9dt1DRI6Gt9+K1jUcdf7nrxAUD4tmHfMEy3xzb pZDT1CBwh0ZjVYfGrsBfvZlqGmDFDdtFv5cjHuwoL/SEzbLtKxHLcW4s7jmiw8bCuaxH jnoozhuLOj+KArYHmCsoHDwaA8Zisi44R5Uw7GzJDUVW0jjXEqZBGa6tlea8w7CuP/ht LJJ/lAkCwzIHU X-Gm-Message-State: AOJu0YzXWv2Nwn73rZmyBgvAkwgzL4O09WOO1Gp1l1FS+VhDGaBKaAwb bkcfJx4MjYHL8PVp9i2iULM= X-Google-Smtp-Source: AGHT+IFGpUbLcNIwMzrdeNGBNq1W7wBWDmf8wtv+EETTGlhdzxyMepWWuo0fpZrjOuI9NHeU6cQRjA== X-Received: by 2002:a2e:5013:0:b0:2c5:11fe:53b2 with SMTP id e19-20020a2e5013000000b002c511fe53b2mr6685570ljb.37.1700566694504; Tue, 21 Nov 2023 03:38:14 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:651c:1181:b0:2be:58d1:dc38 with SMTP id w1-20020a05651c118100b002be58d1dc38ls109408ljo.1.-pod-prod-06-eu; Tue, 21 Nov 2023 03:38:09 -0800 (PST) X-Received: by 2002:a2e:8813:0:b0:2c5:380:2a10 with SMTP id x19-20020a2e8813000000b002c503802a10mr7248961ljh.25.1700566688654; Tue, 21 Nov 2023 03:38:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700566688; cv=none; d=google.com; s=arc-20160816; b=nut1DWfAjdhxLTY1iklNOuhCZX1pMr6r/UcRrQnbUiddWSlMSDXeBjiqYfkqEfV5jd KKYuqGCPjtXzPHoJu/KYPbEYBJYqiDzvSXSSvIE4iIJKqGyrQTI/Sb9hcskcGCqLg6az SBd/nkGK5KaPtZBFHjwtom4vA8/MIAn+GOqHdE064PKAOeO/7GdBziyp4W9IKTAdnoJg lkQs8t27gGv878CHYuyt8N/LfgJpGNvFLEcNXt6/Gd63ehwKdqRZ9zzoZNm9MfPN0awX KUipmhtViRdL8x5aduRqFICyQzs0iiHRiAtR4h+k5QUN4/H/OWi30ai1oYgAhHSLgFPt oP/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9XcbaTom4M6AScqwu03iDRoFSqkNeKx/wnz0i1rB1yw=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=pic0zSOgeoThaorr4MGiSq5hdW5nkVAkubP0v6PF8U2iM4PJ+ObJcZUH5Cm0QORdeB 9Z8QnRhGrpfyHKw6hZvCez+xA//Qg3QG7CKV/WID8CWY91EFjFx+Fmbih+WZKMfDIihP 9NowDuMQ4lAja0z5IErbJ2uWFEwcsO/oWbtgNTkIjcckB9Z8zQ/kK1TWiEXlFMK0HRXu 6ClvyCDlDiwA1OhpBdKk0gj17Stxys2J5cDwPA2/9jHeDla0x5crJhMNqf5ItAF5qb1d CmOCRnVlO+AZp4TTbpdV+G3BjgZwVa7y4E88ZwoBdCLxuAIGcXLcqsb9a1Pic8/JWI57 Wqtg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=c0Dagqe4; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62d as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org Original-Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com. [2a00:1450:4864:20::62d]) by gmr-mx.google.com with ESMTPS id c26-20020a2e681a000000b002c29b97d5f2si393139lja.1.2023.11.21.03.38.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Nov 2023 03:38:08 -0800 (PST) Received-SPF: pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62d as permitted sender) client-ip=2a00:1450:4864:20::62d; Original-Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a00a9d677fcso170079966b.0 for ; Tue, 21 Nov 2023 03:38:08 -0800 (PST) X-Received: by 2002:a17:907:7daa:b0:a02:ad84:3ab3 with SMTP id oz42-20020a1709077daa00b00a02ad843ab3mr764224ejc.44.1700566687522; Tue, 21 Nov 2023 03:38:07 -0800 (PST) In-Reply-To: X-Original-Sender: wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@broadband-forum.org header.s=google header.b=c0Dagqe4; spf=pass (google.com: domain of wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org designates 2a00:1450:4864:20::62d as permitted sender) smtp.mailfrom=wlupton-QSt+ys/nuMyEUIsrzH9SikB+6BGkLq7r@public.gmane.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadband-forum.org X-Original-From: William Lupton 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:33355 Archived-At: --00000000000053b299060aa80954 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It seems that the LaTeX reader encodes the color info in a style attribute? (try.pandoc ) \documentclass{article} \begin{document} \textcolor{blue}{blue} \end{document} -->

blue

On Tue, 21 Nov 2023 at 10:49, Bastien DUMONT wrote: > 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 ( > https://pandoc.org/MANUAL.html#pandocs-markdown): even if you don't use > markdown, it reflects the elements supported by the software. If you are > comfortable with it, you can also use the Lua reference for Pandoc's type= s ( > https://pandoc.org/lua-filters.html#lua-type-reference). > > There are good news, however. If you use: > > pandoc -s -f latex+raw_tex -t markdown > > you will see that the option =E2=80=9Craw_tex=E2=80=9D instructs Pandoc t= o include all > LaTeX code it doesn't understand as raw LaTeX snippets (RawInline type) > instead of ignoring them. It should be possible to process these RawInlin= e > objects with a filter to transform them into raw DOCX code to be inserted > in the DOCX output. Maybe someone on this list already wrote it? > > 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. > > > > 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 Grou= ps > > "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 view this discussion on the web visit [2] > https://groups.google.com/d/msgid/ > > pandoc-discuss/82960ecf-864e-4379-9726-303997983cebn%40googlegroups.com= . > > > > References: > > > > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2] > https://groups.google.com/d/msgid/pandoc-discuss/82960ecf-864e-4379-9726-= 303997983cebn%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter > > -- > 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/ZVyLQcdHOHIr63G_%40local= host > . > --=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/CAEe_xxicy9Np%2B9vktAPtnfaAhHg4sopkgT21%2B_oQSHV0jgdgVQ%40ma= il.gmail.com. --00000000000053b299060aa80954 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It seems that the LaTeX reader encodes the color info in a= style attribute? (try.pandoc)

= \documentclass{article}
\begin{document}
\textcolor{blue}{blue}
\e= nd{document}

-->

&= lt;p><span style=3D"color: blue">blue</span></p= >

On Tue, 21 Nov 2023 at 10:49, Bastien DUMONT <bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org> wrote:=
Colors are not = supported by Pandoc's internal representation of the document. To get a= n idea of what Pandoc takes account of, simply read the =E2=80=9CPandoc'= ;s Markdown=E2=80=9D section in the manual (https://p= andoc.org/MANUAL.html#pandocs-markdown): even if you don't use mark= down, it reflects the elements supported by the software. If you are comfor= table with it, you can also use the Lua reference for Pandoc's types (<= a href=3D"https://pandoc.org/lua-filters.html#lua-type-reference" rel=3D"no= referrer" target=3D"_blank">https://pandoc.org/lua-filters.html#lua-type-re= ference).

There are good news, however. If you use:

=C2=A0 pandoc -s -f latex+raw_tex -t markdown

you will see that the option =E2=80=9Craw_tex=E2=80=9D instructs Pandoc to = include all LaTeX code it doesn't understand as raw LaTeX snippets (Raw= Inline type) instead of ignoring them. It should be possible to process the= se RawInline objects with a filter to transform them into raw DOCX code to = be inserted in the DOCX output. Maybe someone on this list already wrote it= ?

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 Gro= ups
> "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send= an email
> to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit [2]https://groups.go= ogle.com/d/msgid/
> pandoc-discuss/82960ecf-864e-4379-9726-303997983cebn%40googlegroups.co= m.
>
> References:
>
> [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups.goo= gle.com/d/msgid/pandoc-discuss/82960ecf-864e-4379-9726-303997983cebn%40goog= legroups.com?utm_medium=3Demail&utm_source=3Dfooter

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ZVyLQcdH= OHIr63G_%40localhost.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://gro= ups.google.com/d/msgid/pandoc-discuss/CAEe_xxicy9Np%2B9vktAPtnfaAhHg4sopkgT= 21%2B_oQSHV0jgdgVQ%40mail.gmail.com.
--00000000000053b299060aa80954--