SHARE
TWEET

Untitled

a guest Jul 17th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. documentclass{article}
  2. usepackage{lipsum}% http://ctan.org/pkg/lipsum
  3. begin{document}
  4. lipsum[1]
  5.  
  6. hfillbegin{minipage}{dimexprtextwidth-3cm}
  7. lipsum[2]
  8. xdeftpd{theprevdepth}
  9. end{minipage}
  10.  
  11. prevdepthtpdlipsum[3]
  12. end{document}
  13.    
  14. documentclass{article}
  15. usepackage{lipsum}% http://ctan.org/pkg/lipsum
  16. begin{document}
  17. lipsum[1]
  18.  
  19. setlength{leftskip}{3cm}
  20.  
  21. lipsum[2]
  22.  
  23. setlength{leftskip}{0pt}
  24.  
  25. lipsum[3]
  26. end{document}
  27.    
  28. documentclass{report}
  29.  
  30. usepackage{lipsum}       % for sample text
  31. usepackage{changepage}   % for the adjustwidth environment
  32.  
  33. begin{document}
  34.  
  35. lipsum[1]
  36.  
  37. begin{adjustwidth}{2cm}{}
  38. lipsum[1]
  39. end{adjustwidth}
  40. end{document}
  41.    
  42. newenvironment{myenv}{begin{adjustwidth}{2cm}{}}{end{adjustwidth}}
  43.    
  44. begin{myenv}
  45. lipsum[1]
  46. end{myenv}
  47.    
  48. newenvironment{myenv}[1][2cm]{begin{adjustwidth}{#1}{}}{end{adjustwidth}}
  49.    
  50. % Option 1: some other class and scrextend
  51. % documentclass{article}
  52. % usepackage{scrextend}
  53. % end option 1
  54.  
  55. % Option 2: use a KOMA class
  56. documentclass{scrartcl}
  57. % end, option 2
  58.  
  59. usepackage{lipsum}
  60. begin{document}
  61. lipsum[1]
  62. begin{addmargin}[2cm]{0cm}
  63. lipsum[2]
  64. end{addmargin}
  65. begin{addmargin}{2cm}
  66. lipsum[3]
  67. end{addmargin}
  68. lipsum[4]
  69. end{document}
  70.    
  71. startnarrower[left=2cm, right=3cm]
  72.     There was a sigh in the air that grew to a mutter, and a mutter that
  73.     grew to a roar, and a roar that passed all sense of hearing, and the
  74.     hillside on which the villagers stood was hit in the darkness, and
  75.     rocked to the blow.
  76. stopnarrower
  77.    
  78. % 2cm narrower on each side, 4cm in total
  79. startnarrower[middle=2cm]
  80.     Then a note as steady, deep, and true as the deep C of the organ
  81.     drowned everything for perhaps five minutes, while the very roots of the
  82.     pines quivered to it. It died away, and the sound of the rain falling on
  83.     miles of hard ground and grass changed to the muffled drum of water on
  84.     soft earth. That told its own tale.
  85. stopnarrower
  86.    
  87. documentclass{report}
  88. usepackage{lipsum}
  89.  
  90. begin{document}
  91.  
  92. lipsum[1]
  93.  
  94. parshape 1 2cm dimexprlinewidth-2cmrelax
  95. lipsum[1]
  96.  
  97. end{document}
  98.    
  99. documentclass{article}
  100. usepackage{lipsum}
  101. begin{document}
  102. lipsum[1]
  103. narrower
  104. lipsum[1]
  105. end{document}
  106.    
  107. defwider{%
  108.    advanceleftskip -parindent
  109.    advancerightskip -parindent}
  110.    
  111. documentclass{article}
  112. % http://river-valley.zeeba.tv/media/conferences/tug-2015/0302-Joseph-Wright/
  113. usepackage{xgalley}
  114. usepackage{kantlipsum}
  115.  
  116. ExplSyntaxOn
  117. cs_new_eq:NN SetAbsMargins galley_margins_set_absolute:nn % {<left margin>}{<right margin>}
  118. cs_new_eq:NN SetRelMargins galley_margins_set_relative:nn % {<left margin>}{<right margin>}
  119. ExplSyntaxOff
  120.  
  121. begin{document}
  122.  
  123. kant[1]
  124.  
  125. begingroup
  126. SetAbsMargins{3cm}{0pt}
  127.  
  128. kant[2]
  129. endgroup
  130.  
  131. kant[3]
  132.  
  133. end{document}
  134.    
  135. Something's wrong--perhaps a missing item
  136.    
  137. documentclass[a4paper,10pt]{article}
  138. usepackage[english]{babel}
  139. usepackage{blindtext}
  140. parindent0em
  141. parskipbaselineskip
  142. begin{document}
  143. blindtext
  144.  
  145. par
  146. begingroup
  147. leftskip4em
  148. rightskipleftskip
  149. blindtext
  150. par
  151. endgroup
  152.  
  153. blindtext
  154. end{document}
RAW Paste Data
Top