/
How to find the spaces or pages that use the LaTeX Math macros?

How to find the spaces or pages that use the LaTeX Math macros?

This article applies only to the Data Center version of the LaTeX Math 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

  1. Log in as Confluence administrator and click the Gear icon > General configuration > Administration > Macro Usage:

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

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, and 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

It is recommended to: 

  • Test the above queries in a test environment. The time 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.

  • Query syntax has to be adjusted depending on the database used. 

 

Related content

How do I provide useful data for performance issue analysis?
How do I provide useful data for performance issue analysis?
Read with this
How to get the app usage of LaTeX Math macros through REST API on Confluence cloud
How to get the app usage of LaTeX Math macros through REST API on Confluence cloud
More like this
How to get the app usage details for Space tree for Confluence
How to get the app usage details for Space tree for Confluence
More like this
FAQs on Confluence server to cloud migration
FAQs on Confluence server to cloud migration
Read with this
How to find all pages that use SQL for Confluence (Pro Edition) macros via database
How to find all pages that use SQL for Confluence (Pro Edition) macros via database
More like this