Tag Info

New answers tagged

0

I think that using \left and \right is the best way to go, as function arguments might as well grow taller than usual. But it is a matter of taste. For myself, I have defined the following command: \newcommand{\of}[1]{\!\left({#1}\right)} This gives me nice spacing for function arguments while preserving \left's and \right's functionality, and it also ...


13

The braces are incorrect in general. \int does not take an argument so the braces form a group, {xdx} (or many would prefer {x\mathrm{d}x}) is therefore a single atom in the mathlist of type \mathord. In the case of xdx the spacing will not be affected but for example {x+1} differs from x+1 in that the spacing around the + is frozen at its natural size, ...


1

You can use \includestandalone from standalone package (requires -shell-escape). plot.tex: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.5} \begin{document} \begin{tikzpicture} \begin{axis}[ width=\columnwidth, title=Inv. cum. normal, xlabel={$x$}, ylabel={$y$}, ] \addplot[blue] table {invcum.dat}; \end{axis} \end{tikzpicture} ...


0

Using \operatorname{lcm} results in proper spacing in things like this: a\operatorname{lcm}b The same is true of this: \operatorname{ord}


1

As an applied mathematician / computer science guy, I had the requirement to plot (lots of!) data series, to plot functions given by expression, and to typeset numerical tables (often with additional, automatically generated post-processings). Plotting includes surfaces or contour plots for 2d functions. pgfplots and pgfplotstable excel at these ...


1

miller.sty is very useful in crystal chemistry/crystallography. asymptote.sty for incorporating asymptote figures.


1

If your typoscript is to be processed (not retyped) by a scientific journal or book publisher, then stick to conventions and keep it as simple as possible lest you will annoy the copy editor. Hence f(x). Or f\left(\frac{a}{b}\right) if the function argument has extra height or depth. If you are your own editor, then, as others have said, there is no such ...


4

I simply use f(x) (inside a formula, that is, between $...$ or \[...\] or any other mathematical construct, which shall be implicit in what follows) and consider all the other proposed usages wrong. One might argue about \mathop{\kern0pt f}(x) so a thin space would be added in front of the f if preceded by certain kinds of atoms (what happens for \sin and ...


9

Yes, there is a better way: \usepackage{xparse} \NewDocumentCommand{\mychapter}{som}{% %%% things to do before \chapter \IfBooleanTF{#1} {\chapter*{#3}} {\IfNoValueTF{#2}{\chapter{#3}}{\chapter[#2]{#3}}% %%% things to do after \chapter } This supports all three calls: \mychapter*{Title} \mychapter{Title} \mychapter[Short title]{Long title} ...


8

The traditional way, before xparse allowed for more flexible solutions, is to use \@ifnextchar[ to check for the [ of the optional argument and to inject other code into the wrapper. The starred version is included as well and can have an [] now as well -- it's up to the OP to decide what this [] should do then ;-) \documentclass{book} ...


3

Sure, why not. Your use, your choice. Depending on the specific application, you might consider using \xdef take make the (expanded) redefinition global or \protected@xdef to accommodate "strange constructions" in names...


5

I would use different commands, one to hold the name and another to set the name. In a package, it is a common practice to use an external version of the command (\name) to set the value of an internal macro (\@name). This is how \author and \title work in the article class. \makeatletter \newcommand{\name}[1]{\gdef\@name{#1}} \makeatother But it would ...



Top 50 recent answers are included