latex: why the \sum Symbol will disappear? - sum

I am really confused why the \sum symbol will be disappeared after a few times of compiling. It was normally displayed previously, but now it appears as the following:
where the denominator in this equation is a sum from i-1 to n of AIan
My current packages used are as followings:
\usepackage{booktabs} % For formal tables
\usepackage{amssymb}
%\usepackage{amsmath,amsfonts,amssymb,amsxtra}
\usepackage[ruled]{algorithm2e} % For algorithms
\usepackage{verbatim} % For comment
\usepackage{multirow}
\usepackage{threeparttable}
\usepackage{color}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[utf8]{inputenc}
%\usepackage[ngerman]{babel}
\usepackage{graphicx}
\usepackage{subfigure}
\usepackage{amsmath}
Could anyone help me fix this problem? I have tried many different solutions, but the sum symbol still could not be displayed normally.

Related

Latex font in scrbook class and bad printed result

I have written a book using latex class scrbook and have found that the printed text in the proofs is not very easy to read, characters are thin and somewhat small. I would like advice on a more readable font that I could use.
Here goes my latex preamble:
\documentclass[
a5paper,
pagesize,
10pt,
bibliography=totoc,% <-- changed
numbers=noenddot, % <-- changed
headings=normal, % <-- changed
%DIV=9,
twoside=false,
%parskip=half,
]{scrbook}
In a previous work I have used the memoir class, with better results in the printed work:
\documentclass[9pt,openany]{memoir}
\usepackage[osf]{mathpazo}
\usepackage[mathcal,mathbf]{euler}
\usepackage{amsmath,amssymb,amsthm}
\usepackage[utf8]{inputenc}
\usepackage{graphicx,sidecap,tikz}
\usepackage[portuguese]{babel}
\usepackage{csquotes}
\usepackage{url}
\usepackage{siunitx} % automatic number formatting, decimal point alignment
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[backend=biber,style=authoryear,natbib=true]{biblatex}
\addbibresource{sample.bib}

Latex escaping in MatPlotlib

There are a number of situations where it is useful to set matplotlib.rcParams['text.usetex'] = True. In this case, special LaTeX characters such as % have to be escaped in places like axis labels. Is there a function built in to matplotlib for escaping LaTeX symbols?
There is a hint of such a thing in the docs here and here, but no clear mention.
The specific problem I am trying to tackle is using a matplotlib.ticker.PercentFormatter, where a custom symbol (symbol=r'\%') must be used if rcParams['text.usetex'] is true. I am trying to add a PR that will escape the percent symbol in PercentFormatter if rcParams['text.usetex'] is enabled, but it does not make sense to only check for the percent symbol in that case, so I would like to escape the entire symbol string.

Making the PDF format readable and diff-able

I am wondering if anyone have thought of a way to display the PDF document format in a more human readable form?
Now, to compare PDF files, or see exactly what have changed between to versions is very difficult. Many changes aren't visible to the naked eye since they are not a part of the graphical representation(as "created when", and similar).
So if a PDF is a result of an integration test, it is difficult to find the problem without a hex-editor. Also, it is difficult to disregard "created when" in the comparison.
I am not talking any interpretation and displaying, just converting the basic object types to some meta-language. For simplicity's sake, let's say XML. And name nodes like they are named in the PDF specification.
There are PDF-parsers available for most programming languages. Still, at least I, can't find anyone that have gone the distance to convert it to something readable.
Or have I missed it?
Edit:
To clarify(example from specification):
BI % Begin inline image object
/W 17 % Width in samples
/H 17 % Height in samples
/CS /RGB % Color space
/BPC 8 % Bits per component
/F [ /A85 /LZW ] % Filters
Would become:
<BI>
<W>17</W>
<H>17</H>
<CS><RGB/></CS>
<BPC>8</BPC>
<F>
<item>A85</item>
<item>LZW</item>
</F>
</BI>
..and so on.
Binary data could either be extracted to a file or just show a hash or size.

Outlier in the Alpha_Shapes_2 CGAL demo

I started using CGAL for a project, and I wanted to test alpha shapes with the alpha shapes 2 demo, furnished with CGAL. My input file has been correctly formatted (cf http://pastelink.me/dl/c83d1b warning 22087 lines), but I still have an outlier (cf http://bit.ly/YYZjtp). Is it due to a bug in the demo or too much points on the input ?
The file format is not the correct one, it should be:
x1 y1
...
xn yn
Simplices in the Alpha-complex will be displayed in light blue.
You should remove the first line that indicates the number of points, because the "open()" function of the demo just read points until end-of-file. The file formats in CGAL are not consistent at all. I fell guilty: as a developer myself, I made my own file formats without trying to unify with others. We all did that. :-(

reading unformatted data, intel ifort vs Ibm xlf

I'm trying to shift from intel ifort to IBM xlf, but when reading "unformatted output data"(unformatted I mean they are not the same length), there is problem. Here is an example:
program main
implicit none
real(8) a,b
open(unit=10,file='1.txt')
read (10,*) a
read (10,*) b
write(*,'(E20.14E2)'),a,b
close(10)
end program
1.txt:
0.10640229631236
8.5122792850319D-02
using ifort I get output:
0.10640229631236E+00
0.85122792850319E-01
using xlf I get output:
' in the input file. The program will recover by assuming a zero in its place.e invalid digit '
0.10640229631236E+00
0.85122792850319E-01
Since the data in the 1.txt is unformatted, I can't use a fixed format to read the data. Dose anyone know how to solve this warning?
(Question answered in the comments. See Question with no answers, but issue solved in the comments (or extended in chat) )
#M.S.B wrote:
Is there an apostrophe in the input file? Or any character besides digits, decimal point and "D"? Your reads are "list directed".
The OP Wrote:
Yes it seems to have some character after 0.10640229631236 that costs this warning. When I write those numbers to a new file by hand(change line after 0.10640229631236 by the enter key), this warning goes away. I cat -v these two files: With the warning file I get 0.10640229631236^M 8.5122792850319D-02 while the no warning files I get 0.10640229631236 8.5122792850319D-02 Do you know what that M stands for and where it comes from?
#agentp gave the link:
'^M' character at end of lines
Which explains that ^M is the windows character for carriage return