Tag Info

Hot answers tagged

9

It is sort of legal latex but clearly not "good latex style". \noindent shouldn't normaly be used, and \vskip shouldn't be used. (\vspace) Normally within a document one would use a blank line rather than \par (\par is more use within macro definitions where a blank line often looks less convenient, as you may wish to indent code). LaTeX counters like a ...


8

Do not beat me up... I could not resist: % arara: lualatex % arara: lualatex \documentclass{article} \usepackage{fontspec} \setmainfont{ObelixPro-cyr.ttf} % the following is shamelessly stolen from tohecz \usepackage{amsthm} \newtheorem{theorem}{Theorem}[section] \newtheorem{astTheorem}{Theorem} \newcommand*\asterix{\includegraphics[scale=.1]{ast}} ...


6

\the\numexpr\value{counter}-1\relax should do what is asked in the question but you don't seem to need this, it is normal to advance the counter before using it, then its value in a section will be the value used in that sections heading, and you don't need to subtract.


6

You mean something like this? We simply abuse the numbering scheme to make theoremstar have the same number as the very last previous theorem, but with a star added. Remember that two theoremstar with no theorem in between will get clashing numbers. You can rename theoremstar from Theorem to Condition or to whatever you wish, independently of the name of ...


5

This allows having the variant theorem anywhere, but requires giving the environment a label as argument. I'd prefer this way, because moving things around when writing the paper can push the variant theorem in a different place and the numbering might go wrong. The optional argument to \begin{theorem} or \begin{theorem*} is honored as shown in the example ...


5

The purpose of \autoref is to add the counter's name (or whatever one decides in place of the counter's name) to the number. In your case you just need \ref: \documentclass{amsart} \usepackage{hyperref} \newtheorem{Thm}{Theorem} \newtheorem*{innerGenius}{Genius' Special Theorem} \makeatletter \newenvironment{Genius} ...


5

tex parsing is controlled by "catcodes" (\catcode) the catcode of any character is changeable, but control sequence names can be any number of catcode 11 characters (letters) or a single non-letter so \"o for example is \"{o} not a command called "o digits are non-letters so you can have \1 but not \a1. It is possible to make digits letters by making them ...


4

The subequations environment increments the equation counter every time with a new instance. You can use only one subequations environment. If you want the separation between the two sets add a \jot as shown below: \documentclass{article} \usepackage{empheq} \begin{document} \begin{subequations} \begin{empheq}{align} & a = b \label{E1} \\ & c = d ...


3

I realize this loses a lot of the nice default math matrix typesetting and requires some manual fiddling, but wouldn't something like the following be a bit (maybe not much) less unwieldy: \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \[ M=\left[\; \begin{tikzpicture}[baseline=(0:0), y=\baselineskip,x=2em] \foreach \row ...


2

I think this will do what you want and should also be less unwieldy than your current solution. The syntax is similar to that you requested except that different macro names are used on the grounds that it is not possible to simultaneously use the same command name for two different macros ;). \documentclass{article} \usepackage[svgnames]{xcolor} ...


2

\footnote and \footnoteA use two different counter.That why the counting in note is not the same. You just have to let the counter for \footnoteA be an alias of the one for \footnote. Just add \makeatletter\let\c@footnoteA\c@footnote\makeatother


2

The \label command in the \picTEST macro must come after \caption, as it needs a \refstepcounter call, which is done within \caption. Otherwise the label points to something different or to nowhere. Furthermore, the document must have the corresponding number of pages which should be referred to. \documentclass[12pt,a4paper,fleqn,parskip=half]{scrartcl} ...


1

Instead of \crefalias, I would use the instruction \crefname{CommentCount}{comment}{comments} Since you're going to use the counter for cross-referencing purposes, you should use \refstepcounter instead of \stepcounter to increment the counter variable CommentCount. \documentclass{article} \newcounter{CommentCount} \setcounter{CommentCount}{0} ...


1

You have to expand the \the\ga argument. For example: ... \newcommand{\btreematrixnode}[3]{% % #1 ... the level of the node % #2 ... number of node of level #1 % #3 ... values as comma separated list \ga = 1% \let\mymatrixnodecontent\empty \foreach \x in #3 {% \edef\tmp{{\x}{\the\ga}}% ...



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