Italics in a string

11 visualizaciones (últimos 30 días)
Isaac Gruver
Isaac Gruver el 1 de Mayo de 2019
Respondida: Walter Roberson el 1 de Mayo de 2019
Hello,
I am attempting to create a GUI that will generate a citation for a source given the author, title, date of publication, etc. The title of a source is almost always italicized, and I can't figure out how to make part of a string appear in italics. I can change the settings for the textbox where the title is entered to italics, but not in the given citation itself.
Any help would be great.
  3 comentarios
Isaac Gruver
Isaac Gruver el 1 de Mayo de 2019
Citation Generator.pngMy intention is to have the user choose whether they want to create a single citation, or a bibliography. If they choose the single citation, it will come up in the citation edit field. If they choose a bibliography, then it will save to a file
Rik
Rik el 1 de Mayo de 2019
As far as I'm aware it is not possible to have a tex interpreter for uicontrol elements.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 1 de Mayo de 2019
Rik is mostly right: uicontrol('style', 'edit') and uicontrol('style', 'text') can only have character style (or color) affected for the entire control at one time, if you stick with supported methods.
uicontrol('style','edit') and uicontrol('style','text') have underlying java objects whose java handle can be found and manipulated.
There are some uicontrols such as style 'radio' for which the String property can start with '<html>' to have the rest of the string interpreted as HTML 1.1, such as '<html>Vinge, Verner, <i>A Fire on the Deep</i>'
text() elements can have Interpreter 'tex' or 'latex' properties, but text() elements must be within an axes. (annotation('text') creates a hidden axes to draw into.)
If you are creating a citation into a uicontrol style 'text' or 'edit', I wonder if the point is to create something that could be copied and pasted into a paper. If it is, then you would want to create something copyable that when pasted would cause the user's editor to create the appropriate result. That might be rather different content then the presentation layer. Potentially it might involve pushing something into the clipboard. You would probably want the opposite of clipboard('pastespecial')

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by