Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

What are the proper latex inputs for typesetting the bare d'Alembertian operator, and the d'Alembertian operator with either a tilde or a hat or a bar on top in a document prepared using classicthesis documentclass? I understand that the package eulervm is used in classicthesis.

share|improve this question
1  
And how exactly does that operator look like? Can you provide a link or an image showing the operator? –  Gonzalo Medina May 7 at 12:24
    
See here for more inspiration: tex.stackexchange.com/a/20513 –  LaRiFaRi May 7 at 13:46

3 Answers 3

First of all lets have a look on the possibilities we are having. The MWE needs LuaLaTeX for the \mdlgwhtsquare command, but I will propose solutions for pdfLaTeX and LuaLaTeX later on.

% arara: lualatex

\documentclass{book}
\usepackage{classicthesis}
\usepackage{mathtools, amssymb} % !!! Carefull, incompatibility found here, please see below
\usepackage{unicode-math} % !!! Carefull, incompatibility found here, please see below
\newcommand{\test}[1]{#1 \tilde{#1} \widehat{#1} \hat{#1} \bar{#1} \overbar{#1} \overline{#1}\nabla \Delta}
\begin{document}
Latin Modern Math:
\begin{itemize}
\item $\test{\Box}$ \verb+\Box+ % !!! Carefull, incompatibility found here, please see below
\item $\test{\square}$ \verb+\square+ % !!! Carefull, incompatibility found here, please see below
\item $\test{\mdlgwhtsquare}$ \verb+\mdlgwhtsquare+ 
\end{itemize}
%%%%%%
\setmathfont{Asana-math.otf}

Asana Math:
\begin{itemize}
\item $\test{\Box}$ \verb+\Box+ 
\item $\test{\square}$ \verb+\square+ 
\item $\test{\mdlgwhtsquare}$ \verb+\mdlgwhtsquare+ 
\end{itemize}
%%%%%%
\setmathfont{Xits-math.otf}

XITS Math
\begin{itemize}
\item $\test{\Box}$ \verb+\Box+ 
\item $\test{\square}$ \verb+\square+ 
\item $\test{\mdlgwhtsquare}$ \verb+\mdlgwhtsquare+ 
\end{itemize}    
\end{document}

enter image description here enter image description here

The last version, taken from unicode-math results in a good kerning for all solutions. So using LuaLaTeX you could do this:

% arara: lualatex

\documentclass{book}
\usepackage{classicthesis}
\usepackage{unicode-math}
\usepackage{xifthen}
\newcommand{\dalembert}[1][]{\ifthenelse{\isempty{#1}}{\mdlgwhtsquare}{#1\mdlgwhtsquare}}
\begin{document}
$\dalembert \dalembert[\tilde] \dalembert[\hat] \dalembert[\bar]$
\end{document}

which yields the following image for Latin Modern Math:

enter image description here

For pdfLaTeX it can just be achieved like this (I just found out, that the kerning issue above was not a problem with pdfLaTeX. You can read here that unicode-math and amssymb are not compatible):

% arara: pdflatex

\documentclass{book}
\usepackage{classicthesis}
\usepackage{amssymb}
\usepackage{xifthen}
\newcommand{\dalembert}[1][]{\ifthenelse{\isempty{#1}}{\Box}{#1\Box}}

\begin{document}
$\dalembert \dalembert[\tilde] \dalembert[\hat] \dalembert[\bar]$
\end{document}

Which yields:

enter image description here

share|improve this answer

The most common notation seems to be a square. So I suggest to declare it as a math operator, to ensure proper spacing in formulae. I don't know if eulervm has a Box command. You can find it in latexsym, amsfonts, amssymb,mathabx, wasysymb, &c.

\documentclass[12pt,a5paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{amssymb}

\usepackage{esdiff}
\usepackage{mathtools}
\DeclareMathOperator{\dalembert}{\Box}

\begin{document}

\begin{align*}
  \dalembert (f)  & = \frac{1}{c² } \diffp[2]{f}{t} -  \diffp[2]{f}{x} -  \diffp[2]{f}{y}  -  \diffp[2]{f}{z} \\
\widehat\dalembert²(f) &  =  \dots
  \end{align*}

\end{document}

enter image description here

share|improve this answer
    
you seem to have entered this answer twice. you should delete one of them (after checking to see if one is correct and one isn't, of course). –  barbara beeton May 7 at 13:29
    
@barbara beeton: Oh yes, thanks! I modified my answer, due to a typo, and thought it was only modified, not answered twice. –  Bernard May 7 at 13:42

Since the D'Alembert Operator is just a box I don't think the eulervm package should modify it at all. Without a MWE I can not test it in context, but I'm pretty sure that these

$\Box = \partial^{\mu}\partial_{\mu}$
$\hat{\Box}$
$\tilde{\Box}$

work as expected.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.