Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Mail + row, column and corner separators
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Boussicault committed May 2, 2014
1 parent b38e37a commit 5b3a35d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/sage/categories/graphic_outputs_for_tableaux.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This file define some tools to obtain ascii and latex outputs for any tableaux.
"""
#*****************************************************************************
# Copyright (C) 2014 Adrien Boussicault <bousica@labri.fr>
# Copyright (C) 2014 Adrien Boussicault <boussica@labri.fr>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/object_with_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This file define the categorie of Objects with options.
"""
#*****************************************************************************
# Copyright (C) 2014 Adrien Boussicault <bousica@labri.fr>
# Copyright (C) 2014 Adrien Boussicault <boussica@labri.fr>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down
30 changes: 17 additions & 13 deletions src/sage/misc/graphic_tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This file define some tools to obtain ascii and latex outputs for any tableaux.
"""
#*****************************************************************************
# Copyright (C) 2014 Adrien Boussicault <bousica@labri.fr>
# Copyright (C) 2014 Adrien Boussicault <boussica@labri.fr>
#
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
Expand Down Expand Up @@ -402,26 +402,30 @@ def draw_a_box( h, w ):
)

#we draw the borders

row_sep = self.ascii_options['row_separator']
col_sep = self.ascii_options['column_separator']
corner_sep = self.ascii_options['corner_separator']
if self.separators()[h][w][0]:
for w1 in range( pos_no[1]-1, pos_se[1]+1 ):
picture[ pos_no[0]-1 ][ w1 ] = '-'
picture[ pos_no[0]-1 ][ pos_no[1]-1 ] = '+'
picture[ pos_no[0]-1 ][ pos_se[1] ] = '+'
picture[ pos_no[0]-1 ][ w1 ] = row_sep
picture[ pos_no[0]-1 ][ pos_no[1]-1 ] = corner_sep
picture[ pos_no[0]-1 ][ pos_se[1] ] = corner_sep
if self.separators()[h][w][1]:
for h1 in range( pos_no[0]-1, pos_se[0]+1 ):
picture[ h1 ][ pos_se[1] ] = '|'
picture[ pos_se[0] ][ pos_se[1] ] = '+'
picture[ pos_no[0]-1 ][ pos_se[1] ] = '+'
picture[ h1 ][ pos_se[1] ] = col_sep
picture[ pos_se[0] ][ pos_se[1] ] = corner_sep
picture[ pos_no[0]-1 ][ pos_se[1] ] = corner_sep
if self.separators()[h][w][2]:
for w1 in range( pos_no[1]-1, pos_se[1]+1 ):
picture[ pos_se[0] ][ w1 ] = '-'
picture[ pos_se[0] ][ pos_no[1]-1 ] = '+'
picture[ pos_se[0] ][ pos_se[1] ] = '+'
picture[ pos_se[0] ][ w1 ] = row_sep
picture[ pos_se[0] ][ pos_no[1]-1 ] = corner_sep
picture[ pos_se[0] ][ pos_se[1] ] = corner_sep
if self.separators()[h][w][3]:
for h1 in range( pos_no[0]-1, pos_se[0]+1 ):
picture[ h1 ][ pos_no[1]-1 ] = '|'
picture[ pos_no[0]-1 ][ pos_no[1]-1 ] = '+'
picture[ pos_se[0] ][ pos_no[1]-1 ] = '+'
picture[ h1 ][ pos_no[1]-1 ] = col_sep
picture[ pos_no[0]-1 ][ pos_no[1]-1 ] = corner_sep
picture[ pos_se[0] ][ pos_no[1]-1 ] = corner_sep

# We draw all the boxes
for h in range( self.height() ):
Expand Down

0 comments on commit 5b3a35d

Please sign in to comment.