Last active
December 17, 2015 22:49
-
-
Save Opiprog/5685296 to your computer and use it in GitHub Desktop.
Useful LaTex codes
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
%%%%%%% (1) ADDING HQ IMAGES TO LatexPDF %%%%%% | |
% The best ways I have found are through PDF or EPS formats (i.e. vector formats) | |
% Avoid bitmaps. | |
% NEVER WORK IN MS POWERPOINT! Can't export .EPS formats, only horrible bitmaps. Use OPEN OFFICE instead. | |
\usepackage{epstopdf} | |
%%%%%%% (2) SUBSCRIPT AND SUPERSCRIPT TOGETHER %%%%%%% | |
\documentclass{article} | |
\usepackage{fixltx2e} | |
\usepackage{xcolor} | |
\def\SPSB#1#2{\rlap{\textsuperscript{\textcolor{red}{#1}}}\SB{#2}} | |
\def\SP#1{\textsuperscript{\textcolor{red}{#1}}} | |
\def\SB#1{\textsubscript{\textcolor{blue}{#1}}} | |
\begin{document} | |
\huge | |
sometext\SPSB{1}{2} more text | |
sometext\SP{1} more\SB{2} text\SP{1} | |
\end{document} | |
%%%%%%%%% MARGINS ADJUSTMENT CHEAT %%%%%%%%% | |
% ref. http://marasingha.blogspot.co.uk/2006/02/simple-margin-adjustment-in-latex.html | |
\addtolength{\textwidth}{ain} | |
\addtolength{\hoffset}{-bin} | |
\addtolength{\textheight}{cin} | |
\addtolength{\voffset}{-cin} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment