Home > Net >  Add a line break in the label of customUI.xml
Add a line break in the label of customUI.xml

Time:11-07

I would like the button of Add/Edit Citation to show as

Add/Edit

Citation

instead of

Add/Edit Citation

in the ribbon of Word

the file is an xml file,

<?xml version="1.0"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>
      <tab id="ZoteroTab" getLabel="ZoteroRibbon.ZoteroTabLabel" insertBeforeMso="TabAddIns">
        <group id="ZoteroGroup" image="zoteroz16" label="Zotero">
          <button id="InsertZoteroCitationButton" label="Add/Edit Citation" size="large" image="addEditZoteroCitation" onAction="ZoteroRibbon.ZoteroRibbonAddEditCitation" supertip="Insert a new citation, or edit the citation at the current cursor position"/>
          <button id="InsertZoteroNoteButton" label="Add Note" size="large" image="addZoteroNote" onAction="ZoteroRibbon.ZoteroRibbonAddNote" supertip="Insert a new note at the current cursor position"/>
          <button id="InsertZoteroBibliographyButton" label="Add/Edit Bibliography" size="large" image="addEditZoteroBibliography" onAction="ZoteroRibbon.ZoteroRibbonAddEditBibliography" supertip="Insert a new bibliography, or edit the existing bibliography, at the current cursor position"/>
          <button id="ZoteroSetDocPrefs" label="Document Preferences" image="setZoteroDocPrefs-small" onAction="ZoteroRibbon.ZoteroRibbonSetDocPrefs" supertip="Change the citation style or locale"/>
          <button id="RefreshZotero" label="Refresh" image="RefreshZotero" onAction="ZoteroRibbon.ZoteroRibbonRefresh" supertip="Update all citations to reflect changes"/>
          <button id="ZoteroRemoveCodes" label="Unlink Citations" image="ZoteroRemoveCodes" onAction="ZoteroRibbon.ZoteroRibbonRemoveCodes" supertip="Remove all Zotero field codes and unlink from Zotero library"/>
          <!-- <button id="InsertZoteroCitationButtonSmall" visible="false" label="Add/Edit Citation" image="addEditZoteroCitation-small" onAction="ZoteroRibbon.ZoteroRibbonAddEditCitation" supertip="Insert a new citation, or edit the citation at the current cursor position"/>
        <button id="InsertZoteroBibliographyButtonSmall" visible="false" label="Add/Edit Bibliography" size="large" image="addEditZoteroBibliography-small" onAction="ZoteroRibbon.ZoteroRibbonAddEditBibliography" supertip="Insert a new bibliography, or edit the existing bibliography, at the current cursor position"/>
          <button id="ZoteroSetDocPrefsLarge" visible="false" label="Document Preferences" size="large" image="setZoteroDocPrefs" onAction="ZoteroRibbon.ZoteroRibbonSetDocPrefs" supertip="Change the citation style or locale"/> -->
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

I noticed this thread Line Break in XML?, and &lt;br&gt; \n, \n\n were tested, and it didn't work.

Any ideas, many thanks.

CodePudding user response:

To add a line break in the button's label, use &#13; eg label="One&#13;Two"

  • Related