sohotcall

Barcode Interleaved 2 of 5 (ITF)

Jan 28th, 2020
208
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <style>
  2. html {font:10pt Times;}
  3. h1, h2, h3 {margin:0; padding:0;}
  4. p {margin:0; padding:0; text-indent:2.5rem;}
  5.  
  6. .formula {background:#80808080; text-align:center; padding:0.25rem;}
  7. .formula .bar {top:-0.15rem; position:relative; padding:0.1rem;}
  8. .formula .spc {bottom:-0.15rem; position:relative; padding:0.1rem;}
  9. .box {text-align:center;}
  10. .box .barn {background:black;width:0.5rem;display:inline-block;height:3rem;}
  11. .box .barw {background:black;width:1.5rem;display:inline-block;height:3rem;}
  12. .box .spcn {background:white;width:0.5rem;display:inline-block;height:3rem;}
  13. .box .spcw {background:white;width:1.5rem;display:inline-block;height:3rem;}
  14. ul {margin:0; padding:0 0 0 1rem;}
  15. </style>
  16. <h1>Barcode: Interleaved 2 of 5</h1>
  17. <p class="formula sum"><b>ITF =</b> <span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>n</span>
  18.     [
  19.     <span class=bar>b<sub>1</sub></span> <span class=spc>s<sub>1</sub></span>
  20.     <span class=bar>b<sub>2</sub></span> <span class=spc>s<sub>2</sub></span>
  21.     <span class=bar>b<sub>4</sub></span> <span class=spc>s<sub>4</sub></span>
  22.     <span class=bar>b<sub>7</sub></span> <span class=spc>s<sub>7</sub></span>
  23.     <span class=bar>b<sub>0</sub></span> <span class=spc>s<sub>0</sub></span>
  24.     ]*
  25.     <span class=bar>w</span><span class=spc>n</span><span class=bar>n</span></p>
  26. <h2>Opening</h2>
  27. <p>Opening adalah <span class=formula><span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>n</span></span>,
  28. yang berarti bar-narrow lalu space-narrow lalu bar-narrow lalu space-narrow.
  29. Bar artinya garis hitam, space artinya garis putih.
  30. Narrow artinya garis tipis, dan wide artinya garis tebal (wide tebalnya dua atau tiga kali lipat narrow).
  31. <h2>Data</h2>
  32. <p>Data adalah berupa digit dan banyak digitnya harus genap (zero padding mungkin diperlukan) karena mereka akan dikelompokkan sepasang-sepasang.
  33. Digit di posisi index genap (digit ke-1, ke-3, ke-5, ke-7, dst) menjadi bar (bagian
  34. <span class=formula><span class=bar>b<sub>1</sub></span><span class=spc>?</span><span class=bar>b<sub>2</sub></span><span class=spc>?</span><span class=bar>b<sub>4</sub></span><span class=spc>?</span><span class=bar>b<sub>7</sub></span><span class=spc>?</span><span class=bar>b<sub>0</sub></span><span class=spc>?</span></span>),
  35. sementara digit di posisi index ganjil (digit ke-2, ke-4, ke-6, ke-8, dst) menjadi space (bagian
  36. <span class=formula><span class=bar>?</span><span class=spc>s<sub>1</sub></span><span class=bar>?</span><span class=spc>s<sub>2</sub></span><span class=bar>?</span><span class=spc>s<sub>4</sub></span><span class=bar>?</span><span class=spc>s<sub>7</sub></span><span class=bar>?</span><span class=spc>s<sub>0</sub></span></span>).
  37. <p>Dari kelima buah bar (<span class=formula>b<sub>1</sub> b<sub>2</sub> b<sub>4</sub> b<sub>7</sub> b<sub>0</sub></span>)
  38. maupun kelima buah space (<span class=formula>s<sub>1</sub> s<sub>2</sub> s<sub>4</sub> s<sub>7</sub> s<sub>0</sub></span>)
  39. dari setiap digit tersebut, agar lebih mudah kita sebut saja mereka <span class=formula>x<sub>1</sub> x<sub>2</sub> x<sub>4</sub> x<sub>7</sub> x<sub>0</sub></span>,
  40. dua buah di antaranya selalu adalah wide dan tiga buah adalah narrow, sebagai berikut.</p>
  41. <ul>
  42.     <li>Digit 1 adalah <span class=formula>w n n n w</span> artinya <span class=formula>x<sub>1</sub></span> dan <span class=formula>x<sub>0</sub></span> wide, sisanya narrow. (1+0=1, check!)<br/>
  43.     <li>Digit 2 adalah <span class=formula>n w n n w</span> artinya <span class=formula>x<sub>2</sub></span> dan <span class=formula>x<sub>0</sub></span> wide, sisanya narrow. (2+0=2, check!)<br/>
  44.     <li>Digit 3 adalah <span class=formula>w w n n n</span> artinya <span class=formula>x<sub>1</sub></span> dan <span class=formula>x<sub>2</sub></span> wide, sisanya narrow. (1+2=3, check!)<br/>
  45.     <li>Digit 4 adalah <span class=formula>n n w n w</span> artinya <span class=formula>x<sub>4</sub></span> dan <span class=formula>x<sub>0</sub></span> wide, sisanya narrow. (4+0=4, check!)<br/>
  46.     <li>Digit 5 adalah <span class=formula>w n w n n</span> artinya <span class=formula>x<sub>1</sub></span> dan <span class=formula>x<sub>4</sub></span> wide, sisanya narrow. (1+4=5, check!)<br/>
  47.     <li>Digit 6 adalah <span class=formula>n w w n n</span> artinya <span class=formula>x<sub>2</sub></span> dan <span class=formula>x<sub>4</sub></span> wide, sisanya narrow. (2+4=6, check!)<br/>
  48.     <li>Digit 7 adalah <span class=formula>n n n w w</span> artinya <span class=formula>x<sub>7</sub></span> dan <span class=formula>x<sub>0</sub></span> wide, sisanya narrow. (7+0=7, check!)<br/>
  49.     <li>Digit 8 adalah <span class=formula>w n n w n</span> artinya <span class=formula>x<sub>1</sub></span> dan <span class=formula>x<sub>7</sub></span> wide, sisanya narrow. (1+7=8, check!)<br/>
  50.     <li>Digit 9 adalah <span class=formula>n w n w n</span> artinya <span class=formula>x<sub>2</sub></span> dan <span class=formula>x<sub>7</sub></span> wide, sisanya narrow. (2+7=9, check!)<br/>
  51.     <li>Digit 0 adalah <span class=formula>n n w w n</span> artinya <span class=formula>x<sub>4</sub></span> dan <span class=formula>x<sub>7</sub></span> wide, sisanya narrow. (Hm, pokoknya 4+7=0).
  52. </ul>
  53. <h2>Closing</h2>
  54. <p>Closing adalah <span class=formula><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span></span> artinya bar-wide lalu space-narrow lalu bar-narrow.
  55. <h2>Contoh</h2>
  56. <p>Misal datanya "2019". Komponen barcodenya adalah {opening} {digit 2 index genap (bar), digit 0 index ganjil (space)} {digit 1 index genap (bar), digit 9 index ganjil (space)} {closing}.</p>
  57. <ul>
  58.     <li>{opening} = <span class=formula><span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>n</span></span><br/>
  59.     <li>{digit 2 index genap (bar), digit 0 index ganjil (space)}<br/>
  60.         = <span class=formula><span class=bar>n</span><span class=spc>?</span><span class=bar>w</span><span class=spc>?</span><span class=bar>n</span><span class=spc>?</span><span class=bar>n</span><span class=spc>?</span><span class=bar>w</span><span class=spc>?</span></span>
  61.         +
  62.         <span class=formula><span class=bar>?</span><span class=spc>n</span><span class=bar>?</span><span class=spc>n</span><span class=bar>?</span><span class=spc>w</span><span class=bar>?</span><span class=spc>w</span><span class=bar>?</span><span class=spc>n</span></span>
  63.         =
  64.         <span class=formula><span class=bar>n</span><span class=spc>n</span><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span><span class=spc>w</span><span class=bar>n</span><span class=spc>w</span><span class=bar>w</span><span class=spc>n</span></span><br/>
  65.     <li>{digit 1 index genap (bar), digit 9 index ganjil (space)}<br/>
  66.         = <span class=formula><span class=bar>w</span><span class=spc>?</span><span class=bar>n</span><span class=spc>?</span><span class=bar>n</span><span class=spc>?</span><span class=bar>n</span><span class=spc>?</span><span class=bar>w</span><span class=spc>?</span></span>
  67.         +
  68.         <span class=formula><span class=bar>?</span><span class=spc>n</span><span class=bar>?</span><span class=spc>w</span><span class=bar>?</span><span class=spc>n</span><span class=bar>?</span><span class=spc>w</span><span class=bar>?</span><span class=spc>n</span></span>
  69.         =
  70.         <span class=formula><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span><span class=spc>w</span><span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>w</span><span class=bar>w</span><span class=spc>n</span></span><br/>
  71.     <li>{closing} = <span class=formula><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span></span><br/>
  72. </ul>
  73. <p>Jadi barcodenya adalah <span class=formula><span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>n</span><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span><span class=spc>w</span><span class=bar>n</span><span class=spc>w</span><span class=bar>w</span><span class=spc>n</span><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span><span class=spc>w</span><span class=bar>n</span><span class=spc>n</span><span class=bar>n</span><span class=spc>w</span><span class=bar>w</span><span class=spc>n</span><span class=bar>w</span><span class=spc>n</span><span class=bar>n</span></span>
  74. artinya bar-narrow lalu space-narrow lalu bar-narrow dst bar-wide lalu space-narrow lalu bar-narrow.<br/>
  75. <div class=box><span class=barn></span><span class=spcn></span><span class=barn></span><span class=spcn></span><span class=barn></span><span class=spcn></span><span class=barw></span><span class=spcn></span><span class=barn></span><span class=spcw></span><span class=barn></span><span class=spcw></span><span class=barw></span><span class=spcn></span><span class=barw></span><span class=spcn></span><span class=barn></span><span class=spcw></span><span class=barn></span><span class=spcn></span><span class=barn></span><span class=spcw></span><span class=barw></span><span class=spcn></span><span class=barw></span><span class=spcn></span><span class=barn></span></div>
  76. - Gung Sukma, 2020.
RAW Paste Data