Labels

Showing posts with label LATEX. Show all posts
Showing posts with label LATEX. Show all posts

Monday, March 29, 2021

Grammar check for .tex file

TeXtidote is a tool for spell and grammar check for Latex source file.

Installation:

download the deb file from https://github.com/sylvainhalle/textidote/releases.

$ sudo apt-get install ./textidote_X.Y.Z_all.deb

X.Y.Z. is the version number.

Java is needed and can be installed via,
$ sudo apt install default-jdk

useage:
textidote --check en  --output html paper.tex  >report.html

Sunday, February 28, 2021

Please update your system to include revtex4-1.cls

You need to install revtex4-1 package.


download revtex4-1 package

http://d22izw7byeupn1.cloudfront.net/files/revtex/index.html (version 4-1)

or https://ctan.org/pkg/revtex4-1

(https://journals.aps.org/revtex  (can only find 4-2 version) )

$unzip revtex4-1.zip

then enter revtex4-1 folder,

$unzip revtex4-1-tds.zip

move the revtex4-1-tds to appropriate position

$cp revtex4-1-tds     /usr/share/texmf/tex/latex

or 

$cp revtex4-1-tds     /usr/share/texlive/texmf-local

or 

$kpsewhich -var-value TEXMFLOCAL  # to find out the right place

finally,

$sudo texhash


Reference:

https://ubuntuforums.org/showthread.php?t=995840&page=2

Sunday, December 27, 2020

Install latex in Chromebook

// install basic version

sudo apt-get install texlive-latex-base

sudo apt-get install biblatex

sudo apt-get install texlive-fonts-recommended

#sudo apt-get install texlive-science

sudo apt-get remove *texlive*doc


// Cannot determine type of tlpdb

apt-get install xzdec

tlmgr init-usertree

// tlmgr: Remote repository is newer than local (2018 < 2020)

tlmgr option repository ftp://tug.org/historic/systems/texlive/2019/tlnet-final

// search the missed ".sty"

tlmgr search --global --file "/times.sty"

// install the package included ".sty" 

tlmgr install psnfss


Find sty file by yourself:
https://www.tug.org/texlive//Contents/live/texmf-dist/tex/latex/

Reference:

Friday, March 29, 2019

Very useful latex tricks

\usepackage[normalem]{ulem}  
\sout{}


sout in the section (a)


\usepackage{ulem}
\usepackage{hyperref}
\usepackage{nameref}
\DeclareRobustCommand{\hsout}[1]{\texorpdfstring{\sout{#1}}{#1}}

\section{\hsout{Striked out section title}}\label{foo}
\sout{\mbox{\cite{a,b}}} 


color (b)


\usepackage{color}
\definecolor{darkgreen}{rgb}{0,0.3,0}
\definecolor{darkblue}{rgb}{0,0,0.2}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{lightgrey}{rgb}{0.8,0.8,0.8}
\definecolor{black}{rgb}{0,0,0}
\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}\def\red#1{\textcolor{red}{#1}}
figure
set figure position
\usepackage[section]{placeins} (c)
\FloatBarrier


\usepackage[dvipsnames,table,xcdraw]{xcolor}
\newcommand{\ricardo}[1]{\colorbox{ForestGreen}{\color{white}   \textsf{\textbf{Ricardo}}} \textcolor{ForestGreen}{#1}}


organize two figures in one page
\begin{figure}[!htbp] (d)
\centering
\includegraphics{fig1}
\caption{Caption 1}
\includegraphics{fig2}
\caption{Caption 2}
\end{figure}

latex color http://latexcolor.com/

both spelling and grammar in a dozen languages https://github.com/sylvainhalle/textidote

much less , 'll', '<<'
much greater, 'gg', '>>'  

wide bar
\documentclass[11pt]{article}
\newcommand*\xbar[1]{%
   \hbox{%
     \vbox{%
       \hrule height 0.5pt % The actual bar
       \kern0.5ex%         % Distance between bar and symbol
       \hbox{%
         \kern-0.1em%      % Shortening on the left side
         \ensuremath{#1}%
         \kern-0.1em%      % Shortening on the right side
       }%
     }%
   }%
} 
 
\begin{document}
   $\xbar{\Psi}$
\end{document}


degree
\usepackage{xspace} 
\renewcommand{\deg}{\ensuremath{^{\circ}}\xspace}


latexmk -c  // all non-essential files will be cleaned u


Reference:
https://tex.stackexchange.com/questions/22410/strikethrough-in-section-title
https://git-iit.fh-joanneum.at/Feine/omd-ios-devel/blob/4b4889af69e5e73e925f01c170f540f3e66cf77b/omd_ios-devel.tex
https://stackoverflow.com/questions/1788598/how-to-force-two-figures-to-stay-on-the-same-page-in-latex
https://latex.org/forum/viewtopic.php?t=20717