Skip to content

Latest commit

 

History

History
432 lines (318 loc) · 7.68 KB

report-3stamps.md

File metadata and controls

432 lines (318 loc) · 7.68 KB

ISO-nnnn

Japan style
Technical Report : edit
FOSS 19-10-10 sn D.S : check : approve
FOSS 19-10-11 mn N.S

  1. Abstract

this is a sample of japan style technical report.

  1. (Conclusion)

  • this is a sample of japan style technical report.
  • include edit/ check/ approve stamps.
  • include TOC styles with page outputs.
  1. Con\tents

[TOC]

  1. Features of this plugin

4.1. Script for dl-dt-dd tables

  • convert dl-dt-dd markup to tables
  • dl will be specified by previous siblings with class before-dl-tables

4.2. Script and Styles for stamps

  • made by a dl-dt-dd markup in markdown, made by 1dt, 3dd.
  • place after an elment have class="table-3stamps" .
  • if stamp fields have no <br>, the slash line will be insereted.
  • samples:
<p class="before-dl-table table-3stamps"></p>

Japan style<br>Technical Report
: edit<br>![stamp-editor](stamp-A.svg)
: check
: approve<br>![stamp-approve](stamp-C.svg)

or

{: .before-dl-table .table-3stamps }

Japan style<br>Technical Report
: edit<br>![stamp-editor](stamp-A.svg)
: check
: approve<br>![stamp-approve](stamp-C.svg)
  • to disable the slash lines, you can specify these style:
th.no-stamps {
    background-image: none !importatnt;
}

4.3. Script and Styles for tables {: #css-tables }

  • this function is for improve to enable markdown syntax to
    multi-line tables

  • CSS-styles predefined in _extra.pdf

pre-defined CSS styles for table{: .table-tag }

class size
table2-8 20-80%
table3-7 30-70%
table4-6 40-60%
table5-5 50-50%
table2-2-6 20-20-60%
table2-3-5 20-30-50%
table2-4-4 20-40-40%
table3-3-3 33-33-33%
table2-5-3 20-50-30%
table2-6-2 20-60-20%
table2-2-2-4 20-20-20-40%%

20% : 80%

20% : 40% : 40%

20% : 20% : 20% : 40%

multi line sample : tables can be
write with
regular syntax : 1. list ok 2. ol ok 3. ul too

but dt can't be multi-line : ... : ...

4.4. Styles for page-header (paged.js)

use paged.js CSS for page settings

page headers

@page {
    @top-right {
        content: string(doc_title) '(' counter(page) '/' counter(pages) ')';
    }
}
@media print {
    .pagedjs_margin-top-right {
        margin-top: auto;
    }
    .doc-num {
        display: none;
        string-set: doc_title content(text);
    }
}
<p class="doc-num">document number. ISO-nnnn-nn</p>

or

document number. ISO-nnnn-nn
{: .doc-num }

page border

I hacked paged.js output and append style for pages border.

@media print {
    .pagedjs_area {
        border: 1pt solid #000;
        padding: 2mm;
    }
}

4.5. Styles for TOC (paged.js)

  • page numbers were generated by paged.js
  • PDF outlines were generated by pagedjs-cli option: --outline-tags
  • dot lines were generate by CSS:
    .toc a::after { ...
        content: target-counter(attr(href), page);
    ...
    .toc li:before { ...
        content: ". . . . . . . . . . . . . . . . . . . . . . . . . "

4.6. Styles for page-break

just use hr

---

4.7. Styles for auto-numbered images and tables

figure or table captions can be described with em tags.

img + em, svg + em {
    ...
    counter-increment: num_figure; }
img + em::before, svg + em::before {
    content: "Fig." counter(num_figure) " ";
}

see samples in this section, Styles for Tables and Demo.

*sample svg* *sample svg part2*

sample : 1 : 2

sample : 1 : 2

sample table

4.8. Script to fix element ids for paged-js

  • mkdocs outputs the header ids with heading digit from
    it's contents: markdown: ' ### 1 content '
    -- convert to --> html: ' <h3 id="1-content">1 content</h3> '

  • some functions in paged-js cause exceptions by these ids.
    pagedjs-cli will halt by this exceptions.

  • fix_mkdocs_ids() change these ids to prefixed ids.

  • paged-js cause exceptions: SyntaxError: '#1-content' is not a valid selector at element.querySelector() functions.

  1. Demo

screenshot in pdf viewer screenshot in pdf viewer

T.B.D - screenshot in libreoffice

  1. History

Revision History

dummy text for attr-lists {: .before-dl-table .table2-8 }

version : desc

1.0.0 : update to github/ nested lists/ hr as page-breaks

0.9.6 : enable inline elements: comments, em, br, strong or etc...

0.9.5 : support embedded images.

0.9.4 : enable ooxml fields: TOC, page numbers, bookmarks

0.9.3 : borders on code blocks/ control tables width/ floating rectangles on header

0.9.2 : borders on code blocks/ control tables width.

0.9.1 : enable document numbers on header

0.9.0 : append docx backend by python-docx

0.5.1 : fixed multiple <tbody> element in dl-tables.

0.5.0 : add a script: fix the mkdocs invalid html-id to prevent paged-js exceptions.

0.4.0 : append CSS-counters for figures and tables.

0.3.0 : append theme to the package name

0.2.7 : TOC and styles

0.2.6 : append explanation for paged.js TOC and styles

0.2.5 : append explanation for paged.js styles

0.2.4 : append explanation for paged.js styles

0.2.3 : append slash line to the no-stamp cells.

0.2.2 : append screenshot

0.2.1 : append explanation for dl-dt-dd tables

0.2.0 : start to edit/ 3stamps

0.1.2 : start to use paged.js

0.1.1 : start to use mkhtmltopdf

0.1.0 : append dl-dt-dd tables

0.0.6 : start to edit

Donations

If you are feel to nice for this software, please donation to my

  • Bitcoin | 1FTBAUaVdeGG9EPsGMD5j2SW8QHNc5HzjT |
  • or Ether | 0xd7Dc5cd13BD7636664D6bf0Ee8424CFaF6b2FA8f | .