Showing posts with label latex. Show all posts
Showing posts with label latex. Show all posts

Tuesday, October 18, 2016

include (input) file inside table

to include raw files inside a table define

\makeatletter
\newcommand\primitiveinput[1]
{\@@input #1 }
\makeatother

 and then use it as

  \primitiveinput{proben.tex}


source:
http://tex.stackexchange.com/questions/50694/cannot-use-toprule-when-doing-input-inside-tabular-why

Friday, October 18, 2013

japanese latex



dvipdfmx
** ERROR ** Could not find encoding file "H".

solution:
sudo apt-get install cmap-adobe-japan1


No file C40song.fd.
solution:
sudo apt-get install latex-cjk-japanese latex-cjk-japanese-wadalab


open file as euc-jp in emacs:
C-x ret r
euc-jp
yes

Tuesday, July 16, 2013

eps crop

solution 1
gs -dNOPAUSE -dBATCH -q -sDEVICE=bbox img.eps
and replace the bounding box of the file with the two lines obtained

source: http://tex.stackexchange.com/questions/22063/how-to-fix-eps-with-incorrect-bounding-box


solution 2 (the font may become ugly)
ps2pdf img.eps img.pdf
pdfcrop img.pdf imgc.pdf
pdf2ps imgc.pdf imgc.eps

inkscape does not export text in eps

save as pdf
ps2ps img.pdf img.ps
ps2eps img.ps img.eps

Reliable Long equation to pdf

In mathematica

expression//TraditionalForm

save selection as... eps

ps2pdf -dEPSFitPage-sPAPERSIZE=jisb0  formula.eps formula.pdf
(note: -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=16712 instead of -sPAPERSIZE=jisb0 seems to produce white text on white bg)

pdfcrop formula.pdf formulac.pdf

Friday, July 12, 2013

Equations in latex

system of equations

individually numbered

\begin{align
\end{align}

not numbered


\begin{align*}
\end{align*}

single number


\begin{equation}
\begin{aligned}
  dr_t &= \kappa ( \theta - r_t ) dt + \sigma_r r^{\xi} dW_t \\
  dA_t &= \mu A_t dt + \sigma_A^{\alpha} dZ_t,
\end{aligned}
\end{equation}


source:
http://tex.stackexchange.com/questions/13396/how-to-get-only-one-vertically-centered-equation-number-in-align-environment-wit


only last


\documentclass{article}
\usepackage{amsmath}
\newcommand\numberthis{\addtocounter{equation}{1}\tag{\theequation}}
\begin{document}
\begin{align*}
a &=b \\
  &=c \numberthis \label{eqn}
\end{align*}
Equation \eqref{eqn} shows that $a=c$.
\begin{equation}
d = e
\end{equation}
\end{document}

source: http://tex.stackexchange.com/questions/42726/align-but-show-one-equation-number-at-the-end

matrix

\[

\begin{bmatrix}
a_{x,1} b_{y,1} -  a_{y,1} b_{x,1} & 0\\
0                             & a_{x,2} b_{y,2} -  a_{y,2} b_{x,2} \\
\end{bmatrix}=
\]




Saturday, June 22, 2013

greek math simbols in inkscape

Use font cmmi10

and unicode chars
MATHEMATICAL ITALIC  ... ("Common" section in gnome-character-map)
around U+1D6FC

Thursday, November 15, 2012

latex, align at the top inside table

\begin{figure}
\center
\begin{tabular}{cc}
\vtop{%
  \vskip0pt
  \hbox{%
    \subfigure[]{
    \includegraphics[width=0.41\linewidth]{img/neony/blackParallel.png} 
    \label{fig:parallelLink}
}
  }%
  }&
\vtop{%
  \vskip0pt
  \hbox{%
    \begin{tabular}{c}
      \subfigure[]{
      \includegraphics[width=0.405\linewidth]{img/neony/blackHead.png}\label{fig:neonyHead}}\\
      \subfigure[]{\includegraphics[width=0.405\linewidth]{img/neony/head.jpg}\label{fig:urethanHead}}
    \end{tabular}
  }%
}
\end{tabular}

\caption{\label{fig:photo}Particulars of M3-Neony. (a) Parallel links give robustness to the robot legs. (b) M3-Neony's head, equipped with two microphones, two cameras and 15 tactile sensors. (c) An alternative head, covered by polyurethane.} 
\end{figure}

Thursday, May 17, 2012

latex underline

\usepackage{soul}

and then \ul{This text will be underlined} 

Monday, November 14, 2011

install new latex package in ubuntu / make revtex4-1 work

download
 https://authors.aps.org/revtex4/revtex4-1.zip
install
sudo  unzip revtex4-1-tds.zip -d /usr/share/texmf-texlive/
(sudo texhash)

update natbib:
 download
  http://www.ctan.org/pkg/natbib
 (http://mirrors.ctan.org/macros/latex/contrib/natbib.zip)
backup
 tar cfz texbackup.tgz /usr/share/texmf-texlive/bibtex/bst/natbib/ /usr/share/texmf-texlive/tex/latex/natbib/
 rm /usr/share/texmf-texlive/bibtex/bst/natbib/*
 rm /usr/share/texmf-texlive/tex/latex/natbib/*
install
  unzip natbib.zip
  mv natbib/*.bst /usr/share/texmf-texlive/bibtex/bst/natbib/
  mv natbib/* /usr/share/texmf-texlive/tex/latex/natbib/
  cd /usr/share/texmf-texlive/tex/latex/natbib/
  latex natbib.ins
  mktexlsr /usr/share/texmf-texlive/