Skip to end of banner
Go to start of banner

How to find all spaces and pages which use Latex Math macros

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

  • This article applies to the Data Center version of the app

This article helps you find all the spaces and pages where the Latex Math for Confluence macros are added to your Confluence instance hosted on the Data Center.

Instructions

  • Log in as Confluence Administrator and navigate to Cogwheel > General configuration > Administration > Macro Usage:

screenshot-1 (1).pngscreenshot-2 (1).png
  • Under All macros, look out for the App name Latex Math:

2024-05-22_19-51-31.png

Usage information using SQL queries

Use the following query to get the macro-level usage information. If the query returns any records, the output includes the Space Key, Space name, Title of the relevant pages.

SELECT DISTINCT SPACES.SPACEKEY, SPACES.SPACENAME, CONTENT.Title, BODYCONTENT.body FROM BODYCONTENT
JOIN CONTENT ON BODYCONTENT.CONTENTID = CONTENT.CONTENTID
JOIN SPACES ON CONTENT.SPACEID = SPACES.SPACEID
WHERE BODYCONTENT.BODY like '%<ac:structured-macro ac:name="mathblock"%'
 OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="mathblock-ref"%'
OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="mathinline"%'
OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="mathblock-table"%'
OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="unit"%'
OR BODYCONTENT.BODY LIKE '%<ac:structured-macro ac:name="latex"%'


Results:

2024-05-22_19-55-17.png

It is recommended to: 

  • Test the above queries in a test environment. The time taken to get the results is based on the number of pages where the macro is used.

  • Run the query during off-business hours to reduce any impact caused by the query's run time.

  • Queries have to be adjusted with syntax in databases. 

  • No labels