text - jgrey4296/templates GitHub Wiki

Text Formats and processors

Tools

Awk

https://en.m.wikibooks.org/wiki/An_Awk_Primer/Awk_Command-Line_Examples

# Getting subgroups
awk 'match($0, /HREF="(.+?)"/, a) {print a[1]}'

# checking length
awk 'length < 10 {print $0}'

# in place editing and printing at end of file
gawk -i inplace '/if __name__ / {print "##-- ifmain" } {print $0} ENDFILE {print "##-- end ifmain"}'

Bibtex

http://www.lri.fr/~filliatr/bibtex2html/

bibtex --help

bibtex2html

https://www.lri.fr/~filliatr/bibtex2html/ https://github.com/backtracking/bibtex2html

	bibtex2html --help

Latex

tlmgr

to call bibtex, specify local aux file

for installing packages, use –usermode after tlmgr init-usertree

https://tex.stackexchange.com/questions/586467/

sudo fmtutil-sys –all

for fonts install collection-fontsrecommended for russian: cyrillic, hyphen-russian, babel-russian, fontspec, collection-langcyrillic

kpsewhich for searching latex path https://www.overleaf.com/learn/latex/Articles/An_introduction_to_Kpathsea_and_how_TeX_engines_search_for_files

texdoc

https://tex.stackexchange.com/questions/297004/ tlmgr option docfiles 1 tlmgr install –reinstall $(tlmgr list –only-installed | sed -E ‘s/i (.*):.*$/\1/’)

Installing fonts

https://tug.org/fonts/fontinstall.html#fndb

https://design.tutsplus.com/articles/different-font-file-types-explained-ott-ttf-woff–cms-39047 https://fontsarena.com/blog/font-formats-and-use/ https://creativemarket.com/blog/the-missing-guide-to-font-formats

OTF/TTF and WOFF are most supported.

mktexlsr updmap fmtutil

Xetex

https://www.tug.org/xetex/

replace `babel` with `polyglossia` replace `lmodern` with `fontspec` replace `fancyhdr` with `scrlayer-scrpage` use `microtype`

remove `inputenc` remove `fontenc`

Lualatex

http://www.luatex.org/

Markdown

https://help.github.com/articles/markdown-basics/

Markdown html export

Add a local file to `markdown-css-paths`, can use npm package `generate-github-markdown-css` as a start

Pandoc

https://pandoc.org/index.html

pandoc ? -o output.pdf

RST / Sphinx

https://www.sphinx-doc.org/en/master/contents.html https://restructuredtext.readthedocs.io/en/latest/

Sed

http://linuxcommando.blogspot.com/2008/03/using-sed-to-extract-lines-in-text-file.html

https://learnbyexample.gitbooks.io/command-line-text-processing/content/gnu_sed.html

https://learnbyexample.github.io/learn_gnused/

https://unix.stackexchange.com/questions/112023/how-can-i-replace-a-string-in-a-files#251742

extended regexs: sed -E ‘s/ / /’

groups and subselection: echo “a test blah” | sed -n -E ‘s/a (.+) blah/\1/p’

Filter lines with: ‘/pattern/d’

Print Matching lines with: ‘/pattern/p’

case Invariant: ‘/pattern/I’

Wordnet

`wn`

# For Nouns
-hypen		Hypernyms
-hypon, -treen	Hyponyms & Hyponym Tree
-synsn		Synonyms (ordered by estimated frequency)
-derin		Derived Forms
-famln		Familiarity & Polysemy Count
-coorn		Coordinate Terms (sisters)
-grepn		List of Compound Words
-over		Overview of Senses
# For verbs
-hypev		Hypernyms
-hypov, -treev	Hyponyms & Hyponym Tree
-synsv		Synonyms (ordered by estimated frequency)
-deriv		Derived Forms
-famlv		Familiarity & Polysemy Count
-framv		Verb Frames
-coorv		Coordinate Terms (sisters)
-simsv		Synonyms (grouped by similarity of meaning)
-grepv		List of Compound Words
-over		Overview of Senses
# Adjectives
-antsa		Antonyms
-synsa		Synonyms (ordered by estimated frequency)
-attra		Attributes
-deria		Derived Forms
-domna		Domain
-famla		Familiarity & Polysemy Count
-grepa		List of Compound Words
-over		Overview of Senses
# Adverbs
-antsr		Antonyms
-synsr		Synonyms (ordered by estimated frequency)
-pertr		Pertainyms
-famlr		Familiarity & Polysemy Count
-grepr		List of Compound Words
-over		Overview of Senses

vim

http://spacevim.org/documentation/

http://www.openvim.com/

http://www.tuxfiles.org/linuxhelp/vimcheat.html

https://betterprogramming.pub/50-vim-mode-tips-for-ide-users-f7b525a794b3

https://medium.com/@peterxjang/how-to-learn-vim-a-four-week-plan-cd8b376a9b85

https://www.andrewt.net/blog/vim/index.html

⚠️ **GitHub.com Fallback** ⚠️