From: Lyndon Drake <isenguard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Best Markdown markup for LaTeX environment with arguments
Date: Tue, 14 Jun 2022 20:15:33 -0700 (PDT) [thread overview]
Message-ID: <6667603d-bd7c-4a1f-aa97-4198aabfddc8n@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 4515 bytes --]
Hi,
In my LaTeX preamble, I have a LaTeX environment which takes an argument,
and I would like to map from my Markdown input document to that environment.
Specifically, I want to generate `csquotes` environments similar to these
examples:
```
\begin{foreigndisplayquote}{hebrew}[Jer 32.1–5]
הַדָּבָר אֲשֶׁר־הָיָה אֶל־יִרְמְיָהוּ מֵאֵת יְהוָה בִּשְׁנַת
[בַּ][שָּׁנָה] הָעֲשִׂרִית לְצִדְקִיָּהוּ מֶלֶךְ יְהוּדָה הִיא הַשָּׁנָה
שְׁמֹנֶה־עֶשְׂרֵה שָׁנָה לִנְבוּכַדְרֶאצַּר׃ 2 וְאָז חֵיל מֶלֶךְ בָּבֶל
צָרִים עַל־יְרוּשָׁלִָם וְיִרְמְיָהוּ הַנָּבִיא הָיָה כָלוּא בַּחֲצַר
הַמַּטָּרָה אֲשֶׁר בֵּית־מֶלֶךְ יְהוּדָה׃ 3 אֲשֶׁר כְּלָאוֹ צִדְקִיָּהוּ
מֶלֶךְ־יְהוּדָה לֵאמֹר מַדּוּעַ אַתָּה נִבָּא לֵאמֹר כֹּה אָמַר יְהוָה
הִנְנִי נֹתֵן אֶת־הָעִיר הַזֹּאת בְּיַד מֶלֶךְ־בָּבֶל וּלְכָדָהּ׃ 4
וְצִדְקִיָּהוּ מֶלֶךְ יְהוּדָה לֹא יִמָּלֵט מִיַּד הַכַּשְׂדִּים כִּי
הִנָּתֹן יִנָּתֵן בְּיַד מֶלֶךְ־בָּבֶל וְדִבֶּר־פִּיו עִם־פִּיו וְעֵינָיו
אֶת־עֵינָו [עֵינָיו] תִּרְאֶינָה׃ 5 וּבָבֶל יוֹלִךְ אֶת־צִדְקִיָּהוּ
וְשָׁם יִהְיֶה עַד־פָּקְדִי אֹתוֹ נְאֻם־יְהוָה כִּי תִלָּחֲמוּ
אֶת־הַכַּשְׂדִּים לֹא תַצְלִיחוּ׃ פ
\end{foreigndisplayquote}
\begin{displayquote}[Jer 32.1–5]
The word that came to Jeremiah from the LORD in the tenth year of King
Zedekiah of Judah, which was the eighteenth year of Nebuchadrezzar. 2 At
that time the army of the king of Babylon was besieging Jerusalem, and the
prophet Jeremiah was confined in the court of the guard that was in the
palace of the king of Judah...
\end{displayquote}
```
I had wondered about doing something similar to this:
```
::: quote {type="hebrew" ref="Jer 32.1–5"}
הַדָּבָר אֲשֶׁר־הָיָה אֶל־יִרְמְיָהוּ מֵאֵת יְהוָה בִּשְׁנַת
[בַּ][שָּׁנָה] הָעֲשִׂרִית לְצִדְקִיָּהוּ מֶלֶךְ יְהוּדָה הִיא הַשָּׁנָה
שְׁמֹנֶה־עֶשְׂרֵה שָׁנָה לִנְבוּכַדְרֶאצַּר׃ 2 וְאָז חֵיל מֶלֶךְ בָּבֶל
צָרִים עַל־יְרוּשָׁלִָם וְיִרְמְיָהוּ הַנָּבִיא הָיָה כָלוּא בַּחֲצַר
הַמַּטָּרָה אֲשֶׁר בֵּית־מֶלֶךְ יְהוּדָה׃ 3 אֲשֶׁר כְּלָאוֹ צִדְקִיָּהוּ
מֶלֶךְ־יְהוּדָה לֵאמֹר מַדּוּעַ אַתָּה נִבָּא לֵאמֹר כֹּה אָמַר יְהוָה
הִנְנִי נֹתֵן אֶת־הָעִיר הַזֹּאת בְּיַד מֶלֶךְ־בָּבֶל וּלְכָדָהּ׃ 4
וְצִדְקִיָּהוּ מֶלֶךְ יְהוּדָה לֹא יִמָּלֵט מִיַּד הַכַּשְׂדִּים כִּי
הִנָּתֹן יִנָּתֵן בְּיַד מֶלֶךְ־בָּבֶל וְדִבֶּר־פִּיו עִם־פִּיו וְעֵינָיו
אֶת־עֵינָו [עֵינָיו] תִּרְאֶינָה׃ 5 וּבָבֶל יוֹלִךְ אֶת־צִדְקִיָּהוּ
וְשָׁם יִהְיֶה עַד־פָּקְדִי אֹתוֹ נְאֻם־יְהוָה כִּי תִלָּחֲמוּ
אֶת־הַכַּשְׂדִּים לֹא תַצְלִיחוּ׃ פ
:::
```
Then I could use BJP's lua filter to map the div to a class.
Does that seem like a plausible approach?
Within the lua Div(el) function, how can I get the attributes of the class,
in my case `type` and `ref`?
Best regards,
Lyndon
--
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@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/6667603d-bd7c-4a1f-aa97-4198aabfddc8n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 5091 bytes --]
next reply other threads:[~2022-06-15 3:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 3:15 Lyndon Drake [this message]
[not found] ` <6667603d-bd7c-4a1f-aa97-4198aabfddc8n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-06-15 7:27 ` AW: " denis.maier-NSENcxR/0n0
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6667603d-bd7c-4a1f-aa97-4198aabfddc8n@googlegroups.com \
--to=isenguard-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).