Today I learned that Latex supports many different typefaces: https://www.overleaf.com/learn/latex/font_typefaces and http://www.personal.ceu.hu/tex/typeface.htm I’ve seen papers like this one (https://arxiv.org/pdf/2006.15704.pdf) uses a different font for subroutines (like function names or APIs). One example is from their reference to the “CrossEntropyLoss” function: Now, I try by myself different typefaces and see which one it uses: I think …
Category Archives: latex
“file pdftex.def” not found on Mac OS
After installing MacTex, I still encountered “File pdftex.def not found” error when compiling a tex file in TexMaker/TexShop. Here is the way to solve it: Download from pdfetx-def package from https://www.ctan.org/pkg/pdftex-def Unzip Copy the unzipped folder to the texlive installation directory. Below is what I used: sudo cp -R graphics-def /usr/local/texlive/2016/texmf-dist/
How to add footnote in Latex Table?
If you just use \footnote in a latex table, the footnote usually will not appear in the real pdf. The workaround is to use tablefootnote package: \usepackage{tablefootnote} at the top of `.tex` file anywhere in table you want to add footnote, use \tablefootnote{…}
Convert Latex To Word
The best way to convert a tex file to docx is to: use Mircosoft Office Word 2013 or later to open the pdf file generated by .tex file. Word will convert pdf to docx with pretty format.
How to make multi-lined cells in table in Latex?
Use package `makecell`. http://tex.stackexchange.com/a/176780/76654
How to to write multi-lined subscript in latex?
In latex, what is the best way to write multi-lined formula in subscript? Use `\atop`! For example, \begin{align*} P(M_n=1) =\sigma(&w_s(\sum\limits_{j_r \in T_{nr}}\vec{U_{j_r}} \cdot \vec{C_{j_r}} – \sum\limits_{j_b \in T_{nb}}\vec{U_{j_b}} \cdot \vec{C_{j_b}} ) + \\ &w_b(\sum\limits_{j_{r_1}, j_{r_2} \in T_{nr} \atop j_{r_1} \neq j_{r_2} }\left\Vert\vec{C_{j_{r_1}}} – \vec{C_{j_{r_2}}}\right\Vert^2 – \sum\limits_{j_{b_1}, j_{b_2} \in T_{nb} \atop j_{b_1} \neq j_{b_2} }\left\Vert\vec{C_{j_{b_1}}} – …
Continue reading “How to to write multi-lined subscript in latex?”
How to write multi-lined formula?
In latex, what is the best way to write multi-lined formula? Actually, the `begin/end{align*}` block supports `\\\` in it. For example, \begin{align*} P(M_n=1) =\sigma(&w_s(\sum\limits_{j_r \in T_{nr}}\vec{U_{j_r}} \cdot \vec{C_{j_r}} – \sum\limits_{j_b \in T_{nb}}\vec{U_{j_b}} \cdot \vec{C_{j_b}} ) + \\ &w_b(\sum\limits_{j_{r_1}, j_{r_2} \in T_{nr} \atop j_{r_1} \neq j_{r_2} }\left\Vert\vec{C_{j_{r_1}}} – \vec{C_{j_{r_2}}}\right\Vert^2 – \sum\limits_{j_{b_1}, j_{b_2} \in T_{nb} \atop j_{b_1} …
Install Latex distribution, editor and packages on Ubuntu
1. Install TexLive. This is the latex environment. https://www.tug.org/texlive/quickinstall.html We recommend to use .install-tl script to install TexLive. TexLive is usually installed at “/usr/local/texlive/year/bin/x86_64-linux/….” Although you can install vanilla TexLive via sudo apt-get install texlive, we often observe it misses advanced accessories such as fonts. 2. Install Texmaker http://www.xm1math.net/texmaker/ *** Note: On Ubuntu, Texmaker can …
Continue reading “Install Latex distribution, editor and packages on Ubuntu”
How to type double vertical bar (norm) in latex?
How to type two vertical bars for representing norms? Here is the trick: $\left\Vert something \right\Vert$ The effect will be like this:
How to type gradient descent symbol in latex
Use \nabla to print an upside-down triangle to represent gradient descent. The effect is like this: