Difference between revisions of "Command/showjustification"

From Wiki
Jump to navigation Jump to search
Line 1: Line 1:
== Description ==
+
{{Reference
 +
|name=showjustification
 +
|attributes=
 +
}}
  
Show justification in color.{{since|2012|text=nov 2012}}
+
== [[Help:Reference|Syntax]] ==
 +
<table cellspacing="4" cellpadding="2" class="cmd">
 +
  <tr>
 +
    <td colspan="2" class="cmd">\showjustification<!--
 +
--></td>
 +
  </tr>
 +
</table>
 +
 
 +
== Description ==
 +
Show line squashing/stretching in color.{{since|2012|text=nov 2012}}
  
 
* blue: natural width is larger than hsize
 
* blue: natural width is larger than hsize
Line 8: Line 20:
 
* cyan: natural width is smaller than hsize (raggedleft)
 
* cyan: natural width is smaller than hsize (raggedleft)
 
* yellow: natural width is smaller than hsize (raggedcenter)
 
* yellow: natural width is smaller than hsize (raggedcenter)
* red: probably bad news
+
* red: natural width is larger than hsize; overfull hbox
  
 
== Example ==
 
== Example ==
 
 
<texcode>
 
<texcode>
 +
\setuppapersize[A5]
 +
\setuplayout[
 +
    topspace=1cm,
 +
    height=19cm,
 +
    ]
 
\starttext
 
\starttext
  
    \showjustification
+
    \showjustification
  
    \showframe
+
    \showframe
  
    {\notragged    \input ward \blank}
+
    {\notragged    \input ward \blank}
    {\raggedright  \input ward \blank}
+
    {\raggedright  \input ward \blank}
    {\raggedleft  \input ward \blank}
+
    {\raggedleft  \input ward \blank}
    {\raggedcenter \input ward \blank}
+
    {\raggedcenter \input ward \blank}
  
    {\hsize1cm \notragged x x xxxxxx xxxxxxxxxxxxxxxxxxx\par} \blank
+
    The x lines have \tex{hsize} 1cm:\par
 +
    {\hsize1cm \notragged x x xxxxxx xxxxxxxxxxxxxxxxxxx\par} \blank
  
    \framed[width=10cm,align=middle]{test}
+
    \framed[width=10cm,align=middle]{test}
  
\stoptext
+
\stoptext
 
</texcode>
 
</texcode>
  
[[Category:Commands]]
+
[[File:Showjustification.png]]
 +
 
 +
== See also ==
 +
* {{cmd|version}}
 +
* {{src|trac-jus.lua}}
 +
 
 +
== Help from ConTeXt-Mailinglist/Forum ==
 +
All issues with:
 +
{{Forum|showjustification}}
 +
 
 
[[Category:Command/Debugging]]
 
[[Category:Command/Debugging]]
 +
[[Category:Command/MkIV only]]

Revision as of 23:26, 28 November 2012

\showjustification

Syntax

\showjustification

Description

Show line squashing/stretching in color.Template:since

  • blue: natural width is larger than hsize
  • green: natural width is smaller than hsize
  • magenta: natural width is smaller than hsize (raggedright)
  • cyan: natural width is smaller than hsize (raggedleft)
  • yellow: natural width is smaller than hsize (raggedcenter)
  • red: natural width is larger than hsize; overfull hbox

Example

\setuppapersize[A5]
\setuplayout[
    topspace=1cm,
    height=19cm,
    ]
\starttext

    \showjustification

    \showframe

    {\notragged    \input ward \blank}
    {\raggedright  \input ward \blank}
    {\raggedleft   \input ward \blank}
    {\raggedcenter \input ward \blank}

    The x lines have \tex{hsize} 1cm:\par
    {\hsize1cm \notragged x x xxxxxx xxxxxxxxxxxxxxxxxxx\par} \blank

    \framed[width=10cm,align=middle]{test}

\stoptext

Showjustification.png

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: