{"id":14980851,"url":"https://github.com/gfngfn/expandparams","last_synced_at":"2026-03-08T19:34:02.341Z","repository":{"id":21495971,"uuid":"24814889","full_name":"gfngfn/expandparams","owner":"gfngfn","description":"(La)TeX packages that makes you save the cost of writing thousands of \\expandafter.","archived":false,"fork":false,"pushed_at":"2014-10-17T09:32:34.000Z","size":416,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-16T03:50:10.509Z","etag":null,"topics":["latex","latex-package","tex"],"latest_commit_sha":null,"homepage":"","language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gfngfn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-05T12:05:41.000Z","updated_at":"2019-07-07T01:10:17.000Z","dependencies_parsed_at":"2022-08-21T16:21:04.933Z","dependency_job_id":null,"html_url":"https://github.com/gfngfn/expandparams","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2Fexpandparams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2Fexpandparams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2Fexpandparams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gfngfn%2Fexpandparams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gfngfn","download_url":"https://codeload.github.com/gfngfn/expandparams/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242049033,"owners_count":20063501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["latex","latex-package","tex"],"created_at":"2024-09-24T14:02:30.136Z","updated_at":"2026-03-08T19:34:02.311Z","avatar_url":"https://github.com/gfngfn.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"# expandparams\n\n`expandparams` is a (La)TeX package that controls the expansion of token list with ease.\nBy using the commands `\\expandparams` and `\\prexp` in this package\nyou can save the cost of writing thousands of `\\expandafter`. \nFor example, let `\\csone` and `\\cstwo` be defined by below:\n\n    \\makeatletter\n    \\def\\csone{GF}%\n    \\def\\cstwo{\\csone N}%\n    \\def\\separatetokens#1#2#3{%\n      \\@tfor\\ch:=#1\\do{[\\ch]}%\n      \\@tfor\\ch:=#2\\do{(\\ch)}%\n      \\@tfor\\ch:=#3\\do{\\{\\ch\\}%\n    }%\n\nHere, ordinary spec of `\\separatetokens` is like\n\n    \\separatetokens{AB}{PQRS}{XYZ}\\par\n      % =\u003e [A][B](P)(Q)(R)(S){X}{Y}{Z}\n    \\separatetokens{AB}{\\cstwo}{\\csone}\\par\n      % =\u003e [A][B](GFN){GF}\n\nHowever, sometimes we need to expand parameters before the main control sequence is expanded.\nWhen you want to expand `\\csone` once before `\\separatetokens` is expanded,\nyou can write\n\n    \\expandparams{\\separatetokens{AB}{\\cstwo}\\prexp{\\cstwo}}\\par\n      % =\u003e [A][B](GFN){G}{F}\n\ninstead of writing\n\n    \\expandafter\\separatetokens\n      \\expandafter{\\expandafter A\\expandafter B\\expandafter}%\n      \\expandafter{\\expandafter\\cstwo\\expandafter}%\n      \\expandafter{\\csone}\\par\n\nby using enormous `\\expandafter`s. Similarly, you can write\n\n    \\expandparams{\\separatetokens{AB}\\prexp{\\cstwo}\\prexp{\\csone}}\\par\n      % =\u003e [A][B](GF)(N){G}{F}\n\ninstead of\n\n    \\expandafter\\expandafter\\expandafter\\separatetokens\n      \\expandafter\\expandafter\\expandafter{%\n        \\expandafter\\expandafter\\expandafter A%\n        \\expandafter\\expandafter\\expandafter B%\n      \\expandafter\\expandafter\\expandafter}%\n      \\expandafter\\expandafter\\expandafter\n      {\\expandafter\\cstwo\\expandafter}\\expandafter{\\csone}\\par\n \nfor expanding both `\\csone` and `\\cstwo` once. And you can also write\n\n    \\expandparams{\\separatetokens{AB}\\prexp\\prexp{\\cstwo}{\\csone}}\\par\n      % =\u003e [A][B](G)(F)(N){GF}\n\ninstead of\n\n    \\expandafter\\expandafter\\expandafter\\separatetokens\n      \\expandafter\\expandafter\\expandafter{%\n      \t\\expandafter\\expandafter\\expandafter A%\n      \t\\expandafter\\expandafter\\expandafter B%\n      \\expandafter\\expandafter\\expandafter}%\n      \\expandafter\\expandafter\\expandafter{\\cstwo}{\\csone}\\par\n\nfor expanding `\\cstwo` *twice*.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfngfn%2Fexpandparams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgfngfn%2Fexpandparams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgfngfn%2Fexpandparams/lists"}