Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
16

I recycled this code and slightly extended it to get \documentclass{article} \usepackage{pgffor} \newcommand{\nbullets}[2][\textbullet]{% \foreach \X [evaluate=\X as \Y using {int(mod(\X,5))}]in {1,...,#2} {\ifnum\X>1% \ifnum\Y=1% $\vert$\fi% \fi% #1}} \begin{document} \renewcommand{\labelenumi}{\nbullets{\value{enumi}}} \begin{enumerate} \item first \...


14

The enumitem package is your friend. You can define a new list style, which I have called unerate, and then make this list style use your \unary code. To achieve this it is enough to add the following lines to your code: \let\realItem\item \newcommand\unerateItem{\refstepcounter{uneratei}\realItem[\unary{uneratei}]} \usepackage{enumitem} \newlist{unerate}{...


11

The fmtcount package provides a simple way to get the binary numbers. To begin counting at zero you need to set the section counter initially to -1. You can also pad the values with zeroes if you wish. \documentclass{article} \usepackage{fmtcount} \renewcommand{\thesection}{\binary{section}.} \setcounter{section}{-1}% To begin at 0 \begin{document} \...


10

Here's an expandable \unifive macro: \documentclass{article} \usepackage{xparse,enumitem,tipa} \usepackage{showframe} \ExplSyntaxOn \NewExpandableDocumentCommand{\unifive}{m} {% #1 should be an integer \draconis_unifive:n { #1 } } \cs_new:Nn \draconis_unifive:n { \int_compare:nTF { #1 > 5 } { \unifivefive \draconis_unifive:e { \...


8

Sure. \documentclass{article} \usepackage{expl3} \ExplSyntaxOn \cs_set:Npn \thesection {\int_to_bin:n{\value{section}-1}} \ExplSyntaxOff \begin{document} \section{one} \section{two} \section{three} \end{document} Note that I only changed the displayed number here, so the section counter still has the value 1 for the first section, we only print ...


6

You don't need explicit loops to generate a number of bullets \documentclass{article} \renewcommand\labelenumi{\theenumi\space} \renewcommand\theenumi{\expandafter\zzm\romannumeral\the\value{enumi}000\relax} \def\zzm#1{\if m#1\textbullet\expandafter\zzm\fi} \begin{document} \begin{enumerate} \item My text here my text here \item More text more ...


4

Here are some quick and dirty tricks. \documentclass[12pt]{arabbook} \usepackage{fancyhdr} \usepackage{arabtex} \usepackage{amssymb} \usepackage{amsmath} \usepackage{arqam} \usepackage{graphicx} \usepackage{pstricks} \textwidth= 15truecm % \textheight= 22.27truecm % \hoffset= -1.5 cm%truecm % \voffset= -1.5 cm%truecm % \pagestyle{fancy} \renewcommand{\...


4

Edit If for some reason one need to use arabtex, here is another solution with pdflatex (arabi and arabtex): Note i think one need to add this \renewcommand*\l@section{\@dottedtocline{1}{1em}{1.5em}} to correctly set table of contents \documentclass[12pt]{arabbook} %--------------------------------------------- \usepackage[LAE,T1]{fontenc}...


2

It looks like you're engaging in quite a bit of low-level, "visual" formatting of your document. Now this is precisely what LaTeX is supposed to make unnecessary. The following, really old joke comes to mind: "Good Fortran programmers can program in Fortran in any language." E.g., by issuing the instruction \section*{\centerline{3. abc}} to (a) center-set ...


2

Use \refstepcounter instead of \stepcounter, so that a proper value to be referenced is set. On the other hand, I'd prefer a more abstract approach: \documentclass{article} \usepackage{amsmath,amsthm} \theoremstyle{remark} \newtheorem{exer}{Exercise} \newtheoremstyle{endchapterexer} {0pt} % ABOVESPACE {0pt} % BELOWSPACE {\upshape} % ...


2

You have two possibilities to fix the issue you encountered: manipulate the table counter put both panels in the same tabularx environment and manually add some vertical white space Here is an MWE for the first possibility. I have commented out the table environment and added \addtocounter{table}{-1} after the caption command. \documentclass[12pt]{...


2

Two things: You should load hyperef as the last package The code you are using is a modification of the subequations code from amsmath.sty, so you also need a mimic the code hyperef has specific to subequations \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} \usepackage[linktoc=page,...


2

I will assume that you're using a document class that's compatible with the amsmath package. (Fortunately, most document classes satisfy this criterion.) I suggest you use the \numberwithin macro of the amsmath package to set the numbering style and the \tag macro to override the default numbering system for selected equations. \documentclass{article} % or ...


2

You can do this: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{enumitem} \newtheorem{assumption}{Assumption} \begin{document} \begin{assumption}[The Assumptions]\label{assumption1} We have the following four assumptions. \begin{enumerate}[label={\textbf{Part~\Alph*:}}, ref={assumption~\Alph*}] \item \label{assump-A}%...


1

that is expected as wrapfigure is a non floating environment so floating figures can float past it. If it is still that way in the final document version after all other edits done, you can fix as follows: put \addtocounter{figure}{1} in the wrapfig before the caption and \addtocounter{figure}{-2} in the figure just before the caption.


1

How can I tell LaTeX to number the code the way I tried above? Thanks in advance! Some nitpicking: You can't "tell" LaTeX to number (in whatsoever ways) the code because LaTeX must not modify (in whatsoever ways) the .tex-source code of a document while "numbering code" can be subsumed under "modifying code". But you can "tell" LaTeX to number in the way ...


1

Here is a MWE which gives table tiles as A.number. This uses the caption package to add a custom label format called AppendixTables in the example below. If you want to change the title for all your appendix Tables it can be done by changing the A.#2 in the label format. #1 (not shown) would be the text from the \caption{} command in the table if you wanted ...


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