math mode - Use Python to generate input to XeTeX

I am wondering what is a good way to use Python to generate an arithmetic worksheet consisting only of 2-digit numbers squared. Specifically I want to be able to call upon a Python program in which it asks me for parameters such as the range of the numbers in can call upon to square and the number of questions I want to generate. Once that is done the program will generate the numbers and then automatically open up a .tex file (already with preamble and customizations) and basically do a loop for each question like this:\begin{exer}n^2\end{exer...Read more

math mode - Typesetting numbers above, below, left, and right of a symbol - TeX

What commands would be the best way to put numbers above, below, left, and right of a symbol in math-mode, as in the following image:Would the tensor package be useful here, or possibly another package? Thank you.Edit:It looks like David's \mathop workaround works for display style, but not inline math mode. How would one fix it to work for inline, or perhaps use two different commands for inline and display mode?Secondly, how would I shrink the size of the numbers with respect to the central symbol?...Read more

using unicode-math with math keyboard or hotkeys? - TeX

Here is more information about the unicode math-package:http://ctan.mackichan.com/macros/latex/contrib/unicode-math/unicode-math.pdfA great pro for using unicode math, is that your code is much more readable. But typing all those symbols using alt+xxxx doesn't seem to be a very fast solution.I was thinking, in theory it could be possible to have a math keyboard ( i mean in hardware form), where you see all those math characters at your keyboard. Would be quite cool, but I have no idea if this already exist.On the other hand, just designing hotk...Read more

Math font changing and siunitx? - TeX

Consider this MWE:\documentclass{article}\usepackage[utf8]{inputenc}\usepackage[T2A, T1]{fontenc}\usepackage{amsmath}\usepackage{lmodern}\usepackage{siunitx}\usepackage{mathpazo}\usepackage{trace}% https://tex.stackexchange.com/questions/19255/using-declaremathversion% note: mathpazo.sty, lmodern.sty overrides normal, bold!%%% New math versions\DeclareMathVersion{lmnormal}\DeclareMathVersion{lmbold}\DeclareMathVersion{mpazonormal}\DeclareMathVersion{mpazobold}\newcommand\lmmath{\mathversion{lmnormal}}\newcommand\lmboldmath{\mathversion{lmbold}}...Read more

Changing font in math mode - TeX

I am very, very new to LaTeX, and I've been trying to understand fonts but as far as I can tell, it is too complicated for me at this point.All I really want to do, is change the amssymb version of \mathbb{R, N, C, etc.} for the kpfonts one. Can anyone help? Please keep in mind, that I'm a dumbo :)...Read more

amsthm - Theorem Environment, Text in math mode breaks out of margin - TeX

Could someone explain to me why some of the text in math mode breaks out of the margins?Edit: Sorry for the bad question formatting. Why is it that when I paste things it runs on like a single sentence?\documentclass[a4paper,12pt]{extarticle}\usepackage[utf8]{inputenc}\usepackage{amsthm}\usepackage{amsmath}\usepackage{amssymb}\newtheorem{manualtheoreminner}{Theorem}\newenvironment{manualtheorem}[1]{% \renewcommand\themanualtheoreminner{#1}% \manualtheoreminner}{\endmanualtheoreminner}\begin{document}\begin{manualtheorem}{2.3 (Dimension Theore...Read more

math mode - Have Right implication sign all the way to the left inside align environment - TeX

I want to add \Rightarrow into my align environment (or something similar) all the way to the left of a specific line. However whenever I try to do this I either get that the arrow sticks with the line or it pushes the rest of the line all the way to the right instead of the preferred behaviour.\documentclass{article}\usepackage{mathtools}\usepackage[utf8]{inputenc}\begin{document}\begin{align*}y &= mx+c \\\leftalign{\Rightarrow} \\y - c &= mx \\\leftalign{\Rightarrow}\\&\text{blah...blah...blah...}\end{align*}\end{document}...Read more

math mode - Mixing font sizes inside the same equation - TeX

I would like to use latex to produce math output like this:Please, no scolding about how this looks like a ransom note, makes your eyeballs bleed, etc. This is for didactic purposes in specific situations in teaching physics. The first one is meant to focus the student's eyes on the main physical relationship, so they're not distracted by the coupling constants. The second one (for students at a much lower mathematical level) is to express the idea that when a force is applied to a small mass, the result is a big acceleration.I've tried three m...Read more

math mode - Bracket for dual pair (in functional analysis) - TeX

In functional analysis, one occasionally considers a so-called dual pair (a pair of vector spaces tied together by a non-degenerate bilinear map to the ground field). I usually typeset these using \langle and \rangle, but it seems that all textbooks in functional analysis use a slightly different symbol for this. (See samples below.) The shape is very similar to \langle and \rangle, but the angle between the two legs is noticeably smaller. Consequently, the glyph is a bit wider.How do I reproduce this symbol in LaTeX?Samples:LaTeX with \langle ...Read more

tables - Vertically Centering Text/Numbers in Rows of Array using Math Mode - TeX

I am trying to center text in an array of two rows inside a math mode environment so that the text in the second column of the array appears half way between the first and second row of the first column. Here's an example of what I have done so far.\documentclass{article}\usepackage{amsmath}\begin{document} \[ A = \left[ \begin{array}{c|c} B & \\ a^{T} & b \\ \end{array} \right] \]\end{document}This is how I would like it to appear:Any help/suggestions on how to do this would be appreciated....Read more

equations - Set a minimum space above and below displayed math - TeX

NOTE: This question is specifically about adding vertical space that increases to compensate for tall symbols. Thus, it is not a duplicate of How can I change the whitespace above and below math displays?.I'm trying to revise my university's thesis class to produce spacing with displayed math that works a little bit better with double spacing (which is required). What I have in mind is this:The distance above and below a displayed math environment should be the same as the distance between the top of a typical line of text and the bottom of the...Read more