How can I create PDFs using LaTeX?

  • Context: LaTeX 
  • Thread starter Thread starter Dustinsfl
  • Start date Start date
  • Tags Tags
    Latex
Click For Summary
SUMMARY

This discussion provides essential tips for creating PDFs using LaTeX, focusing on mathematical operators and referencing techniques. Users can define the hyperbolic arctangent function with \DeclareMathOperator\arctanh{arctanh} to enable its use in documents. Additionally, it addresses referencing itemized cases and figures, recommending the use of the hypcap package to ensure proper hyperlink navigation. The discussion also advises against using the caption package in favor of float and subfig for better formatting in IEEEtran two-column layouts.

PREREQUISITES
  • Familiarity with LaTeX document preparation
  • Understanding of mathematical notation in LaTeX
  • Basic knowledge of LaTeX packages such as hyperref and hypcap
  • Experience with referencing techniques in LaTeX
NEXT STEPS
  • Learn how to use the hypcap package for figure referencing in LaTeX
  • Explore the float and subfig packages for improved document formatting
  • Research advanced mathematical operator definitions in LaTeX
  • Investigate LaTeX3 changes regarding delimiter usage
USEFUL FOR

LaTeX users, mathematicians, researchers, and anyone involved in document preparation who seeks to enhance their PDF creation skills and improve mathematical formatting.

Dustinsfl
Messages
2,217
Reaction score
5
This works when making your own pdf files. On site, I don't know. If you can set it in the background of Math Jax, then it would be good here too.

Latex doesn't have a \arctanh. That probably means there is no sinh, cosh, etc versions as well.

I only know for a fact about arctanh because I use that one a lot.

Before you start you document, add

Code:
\DeclareMathOperator\arctanh{arctanh}

Now \arctanh works.
 
Physics news on Phys.org
Latex tip #3 references itemize cases

Have you ever done

Code:
\begin{enumerate}[{Case} 1:]
\item
blah
\item
blah
...

and then wanted to reference to one of your itemized cases? Well I have and here is how you do this. Add the following in your preamble before you start your document.

Code:
%  phantom sections for itemize linking use hyperref and name                       
\AtBeginEnvironment{itemize}{\apptocmd{\item}{\phantomsection}{}{
    \errmessage{couldn't patch item}}}

Now you can do this

Code:
\item
\label{case1}

some time later

See Case~\ref{case1}
 
Latex tip #4 referencing figure but the jump is never center on the figure

Have you ever referenced a figure, and when you click the hyper link, it jumps to the caption and not the figure?

Well if you haven't adjusted the caption package or added hypcap, this is what happens.

Your options to correct this are:

I recommend not using the caption package though see tip 5.
You can load the package caption. The default setting is hypcap=true.

If you don't load the package caption, you can load the package hypcap. Load this after hyperref
\usepackage[all]{hypcap}
 
Latex tip #5 don't use the caption package

Instead of the caption package use float and subfig.

For subfig, you want to set

\usepackage[caption = false]{subfig}

This will be valuable to you if you ever use the IEEEtran two column class.
 
Re: Latex tip #2

Or, if you prefer the function inverse notation, you could go

Code:
\DeclareMathOperator\arctanh{tanh^{-1}}
 
Re: Latex tip #2

Ackbach said:
Or, if you prefer the function inverse notation, you could go

Code:
\DeclareMathOperator\arctanh{tanh^{-1}}

You wouldn't need to define that one. Just do \tanh^{-1} and you have it.
 
Latex tip #6 the use of dollar signs

This is for preparing your own pdfs. In $\LaTeX3$, I believe the use of dollar signs will be removed since they are a $\TeX$ delimiter.
If you have ever had a compiling error and the information didn't help or make sense, it may be because you are using dollar delimiters over the $\LaTeX$ delimiters unless you already use the appropriate delimiters.

In $\LaTeX$, you should never the dollar sign or double dollar sign.

For inline math, you should use \({\verb|\(\)|}\) as the delimiters, and for displaymath, you should use \({\verb|\[ \]|}\) or
Code:
\begin{displaymath}\end{displaymath}

Note: this is in regards to document preparation not the forum.
 
Last edited by a moderator:
Re: Latex tip #2

dwsmith said:
You wouldn't need to define that one. Just do \tanh^{-1} and you have it.

Oh, yeah. Right. It might be a tad faster to type the definition, though. Or you could use something like \at as a shortcut.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
4K
Replies
3
Views
7K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K