{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2674","repository_url":"https://api.github.com/repos/sphinx-doc/sphinx","labels_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2674/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2674/comments","events_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2674/events","html_url":"https://github.com/sphinx-doc/sphinx/issues/2674","id":159902102,"number":2674,"title":"Feature request: Adjustable colour/thickness of border/rule in latex admonitions","user":{"login":"paulanthonyjacobs","id":12054648,"avatar_url":"https://avatars.githubusercontent.com/u/12054648?v=3","gravatar_id":"","url":"https://api.github.com/users/paulanthonyjacobs","html_url":"https://github.com/paulanthonyjacobs","followers_url":"https://api.github.com/users/paulanthonyjacobs/followers","following_url":"https://api.github.com/users/paulanthonyjacobs/following{/other_user}","gists_url":"https://api.github.com/users/paulanthonyjacobs/gists{/gist_id}","starred_url":"https://api.github.com/users/paulanthonyjacobs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulanthonyjacobs/subscriptions","organizations_url":"https://api.github.com/users/paulanthonyjacobs/orgs","repos_url":"https://api.github.com/users/paulanthonyjacobs/repos","events_url":"https://api.github.com/users/paulanthonyjacobs/events{/privacy}","received_events_url":"https://api.github.com/users/paulanthonyjacobs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/sphinx/labels/latex","name":"latex","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-13T08:57:42Z","updated_at":"2016-06-13T18:07:12Z","closed_at":null,"body":"Referring to sphinx.sty, and the `lightbox` and `heavybox` commands that determine the style of latex admonitions.\r\n**This feature request:**\r\n- Add colour and rule thickness arguments to the lightbox command.\r\n- Add colour and box border thickness arguments to the heavybox command.\r\n\r\nThe defaults will keep the current stylings (black and 0.5pt rules/box).\r\nThis will allow these commands to be renewcommand'd (I guess) elsewhere, overriding the arg values to create a better visual distinction between the different types of admonition in the resulting PDF.\r\nCheers"},"comment":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/comments/225661507","html_url":"https://github.com/sphinx-doc/sphinx/issues/2674#issuecomment-225661507","issue_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/2674","id":225661507,"user":{"login":"jfbu","id":2589111,"avatar_url":"https://avatars.githubusercontent.com/u/2589111?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbu","html_url":"https://github.com/jfbu","followers_url":"https://api.github.com/users/jfbu/followers","following_url":"https://api.github.com/users/jfbu/following{/other_user}","gists_url":"https://api.github.com/users/jfbu/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbu/subscriptions","organizations_url":"https://api.github.com/users/jfbu/orgs","repos_url":"https://api.github.com/users/jfbu/repos","events_url":"https://api.github.com/users/jfbu/events{/privacy}","received_events_url":"https://api.github.com/users/jfbu/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T18:07:12Z","updated_at":"2016-06-13T18:07:12Z","body":"I have given it a start at https://github.com/jfbu/sphinx/tree/jfbu_customizablenoticeborders which is on top of current master branch of main repo.\r\n\r\nIt answers your feature request but doing it I realized it probably should be better to customize separately say warning and caution directives, or hint and note for the \"light\" admonitions. This is feasible. As usual I have had some problems in choosing appropriate LaTeX names for lengths or for colors.\r\n\r\nThen one will probably want also one shot customization via options to the directive, but this is more out of my domain.\r\n\r\nWith this source\r\n\r\n```rst\r\nHello\r\n=====\r\n\r\n\r\nSection\r\n-------\r\n\r\n.. warning::\r\n\r\n   Attention!\r\n\r\n\r\n\r\n.. raw:: latex\r\n\r\n   \\setlength{\\sphinxWarningBorderThickness}{3pt}\r\n   \\definecolor{sphinxWarningBorderColor}{rgb}{1,0,0}\r\n   \\definecolor{sphinxWarningBackgroundColor}{rgb}{0,0.9,0.9}\r\n\r\n.. warning::\r\n\r\n   Attention!\r\n\r\n\r\n.. raw:: latex\r\n\r\n   \\setlength{\\sphinxNoteRuleThickness}{3pt}\r\n   \\definecolor{sphinxNoteRuleColor}{rgb}{0,1,0}\r\n\r\nA paragraph\r\n\r\n.. hint::\r\n\r\n   Use ``'preamble'`` key to set the lengths and colors for the whole document.\r\n\r\n.. raw:: latex\r\n\r\n   \\setlength{\\sphinxNoteRuleThickness}{6pt}\r\n   \\definecolor{sphinxNoteRuleColor}{rgb}{0,0,1}\r\n\r\nA paragraph\r\n\r\n.. note::\r\n\r\n   up to some extent thickness of light notices does not affect vertical\r\n   distances between text lines.\r\n\r\n.. raw:: latex\r\n\r\n   \\setlength{\\sphinxNoteRuleThickness}{10pt}\r\n   \\definecolor{sphinxNoteRuleColor}{rgb}{0,1,0}\r\n   \\setlength{\\sphinxWarningBorderThickness}{5pt}\r\n   \\definecolor{sphinxWarningBackgroundColor}{named}{yellow}\r\n   \\definecolor{sphinxWarningBorderColor}{named}{magenta}\r\n\r\nA paragraph\r\n\r\n.. note::\r\n\r\n   and in strong admonitions, contents are not shifted by thick border (up to\r\n   some quite lower limit for the thickness).\r\n\r\n.. warning::\r\n\r\n   Attention!\r\n\r\n      warning, caution, attention, danger and error share the same settings.\r\n   \r\n      note, hint, important, tip, also share the same settings.\r\n\r\n   .. raw:: latex\r\n\r\n      \\setlength{\\sphinxNoteRuleThickness}{1pt}\r\n\r\n   .. note::\r\n\r\n      It would be nice to have options to these various admonition directives\r\n      to allow to set the parameters on a one shot basis. \r\n\r\n\r\n   .. note::\r\n\r\n      Or perhaps it would be more important to be able to distinguish more the\r\n      various types of admonitions.\r\n\r\n   .. raw:: latex\r\n\r\n      \\setlength{\\sphinxWarningBorderThickness}{2.5pt}\r\n      \\definecolor{sphinxWarningBackgroundColor}{named}{green}\r\n      \\definecolor{sphinxWarningBorderColor}{named}{black}\r\n\r\n   .. caution::\r\n\r\n      proceed cautiously.\r\n\r\n```\r\nI get:\r\n![capture d ecran 2016-06-13 a 20 04 45](https://cloud.githubusercontent.com/assets/2589111/16017864/2638dc86-31a2-11e6-9e78-5f0dad498175.png)\r\n"}}
{"actor":{"display_login":"jfbu"}}