From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32123 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Frank Wisniewski Newsgroups: gmane.text.pandoc Subject: Re: Convert Plain Element to Latex Code in LUA Filter Date: Tue, 31 Jan 2023 23:12:02 -0800 (PST) Message-ID: <9c6c56a7-4b45-4d8f-8152-c85822932b6cn@googlegroups.com> References: <76501da2-0d17-4aaa-9dfd-c236abd93de8n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3164_681539493.1675235522837" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36501"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBC7JTR4RTQIRBRFB5CPAMGQEEUKOAWA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Feb 01 08:12:08 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f57.google.com ([209.85.161.57]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pN7Hr-0009Ft-Gi for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 01 Feb 2023 08:12:07 +0100 Original-Received: by mail-oo1-f57.google.com with SMTP id v16-20020a4ade90000000b005175eeadba3sf1764214oou.0 for ; Tue, 31 Jan 2023 23:12:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=UCS+EUgGeU//yotuG0hRoRYj7KZKay11QArJwc6yMRc=; b=Xm3rz2d8nt7NyAg1s6hpDLzcChmh0YFFKDjTa+VTFlWs5veEE/DmfA6tj3QQLZf+of +uo7+qli7nSyQYkX/97KmV+F7HR5j8hiVzMZmKJ+rniN86iCEStxZCHh44xLAme78tSh u27pQVkC6YikwOa9Q9gUOIIU0a2p1n2wm2rNMNzWCn0ghaxZN8A0bvity44O2XsZhvSP P0b54Fu+qMzUhOiTTX+/Gl2d1sAj673IiaUSjqQYUJ4Huvl3C5gpXO0YX1tZji7Zi5pL YZkg4jmQfxORUZm6Wyx7W/gCjW8btMtbm9LV6jN1VxvfYccgLOZFqLCZv5Dejlh8OIbB 3SWg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=UCS+EUgGeU//yotuG0hRoRYj7KZKay11QArJwc6yMRc=; b=EBTLhb6DgGFzuOhWyOJ1UuOuYQHlVwvUDoXnlhs7tQoRkKk0PTpMy34alDSHwtJD6O 78jfMKZotfCMg73yRM1G3m/WKprjCXr3Lm+3iGbCsBPuH6O/Vj3wuopFxrckJj2FI7nF F+dYb4Ez/cB/bcbHBpdkojqiLqplyKt9wmczi430ZyuUocPdeomV0kWiOQsqBFW9YF/f vUOvw30+OfSbre8gp64ge4WI/r4UE/QLuBx+fTNmVTHvzy9rawUffcYrrQsZQR7tAqT0 mH6jsDFumS6qLHSvOh18Qhp5uyJhXHJ4pXWzRM/Mb56LBQr5B8IIL36+MafKlg/tqaNW jB4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=UCS+EUgGeU//yotuG0hRoRYj7KZKay11QArJwc6yMRc=; b=Y4I1a9QvtFkTgserYSETInDalFzah/nQtEG4hgMiCVuqYFPH85E0YMWZQIEt6Ztk8d VSM3Hd8TtJZRpzhD6BVacCOlJQIPTFUuQDKR4yNi764MVlq4GsNRJ2yzLJzT0zlptDAw NVcgXZ6jqSxRKU67h/yDcsb0AjxKYgLA0EhBo3/F6S1xnZFtzPV84x6PWVDUoXbkZZY3 MUVQ1aGOBOUrGJt1Ahb86C5N/tvtUH1eHgKqdoyQOf0M+wOeE5WQ1jEPEgdLxtXIzOeT i6Z8UduH2LKfyykMi3SPSEOO1nh/4dK5Uzdg5JvXgVYd4M20dG47LLl7dcuPRDQOiAZA +4rg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKUvBqebU33kpcxbc8PBs3lQmgfZd5YR7saTNO2H+r/8NKbm/SDr o/QQKs5jnMEC6jli55CbLoI= X-Google-Smtp-Source: AK7set/W1y24/im508wYCbUAuXhdHhBkxPrxuvlLp1XFmDgr2j4HS2Kx5f3bUIcCBzaN3CxEcisg3Q== X-Received: by 2002:a05:6870:1157:b0:163:8088:b50e with SMTP id 23-20020a056870115700b001638088b50emr61078oag.39.1675235526290; Tue, 31 Jan 2023 23:12:06 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:5b81:b0:150:5959:52ad with SMTP id em1-20020a0568705b8100b00150595952adls1234128oab.3.-pod-prod-gmail; Tue, 31 Jan 2023 23:12:03 -0800 (PST) X-Received: by 2002:a05:6870:5490:b0:163:81dc:c61c with SMTP id f16-20020a056870549000b0016381dcc61cmr88355oan.21.1675235523659; Tue, 31 Jan 2023 23:12:03 -0800 (PST) In-Reply-To: X-Original-Sender: infokaminbausatz-Re5JQEeQqe8AvxtiuMwx3w@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:32123 Archived-At: ------=_Part_3164_681539493.1675235522837 Content-Type: multipart/alternative; boundary="----=_Part_3165_1128598944.1675235522837" ------=_Part_3165_1128598944.1675235522837 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don't want to use longtabular, so I need to translate the table element= =20 to plain latex to create a PDF. Examples: Before Filter [CODE] \begin{longtable}[]{@{}ll@{}} \caption{\textbf{Adress}}\tabularnewline \toprule\noalign{} \textbf{Name} & \textbf{City} \\ \midrule\noalign{} \endfirsthead \toprule\noalign{} \textbf{Name} & \textbf{City} \\ \midrule\noalign{} \endhead \bottomrule\noalign{} \endlastfoot NameOne & Bonn \\ NameTwo & Munich \\ NameThre & Cologne \\ \end{longtable} [/CODE] After LUA Filter [CODE] \begin{longtblr}[ theme=3Dcaptionlinksbuendig, caption =3D \textbf{Adress}, ]{ colspec =3D {X[l]X[l]}, width =3D 1\linewidth, rowhead =3D 1, rowfoot =3D 0, row{odd} =3D {shadecolor}, row{1} =3D {white}, } \hline=20 \textbf{Name} & \textbf{City}\\ \hline=20 NameOne & Bonn\\ NameTwo & Munich\\ NameThre & Cologne\\ \hline \end{longtblr} [/CODE] The captions are passed as inline elements which I have to convert to the= =20 appropriate latex format. EXAMPLE [CODE] Plain [Strong [Emph [Str "A"]],Str "dre",Emph [Str "ssen"]] [/CODE] must be convert to the Plain latex Code [CODE] \textbf{\emph{A.... [/CODE] Bastien Dumont schrieb am Dienstag, 31. Januar 2023 um 15:06:56 UTC+1: > Doesn't Pandoc do the conversion? What do you want, what do you do and=20 > what do you get? > > Le Tuesday 31 January 2023 =C3=A0 04:51:01AM, Frank Wisniewski a =C3=A9cr= it : > > I have the following Plain Element fron caption > > Plain [Strong [Emph [Str "A"]],Str "dre",Emph [Str "ssen"],Space,Str > > "Sa",Strong [Str "mm"],Str "lung"] > > i would convert this to Latex Code: > > '{\textbf{\emph{A}}dre\emph{ssen}' > >=20 > > Is there a function for this? > >=20 > > -- > > 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= =20 > an email > > to [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit [2] > https://groups.google.com/d/msgid/ > > pandoc-discuss/76501da2-0d17-4aaa-9dfd-c236abd93de8n%40googlegroups.com= . > >=20 > > References: > >=20 > > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > [2]=20 > https://groups.google.com/d/msgid/pandoc-discuss/76501da2-0d17-4aaa-9dfd-= c236abd93de8n%40googlegroups.com?utm_medium=3Demail&utm_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/9c6c56a7-4b45-4d8f-8152-c85822932b6cn%40googlegroups.com. ------=_Part_3165_1128598944.1675235522837 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I don't want to use longtabular, so I need to translate the table element t= o plain latex to create a PDF.

Examples:

Before Filte= r
[CODE]
\begin{longtable}[]{@{}ll@{}}
\caption{\textbf{Adre= ss}}\tabularnewline
\toprule\noalign{}
\textbf{Name} & \textb= f{City} \\
\midrule\noalign{}
\endfirsthead
\toprule\noalign= {}
\textbf{Name} & \textbf{City} \\
\midrule\noalign{}
\= endhead
\bottomrule\noalign{}
\endlastfoot
NameOne & Bon= n \\
NameTwo & Munich \\
NameThre & Cologne \\
\end{= longtable}
[/CODE]

After LUA Filter
[CODE]
\begin= {longtblr}[
=C2=A0 theme=3Dcaptionlinksbuendig,
=C2=A0 caption = =3D \textbf{Adress},
]{
colspec =3D {X[l]X[l]},
width =3D 1\= linewidth,
rowhead =3D 1,
rowfoot =3D 0,
row{odd} =3D {shade= color},
row{1} =3D {white},
}
\hline
\textbf{Name} &am= p; \textbf{City}\\
\hline
NameOne & Bonn\\
NameTwo &= ; Munich\\
NameThre & Cologne\\
\hline
\end{longtblr}[/CODE]

The captions are passed as inline elements which I ha= ve to convert to the appropriate latex format.

EXAMPLE

[CODE]
Plain [Strong [Emph [Str "A"]],Str "dre",Emph [Str "ssen"]][/CODE]

must be convert to the Plain latex Code

[= CODE]
\textbf{\emph{A....
[/CODE]

Bastien Dumont schrieb am Die= nstag, 31. Januar 2023 um 15:06:56 UTC+1:
Doesn't Pandoc do the conversion? What do = you want, what do you do and what do you get?

Le Tuesday 31 January 2023 =C3=A0 04:51:01AM, Frank Wisniewski a =C3=A9= crit :
> I have the following Plain Element fron caption
> Plain [Strong [Emph [Str "A"]],Str "dre",Emph = [Str "ssen"],Space,Str
> "Sa",Strong [Str "mm"],Str "lung"]
> i would convert this to Latex Code:
> '{\textbf{\emph{A}}dre\emph{ssen}'
>=20
> Is there a function for this?
>=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 [1]pandoc-discus...@= googlegroups.com.
> To view this discussion on the web visit [2]https://groups.google.com/d/msgid/
> pandoc-discuss/76501da2-0d17-4aaa-9dfd-c236abd93de8n%40googlegroups.com.
>=20
> References:
>=20
> [1] mailto:pandoc-discu= s...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> [2] https://groups= .google.com/d/msgid/pandoc-discuss/76501da2-0d17-4aaa-9dfd-c236abd93de8n%40= googlegroups.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 pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/9c6c56a7-4b45-4d8f-8152-c85822932b6cn%40googlegroups.= com.
------=_Part_3165_1128598944.1675235522837-- ------=_Part_3164_681539493.1675235522837--