How to cite a gazette
The document URL plus a hash is the highlight API. No extra request. This page is only how to link and highlight. It is not legal advice.
English pages are the team’s translation. The PDF linked on the document page is the official text.
Machine-readable spec (JSON) · /law/citation.json
Hash grammar
#s-{n} | #c-{n} | #q={encodeURIComponent(snippet)} | #s-{n}&q={encodeURIComponent(snippet)} | #:~:text={encoded snippet}Put the hash on a document page: /law/documents/{sourceId} in English, /th/law/documents/{sourceId} in Thai. Digits may be Arabic (46) or Thai (๔๖).
Section / มาตรา
#s-{n} scrolls to that section and paints it yellow.
Clause / ข้อ
#c-{n} scrolls to that clause and paints it yellow.
Quote
#q={encodeURIComponent(snippet)} finds that exact string in the rendered document and paints the same yellow marker. A short unique prefix of about 20–80 characters is enough. If the snippet is missing, nothing else is highlighted. #:~:text={encoded snippet} is also accepted; prefer #q= so the language toggle can keep the quote.
Section plus quote
If both are present, for example #s-46&q=…, highlight the quote inside that section when it is found. Otherwise highlight the section. The language toggle keeps the full hash, including the quote.
Copy-paste examples
- #s-46 · https://card.weed.th/law/documents/ttm#s-46
- #c-4 · https://card.weed.th/law/documents/herb25#c-4
- #q= · https://card.weed.th/law/documents/ttm#q=No%20person%20may%20study%20or%20export%20a%20controlled%20herb
- #s-46&q= · https://card.weed.th/law/documents/ttm#s-46&q=No%20person%20may%20study%20or%20export%20a%20controlled%20herb
- #:~:text= · https://card.weed.th/law/documents/ttm#:~:text=No%20person%20may%20study%20or%20export%20a%20controlled%20herb
- /th/…#s-46 · https://card.weed.th/th/law/documents/ttm#s-46
Law-article footnotes that name a section already use #s- or #c- on the document link.
