use Microsoft Word to edit an equation with underbrace. The line is as follows:
\underbrace(ab+cdf-edf=9dc/ereat+asdfdgg-asfeefe-eafdgahty+atataeaattrat)
The problem is the symbol for underbrace is very flat, looking like a line with the downward pointing part too small to see. Is there a way to make it larger (e.g., is there a way to stretch the underbrace VERTICALLY)? The size of underbrace is set automatically in Latex and looks fine. But in Microsoft Word, the default just does not look especially when you have a long equation. I am not sure if there is a setting allowing you to change it. Many thanks! Gene
Related
I don't know how to properly specify this question, but basically I would like to format a document like specified here : http://etd.lib.hku.hk/thesis-form/Theses%20Binding%20specification(ed%20January%202018)c.pdf
It's on the 3rd page of the PDF document. So I need to input a line at the exact distance from the top border, while another line occurs at some exact distance from the bottom.
Does MS Word give the flexibility to do this?
Thanks!
Someone points out this question is off-topic for this forum but just in case someone is here anyway: use multiple text boxes can be the solution.
A user can adjust a text box's relative position on a page and thus achieve the formatting needed.
I am trying this example:
http://www.mathworks.com/help/symbolic/latex.html
Let's say I wanted to resize those labels. How? I can't figure out any LaTeX code, and 'fontsize' does not do the trick.
This hits a sore spot when it comes to Matlab's support for (or use of) Latex. The normal font-size commands from Latex aren't available. (In Latex normally you'd just say \Large{Text ... $x$} or even \normalsize ....)
To do this in a Matlab plot you can add fontsize spec at the end
title(['For $x$ and ...'], 'Interpreter', 'latex', 'fontsize', 14)
For more discussion and how to change font type as well see this post. Note that there are not so many fonts readily available in Matlab. To preserve sanity I'd keep this kind of tweaking to the minimum.
There is another method that will work anywhere in Matlab where you can use Latex -- in any text, in the middle of a string, etc: You can drop to Latex's lower level font specification.
title(['\fontsize{15}{0}\selectfont For $x$ and ...'], 'Interpreter', 'latex')
The first command \fontsize{}{} specifies the font, the second one \selectfont actually changes it for the rest of the text. When you want to switch to a different font, even mid-string, you again issue \fontsize{12}{0}\selectfont and you have that font size after that point. The only thing you need to change is the size (I used 15 and 12 as examples), the rest is boilerplate (for this purpose).
See what these things mean and more discussion in this post. For far more detail on fonts in Matlab see this article. For how to change fonts across the whole document see this post.
There are yet other ways but it gets progressively trickier and this should be enough. Probably the best advice is to set it once for the whole document. That also makes sense typesetting-wise.
Note. The font command of the second example must be given outside of math mode. Latex has two major modes, text and math. To make it go to 'math mode', where it processes everything as it were math symbols, you put a $, or $$. (There are yet many other ways, but in Matlab's strings this is all you'll ever use.) When you want it to go back to typesetting text normally, you end math mode with another $, or $$. All math is in between $...$, everything else is normal text.
This is some text, now typeset some math: $y = x^2$ ... back to text.
The font commands do not work in math mode but need be given outside the $...$. They will apply to any following math as well. In a plot command we'd say
ylabel(['\fontsize{16}{0}\selectfont $\dot{x}$'], 'interpreter','latex');
Here is the line that worked:
ylabel('$x_e, x_c$', 'interpreter','latex', 'fontsize', 32);
Obviously, between the dollar signs can be whatever appropriate LaTeX expression desired.
If I export my matlab figure as an eps using:
print('myfig','-depsc')
I then open it in another software, in my case Illustrator CS6.
The text appears ok, but what should be a single text box, say a legend entry, is actually multiple text boxes arranged so that it looks like one.
In the image below, the black text is what it looks like first, but I have also shown a copy of the same text, with each text box a different color.
If I want to edit any of this its very difficult as the space will then be messed up. Also if I change the font, the kerning gets messed up.
I have also tried using the text command to place text on the axis, and this also ends up in multiple text boxes.
Is there any way to fix this?
Am I missing something?
Just to be clear, I would like to fix matlab's eps, Not use a different software.
Is there a way to set a custom word spacing in CoreText?
I have looked around the paragraph properties where I would have expected to see this but found nothing.
I don't have deep experience in this but AFAIK you cannot adjust the space between words. So my list of possible solutions would be:
Adjust the kern value, however this will also adjust the space between letter which may not be what you want.
Add extra spaces. Crude, but you can increase the space between words by replace a single space with two.
(Really advanced) start adjusting individual glyphs. The best example I have found for doing is here: http://invasivecode.tumblr.com/core-text about 2/3rds down the author shows how to access the individual glyphs and adjust their settings.
Below is the user interface I have created to simulate LDPC coding and decoding
The code sequence is decoded iteratively by passing values between the left and right nodes through the connections.
The first thing it would be good to add in order to improve visualization is to add arrows to the connections in the direction of passing values. The alternative is to draw a bigger arrow at the top of the connection showing the direction.
Another thing I would like to do is displaying the current mathematical operation below the connection (in this example c * H'). What I don't know how to do is displaying special characters and mathematical symbols and other kinds of text such as subscript and superscript in the figure (for example sum sign and subscript "T" instead of sign ="'" to indicate transposed matrix).
I would be very thankful if anyone could point to any useful resources for the questions above or show the solution.
Thank you.
To add arrows, you can either use the built-in QUIVER, or, for more options, ARROW from the file exchange. Both of these have to be plotted into axes, so if you want a big arrow on the top, you have to create an additional set of axes above the main axes.
As far as I know, you cannot use TeX or LaTeX symbols in text uicontrols. However, you can use them in axes labels. Thus, I suggest that you add an XLabel to the axes, for example
xlabel('\sigma c*H_T')
or (note the $-signs required for LaTeX)
xlabel('$\sum c*H_T$','interpreter','latex')
EDIT
I hadn't mentioned the use of text (as suggested by #gnovice and #YYC) because I thought it wasn't possible to place text outside of the axes. It turns out that I was wrong. text(0.5,-0.2,'\Sigma etc.') should work fine as well. I guess the only advantage of using 'xlabel' would be that you can easily add and position the axes label during GUI creation.
In regards to the 1st question, annotation (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/annotation.html) might be an alternative solution.
In regards to the 2nd question, try text property in Matlab Help.
Search "Character Sequence" for the special characters; search "Specifying Subscript and Superscript Characters" for the subscript and superscript.
For drawing the arrow, I would go Jonas' suggestion arrow.m by Erik Johnson on the MathWorks File Exchange. It's the easiest way I've found to create arrows in figures.
For creating text with symbols, you can use the function TEXT. It lets you place text at a given point in an axes, and you can use the 'tex' (default) or 'latex' options for the 'Interpreter' property to get access to different symbols. For example, this places the text you want at the point (0,0) using 'latex' as the interpreter:
hText = text(0,0,'$\sum c*H_T$','Interpreter','latex');
The variable hText is a handle to the text object created, which you can then use with the SET command to change the properties of the object (string, position, etc.).