Tag Info

New answers tagged

6

They are centred vertically. That is, they are centred on the current baseline. (See explanation below.) The problem is that the bottom of the tikzpicture is on the baseline by default. To centre that, we can use baseline in the argument for the picture: \documentclass[12pt,letterpaper]{article} \usepackage{array} \usepackage{tabularx} \usepackage{tikz} ...


2

The problem here is the unprotected \\ of dcases inside a tabular-related environment. The following non-tabularx MWE replicates the problem (using p-columns; a toned-down version of tabularx's X-columns): %\documentclass[12pt,border=3mm,preview]{standalone} \documentclass{article} \usepackage{amsmath,graphicx} ...


3

Use an extra pair of braces to enclose the dcases (which is basically an array): \begin{tabularx}{\hsize}{m{0.4\hsize}X} \includegraphics[width=0.9\hsize]{example-image} & \begin{gather}\label{eq:1} {\delta_h(t) = \begin{dcases} \frac{1}{2h} &\text{pri}\quad -h<t<h \\ 0 &\text{sicer} ...


2

\documentclass[a4paper]{article} \usepackage[framemethod=TikZ]{mdframed} \definecolor{abcd}{RGB}{0,155,155} \mdfsetup{skipabove=0pt,skipbelow=1.25\topskip, nobreak=true, innertopmargin=0.5\baselineskip, innerbottommargin=0.5\baselineskip, frametitleaboveskip=2pt, frametitlebelowskip=1pt, roundcorner=5pt} \mdfdefinestyle{my_style_abcd}{% ...


4

Assuming you want the X column to be three times as wide as the Z column -- as well as the Z column type being defined as in your query above and there being no whitespace to the left of the first column or to the right of the final column -- you could set up the structure of the tabularx environment as follows: begin{tabularx}{\textwidth}{@{} ...


3

Not going into deep explanations, but this uses only Plain TeX macros. ;-) \documentclass{article} \makeatletter \newcommand{\shortdiv}[1]{% \vcenter{\offinterlineskip\m@th \setbox\z@=\hbox{$\big|$}% \def\short@div@strut{\vrule width0pt height\ht\z@ depth\dp\z@}% \dimen@=-.5em \short@div#1;\short@div; }% } \def\short@div#1;{% ...


1

Depending on your exact spacing needs some variation of the following might work. \parindent=0pt \newbox\leftbox \newbox\rightbox \newbox\skipbox \def\div#1#2{\hskip\wd\skipbox\setbox\skipbox\hbox{\unhcopy\skipbox#1} \setbox\leftbox\hbox{#1}\unhcopy\leftbox\vrule height 2ex depth 1pt width .5pt \setbox\rightbox\hbox{#2}\vrule height-.5pt depth1pt ...


1

Adapting my answer at Division with remainders displayed on side. EDITED to adapt its use to arguments with descenders AND to extend the horizontal rule length AND use math mode for the arguments AND to take box measurements in math mode AND extended the strutheight to the above line. EDITED again to automate the indents. The indent is reset to 0pt ...


4

Using the powerful tikz package, we can define a \newcommand with three arguments as follows: \createtable{<# Questions>}{<# Columns>}{<Table caption>} like this: \documentclass[12pt,a4paper]{article} \usepackage{tikz,xcolor} \usetikzlibrary{calc} \begin{document} \newcounter{xy} \definecolor{Qcolor}{HTML}{EFEFEF} ...


2

You can get this: \documentclass[conference]{IEEEtran} \usepackage{tabularx,lipsum} \begin{document} \lipsum[1-2] \begin{table}[h] \renewcommand{\arraystretch}{1.2} \caption{A table} \begin{tabularx}{\linewidth}{|l|X|} \hline \multicolumn{1}{|c|}{\textbf{Term}} & \multicolumn{1}{c|}{\textbf{Description}} \\ \hline \hline key1 & A very long text. ...


4

Very simple: replace \textwidth with \linewidth. I took the opportunity to improve the vertical spacing of the rows of the table, and to propose a solution without vertical rules, that looks better, in the opinion of many: \documentclass{ieeetran} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{lipsum} ...



Top 50 recent answers are included