m (→Equations) |
m (→Underline) |
||
(37 intermediate revisions by 2 users not shown) | |||
Line 39: | Line 39: | ||
\end{align} | \end{align} | ||
{{multicol-end}} | {{multicol-end}} | ||
+ | |||
+ | To align equations as if in a table <wz tagtotip="intp">(?!)</wz>, one can use [https://www.overleaf.com/learn/latex/Aligning_equations_with_amsmath] | ||
+ | <span id="intp">This is to integrate $\int x\sin(k\pi x)dx$ by parts.</span> | ||
{{multicol}} | {{multicol}} | ||
Line 53: | Line 56: | ||
\end{align} | \end{align} | ||
{{multicol-end}} | {{multicol-end}} | ||
+ | |||
+ | To gather equations (from [[the Wolverhampton Lectures on Physics]] on [[Mathematics]]): | ||
+ | |||
+ | <pre> | ||
+ | \begin{gather} | ||
+ | \mathbb{R}^n\xrightarrow[\mathbf{J}_g\atop m\times n]{g}\mathbb{R}^m\xrightarrow[\mathbf{J}_f\atop l\times m]{f}\mathbb{R}^l\\ | ||
+ | \mathbb{R}^n\xrightarrow[\mathbf{J}_{f\circ g}\atop l\times n]{f\circ g}\mathbb{R}^l | ||
+ | \end{gather} | ||
+ | </pre> | ||
+ | |||
+ | \begin{gather} | ||
+ | \mathbb{R}^n\xrightarrow[\mathbf{J}_g\atop m\times n]{g}\mathbb{R}^m\xrightarrow[\mathbf{J}_f\atop l\times m]{f}\mathbb{R}^l\\ | ||
+ | \mathbb{R}^n\xrightarrow[\mathbf{J}_{f\circ g}\atop l\times n]{f\circ g}\mathbb{R}^l | ||
+ | \end{gather} | ||
+ | |||
+ | == Underline == | ||
+ | |||
+ | <tt>\underline</tt> doesn't work great. | ||
+ | |||
+ | But <tt>\uline</tt> from the <tt>soul</tt> package does! | ||
+ | |||
+ | One can also use [https://alexwlchan.net/2017/latex-underlines/ axelwlchan's trick], but it doesn't work for sentences breaking over several lines: | ||
+ | |||
+ | <pre> | ||
+ | \usepackage{contour} | ||
+ | \usepackage[normalem]{ulem} | ||
+ | |||
+ | \renewcommand{\ULdepth}{1.8pt} | ||
+ | \contourlength{0.8pt} | ||
+ | |||
+ | \newcommand{\myuline}[1]{% | ||
+ | \uline{\phantom{#1}}% | ||
+ | \llap{\contour{white}{#1}}% | ||
+ | } | ||
+ | </pre> | ||
== International accents == | == International accents == | ||
Line 60: | Line 98: | ||
<center><wz tagtotip="intaccents">[[File:intaccents.jpg|300px]]</wz></center> | <center><wz tagtotip="intaccents">[[File:intaccents.jpg|300px]]</wz></center> | ||
<span id=intaccents>$?`$Does this work?</span> | <span id=intaccents>$?`$Does this work?</span> | ||
+ | |||
+ | and a more comprehensive list of [https://arxiv.org/edit-user/tex-accents.php accentuated characters]. | ||
== Fonts == | == Fonts == | ||
See Will Robertson [http://www.tug.org/mactex/fonts/LaTeX_Preamble-Font_Choices.html preambles] to use different fontsets. | See Will Robertson [http://www.tug.org/mactex/fonts/LaTeX_Preamble-Font_Choices.html preambles] to use different fontsets. | ||
+ | |||
+ | == Shortcuts == | ||
+ | |||
+ | Useful shortcuts, include: | ||
+ | |||
+ | * <tt>\to</tt> instead of <tt>\rightarrow</tt> for $\to$ (also <tt>mapsto</tt> for $\mapsto$) | ||
+ | * <tt>\gets</tt> instead of <tt>\leftarrow</tt> for $\gets$. | ||
+ | * <tt>\implies</tt> instead of <tt>\Longrightarrow</tt> for $\implies$ (is there a shortcut for <tt>\Rightarrow</tt> which is the prettier $\Rightarrow$?) | ||
+ | |||
+ | == Colors == | ||
+ | |||
+ | Using the package | ||
+ | |||
+ | <pre> | ||
+ | \usepackage[svgnames]{xcolor} | ||
+ | </pre> | ||
+ | |||
+ | One can then use <tt>\textcolor{red}{this is red}</tt> or <tt>\color{red}</tt> to turn everything red (until next escape). | ||
+ | |||
+ | The predefined colors are: | ||
+ | |||
+ | <pre> | ||
+ | black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, | ||
+ | magenta, olive, orange, pink, purple, red, teal, violet, white, yellow. | ||
+ | </pre> | ||
+ | |||
+ | but some of them are horrible! like this <font color=lime>horrible #00ff00 pure green (so-called ''lime'')</font> (what it calls <tt>lime</tt> is <font color=#e9ffa8>even less visible</font>). The | ||
+ | <tt>svgnames</tt> gives access to about 150 additional, and pretty, colors. Use capitals letters. Here are the most useful with a short name: | ||
+ | |||
+ | {{multicol}} | ||
+ | * <span style="background-color:#6bc6d9;"> </span> Aqua | ||
+ | * <span style="background-color:#294ea1;"> </span> Blue | ||
+ | * <span style="background-color:#a62a2c;"> </span> Brown | ||
+ | * <span style="background-color:#dc183c;"> </span> Crimson | ||
+ | * <span style="background-color:#6bc6d9;"> </span> Cyan | ||
+ | * <span style="background-color:#b163a4;"> </span> Fuchsia | ||
+ | * <span style="background-color:#fed716;"> </span> Gold | ||
+ | * <span style="background-color:#0c8238;"> </span> Green | ||
+ | {{multicol-break}} | ||
+ | * <span style="background-color:#66b22f;"> </span> Lime | ||
+ | * <span style="background-color:#874176;"> </span> Magenta | ||
+ | * <span style="background-color:#7f1610;"> </span> Navy | ||
+ | * <span style="background-color:#ba76b1;"> </span> Orchid | ||
+ | * <span style="background-color:#d0873b;"> </span> Peru | ||
+ | * <span style="background-color:#f7bdcb;"> </span> Pink | ||
+ | * <span style="background-color:#d1a1ca;"> </span> Plum | ||
+ | * <span style="background-color:#7e217d;"> </span> Purple | ||
+ | {{multicol-break}} | ||
+ | * <span style="background-color:#e72d20;"> </span> Red | ||
+ | * <span style="background-color:#a05430;"> </span> Sienna | ||
+ | * <span style="background-color:#d3b38d;"> </span> Tan | ||
+ | * <span style="background-color:#178181;"> </span> Teal | ||
+ | * <span style="background-color:#ec644e;"> </span> Tomato | ||
+ | * <span style="background-color:#c688bb;"> </span> Violet | ||
+ | * <span style="background-color:#f5dcb2;"> </span> Wheat | ||
+ | * <span style="background-color:#f1e61b;"> </span> Yellow | ||
+ | {{multicol-end}} | ||
+ | |||
+ | And here are [[:File:svgnames.jpg|all of them.]] | ||
+ | |||
+ | == Unicode == | ||
+ | |||
+ | [[Unicode]] can be supported (at least to some extent) with | ||
+ | |||
+ | <pre> | ||
+ | \usepackage[mathletters]{ucs} | ||
+ | \usepackage[utf8x]{inputenc} | ||
+ | </pre> | ||
+ | |||
+ | It works at least for the Greek letters. | ||
== Formatting == | == Formatting == | ||
Line 75: | Line 185: | ||
<code lang="latex">\addtolength{\itemsep}{-0.5\baselineskip}</code> | <code lang="latex">\addtolength{\itemsep}{-0.5\baselineskip}</code> | ||
− | * To change the starting value of an enumerate list: | + | * To change the starting value of an enumerate list (<tt>enumii</tt> if it's a sublist): |
<code lang="latex">\begin{enumerate} | <code lang="latex">\begin{enumerate} | ||
Line 81: | Line 191: | ||
\item fifth element | \item fifth element | ||
\end{enumerate}</code> | \end{enumerate}</code> | ||
+ | |||
+ | * To change the type of numbering: | ||
+ | |||
+ | <syntaxhighlight lang="latex"> | ||
+ | \renewcommand{\theenumi}{\Roman{enumi}} | ||
+ | \renewcommand{\theenumi}{\roman{enumi}} | ||
+ | </syntaxhighlight> | ||
* To change enumeration (with square brackets, parentheses, etc.): (see [http://goo.gl/0ZzbB]) | * To change enumeration (with square brackets, parentheses, etc.): (see [http://goo.gl/0ZzbB]) | ||
− | < | + | <syntaxhighlight lang="latex">\usepackage{enumitem}% http://ctan.org/pkg/enumitem |
\begin{document} | \begin{document} | ||
\begin{enumerate}[label={[\arabic*]}] | \begin{enumerate}[label={[\arabic*]}] | ||
Line 92: | Line 209: | ||
\item Last item | \item Last item | ||
\end{enumerate} | \end{enumerate} | ||
− | \end{document}</ | + | \end{document} |
+ | </syntaxhighlight> | ||
== Footnotes == | == Footnotes == | ||
Line 108: | Line 226: | ||
* To use footnotes to feature reference-style annotations, that is, with no subscripts and with enclosing brackets <wz tip="Like this.">[1]</wz>, add in the preamble: | * To use footnotes to feature reference-style annotations, that is, with no subscripts and with enclosing brackets <wz tip="Like this.">[1]</wz>, add in the preamble: | ||
− | < | + | <pre>\makeatletter |
\renewcommand{\@makefnmark} | \renewcommand{\@makefnmark} | ||
%{\@textsuperscript{\textit{\tiny{\@thefnmark}}}} | %{\@textsuperscript{\textit{\tiny{\@thefnmark}}}} | ||
Line 116: | Line 234: | ||
\noindent | \noindent | ||
[\@thefnmark]\enspace #1} | [\@thefnmark]\enspace #1} | ||
− | \makeatother</ | + | \makeatother</pre> |
(I left, commented, the original definition of the footnote). | (I left, commented, the original definition of the footnote). | ||
Line 125: | Line 243: | ||
* see [http://en.wikibooks.org/wiki/LaTeX/Page_Layout] or [https://www.sharelatex.com/learn/Page_size_and_margins]. | * see [http://en.wikibooks.org/wiki/LaTeX/Page_Layout] or [https://www.sharelatex.com/learn/Page_size_and_margins]. | ||
+ | |||
+ | To use "infinite"-width page to accommodate single-line long formulas, use the package <tt>standalone</tt>: | ||
+ | |||
+ | <pre> | ||
+ | \documentclass[border=1in]{standalone} | ||
+ | \usepackage{lipsum} | ||
+ | \begin{document} | ||
+ | \begin{minipage}{66cm} | ||
+ | \lipsum[1-150] | ||
+ | \end{minipage} | ||
+ | \end{document} | ||
+ | </pre> | ||
+ | |||
+ | This is, unfortunately, incompatible with the RevTeX package or amsmath tools in general. In this case one has to use <tt>geometry</tt>: | ||
+ | |||
+ | <pre> | ||
+ | \documentclass[preview, border=1cm]{standalone} | ||
+ | \usepackage[total={50cm, 20cm}]{geometry} | ||
+ | \usepackage{amsmath} | ||
+ | |||
+ | \begin{document} | ||
+ | |||
+ | \begin{subequations} | ||
+ | \begin{align} | ||
+ | \sigma_1^{(1)}&=\sqrt{\frac{\gamma_a^4+2\gamma_a^3\Gamma+6\gamma_a^2\Gamma^2+2\gamma_a\Gamma^3+\Gamma ^4}{\gamma_a^2\Gamma^2(\gamma_a+\Gamma)^2}}\\ | ||
+ | ... | ||
+ | \end{align} | ||
+ | \end{subequations} | ||
+ | |||
+ | \end{document} | ||
+ | </pre> | ||
+ | <center><wz tip="Formulas which need a lot of space (standard deviation of detection times from N-photon bundles, from our paper Multiphoton Emission). LaTeX would by default crop them. If you want to see them before typesetting them to fit, one can use geometry + standalone as above.">[[File:wide-LaTeX-formulas.jpg|750px]]</wz></center> | ||
== Units == | == Units == | ||
Line 137: | Line 287: | ||
<center><wz tip="Please!">[[File:pleasewrite10mum.jpeg|250px]]</wz></center> | <center><wz tip="Please!">[[File:pleasewrite10mum.jpeg|250px]]</wz></center> | ||
− | |||
− | |||
To write '''inverse unit''', use \per: | To write '''inverse unit''', use \per: | ||
Line 162: | Line 310: | ||
(that would be giga-bits per seconds). | (that would be giga-bits per seconds). | ||
+ | |||
+ | It is also possible to empower the package with extra options, e.g.: | ||
+ | |||
+ | <pre> | ||
+ | \usepackage[alsoload=astro]{siunitx} | ||
+ | </pre> | ||
+ | |||
+ | to have parsec and lightyears, e.g., Proxima Centauri is $\SI{4.2465}{\lightyear}$ away. | ||
+ | |||
+ | There is also a <tt>SIUnits</tt> which is however deprecated [http://tex.stackexchange.com/questions/21936/differences-between-siunits-and-siunitx-packages]. Sometimes it came in handy, for instance to add non-numerical inputs (though siunitx should be able to allow that as well). | ||
+ | |||
+ | == Mathematical hacks == | ||
+ | |||
+ | === Small matrices === | ||
+ | |||
+ | For small matrices, such as $\sigma_z=\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)$, one can use | ||
+ | |||
+ | <pre> | ||
+ | \left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right) | ||
+ | </pre> | ||
+ | |||
+ | == Symbols == | ||
+ | |||
+ | To use <tt>\mathbb{1}</tt> produce the "identity" [[File:identity.jpg|16px|bottom]]: | ||
+ | <pre> | ||
+ | \usepackage{bbold} | ||
+ | </pre> | ||
+ | |||
+ | To use ornaments, like [[File:fingerpoint.png|28px|bottom]] or [[File:suggestion.png|16px|bottom]]: | ||
+ | |||
+ | <pre> | ||
+ | \usepackage[object=vectorian]{pgfornament} | ||
+ | \newcommand{\selectedpub}{\pgfornament[anchor=south, width=.25cm]{152}} | ||
+ | </pre> | ||
+ | |||
+ | (152 for the finger, 5 for the heart, etc.) | ||
+ | |||
+ | If desperate, you can try to [https://detexify.kirelabs.org/classify.html de{{TeX}}ify] your input. | ||
+ | |||
+ | == Bold letters == | ||
+ | |||
+ | Greek letters can be typeset with the <tt>bm</tt> package | ||
+ | |||
+ | <pre> | ||
+ | \usepackage{bm} | ||
+ | </pre> | ||
+ | |||
+ | which produce <nowiki>$\bm{\alpha}$</nowiki>, <nowiki>$\bm{\beta}$</nowiki>, <nowiki>$\bm{\gamma}$</nowiki> as[[File:alpha-beta-gamma.jpg|70px|middle]]. | ||
== Line numbering == | == Line numbering == | ||
Line 192: | Line 388: | ||
\patchBothAmsMathEnvironmentsForLineno{multline}% | \patchBothAmsMathEnvironmentsForLineno{multline}% | ||
} | } | ||
+ | </pre> | ||
+ | |||
+ | == Editing/Proofreading (copy-editing) == | ||
+ | |||
+ | There are two ways to strike out text: (soul seems better) | ||
+ | |||
+ | <pre> | ||
+ | \usepackage{soul} | ||
+ | \st{This can't be!} | ||
+ | </pre> | ||
+ | |||
+ | <pre> | ||
+ | \usepackage[normalem]{ulem} | ||
+ | \sout{This neither!} | ||
+ | </pre> | ||
+ | |||
+ | == Seamless for computation == | ||
+ | <center><wz tip="Seamless page; not to print but to scroll through. Here showing calculations for Stefan Lichtmannecker's two-level system in two cavities.">[[File:Screenshot_20230616_150740.png|thumb]]</wz></center> | ||
+ | These options allow to have an infinite page large enough to work on without page interruptions nor limitations from the finite widths. As a result, it is convenient to have equations flushed left. | ||
+ | |||
+ | <pre> | ||
+ | \documentclass[preview, leqno, border=1cm, fleqn]{standalone} | ||
+ | \usepackage[total={20cm, 20cm}]{geometry} | ||
+ | </pre> | ||
+ | |||
+ | There is apparently a bug with align that adds extra spacing for the 16th line! | ||
+ | |||
+ | == texmf == | ||
+ | |||
+ | Local files (such as [[laussy.sty]]) are to be put in a local version of the texmf directory (texmf stands for {{TeX}} and [[Metafont]]). This is to be declared to the system as follows: | ||
+ | |||
+ | <pre> | ||
+ | texhash /home/laussy/Dropbox/Fabrice/comp/texmf | ||
+ | </pre> | ||
+ | |||
+ | == lualatex == | ||
+ | |||
+ | To use fonts such as Arial or Colibri, one can use lualatex. This requires the installation of: | ||
+ | |||
+ | <pre> | ||
+ | sudo apt install texlive-luatex | ||
+ | </pre> | ||
+ | |||
+ | as well as the installation of the fonts themselves. Note that still within {{LaTeX}}, one can use the package helvet to use a look-alike free font (Nimbus Sans font): | ||
+ | |||
+ | <pre> | ||
+ | \usepackage{helvet} | ||
+ | \renewcommand{\familydefault}{\sfdefault} | ||
+ | </pre> | ||
+ | |||
+ | or, for Calibri, the Carlito font which is almost identical (in particular, it has the same metrics): | ||
+ | |||
+ | <pre> | ||
+ | \usepackage[sfdefault]{carlito} | ||
+ | </pre> | ||
+ | |||
+ | but if you want the real proprietary fonts, you have to <wz tagtotip=microsoftagreement width=600px>commit your soul to some endt-user license agreement</wz><span id="microsoftagreement">[[File:Screenshot_20220718_110611.png|600px]]</span> which is however easily done through | ||
+ | |||
+ | <pre> | ||
+ | sudo apt install ttf-mscorefonts-installer | ||
+ | </pre> | ||
+ | |||
+ | If the fonts you want are not part of this, such as calibri, then you need to find it elsewhere (for instance, [http://www.sscs.org.cn/Public/Home/Font/arial/ here]), and then you can declare your choice of font as follows (un/comment as needed; you may have to declare the exact path to the files as shown below): | ||
+ | |||
+ | <pre> | ||
+ | \usepackage{fontspec} | ||
+ | %\setmainfont{Arial} | ||
+ | %\setmainfont{calibri.ttf} | ||
+ | \setmainfont[Path=/usr/local/share/fonts/c/, | ||
+ | BoldItalicFont=calibriz.ttf, | ||
+ | BoldFont =calibrib.ttf, | ||
+ | ItalicFont =calibrii.ttf]{calibri.ttf} | ||
+ | </pre> | ||
+ | |||
+ | Compilation is either from the command line: | ||
+ | |||
+ | <pre> | ||
+ | lualatex text.tex | ||
+ | </pre> | ||
+ | |||
+ | or from [[Emacs]] with AucTeX's specification of the TeX-engine at the end of the file: | ||
+ | |||
+ | <pre> | ||
+ | %%% Local Variables: | ||
+ | %%% mode: latex | ||
+ | %%% TeX-master: t | ||
+ | %%% TeX-engine: luatex | ||
+ | %%% End: | ||
</pre> | </pre> | ||
Line 208: | Line 492: | ||
== Links == | == Links == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* [http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf The Comprehensive $\LaTeX$ Symbol List] of November 2015 (331 pages of glyphs). | * [http://tug.ctan.org/info/symbols/comprehensive/symbols-a4.pdf The Comprehensive $\LaTeX$ Symbol List] of November 2015 (331 pages of glyphs). | ||
+ | * [https://tug.org/texshowcase/ Showcases 1] and [https://tex.stackexchange.com/questions/1319/showcase-of-beautiful-typography-done-in-tex-friends 2]. | ||
+ | * [http://tex.stackexchange.com/questions/168169/options-for-supplementary-materials-in-preprint-version-revtex-arxiv Options for supplementary material on the arXiv]. |
$\mathrm{\TeX}$ is one of the masterpieces of Don Knuth.
It is the uppercase version of $\tau\epsilon\chi$, a Greek word for Tech, which is how $\mathrm{\TeX}$ should be pronounced (!?).
At some point in the early 2000, I switched to $\mathrm{\LaTeX}$ for convenience, and almost exclusively use the latter now.
Splitting equations within an aligned set can be done as followed~[1]:
\begin{align} a &= \begin{aligned}[t] &b + c + d +\\ &c + e + f + g + h + i \end{aligned}\\ k &= \begin{aligned}[t] &l + m + n\\ &+ o + p + q \end{aligned} \end{align} |
\begin{align} a &= \begin{aligned}[t] &b + c + d +\\ &c + e + f + g + h + i \end{aligned}\\ k &= \begin{aligned}[t] &l + m + n\\ &+ o + p + q \end{aligned} \end{align} |
To align equations as if in a table (?!), one can use [2] This is to integrate $\int x\sin(k\pi x)dx$ by parts.
\begin{align} u&=x & v&=-\frac{1}{k\pi}\cos(k\pi x)\\ u'&=1 & v'&=\sin(k\pi x) \end{align} |
\begin{align} u&=x & v&=-\frac{1}{k\pi}\cos(k\pi x)\\ u'&=1 & v'&=\sin(k\pi x) \end{align} |
To gather equations (from the Wolverhampton Lectures on Physics on Mathematics):
\begin{gather} \mathbb{R}^n\xrightarrow[\mathbf{J}_g\atop m\times n]{g}\mathbb{R}^m\xrightarrow[\mathbf{J}_f\atop l\times m]{f}\mathbb{R}^l\\ \mathbb{R}^n\xrightarrow[\mathbf{J}_{f\circ g}\atop l\times n]{f\circ g}\mathbb{R}^l \end{gather}
\begin{gather} \mathbb{R}^n\xrightarrow[\mathbf{J}_g\atop m\times n]{g}\mathbb{R}^m\xrightarrow[\mathbf{J}_f\atop l\times m]{f}\mathbb{R}^l\\ \mathbb{R}^n\xrightarrow[\mathbf{J}_{f\circ g}\atop l\times n]{f\circ g}\mathbb{R}^l \end{gather}
\underline doesn't work great.
But \uline from the soul package does!
One can also use axelwlchan's trick, but it doesn't work for sentences breaking over several lines:
\usepackage{contour} \usepackage[normalem]{ulem} \renewcommand{\ULdepth}{1.8pt} \contourlength{0.8pt} \newcommand{\myuline}[1]{% \uline{\phantom{#1}}% \llap{\contour{white}{#1}}% }
We try to write your name properly when we quote it. Here are the most common glyphs and the code needed to do so:
$?`$Does this work?
and a more comprehensive list of accentuated characters.
See Will Robertson preambles to use different fontsets.
Useful shortcuts, include:
Using the package
\usepackage[svgnames]{xcolor}
One can then use \textcolor{red}{this is red} or \color{red} to turn everything red (until next escape).
The predefined colors are:
black, blue, brown, cyan, darkgray, gray, green, lightgray, lime, magenta, olive, orange, pink, purple, red, teal, violet, white, yellow.
but some of them are horrible! like this horrible #00ff00 pure green (so-called lime) (what it calls lime is even less visible). The svgnames gives access to about 150 additional, and pretty, colors. Use capitals letters. Here are the most useful with a short name:
|
|
|
And here are all of them.
Unicode can be supported (at least to some extent) with
\usepackage[mathletters]{ucs} \usepackage[utf8x]{inputenc}
It works at least for the Greek letters.
\addtolength{\itemsep}{-0.5\baselineskip}
\begin{enumerate}
\setcounter{enumi}{4}
\item fifth element
\end{enumerate}
\renewcommand{\theenumi}{\Roman{enumi}} \renewcommand{\theenumi}{\roman{enumi}}
\usepackage{enumitem}% http://ctan.org/pkg/enumitem \begin{document} \begin{enumerate}[label={[\arabic*]}] \item First item \item Second item \item \ldots \item Last item \end{enumerate} \end{document}
There is a $\mathrm{\LaTeX}$ package, footmisc, that is useful for manipulating footnote formatting.
%\footnotesep is the space between footnotes:
\setlength{\footnotesep}{-0.5\baselineskip}
%\footins is the space between the text body and the footnotes:
\setlength{\skip\footins}{1cm}
\makeatletter \renewcommand{\@makefnmark} %{\@textsuperscript{\textit{\tiny{\@thefnmark}}}} {[\@thefnmark]} \renewcommand\@makefntext[1]{% \parindent 1em \noindent [\@thefnmark]\enspace #1} \makeatother
(I left, commented, the original definition of the footnote).
\usepackage[a4paper, total={6in, 8in}]{geometry}
To use "infinite"-width page to accommodate single-line long formulas, use the package standalone:
\documentclass[border=1in]{standalone} \usepackage{lipsum} \begin{document} \begin{minipage}{66cm} \lipsum[1-150] \end{minipage} \end{document}
This is, unfortunately, incompatible with the RevTeX package or amsmath tools in general. In this case one has to use geometry:
\documentclass[preview, border=1cm]{standalone} \usepackage[total={50cm, 20cm}]{geometry} \usepackage{amsmath} \begin{document} \begin{subequations} \begin{align} \sigma_1^{(1)}&=\sqrt{\frac{\gamma_a^4+2\gamma_a^3\Gamma+6\gamma_a^2\Gamma^2+2\gamma_a\Gamma^3+\Gamma ^4}{\gamma_a^2\Gamma^2(\gamma_a+\Gamma)^2}}\\ ... \end{align} \end{subequations} \end{document}
We use the siunitx package:
\usepackage{siunitx}
It'd take \SI{500}{\milli\second} to understand.
Please write \SI{10}{\micro\meter} and not 10$\mu\mathrm{m}$
To write inverse unit, use \per:
shows the PL emission of a \SI{3}{\micro\meter} wire, where one can observe the splitting between the two first confined subbands, the polarization splitting, and the crossing of the X and Y (labelled TE and TM here) polarized lines around \SI{2.6}{\per\micro\meter}, whereas the value given by the formula above is \SI{2.1}{\per\micro\meter}.
The powers of ten can be counter-$\mathrm{\LaTeX}$-intuitive:
with a density of $\SI{e-3}{\per\square\micro\meter}$
If you do not use SI units, then omit the slash:
repetition rate of SI{3}{gb/s}
(that would be giga-bits per seconds).
It is also possible to empower the package with extra options, e.g.:
\usepackage[alsoload=astro]{siunitx}
to have parsec and lightyears, e.g., Proxima Centauri is $\SI{4.2465}{\lightyear}$ away.
There is also a SIUnits which is however deprecated [7]. Sometimes it came in handy, for instance to add non-numerical inputs (though siunitx should be able to allow that as well).
For small matrices, such as $\sigma_z=\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)$, one can use
\left(\begin{smallmatrix}1&0\\0&-1\end{smallmatrix}\right)
To use \mathbb{1} produce the "identity" :
\usepackage{bbold}
\usepackage[object=vectorian]{pgfornament} \newcommand{\selectedpub}{\pgfornament[anchor=south, width=.25cm]{152}}
(152 for the finger, 5 for the heart, etc.)
If desperate, you can try to de$\mathrm{\TeX}$ify your input.
Greek letters can be typeset with the bm package
\usepackage{bm}
which produce $\bm{\alpha}$, $\bm{\beta}$, $\bm{\gamma}$ as.
It's useful to number profusely manuscripts of which you are discussing every line. Package lineno does that.
\usepackage{lineno} \linenumbers
It may have a hard time cohabiting with amsmath, however. It appears that if you include this monstrosity somewhere in your preamble, it'll perform well enough for line-dropping with your co-authors:
\newcommand*\patchAmsMathEnvironmentForLineno[1]{% \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname \renewenvironment{#1}% {\linenomath\csname old#1\endcsname}% {\csname oldend#1\endcsname\endlinenomath}}% \newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{% \patchAmsMathEnvironmentForLineno{#1}% \patchAmsMathEnvironmentForLineno{#1*}}% \AtBeginDocument{% \patchBothAmsMathEnvironmentsForLineno{equation}% \patchBothAmsMathEnvironmentsForLineno{align}% \patchBothAmsMathEnvironmentsForLineno{flalign}% \patchBothAmsMathEnvironmentsForLineno{alignat}% \patchBothAmsMathEnvironmentsForLineno{gather}% \patchBothAmsMathEnvironmentsForLineno{multline}% }
There are two ways to strike out text: (soul seems better)
\usepackage{soul} \st{This can't be!}
\usepackage[normalem]{ulem} \sout{This neither!}
These options allow to have an infinite page large enough to work on without page interruptions nor limitations from the finite widths. As a result, it is convenient to have equations flushed left.
\documentclass[preview, leqno, border=1cm, fleqn]{standalone} \usepackage[total={20cm, 20cm}]{geometry}
There is apparently a bug with align that adds extra spacing for the 16th line!
Local files (such as laussy.sty) are to be put in a local version of the texmf directory (texmf stands for $\mathrm{\TeX}$ and Metafont). This is to be declared to the system as follows:
texhash /home/laussy/Dropbox/Fabrice/comp/texmf
To use fonts such as Arial or Colibri, one can use lualatex. This requires the installation of:
sudo apt install texlive-luatex
as well as the installation of the fonts themselves. Note that still within $\mathrm{\LaTeX}$, one can use the package helvet to use a look-alike free font (Nimbus Sans font):
\usepackage{helvet} \renewcommand{\familydefault}{\sfdefault}
or, for Calibri, the Carlito font which is almost identical (in particular, it has the same metrics):
\usepackage[sfdefault]{carlito}
but if you want the real proprietary fonts, you have to commit your soul to some endt-user license agreement which is however easily done through
sudo apt install ttf-mscorefonts-installer
If the fonts you want are not part of this, such as calibri, then you need to find it elsewhere (for instance, here), and then you can declare your choice of font as follows (un/comment as needed; you may have to declare the exact path to the files as shown below):
\usepackage{fontspec} %\setmainfont{Arial} %\setmainfont{calibri.ttf} \setmainfont[Path=/usr/local/share/fonts/c/, BoldItalicFont=calibriz.ttf, BoldFont =calibrib.ttf, ItalicFont =calibrii.ttf]{calibri.ttf}
Compilation is either from the command line:
lualatex text.tex
or from Emacs with AucTeX's specification of the TeX-engine at the end of the file:
%%% Local Variables: %%% mode: latex %%% TeX-master: t %%% TeX-engine: luatex %%% End:
Use texfot to get rid of the flood of output generated by compilation and retain only the warnings:
texfot pdflatex Microcavities.tex