Tag Info

Hot answers tagged

19

In version 10.1, I've built something like Spelunk into GeneralUtilities`. To use it, run Needs["GeneralUtilities`"] PrintDefinitions[symbol]; This will pop up a window that shows all definitions of symbol. Here is a short summary of features: The window shows code cells containing all DownValues, OwnValues, UpValues, SubValues, and Attributes of a ...


5

Something like this?: expr = -t^Range[0, 5] // Total toΣ[expr_Plus] := Block[{n}, HoldForm[Sum[#, {n, #2}]] & @@ {FindSequenceFunction[List @@ expr, n], Length@expr}] toΣ@expr If you want to manually set the initial index: toΣ[expr_Plus, init_Integer: 1] := Block[{n, l = Length@expr}, HoldForm[Sum[#, {n, init, #2}]] & @@ ...


5

Unfortunately, the Mathematica's Copy As > LaTeX command is not (as you'd expect) a command that copies the selected expressions as LaTeX. Instead, it performs additional reformatting that can only be avoided by changing behavior of the relevant built-in function with: System`FEDump`CopyAsTeXMakeBoxes = #& Details Why copied boxes are reformatted ...


3

I think we can just use basic pattern matching: (* Freshman's dream... ahhhhh *) FrobeniusFactor[expr_] := expr //. x_^e1_ + y_^e2_ :> With[{g = PolynomialGCD[e1, e2]}, ( (x^Cancel[e1/g] + y^Cancel[e2/g])^g ) /; g =!= 1 ] FrobeniusFactor[x^a + y^a] (x + y)^a FrobeniusFactor[f[x]^2 + f[y]^4] (f[x] + f[y]^2)^2


3

As suggested i post my commend as an answer: I made a bugreport on this (March 27) and got an answer from WRI 3 days later that says: In this case, Mathematica is behaving as designed. In particular, the StyleNames item does not apply to the cells you are looking at. Further, StyleNames is an undocumented symbol, meaning that it's usage can change without ...


2

You can use UnderBar instead of Style[...,Underlined]: Hyperlink[UnderBar[#], #] &@ "http://www.wolfram.com/Sine.html" Note: The issue you observe is mentioned in the docs Underlined >> Possible Issues: Underlined will recursively affect all elements of an expression


2

InputForm[ ToString@StringForm["SomeText=`` as well as OtherText=``.", "textA", "textB"]] "SomeText=textA as well as OtherText=textB." If you have version 10 you might want to try StringTemplate StringTemplate["SomeText=`` as well as OtherText=``."]["textA", "textB"] "SomeText=textA as well as OtherText=textB."


1

This is not as versatile as Chip's method but it might be sufficient: rule = {x_^a_ + y_^b_ /; Divisible[a, b] :> (x^(a/b) + y)^b}; {q^3 + r^3, f[x]^2 + f[y]^4} /. rule {(q + r)^3, (f[x] + f[y]^2)^2}


1

data = Transpose@{DateRange[Today, DatePlus[{9, "Week"}], "Week"], RandomReal[{25.5, 50.8}, 10]}; Using ToString avoids the problem: DateListPlot[ Function[{pair}, Tooltip[pair, ToString[NumberForm[pair[[2]], {3, 1}]]]] /@ data, Joined -> False, Filling -> Axis] Or, more compactly: DateListPlot[Tooltip[#, ToString[NumberForm[#[[2]], {3, ...


1

It is not really an answer, but if you select this expression and go to Menu/Evaluation/EvaluateInPlace you will repair your formula. May be this helps. You might also want to define a simple function to apply it to each your expression to prevent any its unwanted reformatting. like this, for example: rE[expr_] := Rasterize[Evaluate[expr] // ...


1

Within a Text Cell you can use ParagraphIndent. A negative value will produce a hanging paragraph. A stylesheet entry: Cell[StyleData["Text"], ParagraphIndent -> -50 ] The result: See also LineIndent.



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