[latex3-commits] [latex3/latex3] main: Reindent l3backend codes (82b0b1e87)

github at latex-project.org github at latex-project.org
Sun Dec 17 20:29:01 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/82b0b1e870f1fd3be34cd768e401343c2085fc86

>---------------------------------------------------------------

commit 82b0b1e870f1fd3be34cd768e401343c2085fc86
Author: Yukai Chou <muzimuzhi at gmail.com>
Date:   Fri Dec 15 06:19:40 2023 +0800

    Reindent l3backend codes


>---------------------------------------------------------------

82b0b1e870f1fd3be34cd768e401343c2085fc86
 l3backend/l3backend-box.dtx      | 10 ++++-----
 l3backend/l3backend-color.dtx    | 48 ++++++++++++++++++++--------------------
 l3backend/l3backend-draw.dtx     | 22 +++++++++---------
 l3backend/l3backend-graphics.dtx | 10 ++++-----
 l3backend/l3backend-header.dtx   |  4 ++--
 l3backend/l3backend-opacity.dtx  | 20 ++++++++---------
 l3backend/l3backend-pdf.dtx      | 30 ++++++++++++-------------
 7 files changed, 72 insertions(+), 72 deletions(-)

diff --git a/l3backend/l3backend-box.dtx b/l3backend/l3backend-box.dtx
index ee1a7372d..6c5018f62 100644
--- a/l3backend/l3backend-box.dtx
+++ b/l3backend/l3backend-box.dtx
@@ -118,9 +118,9 @@
           { \fp_eval:n { round ( -(#2) , 5 ) } } ~
         rotate
       }
-   \__kernel_backend_align_end:
-   \box_use:N #1
-   \__kernel_backend_scope_end:
+    \__kernel_backend_align_end:
+    \box_use:N #1
+    \__kernel_backend_scope_end:
   }
 %    \end{macrocode}
 % \end{macro}
@@ -217,8 +217,8 @@
         \c_space_tl
         \fp_use:N \l_@@_backend_cos_fp
       }
-   \box_use:N #1
-   \__kernel_backend_scope_end:
+    \box_use:N #1
+    \__kernel_backend_scope_end:
   }
 \fp_new:N \l_@@_backend_cos_fp
 \fp_new:N \l_@@_backend_sin_fp
diff --git a/l3backend/l3backend-color.dtx b/l3backend/l3backend-color.dtx
index a1d5a3219..3b646e362 100644
--- a/l3backend/l3backend-color.dtx
+++ b/l3backend/l3backend-color.dtx
@@ -467,9 +467,9 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_backend_separation_init:nnn #1#2#3
   {
-   \exp_args:Ne \@@_backend_separation_init:nnnn
-     { \@@_backend_separation_init_count:n {#2} }
-     {#1} {#2} {#3}
+    \exp_args:Ne \@@_backend_separation_init:nnnn
+      { \@@_backend_separation_init_count:n {#2} }
+      {#1} {#2} {#3}
   }
 \cs_new:Npn \@@_backend_separation_init_count:n #1
   { \int_eval:n { 0 \@@_backend_separation_init_count:w #1 ~ \s_@@_stop } }
@@ -531,15 +531,15 @@
 %    \begin{macrocode}
 \cs_new:Npn \@@_backend_separation_init:nw #1#2 ~ #3 ~ #4 \s_@@_stop
   {
-     #2 ~ #3 ~
-     2 ~ index ~ 2 ~ index ~ lt ~
-       { ~ pop ~ exch ~ pop ~ } ~
-       { ~
-         2 ~ index ~ 1 ~ index ~ gt ~
-           { ~ exch ~ pop ~ exch ~ pop ~ } ~
-           { ~ pop ~ pop ~ } ~
-         ifelse ~
-       }
+    #2 ~ #3 ~
+    2 ~ index ~ 2 ~ index ~ lt ~
+      { ~ pop ~ exch ~ pop ~ } ~
+      { ~
+        2 ~ index ~ 1 ~ index ~ gt ~
+          { ~ exch ~ pop ~ exch ~ pop ~ } ~
+          { ~ pop ~ pop ~ } ~
+        ifelse ~
+      }
     ifelse ~
     #1 ~ 1 ~ roll ~
     \tl_if_blank:nF {#4}
@@ -795,9 +795,9 @@
           {
             /Lab ~
             <<
-             /WhitePoint ~
-               [ \tl_use:c { c_@@_model_whitepoint_CIELAB_ #1 _tl } ]
-             /Range ~ [ \c_@@_model_range_CIELAB_tl ]
+              /WhitePoint ~
+                [ \tl_use:c { c_@@_model_whitepoint_CIELAB_ #1 _tl } ]
+              /Range ~ [ \c_@@_model_range_CIELAB_tl ]
             >>
           }
       }
@@ -841,7 +841,7 @@
             ]
         }
         { {#3} }
-     }
+      }
     \use:e
       {
         \pdf_object_new:n { color \int_use:N \g_@@_model_int }
@@ -1207,14 +1207,14 @@
     \__kernel_backend_scope:n
       {
         stroke =
-         "
-           rgb
-             (
-               #1 \c_percent_str ,
-               #2 \c_percent_str ,
-               #3 \c_percent_str
-             )
-         "
+          "
+            rgb
+              (
+                #1 \c_percent_str ,
+                #2 \c_percent_str ,
+                #3 \c_percent_str
+              )
+          "
       }
   }
 %    \end{macrocode}
diff --git a/l3backend/l3backend-draw.dtx b/l3backend/l3backend-draw.dtx
index cf4a95f9e..d7b531f86 100644
--- a/l3backend/l3backend-draw.dtx
+++ b/l3backend/l3backend-draw.dtx
@@ -141,11 +141,11 @@
   }
 \cs_new_protected:Npn \@@_backend_rectangle:nnnn #1#2#3#4
   {
-     \@@_backend_literal:e
-       {
-         \dim_to_decimal_in_bp:n {#4} ~ \dim_to_decimal_in_bp:n {#3} ~
-         \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
-         moveto~dup~0~rlineto~exch~0~exch~rlineto~neg~0~rlineto~closepath
+    \@@_backend_literal:e
+      {
+        \dim_to_decimal_in_bp:n {#4} ~ \dim_to_decimal_in_bp:n {#3} ~
+        \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
+        moveto~dup~0~rlineto~exch~0~exch~rlineto~neg~0~rlineto~closepath
       }
   }
 \cs_new_protected:Npn \@@_backend_curveto:nnnnnn #1#2#3#4#5#6
@@ -157,7 +157,7 @@
         \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~
         curveto
       }
- }
+  }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -451,10 +451,10 @@
         \dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~
         c
       }
- }
+  }
 \cs_new_protected:Npn \@@_backend_rectangle:nnnn #1#2#3#4
   {
-     \@@_backend_literal:e
+    \@@_backend_literal:e
       {
         \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
         \dim_to_decimal_in_bp:n {#3} ~ \dim_to_decimal_in_bp:n {#4} ~
@@ -698,7 +698,7 @@
           { \fp_eval:n { atand ( #3 , #2 ) } }
           { \fp_eval:n { atand ( #4 , #1 ) } }
       }
-         #5
+        #5
   }
 \cs_new_protected:Npn \@@_backend_cm_decompose_auxii:nnnnN #1#2#3#4#5
   {
@@ -1022,8 +1022,8 @@
   {
     \__kernel_backend_scope:n
       {
-       transform =
-         " matrix ( #1 , #2 , #3 , #4 , 0pt , 0pt ) "
+        transform =
+          " matrix ( #1 , #2 , #3 , #4 , 0pt , 0pt ) "
       }
   }
 %    \end{macrocode}
diff --git a/l3backend/l3backend-graphics.dtx b/l3backend/l3backend-graphics.dtx
index 5136e3ab3..4c1f46d67 100644
--- a/l3backend/l3backend-graphics.dtx
+++ b/l3backend/l3backend-graphics.dtx
@@ -320,7 +320,7 @@
               }
           }
           {#1}
-     }
+      }
     \cs_new_eq:NN \@@_backend_getbb_ps:n \@@_backend_getbb_eps:n
     \cs_new_protected:Npn \@@_backend_getbb_eps:nn #1#2
       {
@@ -382,7 +382,7 @@
   {
     \seq_set_from_clist:Nn \l_graphics_search_ext_seq
       { .pdf , .eps , .ps , .png , .jpg , .jpeg , .bmp }
-   }
+  }
 %    \end{macrocode}
 % \end{variable}
 %
@@ -481,7 +481,7 @@
         \tl_if_empty:NF \l_@@_decodearray_str
           { :D \l_@@_decodearray_str }
         \bool_if:NT \l_@@_interpolate_bool
-           { :I }
+          { :I }
       }
       {#1} {#2}
   }
@@ -768,7 +768,7 @@
                       { \@@_backend_getbb_svg_auxiv:Nw #2 }
                       { \@@_backend_getbb_svg_auxv:Nw #2 }
                   }
-               }
+              }
                 ##2 \s_@@_stop
           }
       }
@@ -777,7 +777,7 @@
         \@@_backend_getbb_svg_auxii:w #3
           \tl_to_str:n {#1} = \tl_to_str:n {#1} =
           \s_@@_stop
-       }
+      }
   }
 \cs_new_protected:Npn \@@_backend_getbb_svg_auxii:w { }
 \cs_new_protected:Npn \@@_backend_getbb_svg_auxiii:Nw #1 ' #2 ' #3 \s_@@_stop
diff --git a/l3backend/l3backend-header.dtx b/l3backend/l3backend-header.dtx
index 7768b1c9b..5c8a8bda1 100644
--- a/l3backend/l3backend-header.dtx
+++ b/l3backend/l3backend-header.dtx
@@ -219,8 +219,8 @@ false setglobal
       pdf.dest.y pdf.tmpc mul add
       pdf.dev.x add
     pdf.dest.x pdf.tmpb mul
-     pdf.dest.y pdf.tmpd mul add
-     pdf.dev.y add
+      pdf.dest.y pdf.tmpd mul add
+      pdf.dev.y add
   }
     def
 %    \end{macrocode}
diff --git a/l3backend/l3backend-opacity.dtx b/l3backend/l3backend-opacity.dtx
index 6a747a0e8..0f1fc479c 100644
--- a/l3backend/l3backend-opacity.dtx
+++ b/l3backend/l3backend-opacity.dtx
@@ -169,10 +169,10 @@
 %   same as color.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_backend_select:n #1
- {
-   \exp_args:Ne \@@_backend_select_aux:n
-     { \fp_eval:n { min(max(0,#1),1) } }
- }
+  {
+    \exp_args:Ne \@@_backend_select_aux:n
+      { \fp_eval:n { min(max(0,#1),1) } }
+  }
 \cs_new_protected:Npn \@@_backend_select_aux:n #1
   {
     \tl_set:Nn \l_@@_backend_fill_tl {#1}
@@ -196,15 +196,15 @@
     \cs_gset_protected:Npn \@@_backend_select_aux:n #1 { }
   }
 \cs_new_protected:Npn \@@_backend_reset:
- {
+  {
 %<*dvipdfmx|xetex>
-   \__kernel_backend_literal_pdf:n
+    \__kernel_backend_literal_pdf:n
       { /opacity1 ~ gs }
 %</dvipdfmx|xetex>
 %<*luatex|pdftex>
     \__kernel_color_backend_stack_pop:n \c_@@_backend_stack_int
 %</luatex|pdftex>
- }
+  }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -240,12 +240,12 @@
           { opacity.stroke #1 }
           { << /CA ~ #2 >> }
 %<*dvipdfmx|xetex>
-    \__kernel_backend_literal_pdf:n
+        \__kernel_backend_literal_pdf:n
 %</dvipdfmx|xetex>
 %<*luatex|pdftex>
-    \__kernel_color_backend_stack_push:nn \c_@@_backend_stack_int
+        \__kernel_color_backend_stack_push:nn \c_@@_backend_stack_int
 %</luatex|pdftex>
-         { /opacity.fill #1 ~ gs /opacity.stroke #2 ~ gs }
+          { /opacity.fill #1 ~ gs /opacity.stroke #2 ~ gs }
         \group_insert_after:N \@@_backend_reset:
       }
   }
diff --git a/l3backend/l3backend-pdf.dtx b/l3backend/l3backend-pdf.dtx
index 1dc579707..bd694acc2 100644
--- a/l3backend/l3backend-pdf.dtx
+++ b/l3backend/l3backend-pdf.dtx
@@ -470,9 +470,9 @@
     \hbox_set:Nn \l_@@_backend_model_box { Gg }
     \exp_args:Ne \@@_backend_link_outerbox:n
       {
-         \int_if_odd:nTF { \value { page } }
-           { \oddsidemargin }
-           { \evensidemargin }
+        \int_if_odd:nTF { \value { page } }
+          { \oddsidemargin }
+          { \evensidemargin }
       }
     \box_move_down:nn { \box_dp:N \l_@@_backend_content_box }
       { \hbox:n { \__kernel_backend_postscript:n { pdf.save.linkll } } }
@@ -711,7 +711,7 @@
         \__kernel_backend_literal_postscript:n
           {
             /setdistillerparams ~ where
-             { pop << /CompressPages ~ false >> setdistillerparams }
+              { pop << /CompressPages ~ false >> setdistillerparams }
             if
           }
       }
@@ -723,7 +723,7 @@
         \__kernel_backend_literal_postscript:n
           {
             /setdistillerparams ~ where
-             { pop << /CompressStreams ~ false >> setdistillerparams }
+              { pop << /CompressStreams ~ false >> setdistillerparams }
             if
           }
       }
@@ -1336,7 +1336,7 @@
 % \begin{macro}{\@@_backend_object_last:}
 %    \begin{macrocode}
 \cs_new:Npn \@@_backend_object_last:
- { @pdf.obj \int_use:N \g_@@_backend_object_int }
+  { @pdf.obj \int_use:N \g_@@_backend_object_int }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1379,7 +1379,7 @@
 % \begin{macro}{\@@_backend_annotation_last:}
 %    \begin{macrocode}
 \cs_new:Npn \@@_backend_annotation_last:
- { @pdf.obj \int_use:N \g_@@_backend_annotation_int }
+  { @pdf.obj \int_use:N \g_@@_backend_annotation_int }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1405,14 +1405,14 @@
     \exp_not:N \int_gincr:N \exp_not:N  \g_@@_backend_link_int
     \@@_backend:e
       {
-         bann ~
-         @pdf.lnk
-         \exp_not:N \int_use:N \exp_not:N  \g_@@_backend_link_int
-         \c_space_tl
-         <<
-           /Type /Annot
-           #1
-         >>
+        bann ~
+        @pdf.lnk
+        \exp_not:N \int_use:N \exp_not:N  \g_@@_backend_link_int
+        \c_space_tl
+        <<
+          /Type /Annot
+          #1
+        >>
       }
   }
 \cs_new_protected:Npn \@@_backend_link_end:





More information about the latex3-commits mailing list.