haghish / markdoc

A literate programming package for Stata which develops dynamic documents, slides, and help files in various formats
http://haghish.com/markdoc
87 stars 30 forks source link

markdoc mini > layout issues with docx and pdf #29

Closed alexandergehret closed 3 years ago

alexandergehret commented 3 years ago

I wasn't really able to bring markdoc to fully work on my system so I was happy to see your "mini" option. I have layout follwoing layout issues.

(Stata 16 on Windows 10 Enterprise and markdoc version 5.0.0)

With the docx option:

With HTML:

Any idea how to work around these (minor) issues? Best, AG

haghish commented 3 years ago

hi alexander,

I am not sure about the table font-size, but none of the others is a bug. the mini engine, is by no mean a replacement for the full installation. But it is really helpful on computers with restrictions and servers. If you install the full markdoc, you can also control the layout style of your documents (see the dialog box for help). But on mini, your options are very limited.

perhaps you could upload a photo of the table?

alexandergehret commented 3 years ago

Hi Thanks for the quick reply. I really wanted to use the full markdoc and not just the mini engine but was able to produce only empty DOCX and PDFs. It also prompted me to install Pandoc although I already had it installed. So, maybe I will try again but might have to contact you to solve those issues with the full version. Do you prefer it here or in statalist?

For this tread: Below a screenshot of the HTML where the table ist in a bigger font than the rest. Ok, its cosmetic, I know. Also the "little" bug with the blue "Heading 4".

I tried to workaround and scanned the ado-files but didn't really find a way to change it. But I really beginner in view of that.

markdoc_mini_example_table_font_size

Best, AG

haghish commented 3 years ago

it's actually great that you're testing the engine with care. If I recall correctly (from over 2 years ago):

If you have time to update the styles of mini engine for everyone, I could guide you to the specific file...

alexandergehret commented 3 years ago

thanks. yeah, I can try to update the styles of mini engine if you gide me to the file.

for the issues with the full markdoc code (not the mini): shall I open here later another thread?

alexandergehret commented 3 years ago

It would be really nice if one could choose / amend the layout of the .docx also with the mini engine like doing with the full markdoc. I'm currently using a workaround and creating .md with markdoc and then using dynpandoc to convert to a nicely formated .docx. That works fine, but it (I assume pandoc) messes up html-tables (from esttab) that I imported (//IMPORT mytable.html). To be able to change the .docx-layout when using the mini-engine would maybe solve the issue (as you don't use pandoc), but don't know if that is an option for future. But, overall, its still a great package! Best, Alexander

haghish commented 3 years ago

There are 2 main programs that collaborate to produce both Docx and PDF in the mini engine. These programs are mdconvert.ado and mdminor.ado.

The midi engine, as you can see in the mini.ado, simply calls markdoc program with the mini option. Therefore, the majority of the program is defined within mini option in markdoc.ado.

I'd suggest to focus on one output document first (docx ?) and make sure it is developed exactly as you wish it to be. Next, we can apply your code to other formats.

alexandergehret commented 3 years ago

Thanks for pinpointing the ado-files for the layout of the .docx (on the first search I din't see, where the formats for docx are defined). Now I see, that you are fully using putdocx for this and I didn't see how to generally change styles of pstyles like for the headings. But at the end I found out, that this ado does not apply to my configuration as I'm using stata 16 😌 and the layout seems to be defined by html2docx (where I can't find the code to check, if I could possibly change the layout there).

So, I guess for the time beeing I work with my workaround. Sorry if I let you down for the formatting of the Stata 15 solution.


Von: E. F. Haghish notifications@github.com Gesendet: Samstag, 12. Dezember 2020 19:18:25 An: haghish/markdoc Cc: Gehret Alexander; Author Betreff: Re: [haghish/markdoc] markdoc mini > layout issues with docx and pdf (#29)

There are 2 main programs that collaborate to produce both Docx and PDF in the mini engine. These programs are mdconvert.ado and mdminor.ado.

The midi engine, as you can see in the mini.ado, simply calls markdoc program with the mini option. Therefore, the majority of the program is defined within mini option in markdoc.ado.

I'd suggest to focus on one output document first (docx ?) and make sure it is developed exactly as you wish it to be. Next, we can apply your code to other formats.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/haghish/markdoc/issues/29#issuecomment-743795236, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASBX5YU2EMEBZ6WWNDXQX23SUOXXDANCNFSM4UTH6NZQ.