Skip to main content
added 1 character in body; edited title
Source Link
user156344
user156344

LaTex LaTeX with markdown and tables

I'm trying to build up a new documentation system using markdownMarkdown and latexLaTeX. After several hours most things are running smooth, but tables are a bit complicated.

Most of the text can be written with markdownMarkdown syntax (included, included by)

\usepackage[fencedCode,inlineFootnotes,citations,definitionLists,hashEnumerators,smartEllipses,hybrid]{markdown} 

But tables with defined cell-widths and multicolumns have to be done in latexLaTeX native code.

To make the document more easy to write down, I am planning to create a latexLaTeX macro creating these tables. So the writer only has to fill some macro variables and latexLaTeX is buliding the table.

Even this is almost working BUT

I have to stop the markdownMarkdown environment with \end{markdown} just before creating the table and entable markdownMarkdown with \begin{markdown}. This istisn't working well within the document like:

\end{markdown} \marcocreatetable {parameter 1} {parameter 2} \begin{markdown} 

But, when trying to put these commands to the macro like

\newcommand{\marcocreatetable}[2]{ \end{markdown} \begin{longtable}{>{\columncolor[gray]{0.8}}p{2.5cm}|p{2.5cm} p{2.5cm} p{3.5cm} p{2.5cm}} \arrayrulecolor{red}\hline Cell1&\multicolumn{2}{l}{S\{1\} #1}&\multicolumn{2}{r}{#2}\\\hline Cell x&cell y &\multicolumn{1}{c}{\textbf{cell w}}&cell z&\multicolumn{1}{c}{\textbf{6}}\\ \end{longtable} \begin{markdown} } 

an using the macro like

%\end{markdown} \marcocreatetable {parameter 1} {parameter 2} %\begin{markdown} 

LatexLaTeX complains about

\begin{document} ended by \end{markdown}.

\begin{document} ended by \end{markdown}. 

Seems ending markdown within the makro is not working very well. And yes, ending markdown at the beginning of a macro and starting markdown at the ending of a macro maybe bad code, but I'd like to create a table with just a single command.

Any suggestions to a big latexLaTeX noop?

LaTex with markdown and tables

I'm trying to build up a new documentation system using markdown and latex. After several hours most things are running smooth, but tables are a bit complicated.

Most of the text can be written with markdown syntax (included by)

\usepackage[fencedCode,inlineFootnotes,citations,definitionLists,hashEnumerators,smartEllipses,hybrid]{markdown} 

But tables with defined cell-widths and multicolumns have to be done in latex native code.

To make the document more easy to write down, I am planning to create a latex macro creating these tables. So the writer only has to fill some macro variables and latex is buliding the table.

Even this is almost working BUT

I have to stop the markdown environment with \end{markdown} just before creating the table and entable markdown with \begin{markdown}. This ist working well within the document like:

\end{markdown} \marcocreatetable {parameter 1} {parameter 2} \begin{markdown} 

But, when trying to put these commands to the macro like

\newcommand{\marcocreatetable}[2]{ \end{markdown} \begin{longtable}{>{\columncolor[gray]{0.8}}p{2.5cm}|p{2.5cm} p{2.5cm} p{3.5cm} p{2.5cm}} \arrayrulecolor{red}\hline Cell1&\multicolumn{2}{l}{S\{1\} #1}&\multicolumn{2}{r}{#2}\\\hline Cell x&cell y &\multicolumn{1}{c}{\textbf{cell w}}&cell z&\multicolumn{1}{c}{\textbf{6}}\\ \end{longtable} \begin{markdown} } 

an using the macro like

%\end{markdown} \marcocreatetable {parameter 1} {parameter 2} %\begin{markdown} 

Latex complains about

\begin{document} ended by \end{markdown}.

Seems ending markdown within the makro is not working very well. And yes, ending markdown at the beginning of a macro and starting markdown at the ending of a macro maybe bad code, but I'd like to create a table with just a single command.

Any suggestions to a big latex noop?

LaTeX with markdown and tables

I'm trying to build up a new documentation system using Markdown and LaTeX. After several hours most things are running smooth, but tables are a bit complicated.

Most of the text can be written with Markdown syntax, included by

\usepackage[fencedCode,inlineFootnotes,citations,definitionLists,hashEnumerators,smartEllipses,hybrid]{markdown} 

But tables with defined cell-widths and multicolumns have to be done in LaTeX native code.

To make the document more easy to write down, I am planning to create a LaTeX macro creating these tables. So the writer only has to fill some macro variables and LaTeX is buliding the table.

Even this is almost working BUT

I have to stop the Markdown environment with \end{markdown} just before creating the table and entable Markdown with \begin{markdown}. This isn't working well within the document like:

\end{markdown} \marcocreatetable {parameter 1} {parameter 2} \begin{markdown} 

But, when trying to put these commands to the macro like

\newcommand{\marcocreatetable}[2]{ \end{markdown} \begin{longtable}{>{\columncolor[gray]{0.8}}p{2.5cm}|p{2.5cm} p{2.5cm} p{3.5cm} p{2.5cm}} \arrayrulecolor{red}\hline Cell1&\multicolumn{2}{l}{S\{1\} #1}&\multicolumn{2}{r}{#2}\\\hline Cell x&cell y &\multicolumn{1}{c}{\textbf{cell w}}&cell z&\multicolumn{1}{c}{\textbf{6}}\\ \end{longtable} \begin{markdown} } 

an using the macro like

%\end{markdown} \marcocreatetable {parameter 1} {parameter 2} %\begin{markdown} 

LaTeX complains about

\begin{document} ended by \end{markdown}. 

Seems ending markdown within the makro is not working very well. And yes, ending markdown at the beginning of a macro and starting markdown at the ending of a macro maybe bad code, but I'd like to create a table with just a single command.

Any suggestions to a big LaTeX noop?

Source Link
Dirk
  • 11
  • 1
  • 3

LaTex with markdown and tables

I'm trying to build up a new documentation system using markdown and latex. After several hours most things are running smooth, but tables are a bit complicated.

Most of the text can be written with markdown syntax (included by)

\usepackage[fencedCode,inlineFootnotes,citations,definitionLists,hashEnumerators,smartEllipses,hybrid]{markdown} 

But tables with defined cell-widths and multicolumns have to be done in latex native code.

To make the document more easy to write down, I am planning to create a latex macro creating these tables. So the writer only has to fill some macro variables and latex is buliding the table.

Even this is almost working BUT

I have to stop the markdown environment with \end{markdown} just before creating the table and entable markdown with \begin{markdown}. This ist working well within the document like:

\end{markdown} \marcocreatetable {parameter 1} {parameter 2} \begin{markdown} 

But, when trying to put these commands to the macro like

\newcommand{\marcocreatetable}[2]{ \end{markdown} \begin{longtable}{>{\columncolor[gray]{0.8}}p{2.5cm}|p{2.5cm} p{2.5cm} p{3.5cm} p{2.5cm}} \arrayrulecolor{red}\hline Cell1&\multicolumn{2}{l}{S\{1\} #1}&\multicolumn{2}{r}{#2}\\\hline Cell x&cell y &\multicolumn{1}{c}{\textbf{cell w}}&cell z&\multicolumn{1}{c}{\textbf{6}}\\ \end{longtable} \begin{markdown} } 

an using the macro like

%\end{markdown} \marcocreatetable {parameter 1} {parameter 2} %\begin{markdown} 

Latex complains about

\begin{document} ended by \end{markdown}.

Seems ending markdown within the makro is not working very well. And yes, ending markdown at the beginning of a macro and starting markdown at the ending of a macro maybe bad code, but I'd like to create a table with just a single command.

Any suggestions to a big latex noop?