Sunday, December 18, 2016

latex change line spacing in short text block or caption

e.g. to increase line spacing: \linespread{1.3}\selectfont{}
(specify a ratio in argument of \linespread{X.XXX}) 
 
Src:  http://tex.stackexchange.com/questions/113626/changing-spacing-of-caption

revtex and algorithm error

Floating environments created with the float package (as algorithm is) are incompatible with the revtex4-1 class.
The only way you have to include such an environment in your document, is to use the floating specifier H, which avoids the environment to float.
MWE:
\documentclass[aip, amsmath, amssymb, reprint]{revtex4-1}

\usepackage{graphicx}
\usepackage{dcolumn}
\usepackage{bm}
%\usepackage{float} % loaded by algorithm
\usepackage{algorithm}
\usepackage{algpseudocode}

\usepackage{lipsum} % just for dummy text

\begin{document}

\lipsum[1]

\begin{algorithm}[H]
  \caption{Hello}
  \label{EPSA}
   \begin{algorithmic}[1]
   \State $T_m= \min\limits_k (T_c(k)),  k_m= \arg\min\limits_k (T_c(k))$
   \end{algorithmic}
\end{algorithm}

\lipsum[1]

\end{document} 
 
Src:  http://tex.stackexchange.com/questions/231191/algorithm-in-revtex4-1

Thursday, November 10, 2016

How to get WYSIWYP (print what you see) in a web browser

I have found only one option that truly addresses my needs: The "Web Developer" add-on / extension developed by Chris Pederick.
With this plugin you can very easily disable ALL styles, Default styles, inline styles, embedded styles, and, you guessed it, print styles!

SRC: http://superuser.com/questions/846082/how-to-get-wysiwyp-print-what-you-see-in-a-web-browser

Friday, September 23, 2016

Change the language in Emacs when using ispell spellcheck


The following command proposes a list of installed dictionaries to use:

M-x ispell-change-dictionary
 
Usually, M-x isp-c-d expands to the above also.
 
Src: http://stackoverflow.com/questions/218512/how-can-i-change-the-language-in-emacs-when-using-ispell

 
 

Friday, September 9, 2016

inkscape latex math font

When a quick and simplistic latex-style formula is needed in Inkscape, the "Latin Modern Roman" font may be used. Latest versions of Inkscape incorporate buttons to create subscripts and supersripts when editing text.

Thursday, September 1, 2016

pyplot tex / latex interpreter

### setup use of TEX for labels ###
plt.rc('text', usetex=True)
plt.rc('font', family='serif')

### define label ###
s="\textbf{Bold}"
s= s.encode('string-escape')

ax.set_ylabel(s)

Monday, July 4, 2016

CUDA constant memory

http://stackoverflow.com/questions/22364926/cuda-invalid-device-symbol-error


http://stackoverflow.com/questions/19621380/cuda-how-to-access-constant-memory-in-device-kernel-when-the-constant-memory-is




Thursday, June 30, 2016

SVN list recently added files

example:

svn log -r{2016-06-06}:{2016-06-30} --verbose | grep '   A'

Src:http://stackoverflow.com/questions/27275375/how-to-retrieve-files-in-subversion-svn-recently-added-to-the-repository

Monday, March 14, 2016

bibtex medphys missing book title

For now medphys.bst is bugged. If a book title is missing, remove the "year" field from .bib and append it to the "publisher" field

Tuesday, February 23, 2016

bash kill process by name

pkill -f csp_build.py
 
src: http://stackoverflow.com/questions/3510673/find-and-kill-a-process-in-one-line-using-bash-and-regex

Tuesday, January 26, 2016

How to use svn merge to preview svn update

How to use svn merge to preview svn update
  1. Change to the root directory of your working copy.
  2. Run the command:
    svn merge --dry-run -r BASE:HEAD .
    Note: The trailing “dot” is the path of the working copy, and it is required even if you are already inside the working copy, which you should be after step 1.
  3. The above command requests a “dry run” of what will happen if we receive all changes that occurred after our working revision (BASE) and the most recent revision in the repository (HEAD). This is what svn update does, too.
  4. Review the output of svn merge and check for conflicts. If you spot any, try using svn diff to determine what is causing the conflict, or just prepare yourself to fix the conflict ASAP! :-D
  5. Now that you know how friendly or destructive update will be with your working copy, run svn update to let the fun begin!
SRC: http://translocator.ws/2005/10/12/svn-update-dry-run