Hot answers tagged

9

Something like this? I used tikz drawings, but this could be replaced by \includegraphics commands of course and a enumitem new list with a special counter named shapeenum has been defined with \AddEnumerateCounter, which selects the shapes according to the value. Due to the internals of enumitem, the shape commands must be robust, i.e. use ...


8

Define suitably the theorem styles; also some trick has to be used for the equation number in boldface. \documentclass[leqno]{book} \usepackage{amsmath,amsthm} \makeatletter % http://tex.stackexchange.com/a/261647/4427 % detach \eqref and \tag making \renewcommand{\eqref}[1]{\textup{\eqreftagform@{\ref{#1}}}} \let\eqreftagform@\tagform@ % equation numbers ...


7

Since you're loading the amsmath package, you could make use of that package's \tagform@ macro to achieve your objective. Note that you will not be able to use \eqref to create cross-references to equations; I suggest you load the cleveref package and use \cref instead. \documentclass{scrbook} \usepackage{amsmath,amssymb,amsthm} \makeatletter ...


7

How about \makeatletter \def\@seccntformat#1{\@ifundefined{#1@cntformat}% {\csname the#1\endcsname\quad}% default {\csname #1@cntformat\endcsname}}% enable indiv. control \newcommand\section@cntformat{\thesection.\quad} \makeatother Feel free to use a different spacing amount than \quad. A full MWE: \documentclass{article} \makeatletter ...


7

Since the OP wants a variety of unspecified icons, I'll leave the actual specification of those images to the OP. However, what I do here is create a custom environment geonumerate and the ability to specify item types with \newitem{<Name>}{<content>} When \itemName is called inside the geonumerate environment, it scales a version of ...


5

Using a \ifx\.... comparison \documentclass{article} \makeatletter \DeclareRobustCommand{\@seccntformat}[1]{% \def\temp@@a{#1}% \def\temp@@b{section}% \ifx\temp@@a\temp@@b \csname the#1\endcsname .\quad% \else \csname the#1\endcsname\quad% \fi } \makeatother \begin{document} \section{Foo} \subsection{Foo} \end{document}


4

Without using any extra packages, just redefine \theenumii, \labelenumi and \labelenumii: \documentclass{article} \renewcommand{\theenumii}{\theenumi.\arabic{enumii}} \renewcommand{\labelenumi}{\theenumi)} \renewcommand{\labelenumii}{\theenumii)} \begin{document} \begin{enumerate} \item Firat item \item Second item ...


4

Under regular documents, using \pdfstrcmp (e-TeX) should work: \documentclass{article} \makeatletter \renewcommand{\@seccntformat}[1]{% \csname the#1\endcsname% Print sectional counter \ifnum\pdfstrcmp{#1}{section}=0 .\fi% If \section, print . \quad% Space between number and title } \makeatother \begin{document} \section{A section} \subsection{A ...


4

The visual representation of the section counter is specified by macro \thesection, which can be redefined: \section{Section Title} (Question 1) \let\savedthesection\thesection \renewcommand*{\thesection}{% \arabic{section}--\the\numexpr\value{section}+1\relax } \section{Section Title} \stepcounter{section} \let\thesection\savedthesection (Question 2 ...


3

Is this what is requested? The redefinition of \thesubsection as {\Alph{subsection}} strips the section information of course from \thesubsection. \thedefn is using \thesubsection.\arabic{defn} due to its definition, so \thesection is missing then. \documentclass{amsart} \newtheorem{defn}{Definition}[subsection] ...


3

You also can do that with thmtools+amsthm or with nthm alone. Concerning the equation numbers, it's the leqno option in the document class. Of course you should comment the part of the code you don't want to use: \documentclass[leqno]{book} \usepackage{xcharter} \usepackage{mathtools} %%% Code for amsthm \usepackage{amsthm, thmtools} % ...


3

Here's a way if para means \section etc. (In this case, \thesection does not need to be changed). The (aa) numbering can be obtained by \alphalph and increasing the subparagraph number by 26 only virtually. I've provided a enumitem way in case a list is actually meant. In case of the \section - version -- I don't recommend this numbering/labelling style ...


3

You can use the same trick as amsart: \documentclass{article} \usepackage{amsmath} \makeatletter % ams classes trick \def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth} \edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay} \everydisplay\expandafter{\@tempa} \makeatother \begin{document} Inside quotation environment: \begin{quotation} ...


2

It seems that you have somewhere defined \thesection on different way as you expected. So if you instead \renewcommand{\thefigure}{\thesection-\arabic{figure}} use \renewcommand{\thefigure}{\arabic{section}-\arabic{figure}} you will obtain desired form of figure numbers.


2

For the sake of completeness, here's a solution that uses the ntheorem package without other helper packages to define a custom look for the theorem headers. \documentclass{report} % use a class that features chapter-level headers %% Customize the appearance of equation numbers \usepackage[leqno]{mathtools} % for \newtagform and \usetagform macros ...


2

Something like this? \documentclass{report} % document class that features 'chapter' sectioning level \usepackage{amsthm} \theoremstyle{plain} \newtheorem{thm}{Theorem}[section] \renewcommand\thethm{\thechapter-\arabic{section}-\arabic{thm}} \begin{document} \setcounter{chapter}{2} \setcounter{section}{3} \begin{thm} aaa \label{thm:aaa} \end{thm} A ...


2

The enumeration is strange here, therefore I use a new list named strangenumerate Since label*= cannot be applied here for the deeper nested levels (it prints a ), there are some other strategies: Make a conditional on the level of nesting and change the label according to this Refer directly to the counter of the current level, i.e. strangenumeratei ...


2

A combination of subequations and \intertext, employed in the right combination. \documentclass{article} \usepackage{amsmath} \begin{document} \noindent some text \begin{subequations} \begin{gather} x = y\\ \intertext{some text} x = y \end{gather} \end{subequations} some text \end{document} If the intertext is very short, one can compress the ...


2

You need to give some indication that the following text is meant to be a numbered paragraph. % nparas.tex (numbered paragraphs) \documentclass{article} \newcounter{np} % numbering your paras \newcommand*{\np}{\refstepcounter{np}\par\noindent\arabic{np}. } \begin{document} \title{A Title} \author{A N Author} \maketitle \np First paragraph. \np Another ...


2

Beamer has a build-in option to number theorems, you can activate it with \setbeamertemplate{theorems}[numbered] The question how to colour it, has already an answer http://tex.stackexchange.com/a/87219/36296 \documentclass{beamer} \usepackage{etoolbox} \newtheorem{teorem}{Teorem}[section] \newtheorem{definicija}{Definicija}[section] ...


2

You could load the mathtools package and use the \newtagform macro to create a new, "hidden", tag form for equation numbers. With the code shown below, use \usetagform{hidden} to suppress the showing of equation numbers and use \usetagform{default} to revert to default mode. "Hidden" equation numbers will show when cross-referenced with \ref, \eqref, etc. ...


2

To make the code compile, we need to remove \maketitle and the bibliography from the example and integrate the code fragments provided in the question. Having done that, we can redefine the chapter style within the appendices environment to include the \appendixname in the chapter label which precedes the title. For example: \documentclass[a4paper, 12pt, ...


2

The environment abstract is derived from quotation environment from egreg answer \newenvironment{abstract} {\small \begin{center} \bfseries \abstractname\vspace{-.5em}\vspace{0pt} \end{center} \quotation} {\endquotation} The definition of quotation environment from article.cls Martin Scharrer answer \newenvironment{quotation} ...


2

You need to also remove the resetting. There's a package dedicated to this. (Actually, there seem to be at least two!) For example: \documentclass[11pt]{article} \usepackage{amsmath,amssymb,amscd,amsthm,remreset} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} ...


2

The package xgreek explicitly redefines \@alph and \@Alph to use greek numbers. If those specific greek numbering style is not needed in the rest of the document, it's possible to switch back to the Latin style by catching the original definition and return to them after xgreek has been loaded. \documentclass[a4paper,12pt]{article} \makeatletter ...


1

There is no need to load the caption package for changing the numbering. It suffices to use \renewcommand{\thetable}{\arabic{chapter}-\arabic{table}} with or without caption, even in memoir: \documentclass{memoir} \renewcommand{\thetable}{\arabic{chapter}-\arabic{table}} \begin{document} \chapter{A chapter} \begin{table} \caption{A table} ...


1

If you (a) reduce the values of the length parameters \arraycolsep, \thickmuskip, and \medmuskip and (b) use the bmatrix environment of the amsmath package instead of array environments, the equation and the equation number fit on a single line. \documentclass[12pt]{report} \usepackage{amsmath} \usepackage[vmargin=25mm]{geometry} ...


1

I propose to use the medsize environment (about 80 % of \displaystyle), from nccmath. Also I simplified your code, using the bmatrix environment: \documentclass[12pt]{report} \usepackage{geometry} \usepackage{mathtools, nccmath} \geometry{ top=25mm, bottom=25mm, showframe } \newcommand{\sss}[2]{_{_{#1_{#2}}}} \begin{document} Some text some text some ...


1

I'm not sure why you think you need a figure environment to use a tikzcd environment, that is not the case. In fact, one of the first things written in the introduction of the tikz-cd manual is Everything inside {tikzcd} is typeset in math mode, but you will probably want to use it inside an {equation} environment or \[ ... \], so that the diagram is ...


1

If it may be independent of a previous text and you can identify page x, \setcounter{page}{1} somewhere on the page x will be enough.



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