I have to state a few long numbers in a document. These aren't meant to be regarded as regular numbers but instead as data. So I don't want to format them with \num{&lt;...&gt;} but with \texttt{&lt;...&gt;} so they appear in typewriter font like code. They can't be approximated. The last digit of each one of these numbers is as important as the first one.  Unfortunately, when these numbers appear at the end of a line, they sometimes exceed the lengths of the surrounding lines by quite a margin.  Example:  \documentclass{article}  \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sit amet ornare eros. Vivamus ac bibendum sapien. Morbi efficitur iaculis elit et pellentesque. Maecenas fermentum augue non tortor rutrum, vel malesuada nunc venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer fringilla. Suspendisse ac scelerisque tortor \texttt{1937294810383219482}. Pellentesque at iaculis risus. Curabitur porta ante non nunc eleifend, sit amet porta enim congue. Nullam semper fringilla suscipit. Nam ac elementum eros. Vivamus sed quam fringilla, tristique odio a, pretium lacus. \end{document}     Can I tell LaTeX to just end the line early and continue in the next one?  As it's not a URL, I probably shouldn't put the numbers in \url{&lt;...&gt;}. This as a solution that pops up quite often when googling the problem. I can't use  either because these numbers can't be hyphenated. About half of them are actually negative numbers and I don't want the readers to be confused about how many numbers I mentioned and which of the digit blocks belong to the same number.
72786
Possible Duplicate:          I'm writing a report (in LaTeX) in cryptology and I have to work with very large numbers. I want those big numbers to be on multi-lines, I mean when I write my big number, and after compiling, LaTeX puts this big number on a single line, but we can only read the beginning of this number. How to print the big number on multi-lines automatically ? Is there a tag to use or something else? Thanks
117263
Currently the network has a very inconsistent track record when it comes to injecting thousands separators in numbers >= 4 digits. Sometimes on the same page there will be commas in one element and not in another.  The primary advantage to using thousands separators is that it makes a number easier to read, at least for me.  The primary disadvantage is that it makes them harder to read for folks who use different languages or locales, where commas are actually decimals, and thousands separators may be decimals, spaces or other characters (or not even an existent concept).  I've seen arguments that the SE network should use comma separators because "the site is American" or because "English is the language of the Internet." I am not quite obnoxious enough to say I agree with either of those statements. And as a Canadian living in the United States, where arguments about m/d/y vs. d/m/y, gallons vs. liters and miles vs. kilometers have plagued me my entire adult life, it would be fantastic to have some consensus about this and to see some consistency implemented across the network.  I understand that . But I still think it's a valuable discussion to have - should we force thousands separators, prevent them, or cater to the individual locale? The downsides to catering per language are (a) screen shots and other artifacts may still seem strange to users of different locales and (b) what if my computer is set to US-English but I would prefer not to see thousands separators? Perhaps the answer is to  instead of listing out the entire number in some places but not others - then the discussion about separators becomes moot.     PLEASE NOTE: This is not a bug report about the individual cases where the use of thousands separators is inconsistent. There are    , and if pluralization has taught us anything, it seems to be . I hope it is the intention for the localization efforts to push all number and other common formatting tasks through common functions to eliminate this chance for discrepancy.This post is an attempt to discuss what the policy should be, in general, not to discuss individual instances of this inconsistency.
26255
I am using lualatex, are there symbols for left and right limits, like small "-" and "+" to put above the numbers? For now I use   \documentclass[a4paper,12pt]{book} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{amsmath,empheq} \usepackage{mathtools} \usepackage{amscd} \usepackage{amsxtra} \usepackage{unicode-math}                   \begin{document} \[ \lim_{x \rightarrow 1^{+}} f(x) \]  \[ \lim_{x \rightarrow 1^{-}} f(x) \] \end{document}   which I feel is not right because the default "+" and "-" are operators and their size and spacing might not be the best for this use.
91690
I would like to write page numbers like this '7/9' in all minted environments of my document. The first number ('7') is the current page and the second number ('9') is the maximum number of page breaks the source file has been split into.  I was planning to use the package totcount but I realized that it was only considering the last value of the counter at the end of the document and it couldn't manage counters locally to an environment.  Here is a totally stupid example, but it illustrate the problem:  \documentclass{report}  \usepackage{totcount} \newtotcounter{sectnum}  \let\oldsection\section \renewcommand{\section}{%   \setcounter{sectnum}{0}%   \regtotcounter{sectnum}%   \oldsection% }  \let\oldsubsection\subsection \renewcommand{\subsection}{%   \stepcounter{sectnum}%   \oldsubsection% }  \begin{document}  \section*{One}  \subsection*{SectionOne} \thesectnum / \total{sectnum}  \subsection*{SectionTwo} \thesectnum / \total{sectnum}  \subsection*{SectionThree} \thesectnum / \total{sectnum}  \subsection*{SectionFour} \thesectnum / \total{sectnum}   \section*{Two}  \subsection*{SectionOne} \thesectnum / \total{sectnum}  \subsection*{SectionTwo} \thesectnum / \total{sectnum}  \end{document}   Gives:    Where we would have liked to have: '1/4', '2/4', '3/4', '4/4' and '1/2', '2/2'.  So, is there a way to get this kind of feature ?
9874
I would like to have \alph{counter} for values larger than 26. The following MnWE gives me the error ! LaTeX Error: Counter too large.  \documentclass{article} \begin{document}  \begin{enumerate} \def\theenumi{\alph{enumi}} \setcounter{enumi}{24} \item twenty-five \item twenty-six \item twenty-seven \end{enumerate}  \end{document}   I would like it to behave like one of these:  ..., x, y, z, aa, bb, cc, ..., xx, yy, zz, aaa, bbb, ccc, ... (preferred) ..., x, y, z, aa, ab, ac, ..., ax, ay, az, ba,  bb,  bc,  ... (can be if nothing else works)   A solution without LaTeX3 extensions would be awesome as I cannot run LaTeX3 extensions.
42362
I am using overleaf. When using the algorithm2e package, it gives me bold line numbers prefixed with a &quot;-&quot; symbol for each line. I want to have a line number in small fonts without the &quot;-&quot; symbol. An output pdf snapshot is attached with minimal working code. Thank you in advance. \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage[ruled,linesnumbered]{algorithm2e} \usepackage{graphicx} \begin{document}      \begin{algorithm}     \DontPrintSemicolon        % enter the algorithm environment     \caption{algorithm}               % give the algorithm a caption     \label{alg1}        %\begin{multicols}{2}                       % and a label for \ref{} commands      %\begin{algorithmic}[1]      \KwIn{         $a=\sum_{i=0}^{n-1} a_i\cdot2^i$,         $b=\sum_{i=0}^{n-1} b_i\cdot2^i$,         $m=\sum_{i=0}^{n-1} m_i\cdot2^i$}     \KwOut {$c = a \times b$ \text{mod} $m$}          $c \leftarrow 0, \quad reg_1 \leftarrow a$\;     $reg \leftarrow 2a$ mod $m \qquad \text {//     \scriptsize Pre-computed value //} $\;     %$N \leftarrow n+2 \quad \quad \quad \text{ //  \scriptsize append two 0's to left of MSB of y //}$\;     $N=      \begin{cases}     n+3,&amp; \text{ if $n \bmod 2 = 0,$ append two $0$ to the left of MSB of $b$} \\     n+2,&amp; \text{ if $n \bmod 2 = 1,$ append single $0$ to the left of MSB of $b$}     \end{cases}     $\;     $N \leftarrow N+1 \qquad  \text{ // \scriptsize append 0 to right of LSB of b //}$\;          \For {$(i=0; i \leq N-2; i \leftarrow i+2)$ }{         \Switch{$(b_{(i+2:i)})$}{             \textbf{when} $ 000 \mid 111 \Longrightarrow v\leftarrow 0$ \;             \textbf{when} $ 001 \mid 010 \mid 101 \mid 110 \Longrightarrow v\leftarrow reg_1$  \;             \textbf{else} $ \Longrightarrow  d\leftarrow reg_2$ \;         }         \tcp {following critical operations are executed concurrently //}         $reg_1 \leftarrow 4\times reg_1 \text{ modulo } m$\;          $reg_2 \leftarrow 4\times reg_2 \text{ modulo } m$\;          $v \leftarrow v \pm d \text{ modulo } m$\;     }     \Return{$v$}\;     %\end{multicols}     \end{algorithm} \end{document}
90825
I created a document in latex. The numbers of pages appears on pdf, but I printed the pdf and numbers don't appear.   Somebody can help me ?  Example of one of my pages:    my preamble code:  \documentclass[12pt,twoside,a4paper,openright]{report} \usepackage{color} \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} \usepackage[hidelinks]{hyperref} \usepackage[official]{eurosym} \usepackage{gensymb} \usepackage[lmargin=3.0cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm]{geometry} \usepackage{fancyhdr} \usepackage{graphicx} \graphicspath{  {fig/} } \usepackage{mathtools} \usepackage[round]{natbib} \usepackage{xr} \usepackage{siunitx} \usepackage{booktabs, multicol, multirow} \usepackage{pdflscape} \usepackage{emptypage} \usepackage{epstopdf} \usepackage{setspace} \usepackage{nomencl} \usepackage{tabularx} \usepackage{amsmath} \usepackage{booktabs} \usepackage{ragged2e} \usepackage{tikz} \usepackage{gensymb} \usepackage{chemformula}  \onehalfspace   \pagestyle{fancy} \fancyhead{} \fancyfoot{} \fancyfoot[RO,LE]{\thepage} \fancyhead[RO]{\slshape \rightmark} \fancyhead[LE]{\slshape \leftmark}  \begin{document} \pagenumbering{roman}  \tableofcontents \listoffigures \listoftables  \cleardoublepage \clearpage \pagenumbering{arabic}  \input{Intro}  \end{document}
3118
In     ... the number "5000" does not paste as such but instead as  5 0 U+200C U+200B 0 0   The HTML source looks like this:  perhaps the easiest would be &lt;code&gt;\edef\tmp{\everypar{\widowpenalty\the\widowpenalty\relax}}\tmp\widowpenalty=-50&amp;zwnj;&amp;#8203;00&lt;/code&gt; that may reset   Or (smaller snippet):  \widowpenalty=-50&amp;zwnj;&amp;#8203;00&lt;/code&gt; that   So in the HTML, we have extraneous &amp;zwnj; and &amp;#8203; in between the two middle digits of 5000.  Upon pasting and trying out this code, this first led to a mysterious compiler error. The same issue happened within a (now deleted) comment thread below ; there, these or similar two characters were inserted after the letter "r" within the string \ref ("\ref").  Note that not all browsers wrap the same way. The above screenshot was for Firefox 19.0.2, in which it breaks between \relax}} and \tmp, with 5000 insidiously left intact on the second line but with the two special characters remaining in the middle. So that is why this took me completely by surprise. Other browsers might indeed only break on the invisible Unicode characters, such as Chrome 25:    Or on a smaller screen with the mobile site, multiple line breaks might show, possibly still leaving the Unicode characters unused:
19281
Consider the following piece of Markdown code:  This is some regular text.      &gt;&gt;&gt; def factorial(n):     ...     return 1 if n &lt; 2 else n * factorial(n - 1)     ...   * This is a list item.      &gt;&gt;&gt; def factorial(n):     ...     return 1 if n &lt; 2 else n * factorial(n - 1)     ...    Notice that the second code block is preceded by a list item.   Why is the factorial code not properly formatted under these circumstances? To demonstrate the problem, I'll insert the Markdown code show above:    This is some regular text.  &gt;&gt;&gt; def factorial(n): ...     return 1 if n &lt; 2 else n * factorial(n - 1) ...     This is a list item                 def factorial(n):       ...     return 1 if n &lt; 2 else n * factorial(n - 1)       ...               This applies to numbered as well as unnumbered lists.
41203
\documentclass [12pt]{article} \oddsidemargin=0pt \topmargin=0pt \textwidth=6.5in \textheight=8.5in \begin{document} \begin{center} {\large\bf\LaTeX\ Example 6} \end{center} We can typeset array structures \begin{equation} \mathbf{A}\times \mathbf{B}=\left| \begin{array}{ccc} \mathbf{i} &amp; \mathbf{j}  &amp; \mathbf{k} \\      a_1  &amp;      a_2        &amp; a_3 \\       b_1  &amp;      b_2        &amp; b_3  \end{array}  \right| \end{equation} \begin{quote} \begin{verbatim} \begin{equation} \mathbf{A}\times \mathbf{B}=\left| \begin{array}{ccc} \mathbf{i} &amp; \mathbf{j}  &amp; \mathbf{k} \\  a_1  &amp;  a_2   &amp; a_3 \\  b_1  &amp;  b_2   &amp; b_3 \end{array} \right| \end{equation} \end{verbatim} \end{quote} Or \begin{equation} \mathbf{A}=\left( \begin{array}{ccc} a_{11} &amp; a_{12} &amp; \cdots &amp; a_{1n} \\ a_{21} &amp; a_{22} &amp; \cdots &amp;  a_{2n} \\ \vdots &amp; \vdots &amp; \ddots &amp; \vdots \\ a_{n1} &amp; a_{n2} &amp; \cdots &amp; a_{nn} \end{array} \right) \end{equation} \end{document}
64455
All is (typographically) fine with this MWE  \documentclass{scrbook} \begin{document}   \tableofcontents   \chapter{chapter}   \chapter{chapter} \end{document}     But as soon as I add \part to it the numbers are getting enddots:  \documentclass{scrbook} \begin{document}   \tableofcontents   \part{part}   \chapter{chapter}   \chapter{chapter} \end{document}     To get rid of the enddots one needs numbers=noenddot:  \documentclass[ numbers=noenddot ]{scrbook} \begin{document}   \tableofcontents   \part{part}   \chapter{chapter}   \chapter{chapter} \end{document}   What is the reason for putting dots to the numbers as soon as one has \part in the document?
35305
I use the listings package for code listings and I turned the line numbers on. But they appear left of the paragraph. I want them inside the paragraph. In the documentation it looks just right. Here is my code:  \documentclass[12pt,a4paper]{scrartcl} \usepackage{listings} \lstset{numbers=left} \begin{document} \section{Test} Test \begin{lstlisting}     test() \end{lstlisting} \end{document}
4521
When I compile my document in LaTeX, some formulas in the document in math mode, between $ $, go into the right margin area beyond all the text.  Is there a way to fix this aesthetic problem?
54132
I'm trying to add sample code to my document. It seems that the listing is left aligned with the margin, and the numbers go outside it. How should I align the number, instead of the code? Here is my latex code:  \documentclass[a4paper,10pt]{article} \usepackage[utf8x]{inputenc} \usepackage{listings}  %opening \title{} \author{}  \begin{document} Some dummy text. Some dummy text. Some dummy text. Some dummy text. \begin{figure} \begin{minipage}[b]{0.4\linewidth} \begin{lstlisting}[language=C, %frame=single, basicstyle=\footnotesize\ttfamily, numbers=left,stepnumber=1, morekeywords={assert} ] void test(int x, int y){   if(x &gt; 5){     x++;     if (x &lt; 3)        x--;     else        y = x;   }   assert (x &lt; 10 ); } \end{lstlisting} \caption{A simple example} \end{minipage}  %another minipage goes here  \end{figure}  \end{document}   Thank you.
43653
How can I keep track of a decimal number that indicates the current paragraph's place in a logical hierarchy and print it in the margin of each paragraph?  (To yield a numbering in the style of Tractatus Logico-Philosophicus).  \def\on{} \def\down{} \def\up{}  \on This is the first paragraph, paragraph number 1.  \on This is paragraph number 2.  \down This is paragraph number 2.1  \down 2 This is 2.101  \up This is 2.11  \down 2.111  \up 3 3  \bye   If \down is starred, begin with zero.  If \up is followed by an integer, it should take it as an argument, unless there is a newline between \up and the integer.  An indefinite number of decimals should be possible.  PS.  I apologize for changing the question after (2) answers have been given, but I realize I failed to appreciate a feature of Wittgenstein's numbering: the last decimal is never 0.  Therefore, \down &lt;n&gt; is better than \down*, as now demonstrated above.  I think the 0 is supposed to indicate an additional level of unimportance.
85536
I thought I was able to do something like this before, but I can't find my solution.  I would like to format my large numbers as follows:   12,504.3124 2359 3   I know I can use siunitx to partially set this up, but I'm not getting the results I want:  \documentclass{article} \usepackage{siunitx}  \newcommand\aenumA[1][4]{%%   \num[group-separator={,},        group-digits=integer,        ]}  \newcommand\aenumB[1][4]{%%   \num[group-digits=decimal,        ]}  \pagestyle{empty} \begin{document}    \aenumA{12504.312423593}    \aenumB{12504.312423593}  \end{document}   I would like a hybrid solution (commas in the integer part and spaces in the decimal).  I would actually also like to be able to group differently between the two: every three digits in the integer part, every four digits in the decimal part.  Is there a straight-forward way to do this with siunitx?  Or, do I need to split the number at the decimal and treat the two parts separately and then glue them back together?
39324
For documents with a lot of footnotes, particularly if some are short, it can be nice to have multiple on the same line, e.g.:        this is the first footnote 2. this is the second footnote 3. this   if the third footnote 4. finally, we begin to wrap around.      Rather than having it:        First footnote   Second footnote   Etc.      Is there a way to achieve this in LaTeX?  (This is not a duplicate of  because I'm asking about regular full page environment.)