Newer
Older
Import / applications / MakePDF / Build / debugging.html
<?xml version="1.0" encoding="UTF-8"?>
<html><head><title>test</title><link rel="stylesheet" type="text/css" href="base.css"></head><body><h3>Must Fix</h3>

<hr/>

<p>High Priority</p>

<ul>
<li>[ ] broken toolbar buttons not hooked up (disable/remove?)</li>
<li>[ ] broken menu items (disable/remove)</li>
<li>[ ] when launch, should open on last session or open an about document

<ul>
<li>particular first launch</li>
</ul></li>
<li>[ ] be able to activate/install a license</li>
<li>[ ] some bug in the template editing - loses data!</li>
<li>[ ] make a command-line exe</li>
<li>[ ] project editing

<ul>
<li>setting of template to use</li>
</ul></li>
<li>[ ] the style is not being applied</li>
<li>[ ] apply style settings to the text</li>
<li>[ ] be able to select a color in style settings</li>
<li>[ ] Crashes when invoice example is on 2 columns and table overflows to next column. Perhaps table resize or something</li>
<li>[ ] Do spell checking of the webpages when they are done</li>
<li>[ ] Fix crashing / stability</li>
</ul>

<p>Low Priority</p>

<ul>
<li>[ ] Convert style to CSS and be able to preview as HTML better - give option to export to HTML+CSS</li>
<li>[ ] TOC to be annotated with links in to the document</li>
<li>[ ] maths formulas</li>
<li>[ ] RST some restructure text support (note, comment etc)</li>
<li>[ ] includes - <code>&lt;[tag](link)</code></li>
<li>[ ] save comment meta to the PDF</li>
<li>[ ] need end-user documentation</li>
<li>[ ] keep basic formatting in table cells (bold italics etc)</li>
<li>[ ] be able to have emphasis on rows - eg for subtotal and total rows</li>
<li>[ ] Reload file when edited from externally. Perhaps when window gets focus, do a check if files modified. Ora  file-watcher API.</li>
<li>[ ] Heading section with 1 column and rest with 2 - make an academic paper template example</li>
<li>[ ] RSS news feed date format is not correct - need to convert between date formats</li>
<li>[ ] The registration form on website - user should be the &quot;registered user&quot; &amp; email. The notes should explain the billed user
can be different. The generated license file should have both the name of the registered user, and the billing user.</li>
<li>[ ] Workflows instead of panels - currently 2 optional panels - style and preview. Instead 3 workflows - editing content, editing formatting, and editing style. The Editing content work pattern just needs straight plain text markdown editing (no style or preview panes). The formatting work pattern needs the markdown and preview views. And the style editing needs the style panel and the preview panel. In this workflow, the markdown doesn&#39;t need to be seen.</li>
</ul>

<p>Done</p>

<ul>
<li>[X] when change template item name, the template item list is not updated</li>
<li>[X] 3rd level heading on 1st two lines of file is promoted</li>
<li>[X] EULA</li>
<li>[X] acknowledgements / 3rd-party licenses</li>
<li>[X] the code/quote highlighting output looks broken/bad</li>
<li>[X] template switching not working</li>
<li>[X] template editing</li>
<li>[X] list indenting is broken</li>
<li>[X] image tag is converted to html but not output in pdf</li>
<li>[X] image with relative path to where document is</li>
<li>[X] when copy and paste text, do as plain-text, remove color/formatting</li>
<li>[X] table editing</li>
<li>[X] be able to mark a column as expanding (fills to page width)</li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h1>Wicked Docs</h1>

<hr/>

<h3>Table of Contents</h3>

<ul>
<li> Markdown specs </li>
<li> PDF specs </li>
<li> Competitors </li>
<li> Business Case / Analysis </li>
<li> TODOs </li>
<li> Improvements </li>
<li> Done </li>
<li> Design Ideas </li>
<li> Testing </li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Markdown specs</h3>

<hr/>

<ul>
<li><a href="https://daringfireball.net/projects/markdown/syntax">DaringFireball</a></li>
<li><a href="https://tools.ietf.org/html/rfc7764">RFC7764</a></li>
<li><a href="https://spec.commonmark.org/0.29/">Commonmark</a></li>
<li><a href="https://fletcher.github.io/MultiMarkdown-4/syntax">Multimark</a></li>
</ul>

<h3>PDF specs</h3>

<hr/>

<ul>
<li><a href="https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/pdf_reference_archives/PDFReference.pdf">Adobde Spec</a></li>
<li><a href="https://planetpdf.com/planetpdf/pdfs/pdf2k/01W/staas_howpdfworks.pdf">How PDF Works</a></li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Competitors</h3>

<hr/>

<ul>
<li><a href="https://bywordapp.com">Byword</a>

<ul>
<li>macOS and iOS only, $11US ($16) - appears to lack applying templates and custom styling</li>
<li>iCloud drive support (sync across devices)</li>
<li>autosave</li>
<li>spelling and grammar checking</li>
<li>tags - file organization</li>
<li>publish to internet / blog features</li>
</ul></li>
<li><a href="https://markdownpro.com/#export_pdf">MarkdownPro</a>

<ul>
<li>macOS only, $10US</li>
<li>templates / css</li>
<li>export to PDF</li>
<li>RTL</li>
<li>save history</li>
</ul></li>
<li><a href="https://www.markdownpad.com">MarkdownPad</a>

<ul>
<li>Windows only</li>
<li>Free version</li>
<li>css styles</li>
<li>Pro version, $15US

<ul>
<li>PDF export</li>
<li>tables</li>
<li>code syntax highlight</li>
</ul></li>
</ul></li>
<li><a href="https://bear.app">Bear</a>

<ul>
<li>macOS and iOS only</li>
<li>note taking oriented</li>
<li>Free version</li>
<li>Pro version is $15 annually !!!</li>
</ul></li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Business Case / Analysis</h3>

<hr/>

<ul>
<li><p>http://blogs.harvard.edu/pamphlet/2014/08/29/switching-to-markdown-for-scholarly-article-production/</p></li>
<li><p>Academic usage required features</p>

<ul>
<li>generation of table of contents</li>
<li>links</li>
<li>footnotes</li>
<li>cross-references</li>
<li>figures</li>
<li>tables</li>
<li>citations</li>
<li><p>bibliographies</p></li>
<li><p>math equations  (MathJax)</p></li>
</ul></li>
<li><p>Publication</p>

<ul>
<li>multiple columns</li>
</ul></li>
<li><p>Extension Features</p>

<ul>
<li>imports/includes  &lt;[include.ext]</li>
<li>including a csv file and it expands as a table</li>
<li>visualize a table as a graph or chart</li>
</ul></li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>TODOs</h3>

<hr/>

<ul>
<li><p>For HTML preview - the style settings can be converted/output as CSS</p>

<ul>
<li>the HTML preview could re-use the WebView widget on macOS</li>
</ul></li>
<li><p>installation of license file</p></li>
<li><p>idea: mime-multipart like emails for combining the markdown, style, formatting and referenced images to a single file for sending/export/reasons while maintaining some level of plain-text</p></li>
<li><p>UI add/remove templates files</p></li>
<li><p>handle user vs system templates and styles</p>

<ul>
<li>perhaps copy system ones to user when creating the user directory structure</li>
</ul></li>
<li><p>need to have licensing - app config file</p></li>
<li><p>hook up missing connected toolbar buttons</p></li>
<li><p>undo/redo of property changes - not just text changes</p></li>
<li><p>open recent files - maintain a recent list</p></li>
<li><p>&#39;export...&#39; not implemented (both menu and project tab)</p></li>
<li><p>style template item of horizontal rule - text property to draw a HR.</p>

<ul>
<li>that way can add a HR under specific types of text or can</li>
<li>turn off HRs completely</li>
</ul></li>
<li><p>style/template settings for:</p>

<ul>
<li>text properties for &#39;links&#39;</li>
<li>syntax highlighting colors for code blocks</li>
<li>properties for table (font, border thickness, colors, alternating colors, spacing etc)</li>
<li>task list properties</li>
<li>emoji set</li>
</ul></li>
<li><p>defaults to new docs as .txt, but perhaps should be .md</p></li>
<li><p>need to add support for other platforms - test, installer/packaging</p></li>
<li><p>as the file gets larger, the refresh is way slower<br/>
perhaps need a way to only redraw/refresh the first page?<br/>
need to profile to figure out the problem</p></li>
<li><p>Search for todos in code</p></li>
<li><p>user configuration of UI colors and settings</p></li>
<li><p>in to setting up of templates</p>

<ul>
<li>support for markdown extensions like tables (github markdown supports this)</li>
<li>Kind of works - Need to add border and work on the conversion from HTML to PDF</li>
<li>test cases</li>
<li>support for syntax highlighting of code - colouring according to templates</li>
<li>Kind of have pre/code sections - need to set a fixed font, needs work</li>
</ul></li>
<li><p>if add a ?-? on line under text, the text is a heading</p>

<ul>
<li>in the PDF, these headings are underlined - feature or bug? style option?</li>
</ul></li>
<li><p>broken build dependancies - after edit UI files, need to force recompile of other files</p></li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Improvements</h3>

<hr/>

<ul>
<li>Git integration</li>
<li><p>Vim key bindings</p></li>
<li><p>be able to edit from the formatted view (or hide/remove it for MVP)</p></li>
<li><p>make template value items editable with context appropriate controls</p></li>
<li><p>EULA doesn&#39;t disclaim warrenties etc</p></li>
<li><p>Should make links to the EULA on the download page</p></li>
<li><p>WebSite terms of use page needs to make exception about the WickedDocs application which is downloaded from the site, that its terms of use<br/>
are instead or additionally governed by the EULA</p></li>
<li><p>Perhaps need to add information about registered and non-registered versions of the software in both the EULA and terms of use pages</p></li>
<li><p>Privacy policy: &quot;We will collect and use of personal information &quot; ... badly worded. Need to look in to implications for how to handle customer lists etc.</p></li>
<li><p>should be a macOS native widget to display a PDF file</p>

<ul>
<li>could use this for macOS</li>
<li>on Windows, using IE embedded ActiveX control might be one way instead of a QWebView</li>
<li>Linux still needs to use the current approach</li>
</ul></li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Done</h3>

<hr/>

<ul>
<li>resizing issue of mainwindow splitter and native windows fixed</li>
<li>syntax <strong>highlighting</strong> is broken <em>for</em> <em>italics</em> more text <strong>bold</strong></li>
<li>hide formatted view</li>
<li>img tag supported</li>
<li>list indenting fixed</li>
<li>Make it faster to edit - a bit slow and non-responsive</li>
<li>UI add/remove template objects</li>
<li>move template items up/down in the list</li>
<li>installer/packaging done for macOS</li>
<li>file size of PDF is really large - the background/images are duplicated each page - fixed with image caching</li>
<li>also file size seems much larger - found flags and settings to enable compression in libharu</li>
<li>need to copy/install Qt libraries in packaging up of build</li>
<li>currently has hard-coded letter head loading, should be from the template file</li>
<li>handle/test multiple instances running</li>
<li>move saving of temp files to a temp directory/location</li>
<li>application icon</li>
<li>search for template file, currently hard coded to load test.tmpl</li>
<li>hide debug things (menus, tool-windows etc)</li>
<li>coloring of plain-text markdown / syntax highlighting</li>
<li>titlebar of mdi child is black - must fix</li>
<li>plain-text editor control should be a fixed-width font</li>
<li>when run UI from the command line, open files from args if provided</li>
<li>one line of text, and on next line, the text doesn?t show in the PDF
if add a CR between the lines, it appears

<ul>
<li>Fixed - needed to handle &lt;br&gt; tag</li>
</ul></li>
<li>menubar in wrong place  - FIXED   (code change to MdiWindow.cpp)</li>
<li>menubar not working until switch to other app and back - FIXED  (run from MyApp.app dir)</li>
<li>Need to rename everywhere from MakePDF to WickedDocs (or other name). Wicked Docs is not bad.</li>
<li>black toolbar - fixed by not setting document mode and setting stylesheets</li>
<li>menu has ?Show Tab Bar? / ?Hide Tab Bar? which doesn?t make sense / bad feature - macOS thing, menu cleared</li>
<li>seems to break if remove the 2nd dummy toolbar - related to black toolbar issue and document mode</li>
<li>when running from MyApp.app dir, pdf.js resources not found, display not-retina/blurry

<ul>
<li>blurry solution is Info.plist with NSHighResolutionCapable. now copying the resources</li>
</ul></li>
<li>the preview as PDFs of some markdown files is wrong scale - seems ok with WebKit WebView</li>
<li>integration of color scheme editing</li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Design Ideas</h3>

<hr/>

<ul>
<li><p>Command line tool takes a number of inputs and outputs a PDF</p>

<ul>
<li>the minimum input is the markdown text file</li>
<li>additionally a style sheet and template and project settings can be passed</li>
<li>the project settings can set a style sheet and template also</li>
</ul></li>
<li><p>The GUI tool edits the project settings and the markdown text</p>

<ul>
<li>it can also edit the style sheet and template</li>
<li>version control integration?? - tracking/comments</li>
</ul></li>
<li><p>Markdown based for main text</p>

<ul>
<li>structured content</li>
<li>TOC</li>
<li>sections and sub-sections</li>
<li>bookmarks</li>
<li>insert images, tables, diagrams, graphs, media</li>
<li>comments / tracking?</li>
</ul></li>
<li><p>Templates for background and headers and footers - portrait or landscape, page size, margins etc</p></li>
<li><p>Style sheet templates for how the markdown is transformed</p></li>
<li><p>These are all plain text files for easy version controlling</p>

<ul>
<li>Markdown text can be standard markdown</li>
<li>Templates for background etc can be SVG based and JSON based</li>
<li>Style sheet can be CSS like or JSON based</li>
</ul></li>
<li><p>Palettes</p>

<ul>
<li>Palette editor to create a palette of colours to pick from</li>
<li>Can also free pick colors - perhaps derived off of a palette color</li>
<li>Colors need to store if they are relative to a palette or absolute</li>
</ul></li>
<li><p>Style sheet contains</p>

<ul>
<li>font family, size, color and style/weight etc for each text markdown type</li>
<li>indentation, spacing and alignment </li>
<li>bullet / list styles</li>
</ul></li>
<li><p>Editor for editing the templates and style sheets and previewing</p></li>
<li><p>Company template - like dot / word doc template.</p></li>
</ul>

<p>--&lt;&lt;&gt;&gt;--</p>

<h3>Testing</h3>

<hr/>

<p><a href="https://www.subflexion.com/WickedDocs">WebSite</a></p>

<ol>
<li>one</li>
<li>two

<ol>
<li>one</li>
<li>two</li>
</ol></li>
</ol>

<p>--&lt;&lt;&gt;&gt;--</p>

<p>&lt;center&gt;</p>

<p><img src="file:///../Resources/Templates/example-bg.png" alt="ExampleImage"/></p>

<p><img src="/Users/jryland/Code/applications/MakePDF/Resources/Documents/project-project.png" alt="Example Image"/></p>

<p><img src="file:///Users/jryland/Code/applications/MakePDF/Resources/Templates/example-bg.png" alt="ExampleImage"/></p>

<p><img src="Resources/Templates/example-bg.png" alt="Alt text" title="Optional title"/></p>

<p><img src="../Templates/example-bg.png" alt="Alt text" title="Optional title attribute"/></p>

<table>
<thead>
<tr>
<th> Tables</th>
<th style="text-align: center"> Are</th>
<th style="text-align: right"> Cool</th>
</tr>
</thead>

<tbody>
<tr>
<td> col 3 is</td>
<td style="text-align: center"> right-aligned</td>
<td style="text-align: right"> $1600</td>
</tr>
<tr>
<td> col 2 is</td>
<td style="text-align: center"> centered</td>
<td style="text-align: right">   $12</td>
</tr>
<tr>
<td> zebra stripes</td>
<td style="text-align: center"> are neat</td>
<td style="text-align: right">    $1</td>
</tr>
</tbody>
</table>

<p>&lt;/center&gt;</p>

<p><img src="../Templates/example-bg.png" alt="Alt text"/></p>

<table>
<thead>
<tr>
<th> a</th>
<th>  a</th>
<th> ff ff</th>
<th> a</th>
<th> d</th>
</tr>
</thead>

<tbody>
<tr>
<td> d</td>
<td> a</td>
<td> ff w</td>
<td>  a</td>
<td> d</td>
</tr>
<tr>
<td> d</td>
<td> a</td>
<td> ffd df</td>
<td>  a</td>
<td> d</td>
</tr>
<tr>
<td> d</td>
<td> a</td>
<td>    a</td>
<td>  a</td>
<td> d</td>
</tr>
</tbody>
</table>

<p>y^(a+b)^<br/>
x~y,z~<br/>
y(a+b)<br/>
xy,z</p>

<p>An example of math within a paragraph --- \({e}^{i\pi }+1=0\)<br/>
--- easy enough.</p>

<p>And an equation on it&#39;s own:</p>

<p>\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \]</p>

<p>That&#39;s it.<br/>
Here?s what it looks like in action (if you?re viewing this document in a supported format):</p>

<p>An example of math within a paragraph ? ({e}^{i\pi }+1=0) ? easy enough.</p>

<p>And an equation on it?s own:</p>

<p>[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} ]</p>

<p>That?s it.</p>

<p>In addition to the \[ \] and \( \) syntax, you can use LaTeX style ?dollar sign? delimiters:</p>

<p>An example of math within a paragraph --- ${e}^{i\pi }+1=0$<br/>
--- easy enough.</p>

<p>And an equation on it&#39;s own:</p>

<p>$${x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$$</p>

<p>That&#39;s it.</p>