Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Markdown

links

setup

  • BEST PLACE TO WRITE ENGLISH MARKDOWN (ALSO TO GET EXPORT) ARE OBSIDIAN, VSCODE!
  • BEST PLACE TO WRITE PERSIAN MARKDOWN (ALSO TO GET EXPORT) IS OBSIDIAN!

Instructions

Items

  • EVERY INDENT INCLUDES MINIMUM 1 SPACE FROM END OF ITEM SPECIFIER OF PREVIOUS ITEM!

  • code:

    - item1
        - childitem1
            - item 1.1.1
        - childitem2
            - item 1.2.1
            - item 1.2.2
  • output:

    • item1
      • childitem1
        • item 1.1.1
      • childitem2
        • item 1.2.1
        • item 1.2.2

Inline Code

  • code:

    `this is some code`
  • output:

    this is some code

Multiline Code

  • code:

        ```python
        print('this is some python codee')
        ```
  • output:

    print('this is some python codee')

Table

  • code:

        | table_col1 | table_col2 | talble_col3 | ... |
        | :--------  | :--------: | ----------: | --- |
        | table_1_1  | table_1_2  | table_1_3   | ... |
        | table_2_1  | table_2_2  | table_2_3   | ... |
        | ... | ... | ... | ... |
  • output:

    table_col1 table_col2 talble_col3 ...
    table_1_1 table_1_2 table_1_3 ...
    table_2_1 table_2_2 table_2_3 ...
    ... ... ... ...

Link

  • code:

    [YOUR LINK TEXT](http://www.google.com)
  • output:

YOUR LINK TEXT

Image

  • code:

    ![image not shown text](./flame.jpg)
  • output:

    image not shown text

Conversion To PDF

typst

  • install typst! (it is awesome)
  • new file README.typ
#import "@preview/cmarker:0.1.8"

#cmarker.render(read("README.md"))
typst c README.typ 

marktext

  • you can open your file directly from terminal
  • edit it
  • export it to pdf or html
  • cons:
    • change text direction needs html code (one main text direction)

obsidian (BEST WAY for english and persian!)

  • copy your markdown codes and select export to pdf!

  • cons:

    • new file opening
  • snippet to fix font on linux (add to css snippet in appearance settings)

.cm-content {
  font-family: "Ubuntu", "Vazirmatn", serif !important;
}

.inline-title {
  font-family: "Vazirmatn", serif !important;
}

.view-header-title {
  font-family: "Ubuntu", "Vazirmatn", serif !important;
}

.tree-item-inner {
  font-family: "Ubuntu", "Vazirmatn", serif !important;
}

.nav-file-title-content {
  font-family: "Ubuntu", "Vazirmatn", serif !important;
}

.markdown-preview-view {
  font-family: "Ubuntu", "Vazirmatn", serif !important;
}

stackedit

  • go to LINK.
  • paste your code.
  • export to html.
  • you can print your html!

VSCode Extension

  • best way to do this is use from vscode extension Markdown PDF
    • first convert your markdown to html file!
    • then you can print your html to a pdf file!
    • even images print well in this approach!
    • you can even change html to make your own settings.

Manual Installation: 1. download the chromium Link 2. download the extension Markdown PDF from its github or somewhere 3. install the Markdown PDF 4. config the chrome download in your system to your Markdown PDF vscode settings 5. remove and reinstall Markdown PDF and restart vscode 6. in markdown file ctrl + shift + p type pdf

Pandoc

  • for fast transmition also you can use pandoc

    • default engine is pdflatex you can do the typst as engine

      pandoc *.md -o out.pdf --pdf-engine=YOURTYPSTPATH
    • also you can convert to typst first and then do what you want!

      pandoc *.md -o out.typ  
    • you can do multiple markdown to one pdf!

      pandoc *.md -o doc.pdf

      again better technique is to first convert your md file to html, by the command pandoc *.md -o doc.html and then convert it to pdf, by the printing the web page to pdf!

    • if you have persian also

      pandoc *.md -o doc.pdf --pdf-engine=xelatex -V mainfont='Vazirmatn'
    • more complete command

      pandoc README.md -o out.tex --standalone && pdflatex out.tex && xreader out.pdf
      pandoc --from markdown --to latex --standalone
              --embed-resources --toc --number-sections
              --highlight-style=zenburn --template eisvogel

      you can add eisvogel to the latex template path ~/.pandoc/templates/!

About

My Markdown Reference

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors