This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First of all, initialize a git repo on the local machine by typing: | |
>>git init | |
in the git command prompt under the working directory. | |
In order to add the files one can use the command | |
>> git add . | |
The . ensures all files in the directory become part of the repo | |
At this time one can leave a commit message keeping track of the changes made in the repo | |
>> git commit -m "A message" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ------------------------------- Useful Tricks Learnt | |
% Use ={}& to align subequations to the left | |
% Use = for single equations | |
% Put comments % in between the lines in order to avoid forming a new paragraph. | |
% To enter special characters into Inkspace figures, use Ctrl+U and then enter the unicode. e.g., for \times symbol, the unicode is U+0D7. So the key entry would be Ctrl+U U+0d7 and then press enter. | |
% | |
% ----------------- To compile with references use the following order in Shell" | |
% 1. pdflatex filename.tex | |
% 2. bibtex filename (no extension) | |
% 3. bibtex filename (no extension) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have messed many times syncnig local repos with remote ones. To avoid that in future, following is a short procedure that I need to follow. | |
1. If work has been started locally, start with the Gist with instructions on how to upload the local repo to Github. | |
2. If work has been started remotely, | |
First step is to clone the remote repo locally: | |
Once the local repo is initialized an synced with remote: | |
git init | |
git remote add <origin> | |
git clone | |
The above command creates a local clone of the remote repo that can be worked on the PC offline. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A quick and dirty bash script to convert a tikz image to a png. | |
# The necessary tweaks to the script to get it to work for your | |
# use case are as follows: | |
# | |
# 1. Change FIGURE_DEFINITIONS to point to your own figures. | |
# This file should contain a series of \newcommand definitions, | |
# one per figure. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% LaTeX Preamble - Font choices | |
%% Each block selects new math, roman (serif), sans serif, and typewriter fonts. | |
%% Delete or comment out all but one to make your choice. | |
% Fourier for math | Utopia (scaled) for rm | Helvetica for ss | Latin Modern for tt | |
\usepackage{fourier} % math & rm | |
\usepackage[scaled=0.875]{helvet} % ss | |
\renewcommand{\ttdefault}{lmtt} %tt | |
% Latin Modern (similar to CM with more characters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exts=".aux .lof .log .lot .fls .out .toc .dvi .bbl .bcf .blg -blx.aux -blx.bib -blx.bib .run.xml .fdb_latexmk .synctex.gz .syntex.gz(busy) .pdfsync .algorithms .alg .loa .thm .nav .snm .vrb .acn .acr .glg .glo .gls .brf .lol .idx .ilg .ind .ist .maf .mtc .mtc0 .pyg .nlo .tdo .xdy .keys" | |
for x in "${@:-.}"; do | |
arg=$(echo ${x:-.} | perl -pe 's/\.(tex|pdf)$//') | |
if [[ -d "$arg" ]]; then | |
for ext in $exts; do | |
rm -f "$arg"/*$ext |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use flushend package in the preamble: | |
\usepackage[keeplastbox]{flushend} | |
Just at the end of the document before invoking bibliographies, call: | |
\atColsEnd{\vfil} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inkscape --file=e_diag.svg --export-area-drawing --without-gui --export-latex --export-pdf=e_diag.pdf | |
Tip to avoid multipage pdf generation headache: | |
Ensure text is always top of eerything | |
select text and then Object -> Raise to top | |
All text objects can be selected from the find command enabling the 'select by type -> text' option. | |
Open the pdf_tex file after compiling, and delete the lines that says \includegraphics for pages other than 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ----------------------------------------------------------------------- | |
-- ** HammerSpoon Config File by S1ngS1ng with ❤️ ** -- | |
-- ----------------------------------------------------------------------- | |
-- *** Please refer to README.MD for instructions. Cheers! *** -- | |
-- ----------------------------------------------------------------------- | |
-- ** Something Global ** -- | |
-- ----------------------------------------------------------------------- | |
-- Uncomment this following line if you don't wish to see animations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% To convert an animated PDF generated out of LaTeX into a GIF: | |
convert -verbose -delay 50 -loop 0 -density 300 file.pdf file.gif | |
%% Inkspace SVG to PDF: | |
```Tip to avoid multipage pdf generation headache: | |
Ensure text is always top of eerything | |
select text and then Object -> Raise to top | |
All text objects can be selected from the find command enabling the 'select by type -> text' option. |
OlderNewer