Tag Info

Hot answers tagged

11

There's no difficulty to define an enumeration to look like your example: \documentclass{article} \usepackage{enumitem} \begin{document} \begin{enumerate}[label={\textbullet\ Exercise\ \arabic*.}] \item An item \item Another one \item And another one \end{enumerate} \end{document} If you want all your first level enumerations to look like this, you can ...


7

Here's a solution with enumitem, with the help of expl3 for the arithmetic: \documentclass{article} \usepackage{enumitem,xparse} \ExplSyntaxOn \DeclareExpandableDocumentCommand{\counterbythree}{m} { \doc_counter_by_three:c { c@#1 } } \cs_new:Nn \doc_counter_by_three:N { \int_div_truncate:nn { #1 + 2 } { 3 } } \cs_generate_variant:Nn ...


5

Without packages. I just define three versions of \item (\itemA, \itemB, and \itemC) two of which decrement the enumi counter before invoking the saved form of \item. They also redefine the next invocation of \item to the next variant. To get the process rolling, I define the enumerateeachthree environment to set \item to \itemA before starting the ...


5

Changing of the sectional fonts: Change size of section, subsection, subsubsection, paragraph and subparagraph title Adjusting the counter representation (somewhat relevant): Continuous v. per-chapter/section numbering of figures, tables, and other document elements \documentclass{article} \usepackage{sectsty} \subsubsectionfont{\normalfont\itshape} ...


5

One approach using the linguex package: \documentclass{article} \usepackage{lipsum} % for dummy text \usepackage{linguex} % Counter format \renewcommand{\ExLBr}{\bfseries} \renewcommand{\ExRBr}{} % http://tex.stackexchange.com/a/57279/11604 % Reset \ex. at each section \usepackage{chngcntr} \counterwithin{ExNo}{section} % add section counter ...


5

The page counter still counts 1, 2, 3, ..., but \thepage is redefined to use 2*page-1 instead. Also \@roman is used to get roman numbers. The calculation is done using e-TeX's \numexpr: \makeatletter \renewcommand*{\thepage}{% \@roman{\numexpr\value{page}*2-1\relax}% } \makeatother Example: \documentclass{article} \makeatletter ...


4

Not sure what this is for. The trick is to add \setcounter{equation}{0} to all the relevant structures. \documentclass{article} \usepackage{amsmath} \usepackage{etoolbox} \preto\equation{\setcounter{equation}{0}} \makeatletter \pretocmd\start@gather{\setcounter{equation}{0}}{}{} \pretocmd\start@align{\setcounter{equation}{0}}{}{} ...


4

I wouldn't do things this way. Since your \subsection* levels are enumerated with letters, they are regular numbered sections, so you should use \subsubsection. (If you don't like typing \subsubsection you can change it to something else (e.g. \let\lsection\subsubsection)). Then you can format everything simply with titlesec: \documentclass{article} ...


4

One option would be to use aligned or alignedat from the amsmath package. A little example in which one variant has a brace at the right (I think the brace is not really needed); using the optional argument you can control the vertical position of the tag: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \begin{alignedat}{3} ...


4

You can use atbegshi to perform page-related checking before shipout and condition accordingly. Here's an example: \documentclass{article} \usepackage{afterpage,atbegshi,lipsum} \AtBeginDocument{% \AtBeginShipout{% \ifnum\value{page}=403 \vspace*{\fill} {\raggedleft\Large The page \\ cannot be found\par} \vfill ...


4

If you want to have each equation centered rather than aligned on some specific point (such as the first = symbol), you should use a gathered environment instead of an aligned environment. \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} \label{eq:test} \begin{gathered} A=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\ ...


3

Edit: I automatically assumed that you wanted all the equations aligned on the = sign. The right answer to center them is Mico's. However, this is another possibility that you may try. You only need to tell Latex how to align your equations, with the & symbol: \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} ...


3

You can adapt the code in http://tex.stackexchange.com/a/209732/4427 \documentclass{article} \usepackage{amsmath,amssymb} \makeatletter \newcommand{\Cen}[2]{% \ifmeasuring@ #2% \else \makebox[\ifcase\expandafter #1\maxcolumn@widths\fi]{$\displaystyle#2$}% \fi } \makeatother \begin{document} This is the output format of the four equations: ...


3

(Update according to egreg's commend. Thanks!) The first example of empheq given by Bernard is invalid if omitting the overload option when loading empheq package. For the latex file provided by Bernard, it has no problems at all. However, when I used \usepackage[overload]{empheq} in IEEEtrans with a lot other packages loaded, it will freeze the pdflatex on ...


3

It is easy to to with alignedat and the empheq package. Needless to load amsmath since empheq loads mathtools, which loads amsmath. In the following code the columns are separated by 3 em. I'm not sure whether you want to reset the equation counter at each new section, or simply add the section counter in front of the equation counter? I chose the first ...


3

Just use a set of \counterwithin* instructions: \counterwithin*{equation}{section}% Reset equation at \section \counterwithin*{equation}{subsection}% Reset equation at \subsection \counterwithin*{equation}{subsubsection}% Reset equation at \subsubsection \counterwithin*{equation}{paragraph}% Reset equation at \paragraph ...


3

From the (almost) the same question (not so long ago) we know, that tabularx clashes with subcaption and caption numbering. So, there is no sense to insist to use it with such application. Instead, it is better to use ordinary tabular and manually calculate width of columns (see MWE below). multirow works in all types of tables, so for its use there is no ...


3

You first of all need to detach \eqref and the equation number making macros. Then you can redefine \tagform@ to add a space as wide as a digit in case the equation number is less than 10. \documentclass{article} \usepackage[leqno]{amsmath} \usepackage[shortlabels]{enumitem} \makeatletter % detach \eqref and \tag making ...


2

You need neither tabularx nor multirow. It's not clear why you're pushing the thing to the left and want to use more than the default text width, but I didn't change this. You just need a tabular for the four images; I use another one for the left image just to get vertical centering (there are several other methods). Note the two nested \makebox commands: ...


2

Given the desired output, I think that using multicols and two equation environments is not the right tool for the job at hand. You can either use just one equation adding some horizontal spacing or some other of the amsmath's environments if multi-row alignment is desired: \documentclass{article} \usepackage{amsmath} \begin{document} $P_{O,t}$ are the ...


2

I've redefined the \theequation with some query about the value of the counters: \renewcommand{\theequation}{% \ifnum\value{subsection} > 0 \ifnum\value{subsubsection} > 0 \thesubsubsection-\arabic{equation} \else \thesubsection-\arabic{equation} \fi \else \thesection-\arabic{equation} \fi } ...


2

For the question number, you can redefine \thequestion (the representation used for the question counter): to aprepend the section counter and the dot: \renewcommand\thequestion{\thesection.\arabic{question}} Having done this, for the enumerations you can use the ref key to provide the desired formatting for cross-referenced simply as: ...


2

Perhaps one of these TABstack choices?? The intercolumn gap is set in the preamble to 1em, and the inter-row baseline skip is set there to 1.2\baselineskip. Both these values can be modified to suit. \documentclass{article} \usepackage{tabstackengine} \stackMath \setstacktabbedgap{1em} \setstackaligngap{1em} \setstackgap{L}{1.2\baselineskip} ...


2

With the alignat environment from amsmath, this is easy: \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{alignat}{2} & \mathrel{\hphantom{\Longleftrightarrow}} Y_l^{\mathrm{hx}} \veebar Y_l^{\mathrm{cx}} & \quad & \forall l \in \mathrm{MS} \\ % Y_l^{\mathrm{hx}} & ...


2

You could also simply write out the word. 1st = first, 2nd = second, and so on. Probably better in a formal setting anyway. If this is in a figure or table then any of the above answers sound great, but in a paragraph setting there's no need to get too cute.


2

I suggest a wrapper command (or environment, but a command is easier here.) \importsheet takes two arguments. The first optional one is meant for the options to be given to \includepdf (there are a lot of possible options, I preset some already in the call to \includepdf, but those can be reset with individual settings using the first argument. The second ...


1

There is a less LaTeX-way solution, but it on the other hand gives you a complete flexibility: We need a footnote that has no symbols whatsoever. \usepackage{lipsum} \newcommand\blfootnote[1]{% \begingroup \renewcommand\thefootnote{}\footnote{#1}% \addtocounter{footnote}{-1}% \endgroup } See this answer for more details. Just put a ...


1

The centred left hand side is really hard to read. Please try to find some good alignment points and use one of the two following approaches: % arara: pdflatex \documentclass{article} \usepackage{amssymb} % needed for \vbar \usepackage{mathtools} \begin{document} This is the output format of the four equations:\setcounter{equation}{16} ...


1

If you use this: \begin{equation} ... \end{equation} try this: \begin{equation*} ... \end{equation*}


1

Here is a small sample of numbering equations. \documentclass[12pt]{article} \usepackage{amsmath} \begin{document} \begin{align} % numbers equations automatically x &= (1-x) + 2x \\ % \\ ends the line &= (x+y) - y \nonumber \\ % \nonumber removes the equation number &= \frac{x}{2} + \frac{x}{2} % last line does not have \\ \end{align} ...



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