How to render Styled text and/or Math formula written in text in Firestore database to App UI in Jetpack Compose?

this below is my code which is fetching data from firestore and i want some text or sentence to be bold or italic or underlined along with if there is math formula written in text in firestore i would like it to be also rendered in the app UI or if any images present also to be rendered.

I tried but could include all three of them to render and i were only able to do text styling and not the math formula rendering.

@Composable
fun QuestionCard(questionText: String) {
    Card(
        modifier = Modifier
            .padding(8.dp)
            .fillMaxWidth(),
        colors = CardDefaults.cardColors(containerColor = Color.Transparent)
    ) {
        Text(
            text = questionText,
            style = MaterialTheme.typography.headlineSmall,
            fontWeight = Bold,
            fontSize = 18.sp,
            modifier = Modifier.padding(16.dp)
        )
    }
}

// Option card with feedback colors
@Composable
fun OptionCard(
    optionText: String,
    isSelected: Boolean,
    isCorrect: Boolean,
    showCorrectAnswer: Boolean,
    disabled: Boolean,
    onSelect: () -> Unit
) {
    val backgroundColor = when {
        isSelected && isCorrect -> AppColors.OptionGreen
        isSelected && !isCorrect -> AppColors.OptionRed
        showCorrectAnswer && isCorrect -> AppColors.OptionGreen
        else -> Color.White
    }
    val radioColors = RadioButtonDefaults.colors(disabledSelectedColor = MaterialTheme.colorScheme.primary)

    Card(
        modifier = Modifier
            .padding(4.dp)
            .fillMaxWidth()
            .clickable(enabled = !disabled) { onSelect() },
        colors = CardDefaults.cardColors(containerColor = backgroundColor),
        elevation = CardDefaults.cardElevation(5.dp)
    ) {
        Box(
            modifier = Modifier
                .padding(12.dp)
                .fillMaxWidth(),
            contentAlignment = Alignment.CenterStart // Align content to the start
        ) {
            Row(
                verticalAlignment = Alignment.CenterVertically,
                modifier = Modifier.fillMaxWidth()
            ) {
                RadioButton(
                    selected = isSelected,
                    onClick = onSelect,
                    enabled = !disabled,
                    colors = radioColors,
                    modifier = Modifier.padding(start = if (isSelected || (showCorrectAnswer && isCorrect)) 16.dp else 16.dp)
                )

                Spacer(modifier = Modifier.width(8.dp))

                Text(
                    text = optionText,
                    style = MaterialTheme.typography.bodyLarge,
                    modifier = Modifier.weight(1f),
                    maxLines = Int.MAX_VALUE
                )
            }

            // Show Check/Close icon on top
            if (isSelected || (showCorrectAnswer && isCorrect)) {
                val icon = if (isCorrect) Icons.Default.Check else Icons.Default.Close
                val iconColor = if (isCorrect) AppColors.CorrectGreen else AppColors.IncorrectRed
                Icon(
                    imageVector = icon,
                    contentDescription = null,
                    tint = iconColor,
                    modifier = Modifier.size(24.dp).padding(start = 4.dp)
                )
            }
        }
    }
}
@Composable
fun ExplanationButton(
    explanation: String,
    showExplanation: Boolean,
    onToggleExplanation: () -> Unit,
    currentQuestionState: MCQViewModel.QuestionState
) {
    if (currentQuestionState.hasAnswered) {
        Button(
            onClick = onToggleExplanation,
            modifier = Modifier.padding(8.dp),
            enabled = currentQuestionState.hasAnswered
        ) {
            Text("Explanation")
        }

        if (showExplanation) {
            Text(
                text = explanation,
                modifier = Modifier.padding(12.dp)
            )
        }
    }
}

i was expecting to see when the styled text or math formula are in between the sentences of lets say questionText field in firestore in text but when i tried i would only show the styled word like a word in italic while all the remaining normal text did not show

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật