Tag Info

Hot answers tagged

5

Use \begin{minipage}{0.49\textwidth} ... \end{[minipage}\hfill \begin{minipage}{0.49\textwidth} ... \end{[minipage} It must be less or equal to the current line width. But you had both with \textwidth


5

You have \textwidth wide minipages; however, in cases like these, it's better to use threeparttable, so the caption will be properly centered over the table. \documentclass{article} \usepackage{fullpage} \usepackage{threeparttable} \begin{document} \begin{table}[htbp]\centering \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} \begin{minipage}{.45\textwidth} ...


5

Set the item in a tabular: \documentclass[a4paper]{article} \usepackage{mathtools} \usepackage{nccmath} \usepackage[margin=1in]{geometry} \newcommand \widebox[1]{\setlength\fboxsep{6pt}\boxed {\enspace#1\enspace}} \newcommand \dpartial[2]{\frac{\partial #1}{\partial #2}} \newcommand \ddef[2]{\frac{d #1}{d #2}} \newcommand \spac{\\[0.6em]} ...


4

You can try with align key of enumitem and define your own align key: \SetLabelAlign{myright}{strut\smash{\parbox[t]{\labelwidth}{\raggedleft#1}}} and use it as align=myright. \documentclass{article} \usepackage{enumitem,showframe} \SetLabelAlign{myright}{strut\smash{\parbox[t]{\labelwidth}{\raggedleft#1}}} \newlist{keywordlist}{description}{1} ...


3

I would just use align inside the amsmath package. By putting the & on the LHS you can left-align your equations. For example, the first three rows of your table are: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} &c=\frac1{\sqrt{\epsilon_0\mu_0}}=3\times 10^8 m/s &&\text{speed of light}\\ ...


3

In your example, you start a group with a { immediately before \centering, but this group is never terminated with a }. Thus \centering stays in effect for the remainder of the document, and you get some complaints (but not errors) from TeX in the log: (\end occurred inside a group at level 1) ### simple group (level 1) entered at line 60 ({) ### bottom ...


2

The makecell package can be handy here, as it allows to have a common formatting for all coumn headers declared in preamble. It also defines a command for hlines of varying thickness. Consider also using the booktabs package: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[x11names]{xcolor} \usepackage{array, booktabs} ...


2

Use of parbox[length]{content} is another option. Code \documentclass[a4paper]{article} \usepackage{mathtools} \usepackage{nccmath} \usepackage[margin=1in]{geometry} \newcommand \widebox[1]{\setlength\fboxsep{6pt}\boxed {\enspace#1\enspace}} \newcommand \dpartial[2]{\frac{\partial #1}{\partial #2}} \newcommand \ddef[2]{\frac{d #1}{d #2}} \newcommand ...


2

Since this is basically a table, I would use a tabular* with a \fill between the columns. That way, the table will be flush with the left and right margins of the text, which is what the OP seemed to desire. \documentclass{article} \usepackage{amsmath} \def\boldcal#1{\ooalign{$\mathcal{#1}$\cr\kern.3pt$\mathcal{#1}$}} \begin{document} {\centering FINAL ...


2

try ... \makeatletter \let\SX@I\SX@resultInput \def\SX@resultInput{\centerline{\SX@I}} \makeatother \begin{document} \LTXinputExample[pos=t,style=PSTricks,graphic={[scale=1]"diagram"}]{diagram.tex} \end{document}


2

Taken from Herbert's another answer (click) several decades ago and I modified to meet my requirement. But honestly I am not sure whether or not it is safe for long-term use. \documentclass[dvipsnames,border=12pt,preview]{standalone} \usepackage{xcolor} \usepackage{showexpl} \usepackage{accsupp} ...


1

Edit There may well be a better way of doing this but here's a solution using tikz. It turns out be easier to anchor the nodes at the south west corner. \documentclass{article} \usepackage{tikz} \usepackage{lipsum} \begin{document} \begin{tikzpicture}[scale=\textwidth/15.2cm, every node/.style={anchor=south west, rectangle,rounded ...


1

Or you can use the flalign* environment provided by the amsmath package: \documentclass{article} \usepackage{amsmath} \usepackage[per-mode=symbol]{siunitx} \usepackage[english]{babel} \usepackage{blindtext}% dummy text \begin{document} \begin{flalign*} &c=\frac1{\sqrt{\epsilon_0\mu_0}}=\SI{3e8}{\m\per\s} &&\text{speed of light}\\ ...


1

It's never a good idea to use two consecutive display math environments with nothing in between (because the spacing will be wrong). Using align, the alignment characters can go before the beginning of the bmatrix environments. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{align} &\begin{bmatrix} -1 & 0 & -1 ...


1

Your formulae are on left margin. To have them (more) centred, you should add a pair of && in front of them. If you want them to be really centred, you can use the alignat* environment: \documentclass[a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{mathtools} \usepackage{nccmath} \usepackage[margin=1in, showframe]{geometry} ...



Only top voted, non community-wiki answers of a minimum length are eligible