New answers tagged

1

The first answer to the question you linked in your question (http://tex.stackexchange.com/a/4816/36296) seems to work just fine. If only the first entry was coloured, did you remember to adjust the alignment options to $c^c^c^r^c^c? \documentclass{article} \usepackage{tabularx} \usepackage{adjustbox} \usepackage{booktabs} \usepackage{array} ...


4

Maybe this? I introduce a \setrow{...} macro invoked on the first element of a row, which applies to each cell of that row (and is then reset). It employs the >{} and <{} feature of tabularx. \documentclass{article} \usepackage{tabularx} \newcommand\setrow[1]{\gdef\rowmac{#1}#1\ignorespaces} \newcommand\clearrow{\global\let\rowmac\relax} \clearrow ...


4

Quite simple: \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[align=right, font=\bfseries] \item[25-1] Compute $1 + 1$ \item[25-8] Compute $1 \times 1$ \end{enumerate} \end{document} B.t.w., note align=right is the default.


1

\documentclass{scrartcl} \usepackage[shortlabels]{enumitem} \newcommand*\makeboldlabel[1]{\textbf{#1}} \begin{document} \begin{enumerate}[align=right,before=\let\makelabel\makeboldlabel] \item[25-1] Compute $1 + 1$ \item[25-8] Compute $1 \times 1$ \end{enumerate} \end{document}


7

A simple application of grouping: \documentclass{article} \newcount\emphlevel \DeclareRobustCommand{\emph}[1]{% \begingroup \normalfont \advance\emphlevel by 1 \ifcase\emphlevel \or `\aftergroup'\normalfont \or \normalfont\expandafter\textsc \or \normalfont\expandafter\textit \else \normalfont!!!!\expandafter\textbf \fi ...


4

I decided to use another command name, but the nesting can be controlled with a counter and \ifcase...\fi conditional. The 4th level will provide an usual \@ctrerr, but this could be shifted to basically any level. \documentclass{article} \newcounter{smartlevel} \makeatletter \newcommand{\smartcmd}[1]{% \stepcounter{smartlevel}% ...


7

\documentclass{article} \newcounter{emphlevel} \renewcommand\emph[1]{\stepcounter{emphlevel}% \ifnum\value{emphlevel}=1`#1'\else \ifnum\value{emphlevel}=2\textsc{#1}\else \ifnum\value{emphlevel}=3\textit{#1}\else \fi\fi\fi\addtocounter{emphlevel}{-1}% } \begin{document} \emph{Single quotes within \emph{Small Caps within \emph{more italics} and} ...


2

The screenshot you've posted suggests you're interested in Times Roman-based Fonts. If that's the case, I suggest you load the newtxtext and newtxmath packages. The latter package, happily, provides "upright" lowercase Greek math symbols. They may be accessed by prefixing "up" to the macro for the ordinary symbol (e.g., \upalpha, \upbeta, etc.). To typeset ...


3

Try the upgreek package and \boldsymbol from amsmath (or mathtools. \documentclass{article} \usepackage{mathtools} \usepackage{upgreek} \begin{document} \begin{align} x'_{0} &= \gamma \left( x_{0} - \boldsymbol{\upbeta \cdot x}\right) \\ \boldsymbol{x}' &= \boldsymbol{x} + \dfrac{\gamma-1}{\boldsymbol{\upbeta}^2} \left( \boldsymbol{\upbeta ...


3

Simply \newcommand\boldblue[1]{\textcolor{blue}{\textbf{#1}}}


1

Here are two ways -- with mdframed and tcolorbox -- the numbers are bold, as well as the title by default (in book) \documentclass{book} \usepackage[x11names]{xcolor} \usepackage{mdframed} \usepackage[most]{tcolorbox} \setcounter{secnumdepth}{3} \begin{document} \chapter{Foo} \section{Foo} \subsection{Foo} \begin{mdframed}[backgroundcolor=lightgray] ...



Top 50 recent answers are included