# Tag Info

20

\documentclass{article} \newcommand{\nthprime}[1]{% \ifcase #1\relax \or 2\or 3\or 5\or 7\or 11\or 13\or 17\or 19\or 23\or 29\or 31\or 37\or 41\or 43\or 47\or 53\or 59\or 61\or 67\or 71\or 73\or 79\or 83\or 89\or 97\or 101\or 103\or 107\or 109\or 113\or 127\or 131\or 137\or 139\or 149\or 151\or 157\or 163\or 167\or 173\or 179\or 181\or ...

18

Today I have already answered a similar code-golf question "Output the first 200 primes using TeX". My answer needs 176 bytes to print the first 200 prime numbers with plain TeX. I have ungolfed the code and adapted it to LaTeX. As interface \primenumber/\primecounter are added as equivalents to \@alph/\alph. Internally the prime numbers are stored in ...

7

You can find a precompiled list of 10000 prime numbers, so there's no need to compute them. \documentclass{article} \usepackage{xparse} \ExplSyntaxOn \DeclareExpandableDocumentCommand{\PRIME}{m} { \seq_item:Nn \g_prime_list_seq { \int_use:c { c@#1 } } } \seq_new:N \g_prime_list_seq \group_begin: \char_set_catcode_space:n {`\ } \seq_gset_split:Nnn ...

7

Those headers and footers are set up by the mathexam package. If you want to remove the header and footer, add nohdr as an option to the package, i.e. write \usepackage[nohdr]{mathexam} instead of \usepackage{mathexam} If you just want to remove the page numbers and the footer, you can use the features from fancyhdr, which is the package used by ...

4

To achieve what you want, remove the line \pagestyle{myheadings} and put \pagestyle{empty} We will use the package eso-pic and its \AddToShipoutPicture macro to position the page number in the right place. That is, add the following lines in your preamble: \usepackage{eso-pic} \AddToShipoutPicture{% \AtPageUpperLeft{% ...

4


3

3

The number of the current frame is contained in the counter framenumber which is output by the command \theframenumber Unless you don't want to write wrapper code for frames with arabic, alph or roman 'numbering', you have to redefine the \theframenumber command each time you want to have a specific numbering. ...

3

For first, remove \pagestyle{plain} and put \pagestyle{empty} For other two, use eso-pic and use the following: \newcommand\Header{% %%%<---- % added at end \begin{tikzpicture}[remember picture, overlay] \node[anchor=north, inner sep=0pt, outer sep=0pt] (header) at (current page.north) {\headergraphics}; \node[anchor=north west, inner ...

2

First of all, \pagenumbering resets the page counter to 1, so don't use it if you don't want it reset. Instead just change the numbering representation using something like \renewcommand{\thepage}{\roman{page}} Now, I notice you're using the sphinxmanual document class. Looking at the code, we see a redefinition of \tableofcontents that includes a ...

1

I am not sure why you would want to do this but the following code will prevent numbers being printed for the front matter and will make the numbering start at 1 with the first chapter. Note that killing numbering altogether results in warnings because I guess tufte loads hyperref which wants unique page identifiers. So just not printing them and giving them ...

1

With background package and tikz \documentclass[12pt, a4paper]{report} \usepackage{background} \usetikzlibrary{calc} \backgroundsetup{ angle=0, scale=1, opacity=1, color=black, contents={% \begin{tikzpicture}[remember picture, overlay] \node[anchor=north east,inner sep=0pt] at (\$(current page.north east) + ...

1


1

Somehow, your text height parameters are in effect at the wrong time, so that LaTeX believes that the third page is much longer than it is. The page number is there, it's just way below the physical page (as you also observed with the text.) You can fix this by putting the macros inside the landscape environment. In order for the change in page size to take ...

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