Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cref support for Chinese and Japanese #61

Closed
wants to merge 3 commits into from
Closed

feat: add cref support for Chinese and Japanese #61

wants to merge 3 commits into from

Conversation

NemoYuan2008
Copy link
Contributor

增加中文和日文的 cleveref 宏包支持。

写这些主要是自己将来需要,另一方面也就是练练手,可以酌情考虑要不要 merge 到项目里,如果没必要或者太麻烦就算了。

我写了一个简单的文档用来测试,没有动原本的测试文件:

\documentclass[lang=ja]{sjtuthesis}

\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{cleveref}


\begin{document}

\mainmatter
\chapter{Test}\label{chap1}


%%% TESTS START %%%
\cref{sec1}

\cref{sec1,sec2,sec3}

\cref{sec1,sec2,sec3,sec5}

\cref{sec1,sec2,sec3,sec5,sec6,sec7}

\cref{fig1,fig2,fig3}

\cref{fig1,fig2,tab1,tab3}

\cref{fig1,fig2,tab1,tab3,tab2}

\cref{thm1,prop1,axm1}
%%% TESTS END %%%


\section{Test}\label{sec1}
\section{Test}\label{sec2}
\section{Test}\label{sec3}
\section{Test}\label{sec4}
\section{Test}\label{sec5}
\section{Test}\label{sec6}
\section{Test}\label{sec7}

\begin{theorem}\label{thm1}
    Test
\end{theorem}

\begin{proposition}\label{prop1}
    Test
\end{proposition}

\begin{axiom}\label{axm1}
    Test
\end{axiom}

\begin{figure}[p]
    \caption{}\label{fig1}
\end{figure}

\begin{figure}[p]
    \caption{}\label{fig2}
\end{figure}

\begin{figure}[p]
    \caption{}\label{fig3}
\end{figure}

\begin{table}[p]
    \caption{}\label{tab1}
\end{table}

\begin{table}[p]
    \caption{}\label{tab2}
\end{table}

\begin{table}[p]
    \caption{}\label{tab3}
\end{table}


\end{document}

测试结果如图所示:

image

image

@AlexaraWu
Copy link
Collaborator

AlexaraWu commented Mar 25, 2024

没必要加到文档类里,不过却是不错的 cleveref 使用示例。

FYI: #35 (comment)

@AlexaraWu AlexaraWu closed this Mar 25, 2024
@NemoYuan2008
Copy link
Contributor Author

OK,如果有需要随时找我

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants