Skip to content

Commit

Permalink
4.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
haghish committed May 27, 2019
1 parent 8aa8cbf commit 3038121
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 52 deletions.
2 changes: 1 addition & 1 deletion markdoc.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ d produces dynamic analysis documents in various formats, such as {bf:pdf}, {bf:
d {bf:odt}, {bf:html}, {bf:epub}, {bf:markdown}, presentation slides in {bf:pdf} or
d {bf:html}, as well as dynamic Stata package help files {bf:sthlp}.
d
d Distribution-Date: 20190110
d Distribution-Date: 20190527
d
F abspath.ado
F markdoc.ado
Expand Down
2 changes: 1 addition & 1 deletion markdoc.sthlp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{smcl}
{right:version 4.4.5}
{right:version 4.5.0}
{title:Title}

{phang}
Expand Down
41 changes: 20 additions & 21 deletions mdconvert.ado
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// to generate the help file, type: markdoc "mdconvert.ado", mini export(sthlp) replace

/***
_v. 1.1.0_
_v. 1.2.0_
Title
======
__mdconvert__ -- converts [Markdown](https://daringfireball.net/projects/markdown/) to
Microsoft Word __docx__ or __pdf__
__mdconvert__ - converts [Markdown](https://daringfireball.net/projects/markdown/) to
Microsoft Word __docx__ or __pdf__ within Stata
Syntax
------
Expand All @@ -14,18 +16,16 @@ Syntax
_options_
- - -
***rep***lace: replaces the existing document
name: name of the exported file
***e***xport(name): document format which can be __docx__ or __pdf__
***t***itle(str): title of the document
***au***thor(str): author of the document
***aff***iliation(str): author affiliation
***add***ress(str): author address or email
***sum***mary(str): abstract or summary of the document
- - -
| _option_ | _Description_ |
|:---------------------|:---------------------------------------------------|
| **rep**lace | names of the exported file |
| name | bold face text |
| **e**xport(name) | document format which can be __docx__ or __pdf__ |
| **t**itle(str) | title of the document |
| **au**thor(str) | author of the document |
| **aff**iliation(str) | author affiliation |
| **add**ress(str) | author address or email |
| **sum**mary(str) | abstract or summary of the document |
Description
Expand Down Expand Up @@ -54,19 +54,17 @@ Example(s)
----------
convert Markdown file to docx
. mdconvert using path/to/markdown.md, name(mydoc) export(docx) replace
. mdconvert using "markdown.md", name(mydoc) export(docx) replace
convert Markdown file to pdf
. mdconvert using path/to/markdown.md, name(mydoc) export(pdf) replace
. mdconvert using "markdown.md", name(mydoc) export(pdf) replace
Author
------
E. F. Haghish
University of Göttingen
info [aT] haghish [D0T] com
The command is hosted on [GitHub](http://github.com/haghish/markdoc)
[https://github.com/haghish](https://github.com/haghish)
- - -
Expand Down Expand Up @@ -386,8 +384,9 @@ program define mdconvert
// -------------------------------------------------------------------------
if substr(`"`macval(line)'"',1,5) == ":----" | ///
substr(`"`macval(line)'"',1,5) == "|----" | ///
substr(`"`macval(line)'"',1,6) == "|:----" | ///
substr(`"`macval(line)'"',1,6) == "| ----" | ///
substr(`"`macval(line)'"',1,6) == "| :---" | {
substr(`"`macval(line)'"',1,6) == "| :---" | {

local tablenum = `tablenum'+1

Expand Down
52 changes: 23 additions & 29 deletions mdconvert.sthlp
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{smcl}
{it:v. 1.1.0}
{it:v. 1.2.0}


{title:Title}

{p 4 4 2}
{bf:mdconvert} {hline 2} converts {browse "https://daringfireball.net/projects/markdown/":Markdown} to
Microsoft Word {bf:docx} or {bf:pdf}
{bf:mdconvert} - converts {browse "https://daringfireball.net/projects/markdown/":Markdown} to
Microsoft Word {bf:docx} or {bf:pdf} within Stata


{title:Syntax}
Expand All @@ -16,20 +16,17 @@ Microsoft Word {bf:docx} or {bf:pdf}
{p 4 4 2}
{it:options}

{space 4}{hline}

{p 4 4 2}
{ul:rep}lace: replaces the existing document {break}
name: name of the exported file {break}
{ul:e}xport(name): document format which can be {bf:docx} or {bf:pdf}
{ul:t}itle(str): title of the document {break}
{ul:au}thor(str): author of the document {break}
{ul:aff}iliation(str): author affiliation {break}
{ul:add}ress(str): author address or email {break}
{ul:sum}mary(str): abstract or summary of the document

{space 4}{hline}

{col 5}{it:option}{col 27}{it:Description}
{space 4}{hline 75}
{col 5}{ul:rep}lace{col 27}names of the exported file
{col 5}name{col 27}bold face text
{col 5}{ul:e}xport(name){col 27}document format which can be {bf:docx} or {bf:pdf}
{col 5}{ul:t}itle(str){col 27}title of the document
{col 5}{ul:au}thor(str){col 27}author of the document
{col 5}{ul:aff}iliation(str){col 27}author affiliation
{col 5}{ul:add}ress(str){col 27}author address or email
{col 5}{ul:sum}mary(str){col 27}abstract or summary of the document
{space 4}{hline 75}


{title:Description}
Expand All @@ -50,35 +47,32 @@ Generating docx and pdf files in Stata 15 is done using the {bf:putdocx} and
{bf:putpdf} commands. Compared to Pandoc, these commands are still very limited
and do not fully cover the Markdown syntax. For example, they do not allow:

{break}1. horizontal line
{break}2. Hyperlink
{break}3. Nested lists
{break}4. Mathematical notations
{break} 1. horizontal line
{break} 2. Hyperlink
{break} 3. Nested lists
{break} 4. Mathematical notations


{title:Example(s)}

convert Markdown file to docx
. mdconvert using path/to/markdown.md, name(mydoc) export(docx) replace
. mdconvert using "markdown.md", name(mydoc) export(docx) replace

convert Markdown file to pdf (NOT DEVELOPED YET)
. mdconvert using path/to/markdown.md, name(mydoc) export(pdf) replace
convert Markdown file to pdf
. mdconvert using "markdown.md", name(mydoc) export(pdf) replace


{title:Author}

{p 4 4 2}
E. F. Haghish {break}
University of Göttingen {break}
info [aT] haghish [D0T] com {break}

{p 4 4 2}
The command is hosted on
GitHub {browse "http://github.com/haghish/markdoc":hyperlink}
{browse "https://github.com/haghish":https://github.com/haghish}

{space 4}{hline}

{p 4 4 2}
This help file was dynamically produced by
{browse "http://www.haghish.com/markdoc/":MarkDoc Literate Programming package}


0 comments on commit 3038121

Please sign in to comment.