diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/markdown/markdown.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/markdown/markdown.sty | 34 |
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}% |