summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/markdown
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-27 21:41:13 +0000
committerKarl Berry <karl@freefriends.org>2017-03-27 21:41:13 +0000
commit58d83afa8885de91f792004e03eb2678b087b46f (patch)
treea2308b039b6a75aa7bf3427476829d50e1746f12 /Master/texmf-dist/tex/latex/markdown
parentf6e2e4efbdd44ba2ce51fc1555361c23ec6c8beb (diff)
markdown (27mar17)
git-svn-id: svn://tug.org/texlive/trunk@43618 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/markdown')
-rw-r--r--Master/texmf-dist/tex/latex/markdown/markdown.sty34
1 files changed, 32 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/markdown/markdown.sty b/Master/texmf-dist/tex/latex/markdown/markdown.sty
index 94997e75fb8..229d810b920 100644
--- a/Master/texmf-dist/tex/latex/markdown/markdown.sty
+++ b/Master/texmf-dist/tex/latex/markdown/markdown.sty
@@ -6,7 +6,7 @@
%%
%% markdown.dtx (with options: `latex')
%%
-%% Copyright (C) 2016 Vít Novotný
+%% Copyright (C) 2017 Vít Novotný
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -71,6 +71,10 @@
\def\markdownOptionCitationNbsps{#1}}%
\define@key{markdownOptions}{cacheDir}{%
\def\markdownOptionCacheDir{#1}}%
+\define@key{markdownOptions}{contentBlocks}[true]{%
+ \def\markdownOptionContentBlocks{#1}}%
+\define@key{markdownOptions}{contentBlocksLanguageMap}{%
+ \def\markdownOptionContentBlocksLanguageMap{#1}}%
\define@key{markdownOptions}{definitionLists}[true]{%
\def\markdownOptionDefinitionLists{#1}}%
\define@key{markdownOptions}{footnotes}[true]{%
@@ -127,6 +131,12 @@
\renewcommand\markdownRendererCodeSpan[1]{#1}}%
\define@key{markdownRenderers}{link}{%
\renewcommand\markdownRendererLink[4]{#1}}%
+\define@key{markdownRenderers}{contentBlock}{%
+ \renewcommand\markdownRendererContentBlock[4]{#1}}%
+\define@key{markdownRenderers}{contentBlockOnlineImage}{%
+ \renewcommand\markdownRendererContentBlockOnlineImage[4]{#1}}%
+\define@key{markdownRenderers}{contentBlockCode}{%
+ \renewcommand\markdownRendererContentBlockCode[5]{#1}}%
\define@key{markdownRenderers}{image}{%
\renewcommand\markdownRendererImage[4]{#1}}%
\define@key{markdownRenderers}{ulBegin}{%
@@ -237,6 +247,12 @@
\renewcommand\markdownRendererCodeSpanPrototype[1]{#1}}%
\define@key{markdownRendererPrototypes}{link}{%
\renewcommand\markdownRendererLinkPrototype[4]{#1}}%
+\define@key{markdownRendererPrototypes}{contentBlock}{%
+ \renewcommand\markdownRendererContentBlockPrototype[4]{#1}}%
+\define@key{markdownRendererPrototypes}{contentBlockOnlineImage}{%
+ \renewcommand\markdownRendererContentBlockOnlineImagePrototype[4]{#1}}%
+\define@key{markdownRendererPrototypes}{contentBlockCode}{%
+ \renewcommand\markdownRendererContentBlockCodePrototype[5]{#1}}%
\define@key{markdownRendererPrototypes}{image}{%
\renewcommand\markdownRendererImagePrototype[4]{#1}}%
\define@key{markdownRendererPrototypes}{ulBegin}{%
@@ -374,6 +390,7 @@
dlBeginTight = {\markdownRendererDlBegin},
dlEndTight = {\markdownRendererDlEnd}}}}
\RequirePackage{fancyvrb}
+\RequirePackage{csvsimple}
\markdownSetup{rendererPrototypes={
lineBreak = {\\},
leftBrace = {\textbraceleft},
@@ -387,7 +404,20 @@
codeSpan = {\texttt{#1}},
link = {#1\footnote{\ifx\empty#4\empty\else#4:
\fi\texttt<\url{#3}\texttt>}},
- image = {\begin{figure}
+ contentBlock = {%
+ \ifthenelse{\equal{#1}{csv}}{%
+ \begin{table}%
+ \begin{center}%
+ \csvautotabular{#3}%
+ \end{center}
+ \ifx\empty#4\empty\else
+ \caption{#4}%
+ \fi
+ \label{tab:#1}%
+ \end{table}}{%
+ \markdownInput{#3}}},
+ image = {%
+ \begin{figure}%
\begin{center}%
\includegraphics{#3}%
\end{center}%